hash-threshold 8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-4
SELECT DISTINCT - 0 DIV - cor0.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-4
SELECT DISTINCT - 0 / - cor0.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
0

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

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

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

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

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

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

query I rowsort
SELECT + tab1.col2 AS col2 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY tab1.col2
----
45
71
8

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 col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-20
SELECT 3 DIV + 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-20
SELECT 3 / + 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 52 * cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2295
3621
408

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

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

query I rowsort
SELECT DISTINCT - ( 96 ) + 43 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1128
-1730
-3493

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

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

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

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

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-39
SELECT cor0.col1 + cor0.col1 / + 86 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

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

query I rowsort
SELECT DISTINCT 52 - 46 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6

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

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

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

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

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

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

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

query I rowsort
SELECT + + tab0.col2 + + 94 AS col2 FROM tab0 GROUP BY tab0.col2
----
118
132
173

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-60
SELECT DISTINCT + 71 DIV + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-60
SELECT DISTINCT + 71 / + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
2
3

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

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

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

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

query I rowsort
SELECT - tab2.col2 + 19 AS col1 FROM tab2 GROUP BY tab2.col2
----
-39
-60
-68

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

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

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

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

query I rowsort
SELECT + tab2.col1 * tab2.col1 + - tab2.col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
1640
3422
3660

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

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

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

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

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

query I rowsort
SELECT cor0.col1 * + cor0.col2 + + cor0.col1 * + col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
5060
5814
84

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

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

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

query I rowsort
SELECT ALL + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - NULLIF ( 26, - col1 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-26
-26
-26

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 29 * + 87 FROM tab2 GROUP BY tab2.col2
----
2523
2523
2523

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-97
SELECT DISTINCT - 52 DIV 45 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-97
SELECT DISTINCT - 52 / 45 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-1

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

query I rowsort
SELECT tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL <> NULL
----

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

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

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

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

query I rowsort
SELECT 56 * 84 FROM tab1 cor0 GROUP BY cor0.col0
----
4704
4704
4704

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 * - 52 col0 FROM tab2 GROUP BY col2
----
-3016
-4108
-4524

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * 98 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
2156
2744
8036

query I rowsort
SELECT + tab1.col0 * + 24 FROM tab1 GROUP BY tab1.col0
----
1968
528
672

query I rowsort
SELECT 98 * + tab1.col1 FROM tab1 GROUP BY col1
----
4312
5586
588

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, cor0.col2
----
1849
676
6889

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-116
SELECT cor0.col0 DIV + 99 FROM tab0 cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-116
SELECT cor0.col0 / + 99 FROM tab0 cor0 GROUP BY col0
----
0
0
0

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-119
SELECT DISTINCT - tab2.col1 DIV - ( + 73 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-119
SELECT DISTINCT - tab2.col1 / - ( + 73 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( tab1.col2, 3, tab1.col1 ) FROM tab1 GROUP BY col2
----
45
71
8

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-124
SELECT DISTINCT cor0.col0 * COALESCE ( cor0.col0 DIV - cor0.col1, - col1 * cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
-66
-82
0

skipif mysql # not compatible
query I rowsort label-124
SELECT DISTINCT cor0.col0 * COALESCE ( cor0.col0 / - cor0.col1, - col1 * cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
-66
-82
0

query I rowsort
SELECT DISTINCT + cor0.col2 * 49 FROM tab0 AS cor0 GROUP BY col2
----
1176
1862
3871

onlyif mysql # DIV for integer division: 
query I rowsort label-126
SELECT ALL 88 DIV 72 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

skipif mysql # not compatible
query I rowsort label-126
SELECT ALL 88 / 72 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

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

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

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

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

query I rowsort
SELECT ALL 28 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1204
2324
728

query I rowsort
SELECT DISTINCT tab2.col1 * + 86 FROM tab2 GROUP BY tab2.col1
----
3526
5074
5246

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col2 AS col0 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 ALL 5 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5
5
5

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

query I rowsort
SELECT ALL + cor0.col0 * - 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2002
-3311
-6391

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-147
SELECT DISTINCT ( 58 ) DIV - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-147
SELECT DISTINCT ( 58 ) / - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-1
0

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

query I rowsort
SELECT + + tab2.col2 * 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 + tab0.col0 * - tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 + 95 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1754
-581
-6794

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

query I rowsort
SELECT + 93 + tab1.col0 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
577
6817
877

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

query I rowsort
SELECT - + 32 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1440
-2272
-256

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-166
SELECT + ( NULLIF ( cor0.col2, cor0.col0 ) ) DIV - cor0.col0 + + 66 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
61
66
66

skipif mysql # not compatible
query I rowsort label-166
SELECT + ( NULLIF ( cor0.col2, cor0.col0 ) ) / - cor0.col0 + + 66 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
61
66
66

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NULL
----
164
44
56

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

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

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

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

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

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

query I rowsort
SELECT cor0.col1 * col0 + COALESCE ( cor0.col0, + cor0.col1 + - cor0.col1 * cor0.col1, cor0.col0 - NULLIF ( 15, cor0.col1 * - cor0.col1 ) ) * + col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
10332
2380
616

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

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

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

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

query I rowsort
SELECT ALL + tab1.col0 + 26 AS col0 FROM tab1 GROUP BY col0
----
108
48
54

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

query I rowsort
SELECT DISTINCT + tab1.col0 * - 34 AS col0 FROM tab1 GROUP BY tab1.col0
----
-2788
-748
-952

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

query I rowsort
SELECT + cor1.col0 + cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
182
184
30

query I rowsort
SELECT 60 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
118
139
147

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-201
SELECT DISTINCT + 86 DIV + 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7

skipif mysql # not compatible
query I rowsort label-201
SELECT DISTINCT + 86 / + 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 + + col1 * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-206
SELECT DISTINCT + tab1.col0 * + CAST( 25 * 87 AS SIGNED ) col0 FROM tab1 GROUP BY tab1.col0
----
178350
47850
60900

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-206
SELECT DISTINCT + tab1.col0 * + CAST ( 25 * 87 AS INTEGER ) col0 FROM tab1 GROUP BY tab1.col0
----
178350
47850
60900

query I rowsort
SELECT ALL + 79 * 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3318
3318
3318

query I rowsort
SELECT DISTINCT 76 * + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
3116
4484
4636

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

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

query I rowsort
SELECT + cor0.col0 * + 68 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1496
1904
5576

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

query I rowsort
SELECT ALL + tab0.col1 * - tab0.col1 + 33 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6528
33

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

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col0 * - 37 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3288
-3346
-468

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - 42 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3822
-3864
-630

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-230
SELECT ALL + - 43 DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-230
SELECT ALL + - 43 / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-7
0
0

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

onlyif mysql # DIV for integer division: 
query I rowsort label-232
SELECT - cor0.col0 DIV + col0 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-45
-58
-7

skipif mysql # not compatible
query I rowsort label-232
SELECT - cor0.col0 / + col0 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-45
-58
-7

query I rowsort
SELECT 39 * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1599
2301
2379

query I rowsort
SELECT + 94 * 55 AS col2 FROM tab0 GROUP BY col0
----
5170
5170
5170

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

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

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

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

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

query I rowsort
SELECT DISTINCT + + 74 - tab1.col1 FROM tab1 GROUP BY col1
----
17
30
68

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

query I rowsort
SELECT tab1.col1 + - tab1.col1 * + 68 FROM tab1 GROUP BY tab1.col1
----
-2948
-3819
-402

query I rowsort
SELECT + 92 * 35 AS col1 FROM tab1 GROUP BY tab1.col0
----
3220
3220
3220

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

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

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

query I rowsort
SELECT cor0.col1 * - 45 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1845
-2655
-2745

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

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

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

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

query I rowsort
SELECT tab0.col2 * + tab0.col2 AS col1 FROM tab0 WHERE + tab0.col0 NOT BETWEEN NULL AND NULL GROUP BY tab0.col2
----

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

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

query I rowsort
SELECT ALL 27 * + cor0.col0 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
2457
2484
405

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

query I rowsort
SELECT ALL 55 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
5005
5060
825

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

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

query I rowsort
SELECT ALL 35 * col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1496
1938
204

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

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

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

query I rowsort
SELECT DISTINCT + cor0.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 DISTINCT + cor0.col1 * 82 col2 FROM tab1 AS cor0 GROUP BY col1
----
3608
4674
492

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

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

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-267
SELECT tab2.col1 / tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-270
SELECT DISTINCT - 63 DIV - 77 FROM tab1 GROUP BY tab1.col1
----
0

skipif mysql # not compatible
query I rowsort label-270
SELECT DISTINCT - 63 / - 77 FROM tab1 GROUP BY tab1.col1
----
0

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

query I rowsort
SELECT + 67 * 67 FROM tab1 GROUP BY tab1.col2
----
4489
4489
4489

query I rowsort
SELECT tab0.col1 / - tab0.col1 AS col0 FROM tab0 WHERE tab0.col0 IN ( tab0.col2 + - tab0.col2 ) GROUP BY tab0.col1
----

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

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

query I rowsort
SELECT col1 + - cor0.col1 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1980
3306
42

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

query I rowsort
SELECT cor0.col0 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-72
12
34

query I rowsort
SELECT - cor0.col0 + - 25 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-116
-117
-40

query I rowsort
SELECT 88 + - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
6
60
66

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 81 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3645
5751
648

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 * tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
-3895
-5605
-5795

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

skipif mysql # not compatible
query I rowsort label-293
SELECT + col0 / - 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

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

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

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

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

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

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

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

query I rowsort
SELECT - - tab0.col2 + + 34 FROM tab0 GROUP BY tab0.col2
----
113
58
72

query I rowsort
SELECT - col0 * - 76 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1672
2128
6232

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

skipif mysql # not compatible
query I rowsort label-302
SELECT ALL CAST ( + COALESCE ( tab1.col1, col1, col1 ) AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

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

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

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

query I rowsort
SELECT + 22 + 21 FROM tab1 GROUP BY tab1.col1
----
43
43
43

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + tab2.col2 + 31 * col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1856
2528
2784

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

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

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

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

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

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

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

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

query I rowsort
SELECT 4 - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-39
-79

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

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

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

query I rowsort
SELECT + 47 + col0 FROM tab0 GROUP BY tab0.col0
----
130
73
90

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

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

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

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

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

query I rowsort
SELECT tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL >= NULL
----

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

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

query I rowsort
SELECT DISTINCT 89 AS col1 FROM tab0 GROUP BY col1
----
89

query I rowsort
SELECT ALL cor0.col1 * + col0 + cor0.col1 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
10738
1830
7544

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-346
SELECT - 86 - - COALESCE ( + cor0.col1, 97 * + 60, cor0.col2 ) DIV cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-85
-85
-85

skipif mysql # not compatible
query I rowsort label-346
SELECT - 86 - - COALESCE ( + cor0.col1, 97 * + 60, cor0.col2 ) / cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-85
-85
-85

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

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

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

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

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

query I rowsort
SELECT - ( 19 ) FROM tab2 AS cor0 GROUP BY col0
----
-19
-19
-19

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

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

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

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

query I rowsort
SELECT DISTINCT - tab2.col0 + - 58 FROM tab2 GROUP BY tab2.col0
----
-149
-150
-73

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

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

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

query I rowsort
SELECT DISTINCT 5 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
120
190
395

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

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

query I rowsort
SELECT ALL 40 * 18 FROM tab0 AS cor0 GROUP BY cor0.col1
----
720
720

query I rowsort
SELECT DISTINCT - 21 * col0 FROM tab2 GROUP BY col0
----
-1911
-1932
-315

query I rowsort
SELECT - 20 + + tab2.col2 * 56 AS col2 FROM tab2 GROUP BY tab2.col2
----
3228
4404
4852

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

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

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NULL
----
44
57
6

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

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

query I rowsort
SELECT - 71 * - ( - cor0.col0 * cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-34364
-477404
-55664

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

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

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

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

query I rowsort
SELECT + + 18 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-25
-65
-8

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col1 * col2 - 93 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-45
2472
3031

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

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

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

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

query I rowsort
SELECT col0 + 28 FROM tab0 GROUP BY col0
----
111
54
71

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

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

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

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

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

query I rowsort
SELECT ALL tab0.col0 AS col2 FROM tab0 WHERE NOT - col1 IS NULL GROUP BY tab0.col0
----
26
43
83

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

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

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

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

query I rowsort
SELECT - + 52 * col1 FROM tab1 GROUP BY tab1.col1
----
-2288
-2964
-312

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

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

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

query I rowsort
SELECT 65 + + cor0.col2 * + col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1509
6306
641

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

query I rowsort
SELECT + cor0.col1 * ( + col1 * cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
185193
216
85184

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

query I rowsort
SELECT + + ( + 80 ) FROM tab0 GROUP BY tab0.col2
----
80
80
80

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

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

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

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

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

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

query I rowsort
SELECT + 48 + + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
106
127
135

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

onlyif mysql # DIV for integer division: 
query I rowsort label-418
SELECT 19 DIV cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-418
SELECT 19 / cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
1

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

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

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

query I rowsort
SELECT 99 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
121
127
181

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-428
SELECT DISTINCT + 17 + + cor0.col2 DIV + 36 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17
18
19

skipif mysql # not compatible
query I rowsort label-428
SELECT DISTINCT + 17 + + cor0.col2 / + 36 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17
18
19

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 71 + + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
116
142
79

query I rowsort
SELECT ALL cor0.col2 * 95 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
4275
6745
760

query I rowsort
SELECT ALL col1 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 39 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
39
39
39

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

query I rowsort
SELECT DISTINCT - col1 + - ( 94 ) FROM tab2 GROUP BY tab2.col1
----
-135
-153
-155

query I rowsort
SELECT 58 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
2610
4118
464

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

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

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

query I rowsort
SELECT tab0.col0 * tab0.col0 AS col2 FROM tab0 WHERE tab0.col2 * tab0.col0 IS NULL GROUP BY tab0.col0
----

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 80 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1920
3040
6320

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

query I rowsort
SELECT + + 64 - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-27
-28
49

query I rowsort
SELECT - 41 + - 16 FROM tab1 GROUP BY col1
----
-57
-57
-57

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-464
SELECT DISTINCT COALESCE ( + col1, cor0.col0, cor0.col1 * - cor0.col0 - - cor0.col0 DIV + cor0.col1 ) * col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

skipif mysql # not compatible
query I rowsort label-464
SELECT DISTINCT COALESCE ( + col1, cor0.col0, cor0.col1 * - cor0.col0 - - cor0.col0 / + cor0.col1 ) * col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT ALL 15 * - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1065
-120
-675

query I rowsort
SELECT DISTINCT - tab1.col2 + 70 FROM tab1 GROUP BY tab1.col2
----
-1
25
62

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

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

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

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

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

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

query I rowsort
SELECT 86 * - 64 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5504
-5504
-5504

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 54 * - 26 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1404

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

query I rowsort
SELECT DISTINCT 95 FROM tab1 GROUP BY col1
----
95

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

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

query I rowsort
SELECT DISTINCT - 83 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1826
2324
6806

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

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

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

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

query I rowsort
SELECT ALL + tab2.col0 - 84 FROM tab2 GROUP BY tab2.col0
----
-69
7
8

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

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

query I rowsort
SELECT + 50 + + 40 FROM tab2 GROUP BY tab2.col1
----
90
90
90

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 * 46 col0 FROM tab0 AS cor0 GROUP BY col1
----
1288
1288

query I rowsort
SELECT + 84 * - 5 FROM tab2 GROUP BY tab2.col1
----
-420
-420
-420

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

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

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

query I rowsort
SELECT 96 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
2112
2688
7872

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 - 52 col2 FROM tab1 GROUP BY tab1.col0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT ( - 82 ) - - 70 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
1738
2928
5728

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 25 + + 93 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
1543
2068
2268

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

onlyif mysql # DIV for integer division: 
query I rowsort label-507
SELECT DISTINCT - cor0.col0 DIV - COALESCE ( + 78, + cor0.col2 * + cor0.col1 + NULLIF ( 73, cor0.col0 ), col1 + + CASE + cor0.col2 WHEN - cor0.col2 THEN col0 WHEN cor0.col1 THEN cor0.col2 ELSE 86 END ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-507
SELECT DISTINCT - cor0.col0 / - COALESCE ( + 78, + cor0.col2 * + cor0.col1 + NULLIF ( 73, cor0.col0 ), col1 + + CASE + cor0.col2 WHEN - cor0.col2 THEN col0 WHEN cor0.col1 THEN cor0.col2 ELSE 86 END ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

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

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

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

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

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

query I rowsort
SELECT tab1.col2 * + ( col2 * tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
357911
512
91125

query I rowsort
SELECT tab2.col2 - 61 * - 66 FROM tab2 GROUP BY tab2.col2
----
4084
4105
4113

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

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

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

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

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

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

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

query I rowsort
SELECT - tab0.col2 * + 14 FROM tab0 GROUP BY tab0.col2
----
-1106
-336
-532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 * col1 col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

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

query I rowsort
SELECT ALL - 50 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1200
-1900
-3950

query I rowsort
SELECT DISTINCT tab0.col0 - 2 AS col0 FROM tab0 GROUP BY tab0.col0
----
24
41
81

onlyif mysql # DIV for integer division: 
query I rowsort label-525
SELECT DISTINCT - + tab1.col0 DIV - 13 FROM tab1 GROUP BY tab1.col0
----
1
2
6

skipif mysql # not compatible
query I rowsort label-525
SELECT DISTINCT - + tab1.col0 / - 13 FROM tab1 GROUP BY tab1.col0
----
1
2
6

query I rowsort
SELECT DISTINCT - tab1.col0 - 21 FROM tab1 GROUP BY tab1.col0
----
-103
-43
-49

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-532
SELECT DISTINCT + tab0.col2 / + 36 AS col2 FROM tab0 GROUP BY col2
----
0
1
2

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

query I rowsort
SELECT 75 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-1125
-6825
-6900

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-538
SELECT - cor0.col1 DIV cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
40
58
60

skipif mysql # not compatible
query I rowsort label-538
SELECT - cor0.col1 / cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
40
58
60

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 50 + + 17 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 47 + - 9 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-25
-358
-592

query I rowsort
SELECT DISTINCT tab2.col0 + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NULL NOT BETWEEN + tab2.col0 AND - col0
----

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

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

query I rowsort
SELECT cor0.col2 * 43 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1935
3053
344

query I rowsort
SELECT ALL - cor0.col2 + - 99 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-107
-144
-170

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

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

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

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

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 ALL col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

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

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

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

query I rowsort
SELECT ALL + 32 + tab1.col2 * 50 AS col2 FROM tab1 GROUP BY tab1.col2
----
2282
3582
432

query I rowsort
SELECT ALL + 57 * + cor0.col2 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
1392
2204
4582

query I rowsort
SELECT cor1.col0 * cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * tab1.col1 col1 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

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

query I rowsort
SELECT DISTINCT tab1.col2 * + col2 + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - col0 * cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-210
-8190
-8372

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 + - 24 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2050
-550
-700

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

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

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

query I rowsort
SELECT - cor0.col1 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-132
-1596
-3608

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

query I rowsort
SELECT - tab2.col1 * - 9 AS col2 FROM tab2 GROUP BY tab2.col1
----
369
531
549

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

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

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

query I rowsort
SELECT DISTINCT - + 47 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
11
32
40

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 + 70 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-13
27
44

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

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

query I rowsort
SELECT + 18 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-26
-39
12

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

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

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

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

query I rowsort
SELECT 3 * + 12 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
36
36
36

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 - + 91 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-12
-53
-67

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + tab2.col2 * 55 FROM tab2 GROUP BY tab2.col2
----
3190
4345
4785

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

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

skipif mysql # not compatible
query I rowsort label-628
SELECT col1 / tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-43
-5
-56

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

query I rowsort
SELECT DISTINCT + + tab2.col0 * - 72 FROM tab2 GROUP BY tab2.col0
----
-1080
-6552
-6624

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

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

query I rowsort
SELECT DISTINCT - 93 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-119
-136
-176

query I rowsort
SELECT DISTINCT - + col1 * - 97 AS col0 FROM tab2 GROUP BY tab2.col1
----
3977
5723
5917

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

onlyif mysql # DIV for integer division: 
query I rowsort label-636
SELECT ALL - 90 DIV - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 0c0b138578d24c14d41ceab68dfc9437

skipif mysql # not compatible
query I rowsort label-636
SELECT ALL - 90 / - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 0c0b138578d24c14d41ceab68dfc9437

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

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

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

query I rowsort
SELECT - - tab1.col1 * tab1.col1 + + 19 AS col1 FROM tab1 GROUP BY tab1.col1
----
1955
3268
55

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

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

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

query I rowsort
SELECT 77 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4466
6083
6699

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-646
SELECT - col0 * - cor0.col0 + ( + 36 + col0 DIV - 63 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
520
6759
820

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-646
SELECT - col0 * - cor0.col0 + ( + 36 + col0 / - 63 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
520
6759
820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 + col1 * - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-1722
-3540
-3782

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

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

query I rowsort
SELECT 92 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5428
5612

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

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

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT 94 * col0 FROM tab2 cor0 GROUP BY col0
----
1410
8554
8648

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

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

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

query I rowsort
SELECT - 46 - + col2 FROM tab1 GROUP BY tab1.col2
----
-117
-54
-91

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

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

query I rowsort
SELECT + ( + 69 ) * tab2.col1 - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
2788
4012
4148

query I rowsort
SELECT + ( - 86 ) FROM tab2 GROUP BY col0
----
-86
-86
-86

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, cor0.col1
----
-484
-6724
-784

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

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

query I rowsort
SELECT cor0.col2 * - 99 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2352
-3724
-7742

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 36 * + 55 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1980
-1980
-1980

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

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

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

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

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

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE + tab0.col2 IS NOT NULL GROUP BY tab0.col2
----
24
38
79

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 16 * - 48 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-768

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

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

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

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

query I rowsort
SELECT DISTINCT - ( 72 ) + + 58 AS col2 FROM tab0 GROUP BY tab0.col2
----
-14

query I rowsort
SELECT DISTINCT - + 4 + 11 FROM tab0 GROUP BY col1
----
7

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + + 65 * + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1560
2470
5135

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

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

query I rowsort
SELECT ALL 58 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
64

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

query I rowsort
SELECT tab2.col2 * - 46 AS col2 FROM tab2 GROUP BY tab2.col2
----
-2668
-3634
-4002

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 * - 58 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1368
-2166
-4503

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 - 16 col0 FROM tab0 GROUP BY tab0.col2
----
-40
-54
-95

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 - ( 45 + - 86 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
100
102
82

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 + tab0.col2 + + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL - 82 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1968
-3116
-6478

query I rowsort
SELECT DISTINCT - 19 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1102
-1501
-1653

query I rowsort
SELECT - + 65 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1430
-1820
-5330

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, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT + + 55 * tab0.col0 + - tab0.col0 * 91 FROM tab0 GROUP BY tab0.col0
----
-1548
-2988
-936

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

query I rowsort
SELECT - 51 * col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-1326
-2193
-4233

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

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

query I rowsort
SELECT ALL tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING tab0.col0 <= ( NULL )
----

query I rowsort
SELECT DISTINCT + tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) NOT IN ( tab2.col0 + + tab2.col0 / - tab2.col0 )
----

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

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

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

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

query I rowsort
SELECT ALL + 97 - + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
69
75

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

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

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

query I rowsort
SELECT DISTINCT - + 72 - 13 * - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
500
6
669

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

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

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

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

query I rowsort
SELECT ALL + 49 FROM tab0 GROUP BY col1
----
49
49

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-757
SELECT DISTINCT + - 86 DIV 4 FROM tab1 GROUP BY tab1.col2
----
-21

skipif mysql # not compatible
query I rowsort label-757
SELECT DISTINCT + - 86 / 4 FROM tab1 GROUP BY tab1.col2
----
-21

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

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

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

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

query I rowsort
SELECT - - 55 FROM tab1 GROUP BY tab1.col1
----
55
55
55

query I rowsort
SELECT ALL + tab1.col1 - 31 FROM tab1 GROUP BY tab1.col1
----
-25
13
26

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

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

query I rowsort
SELECT 93 * tab2.col0 + + 10 AS col2 FROM tab2 GROUP BY tab2.col0
----
1405
8473
8566

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

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

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

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

query I rowsort
SELECT ALL - tab2.col2 - - 63 AS col0 FROM tab2 GROUP BY tab2.col2
----
-16
-24
5

query I rowsort
SELECT + 8 + + cor0.col1 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2386
4669
5315

query I rowsort
SELECT + 45 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
103
124
132

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-778
SELECT DISTINCT + col0 / - 86 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT 20 FROM tab0 GROUP BY col2
----
20

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

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

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

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

query I rowsort
SELECT ALL 34 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
2754

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

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

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

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

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

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

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

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

query I rowsort
SELECT - tab2.col1 + 8 AS col1 FROM tab2 GROUP BY tab2.col1
----
-33
-51
-53

query I rowsort
SELECT + cor0.col2 * + cor0.col2 + + 65 FROM tab2 cor0 GROUP BY cor0.col2
----
3429
6306
7634

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-812
SELECT DISTINCT - 26 DIV col0 + - tab2.col0 * + 46 AS col1 FROM tab2 GROUP BY tab2.col0
----
-4186
-4232
-691

skipif mysql # not compatible
query I rowsort label-812
SELECT DISTINCT - 26 / col0 + - tab2.col0 * + 46 AS col1 FROM tab2 GROUP BY tab2.col0
----
-4186
-4232
-691

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

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

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

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

query I rowsort
SELECT ALL - 4 - + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-28
-42
-83

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

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

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

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

query I rowsort
SELECT DISTINCT + col0 + 18 * 72 FROM tab2 GROUP BY col0
----
1311
1387
1388

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

onlyif mysql # DIV for integer division: 
query I rowsort label-824
SELECT ALL - cor0.col0 DIV 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2
-3
-9

skipif mysql # not compatible
query I rowsort label-824
SELECT ALL - cor0.col0 / 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2
-3
-9

query I rowsort
SELECT ALL - + 55 + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-137
-77
-83

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 88 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2112
3344
6952

query I rowsort
SELECT ALL - 82 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-24
-3
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 * + 36 col0 FROM tab2 GROUP BY tab2.col0
----
3276
3312
540

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

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

query I rowsort
SELECT + tab0.col2 * 8 + 19 FROM tab0 GROUP BY tab0.col2
----
211
323
651

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

query I rowsort
SELECT DISTINCT 53 - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-38
-39
38

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

query I rowsort
SELECT DISTINCT tab2.col2 * 31 FROM tab2 GROUP BY col2
----
1798
2449
2697

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

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

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

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

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

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

query I rowsort
SELECT ALL ( 27 ) AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

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

query I rowsort
SELECT ALL + 54 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3132
-4266
-4698

query I rowsort
SELECT DISTINCT ( - 76 ) - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
-134
-155
-163

query I rowsort
SELECT tab1.col1 * - 37 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1628
-2109
-222

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

query I rowsort
SELECT DISTINCT - + 2 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL + 60 + tab0.col0 * + tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
1909
6949
736

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

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

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

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 ALL + + 30 + 10 FROM tab0 GROUP BY tab0.col1
----
40
40

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

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

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

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

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

query I rowsort
SELECT cor0.col0 * 13 FROM tab1 cor0 GROUP BY cor0.col0
----
1066
286
364

query I rowsort
SELECT DISTINCT + 59 - + 63 AS col0 FROM tab2 GROUP BY tab2.col2
----
-4

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

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col1 + - 23 * ( cor0.col2 * cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-107144
-122000
-54653

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - tab0.col0 + - 13 FROM tab0 GROUP BY tab0.col0
----
-39
-56
-96

query I rowsort
SELECT ALL - cor0.col0 * + 65 + - 51 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col1
----
-1690
-5395
-6926

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

query I rowsort
SELECT ALL cor0.col1 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-132
-1596
-3608

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

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

query I rowsort
SELECT tab2.col2 * tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col1 - 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-7
11
13

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - tab1.col0 * 78 + - tab1.col0 * tab1.col0 FROM tab1 GROUP BY col0
----
-13120
-2200
-2968

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

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

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

query I rowsort
SELECT + tab0.col2 * tab0.col2 - 74 * 63 AS col1 FROM tab0 GROUP BY tab0.col2
----
-3218
-4086
1579

query I rowsort
SELECT DISTINCT + 36 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-35
-9
28

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

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

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

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

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

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

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

query I rowsort
SELECT + NULLIF ( cor0.col2, + col2 * + 42 ) + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

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

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

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

query I rowsort
SELECT ALL - 58 - - 96 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38
38
38

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - + 84 * - 89 + - 46 AS col0 FROM tab0 GROUP BY tab0.col1
----
7430
7430

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

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-958
SELECT + tab2.col1 + 96 DIV - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
39
58
60

skipif mysql # not compatible
query I rowsort label-958
SELECT + tab2.col1 + 96 / - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
39
58
60

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

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

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

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

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

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

query I rowsort
SELECT ALL - + ( - 71 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
71
71
71

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT tab2.col2 + + 49 FROM tab2 GROUP BY col2
----
107
128
136

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

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

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

query I rowsort
SELECT + 20 * + cor0.col2 + - 24 * 47 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-368
-648
452

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

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

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

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

query I rowsort
SELECT ALL + 74 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3330
5254
592

query I rowsort
SELECT + 90 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
105
181
182

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 52 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
1144
1456
4264

query I rowsort
SELECT + 68 * - col2 + 71 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2989
-473
-4757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 + - tab2.col1 col0 FROM tab2 GROUP BY col1
----
-45
-63
-65

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

query I rowsort
SELECT ALL - 15 * + tab1.col1 + - 58 AS col0 FROM tab1 GROUP BY tab1.col1
----
-148
-718
-913

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-1010
SELECT + cor0.col1 DIV cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-40
-58
-60

skipif mysql # not compatible
query I rowsort label-1010
SELECT + cor0.col1 / cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-40
-58
-60

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

query I rowsort
SELECT DISTINCT 60 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 72 col1 FROM tab2 GROUP BY col0
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL 60 FROM tab1 GROUP BY tab1.col0
----
60
60
60

query I rowsort
SELECT DISTINCT + - 37 AS col2 FROM tab0 GROUP BY tab0.col0
----
-37

query I rowsort
SELECT ALL - 42 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT 55 FROM tab2 GROUP BY col2
----
55

query I rowsort
SELECT 28 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-16
-29
22

query I rowsort
SELECT + + 1 FROM tab2, tab2 cor0 GROUP BY tab2.col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-1021
SELECT DISTINCT cor0.col0 DIV 62 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-1021
SELECT DISTINCT cor0.col0 / 62 FROM tab2 cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT col0 + 2 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
246
66
84

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 0, cor0.col1 + col1 * cor0.col2, - 59 * cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL - tab1.col1 * - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - - tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + 47 FROM tab2 GROUP BY tab2.col0
----
47

onlyif mysql # DIV for integer division: 
query I rowsort label-1027
SELECT DISTINCT + 50 DIV + cor0.col1 + 14 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
14
15
22

skipif mysql # not compatible
query I rowsort label-1027
SELECT DISTINCT + 50 / + cor0.col1 + 14 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
14
15
22

query I rowsort
SELECT ALL - 2 AS col1 FROM tab2 GROUP BY tab2.col1
----
-2
-2
-2

query I rowsort
SELECT DISTINCT ( - tab0.col1 ) * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col2 + 35 col0 FROM tab0 GROUP BY col2
----
1479
611
6276

query I rowsort
SELECT - tab2.col2 + tab2.col2 FROM tab2 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 + 77 col1 FROM tab0 GROUP BY tab0.col0
----
103
120
160

query I rowsort
SELECT ALL + ( + tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - - ( + 98 ) + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
106
143
169

query I rowsort
SELECT - cor0.col1 - 15 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-21
-59
-72

query I rowsort
SELECT ALL cor0.col2 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1032
2054
3154

query I rowsort
SELECT 25 AS col1 FROM tab1 GROUP BY tab1.col1
----
25
25
25

query I rowsort
SELECT ALL 91 + 90 FROM tab2 GROUP BY tab2.col1
----
181
181
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 0 col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL + + COALESCE ( 74, tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
74
74
74

query I rowsort
SELECT + 29 FROM tab0 GROUP BY tab0.col1
----
29
29

query I rowsort
SELECT + 55 AS col1 FROM tab0 GROUP BY tab0.col2
----
55
55
55

query I rowsort
SELECT ALL ( 24 ) AS col2 FROM tab0 cor0 GROUP BY col1
----
24
24

query I rowsort
SELECT ALL - 68 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1496
-1904
-5576

query I rowsort
SELECT DISTINCT + 30 AS col1 FROM tab0 GROUP BY tab0.col1
----
30

query I rowsort
SELECT ALL - 12 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-12
-12
-12

onlyif mysql # DIV for integer division: 
query I rowsort label-1048
SELECT - cor0.col2 DIV + 5 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-15
-4
-7

skipif mysql # not compatible
query I rowsort label-1048
SELECT - cor0.col2 / + 5 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-15
-4
-7

query I rowsort
SELECT - + 1 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 56 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-15
3
5

query I rowsort
SELECT cor0.col1 + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

query I rowsort
SELECT ALL - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL - COALESCE ( cor0.col0, + cor0.col0, 38 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + 32 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1856
2528
2784

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + cor0.col0 * COALESCE ( 43, - cor0.col1 * cor0.col1 - cor0.col2 ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
3822
3864
630

query I rowsort
SELECT ALL - + tab0.col0 * 8 AS col1 FROM tab0 GROUP BY tab0.col0
----
-208
-344
-664

query I rowsort
SELECT DISTINCT - - 57 FROM tab2 GROUP BY tab2.col2
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 * - 69 col0 FROM tab0 GROUP BY tab0.col2
----
-4416
-4416
-4416

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1060
SELECT CAST( NULL AS SIGNED ) / cor0.col1 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1060
SELECT CAST ( NULL AS INTEGER ) / cor0.col1 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1061
SELECT DISTINCT + CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1061
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT 4 * - 34 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-136
-136
-136

query I rowsort
SELECT - tab1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + - tab1.col2 * + 23 FROM tab1 GROUP BY tab1.col2
----
-1035
-1633
-184

query I rowsort
SELECT DISTINCT + cor0.col2 - CASE col1 WHEN col2 * cor0.col1 THEN - ( cor0.col1 ) END FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

query I rowsort
SELECT ALL 29 AS col1 FROM tab0 GROUP BY tab0.col0
----
29
29
29

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1068
SELECT DISTINCT - 25 DIV + 19 FROM tab2 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-1068
SELECT DISTINCT - 25 / + 19 FROM tab2 GROUP BY col1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 35 col1 FROM tab1 GROUP BY tab1.col1
----
35
35
35

query I rowsort
SELECT DISTINCT + 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24

onlyif mysql # DIV for integer division: 
query I rowsort label-1071
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-1071
SELECT ALL + tab2.col1 / + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT tab0.col1 + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - + 16 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-103
-74
-95

query I rowsort
SELECT - 65 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

query I rowsort
SELECT DISTINCT 25 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25

query I rowsort
SELECT DISTINCT + 64 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT + col0 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + - 12 FROM tab1 GROUP BY tab1.col0
----
-12

query I rowsort
SELECT DISTINCT - + 42 AS col0 FROM tab2 GROUP BY col0
----
-42

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + - col2 + - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT + ( col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1085
SELECT cor0.col0 + - 69 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
11
91
92

skipif mysql # not compatible
query I rowsort label-1085
SELECT cor0.col0 + - 69 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
11
91
92

query I rowsort
SELECT cor0.col0 + ( + 35 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
117
57
63

query I rowsort
SELECT DISTINCT 26 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
1118
2158
676

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NULL
----
-26
-43
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 32, + cor0.col1, - tab0.col1 + cor0.col0 ) AS col0 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
-32

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

query I rowsort
SELECT DISTINCT 50 FROM tab2 GROUP BY tab2.col1
----
50

query I rowsort
SELECT DISTINCT + 25 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1100
1425
150

query I rowsort
SELECT ALL 64 FROM tab1 GROUP BY tab1.col2
----
64
64
64

query I rowsort
SELECT 6 FROM tab2 GROUP BY col2
----
6
6
6

query I rowsort
SELECT - 19 FROM tab1 GROUP BY col2
----
-19
-19
-19

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-98

query I rowsort
SELECT + col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + 67 AS col1 FROM tab0 GROUP BY col0
----
67
67
67

query I rowsort
SELECT DISTINCT + - 9 FROM tab1 GROUP BY tab1.col2
----
-9

query I rowsort
SELECT ALL 7 * cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
132
168
492

query I rowsort
SELECT - 39 FROM tab2 AS cor0 GROUP BY col1
----
-39
-39
-39

query I rowsort
SELECT - tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT tab0.col2 + 68 FROM tab0 GROUP BY tab0.col2
----
106
147
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 34 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-34
-34
-34

query I rowsort
SELECT 84 + cor0.col2 * + col2 AS col2 FROM tab1 cor0 GROUP BY col2
----
148
2109
5125

query I rowsort
SELECT tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT 19 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
19

query I rowsort
SELECT ALL + 96 FROM tab1 AS cor0 GROUP BY col1
----
96
96
96

query I rowsort
SELECT DISTINCT - 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-66

query I rowsort
SELECT DISTINCT + 21 * - 40 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-840

query I rowsort
SELECT DISTINCT - - 36 AS col1 FROM tab0 GROUP BY tab0.col2
----
36

query I rowsort
SELECT 88 FROM tab2 GROUP BY tab2.col2
----
88
88
88

query I rowsort
SELECT - - 40 FROM tab1 GROUP BY tab1.col2
----
40
40
40

query I rowsort
SELECT DISTINCT - 37 + - 12 AS col2 FROM tab0 GROUP BY tab0.col2
----
-49

query I rowsort
SELECT DISTINCT 80 FROM tab1 cor0 GROUP BY col2
----
80

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - tab2.col0 * 69 FROM tab2 GROUP BY tab2.col0
----
-1035
-6279
-6348

query I rowsort
SELECT - 23 AS col2 FROM tab0 GROUP BY tab0.col1
----
-23
-23

query I rowsort
SELECT ALL + ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 4 FROM tab0 GROUP BY tab0.col1
----
4

query I rowsort
SELECT + cor0.col1 * - 30 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1230
-1770
-1830

query I rowsort
SELECT ALL 6 AS col2 FROM tab0 GROUP BY tab0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT + 94 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2068
-2632
-7708

query I rowsort
SELECT DISTINCT + 72 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 col2 FROM tab1 GROUP BY tab1.col1
----
43
43
43

query I rowsort
SELECT - - tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT 59 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT 23 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2093
-2116
-345

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 78 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-33
-7
-70

query I rowsort
SELECT ALL 83 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1245
7553
7636

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT - 55 AS col1 FROM tab0 GROUP BY tab0.col1
----
-55
-55

query I rowsort
SELECT - tab0.col2 + - 62 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1512
-2394
-4977

query I rowsort
SELECT ALL + 70 FROM tab2 GROUP BY col0
----
70
70
70

query I rowsort
SELECT ALL + col0 * 0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL + 72 AS col2 FROM tab2 GROUP BY tab2.col2
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
22
22

query I rowsort
SELECT 11 AS col0 FROM tab0 GROUP BY tab0.col2
----
11
11
11

query I rowsort
SELECT 7 + 38 AS col2 FROM tab1 GROUP BY tab1.col0
----
45
45
45

query I rowsort
SELECT ALL COALESCE ( + cor0.col0, + 84 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-12
-34
72

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1146
SELECT + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1146
SELECT + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT + tab1.col2 + + ( + tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT NULLIF ( 93, - cor0.col0 + + cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY col0
----
93

query I rowsort
SELECT - 21 * tab1.col0 + + 93 AS col2 FROM tab1 GROUP BY col0
----
-1629
-369
-495

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1151
SELECT DISTINCT + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1151
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT ALL 32 + 87 FROM tab0 GROUP BY tab0.col1
----
119
119

query I rowsort
SELECT ALL 78 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
78
78
78

query I rowsort
SELECT DISTINCT 97 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
97

query I rowsort
SELECT ALL + 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 HAVING NOT + tab0.col1 IS NULL
----
-81
0

query I rowsort
SELECT ALL 13 + - 0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT cor0.col2 * col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT + cor0.col2 * 83 FROM tab1 cor0 GROUP BY col1, col2, cor0.col0
----
3735
5893
664

query I rowsort
SELECT + cor0.col1 - + NULLIF ( NULLIF ( cor0.col1, cor0.col1 ), cor0.col1 ) * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 + - ( - cor0.col1 ) * + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
6642

query I rowsort
SELECT DISTINCT + - 19 FROM tab2 GROUP BY tab2.col0
----
-19

query I rowsort
SELECT DISTINCT + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 1 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT cor0.col2 * 88 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5104
6952
7656

query I rowsort
SELECT DISTINCT + - 4 + + 29 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
25

query I rowsort
SELECT DISTINCT - 13 AS col2 FROM tab0 GROUP BY tab0.col1
----
-13

query I rowsort
SELECT 80 FROM tab2 AS cor0 GROUP BY col0
----
80
80
80

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT ALL - tab1.col0 * + 53 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1166
-1484
-4346

query I rowsort
SELECT cor0.col2 * - col1 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
-1920
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 ALL 0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL 95 FROM tab1 GROUP BY tab1.col2
----
95
95
95

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT + tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - ( 19 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL - - 58 AS col2 FROM tab2 GROUP BY tab2.col1
----
58
58
58

query I rowsort
SELECT DISTINCT + tab0.col1 + col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT DISTINCT - - tab1.col0 + 78 FROM tab1 GROUP BY tab1.col0
----
100
106
160

query I rowsort
SELECT + 47 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
47
47
47

onlyif mysql # DIV for integer division: 
query I rowsort label-1184
SELECT DISTINCT - cor0.col2 DIV - 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
3
4

skipif mysql # not compatible
query I rowsort label-1184
SELECT DISTINCT - cor0.col2 / - 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
3
4

query I rowsort
SELECT DISTINCT + - 52 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1248
1976
4108

query I rowsort
SELECT ALL 70 AS col2 FROM tab0 GROUP BY tab0.col2
----
70
70
70

query I rowsort
SELECT + 49 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
2842
3871
4263

query I rowsort
SELECT + cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) IS NOT NULL
----
225
8281
8464

query I rowsort
SELECT - col1 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT cor0.col0 + 72 FROM tab1 AS cor0 GROUP BY col0
----
100
154
94

query I rowsort
SELECT DISTINCT - - 66 AS col2 FROM tab0 GROUP BY tab0.col2
----
66

query I rowsort
SELECT DISTINCT + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 39 AS col2 FROM tab0 GROUP BY tab0.col0
----
-39

query I rowsort
SELECT ALL - 26 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-26
-26
-26

query I rowsort
SELECT 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT DISTINCT + 38 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
38

query I rowsort
SELECT cor0.col0 - 53 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-10
-27
30

query I rowsort
SELECT - 26 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, col0
----
-20
18
31

query I rowsort
SELECT DISTINCT - - tab1.col2 + + tab1.col2 * col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT DISTINCT 73 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
73

query I rowsort
SELECT ALL ( + 84 ) FROM tab0 AS cor0 GROUP BY col0
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 60 - + 73 col2 FROM tab1 GROUP BY tab1.col0
----
-13
-13
-13

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + ( - cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT - 93 - - 6 AS col2 FROM tab2 GROUP BY tab2.col0
----
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 65 + - 29 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
36

query I rowsort
SELECT DISTINCT + 27 FROM tab1 GROUP BY tab1.col1
----
27

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col1 * + COALESCE ( + 23, + col1 * col0, + cor0.col1 + + cor0.col2 * cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1012
1311
138

query I rowsort
SELECT DISTINCT 59 - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-20
21
35

query I rowsort
SELECT 52 FROM tab1 GROUP BY tab1.col2
----
52
52
52

query I rowsort
SELECT 35 FROM tab2 GROUP BY tab2.col2
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 52 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
52
52
52

query I rowsort
SELECT ALL - 35 FROM tab1 GROUP BY tab1.col1
----
-35
-35
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 85 * tab0.col2 + - ( - 3 ) col2 FROM tab0 GROUP BY tab0.col2
----
-2037
-3227
-6712

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

query I rowsort
SELECT + 57 + 77 FROM tab0 cor0 GROUP BY cor0.col0
----
134
134
134

query I rowsort
SELECT DISTINCT 2 AS col0 FROM tab1 GROUP BY tab1.col0
----
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1219
SELECT CAST( NULL AS SIGNED ) * - 31 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1219
SELECT CAST ( NULL AS INTEGER ) * - 31 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 47 FROM tab2 GROUP BY tab2.col1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + + 75 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
113
154
99

query I rowsort
SELECT DISTINCT 65 FROM tab2 AS cor0 GROUP BY cor0.col2
----
65

query I rowsort
SELECT ALL + 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71
71
71

onlyif mysql # DIV for integer division: 
query I rowsort label-1224
SELECT + 54 DIV 48 AS col1 FROM tab1 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1224
SELECT + 54 / 48 AS col1 FROM tab1 GROUP BY col2
----
1
1
1

query I rowsort
SELECT col1 - - 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
50
68
70

query I rowsort
SELECT DISTINCT - - ( 48 ) + - tab1.col0 FROM tab1 GROUP BY col0
----
-34
20
26

query I rowsort
SELECT - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
81

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT - cor0.col2 * 89 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2136
-3382
-7031

query I rowsort
SELECT + 81 FROM tab1 GROUP BY tab1.col0
----
81
81
81

query I rowsort
SELECT 25 AS col0 FROM tab2 GROUP BY tab2.col2
----
25
25
25

query I rowsort
SELECT 74 FROM tab1 GROUP BY col2
----
74
74
74

query I rowsort
SELECT DISTINCT + 73 FROM tab2 GROUP BY tab2.col2
----
73

query I rowsort
SELECT ALL 8 FROM tab0 GROUP BY tab0.col1
----
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col1 FROM tab2 GROUP BY tab2.col2
----
-13
-13
-13

query I rowsort
SELECT - 40 FROM tab2 GROUP BY tab2.col2
----
-40
-40
-40

query I rowsort
SELECT - - 98 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
2352
3724
7742

query I rowsort
SELECT ALL + 52 FROM tab1 GROUP BY tab1.col1
----
52
52
52

query I rowsort
SELECT ALL + cor0.col0 + - 98 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-6
-7
-83

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col2 * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 46, tab2.col1 * - tab2.col2 - + CASE - tab2.col2 WHEN tab2.col0 THEN NULL WHEN tab2.col0 + + 85 THEN NULL ELSE + tab2.col0 * tab2.col0 END, + col2 * tab2.col0, - tab2.col1 + tab2.col1, tab2.col1 ) FROM tab2 GROUP BY tab2.col2
----
-46
-46
-46

query I rowsort
SELECT ( 12 ) FROM tab0 GROUP BY tab0.col0
----
12
12
12

query I rowsort
SELECT ( - 25 ) * - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1075
2075
650

query I rowsort
SELECT + - 44 AS col1 FROM tab2 GROUP BY tab2.col0
----
-44
-44
-44

query I rowsort
SELECT - 51 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-51
-51
-51

query I rowsort
SELECT ALL 52 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT DISTINCT 79 FROM tab0 GROUP BY tab0.col1
----
79

query I rowsort
SELECT ALL + ( - tab0.col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 34 FROM tab2 GROUP BY tab2.col0
----
34

query I rowsort
SELECT cor0.col0 + 38 FROM tab2 AS cor0 GROUP BY cor0.col0
----
129
130
53

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
44
57
6

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1256
SELECT DISTINCT + + CAST( + 75 AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col2
----
75

skipif mysql # not compatible
query I rowsort label-1256
SELECT DISTINCT + + CAST ( + 75 AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col2
----
75

query I rowsort
SELECT ALL 8 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 - - 64 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
289
8345
8528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * COALESCE ( 60, cor0.col2 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3480
4740
5220

query I rowsort
SELECT + 28 AS col1 FROM tab0 GROUP BY tab0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT - - tab0.col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT tab2.col0 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL + + 73 AS col1 FROM tab0 GROUP BY tab0.col1
----
73
73

query I rowsort
SELECT - + 40 FROM tab2 GROUP BY tab2.col1
----
-40
-40
-40

onlyif mysql # DIV for integer division: 
query I rowsort label-1265
SELECT ALL - cor1.col2 DIV 67 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1265
SELECT ALL - cor1.col2 / 67 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
-1
0
0

query I rowsort
SELECT - - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL tab2.col1 * - 3 FROM tab2 GROUP BY tab2.col1
----
-123
-177
-183

query I rowsort
SELECT ALL - 41 + - 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-109
-109
-109

query I rowsort
SELECT ALL 23 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2093
2116
345

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 61 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-61

query I rowsort
SELECT 27 AS col1 FROM tab0 GROUP BY tab0.col1
----
27
27

query I rowsort
SELECT cor0.col0 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT + 92 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col1
----
92
92
92

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT - tab2.col2 + - col2 AS col2 FROM tab2 GROUP BY col2
----
-116
-158
-174

query I rowsort
SELECT ALL + 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
95
95

query I rowsort
SELECT ALL cor0.col0 * 10 FROM tab0 AS cor0 GROUP BY col0
----
260
430
830

query I rowsort
SELECT - 45 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-45
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 14 AS col2 FROM tab0 GROUP BY tab0.col1
----
14
14

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 34 col0 FROM tab2 cor0 GROUP BY col1
----
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1286
SELECT DISTINCT CAST( col1 AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-1286
SELECT DISTINCT CAST ( col1 AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - tab1.col0 + 38 FROM tab1 GROUP BY tab1.col0
----
-44
10
16

query I rowsort
SELECT ALL 74 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
74
74
74

query I rowsort
SELECT + 27 AS col1 FROM tab1 GROUP BY tab1.col2
----
27
27
27

query I rowsort
SELECT ALL tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col2
----
0
0
0
81
81
81

onlyif mysql # DIV for integer division: 
query I rowsort label-1293
SELECT + cor0.col2 + - COALESCE ( - 67, + cor0.col0, CASE 97 WHEN + cor0.col2 + cor0.col2 THEN NULL WHEN 21 * + 56 THEN - cor0.col0 DIV cor0.col0 END, - cor0.col1, - col2 + + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
125
146
154

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-1293
SELECT + cor0.col2 + - COALESCE ( - 67, + cor0.col0, CASE 97 WHEN + cor0.col2 + cor0.col2 THEN NULL WHEN 21 * + 56 THEN - cor0.col0 / cor0.col0 END, - cor0.col1, - col2 + + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
125
146
154

query I rowsort
SELECT ALL tab1.col0 + - 3 FROM tab1 GROUP BY tab1.col0
----
19
25
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + 93 ) col2 FROM tab2 GROUP BY tab2.col2
----
93

query I rowsort
SELECT col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + - 33 AS col0 FROM tab1 GROUP BY tab1.col0
----
-33
-33
-33

query I rowsort
SELECT ALL - col0 * + col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 21 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-21
-21
-21

query I rowsort
SELECT 96 + 21 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
117
117
117

query I rowsort
SELECT ALL 88 * + 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
88
88
88

query I rowsort
SELECT ALL - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT + 81 * - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1782
-2268
-6642

onlyif mysql # DIV for integer division: 
query I rowsort label-1304
SELECT ALL col0 DIV - 79 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1304
SELECT ALL col0 / - 79 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

query I rowsort
SELECT ALL + 19 FROM tab2 cor0 GROUP BY cor0.col1
----
19
19
19

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL ( COALESCE ( + 55, - cor0.col1 - + cor0.col2 * cor0.col1, + cor0.col0 + - cor0.col2 ) ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
55
55
55

query I rowsort
SELECT - ( 62 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-62
-62
-62

query I rowsort
SELECT ALL - ( - 10 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
10
10
10

query I rowsort
SELECT DISTINCT - 49 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-11
-25
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 15 col1 FROM tab2 GROUP BY col0
----
-15
-15
-15

query I rowsort
SELECT - + 97 AS col0 FROM tab0 GROUP BY tab0.col2
----
-97
-97
-97

query I rowsort
SELECT ALL 95 FROM tab1 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT COALESCE ( cor0.col2, + cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + 54 * 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
648
648
648

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col2
----
-26
-43
-83

query I rowsort
SELECT ALL + tab1.col2 * col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT + 92 FROM tab0 cor0 GROUP BY cor0.col1
----
92
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1318
SELECT ALL + tab0.col2 DIV - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1318
SELECT ALL + tab0.col2 / - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - + 27 FROM tab1 GROUP BY tab1.col0
----
-27

query I rowsort
SELECT DISTINCT - 56 - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-147
-148
-71

query I rowsort
SELECT DISTINCT + 11 FROM tab1 GROUP BY tab1.col0
----
11

query I rowsort
SELECT - 85 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - 3 + + 48 FROM tab2 GROUP BY tab2.col2
----
45

query I rowsort
SELECT ALL + + 66 AS col1 FROM tab0 GROUP BY tab0.col1
----
66
66

query I rowsort
SELECT DISTINCT - + tab2.col1 + - col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT ALL - col2 * - 24 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1080
1704
192

query I rowsort
SELECT ALL - + 68 AS col2 FROM tab2 GROUP BY tab2.col2
----
-68
-68
-68

query I rowsort
SELECT ALL - NULLIF ( tab2.col1, - tab2.col1 * + col1 ) AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + - 27 AS col1 FROM tab0 GROUP BY col1
----
-27

query I rowsort
SELECT ALL 68 + - 64 AS col0 FROM tab0 GROUP BY tab0.col0
----
4
4
4

query I rowsort
SELECT ALL 79 FROM tab0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE tab1.col2 IS NOT NULL GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT tab2.col1 * col1 AS col0 FROM tab2 WHERE NOT ( NULL ) IS NULL GROUP BY tab2.col1
----

query I rowsort
SELECT - cor0.col1 * 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1476
-2124
-2196

query I rowsort
SELECT DISTINCT - 22 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col2
----
-22

query I rowsort
SELECT - ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - 81 AS col1 FROM tab2 GROUP BY tab2.col0
----
-81

query I rowsort
SELECT DISTINCT + 93 * - 37 AS col0 FROM tab0 GROUP BY tab0.col0
----
-3441

query I rowsort
SELECT ALL + 63 * 61 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3843
3843

onlyif mysql # DIV for integer division: 
query I rowsort label-1340
SELECT cor0.col0 DIV NULLIF ( + cor0.col0 * + cor0.col1, + ( - cor0.col0 ) ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1340
SELECT cor0.col0 / NULLIF ( + cor0.col0 * + cor0.col1, + ( - cor0.col0 ) ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL + 46 FROM tab0 GROUP BY tab0.col1
----
46
46

query I rowsort
SELECT ALL - + 74 FROM tab2 GROUP BY tab2.col0
----
-74
-74
-74

query I rowsort
SELECT + + 52 AS col0 FROM tab1 GROUP BY tab1.col1
----
52
52
52

query I rowsort
SELECT + - tab0.col2 + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT col1 + + ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT + - tab0.col1 + 59 FROM tab0 GROUP BY tab0.col1
----
-22
59

query I rowsort
SELECT DISTINCT 53 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
53

query I rowsort
SELECT 11 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
1849
676
6889

query I rowsort
SELECT 77 * 12 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
924
924
924

query I rowsort
SELECT ALL + col2 + + 62 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
120
141
149

query I rowsort
SELECT 20 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
20
20
20

query I rowsort
SELECT DISTINCT - 80 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-3600
-5680
-640

query I rowsort
SELECT 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT cor0.col1 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT ALL col0 * ( 88 ) - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
2262
3741
7221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + 87 col2 FROM tab0 GROUP BY tab0.col1
----
6
87

query I rowsort
SELECT ALL - ( + 20 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-1360
SELECT + cor0.col2 DIV - 8 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-10
-7
-9

skipif mysql # not compatible
query I rowsort label-1360
SELECT + cor0.col2 / - 8 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-10
-7
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 87 col1 FROM tab2 GROUP BY tab2.col1
----
87
87
87

query I rowsort
SELECT ALL + tab1.col0 * 87 FROM tab1 GROUP BY tab1.col0
----
1914
2436
7134

query I rowsort
SELECT DISTINCT + tab0.col0 + - ( + 43 ) * 13 FROM tab0 GROUP BY tab0.col0
----
-476
-516
-533

onlyif mysql # DIV for integer division: 
query I rowsort label-1364
SELECT DISTINCT - cor0.col0 * - 36 + + 41 DIV 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3280
3316
544

skipif mysql # not compatible
query I rowsort label-1364
SELECT DISTINCT - cor0.col0 * - 36 + + 41 / 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3280
3316
544

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 * 4 FROM tab2 AS cor0 GROUP BY cor0.col1
----
205
295
305

query I rowsort
SELECT ALL + cor0.col1 * + 9 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
396
513
54

query I rowsort
SELECT DISTINCT + 44 FROM tab2 GROUP BY tab2.col1
----
44

query I rowsort
SELECT DISTINCT + - 63 FROM tab2 GROUP BY col0
----
-63

query I rowsort
SELECT tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL + 85 AS col2 FROM tab0 GROUP BY tab0.col0
----
85
85
85

query I rowsort
SELECT 69 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT - 86 + 24 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - 39 AS col2 FROM tab1 GROUP BY tab1.col0
----
-39

query I rowsort
SELECT ALL + tab1.col1 * + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL tab1.col0 * + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - 64 FROM tab0 GROUP BY tab0.col0
----
-64
-64
-64

query I rowsort
SELECT + 87 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
2262
3741
7221

query I rowsort
SELECT - 57 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-57
-57
-57

query I rowsort
SELECT ALL 16 - 92 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-76
-76
-76

query I rowsort
SELECT - col2 + tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 + 72 col1 FROM tab1 GROUP BY tab1.col1
----
116
129
78

query I rowsort
SELECT ALL tab0.col2 * - ( 7 ) FROM tab0 GROUP BY col2
----
-168
-266
-553

query I rowsort
SELECT ALL tab1.col1 * - tab1.col1 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1980
-3306
-42

query I rowsort
SELECT DISTINCT - 17 AS col1 FROM tab0 GROUP BY tab0.col1
----
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, cor0.col2 + - 55 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
58
58
58

query I rowsort
SELECT cor0.col2 * 7 FROM tab1 AS cor0 GROUP BY cor0.col2
----
315
497
56

query I rowsort
SELECT + NULLIF ( tab1.col2, tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 92 AS col1 FROM tab2 GROUP BY tab2.col2
----
92
92
92

query I rowsort
SELECT DISTINCT + 97 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
97

query I rowsort
SELECT - - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-1395
SELECT + cor0.col0 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1395
SELECT + cor0.col0 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT + cor0.col0 + 82 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
173
174
97

query I rowsort
SELECT DISTINCT + 46 FROM tab1 GROUP BY tab1.col1
----
46

query I rowsort
SELECT - 11 FROM tab1 cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT ALL + tab1.col0 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT + tab1.col2 + + tab1.col2 * - 19 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1278
-144
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
109
122
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 33 col2 FROM tab0 GROUP BY tab0.col1
----
33
33

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1406
SELECT - cor0.col0 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1406
SELECT - cor0.col0 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - 45 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-45
-45
-45

query I rowsort
SELECT - 56 FROM tab0 AS cor0 GROUP BY col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT + tab2.col0 + + 58 AS col2 FROM tab2 GROUP BY col0
----
149
150
73

query I rowsort
SELECT - col1 + 59 AS col1 FROM tab2 GROUP BY tab2.col1
----
-2
0
18

query I rowsort
SELECT DISTINCT 91 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * 71 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3195
5041
568

query I rowsort
SELECT ALL 43 AS col0 FROM tab1 GROUP BY tab1.col1
----
43
43
43

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1414
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1414
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

query I rowsort
SELECT ALL 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
21
21

query I rowsort
SELECT ALL + 15 AS col2 FROM tab0 GROUP BY tab0.col2
----
15
15
15

query I rowsort
SELECT 68 - - 62 AS col1 FROM tab1 cor0 GROUP BY col2
----
130
130
130

query I rowsort
SELECT DISTINCT - 18 AS col0 FROM tab2 GROUP BY col0
----
-18

query I rowsort
SELECT - col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
114
12
88

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1773
3572
3736

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + 13 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT ALL - 33 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-33
-33
-33

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 * - cor0.col0 - 95 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1691
-227
-3703

query I rowsort
SELECT + 69 AS col2 FROM tab2 GROUP BY tab2.col0
----
69
69
69

query I rowsort
SELECT 13 AS col2 FROM tab1 GROUP BY tab1.col2
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-1429
SELECT - cor0.col1 DIV cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1429
SELECT - cor0.col1 / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT 51 AS col0 FROM tab2 GROUP BY tab2.col1
----
51
51
51

query I rowsort
SELECT DISTINCT + 53 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-26
15
29

query I rowsort
SELECT ALL cor0.col2 * - 38 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-3002
-912

query I rowsort
SELECT + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL tab0.col2 * - 55 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1320
-2090
-4345

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col0 * + ( cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL 83 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4814
-6557
-7221

query I rowsort
SELECT DISTINCT 57 FROM tab0 AS cor0 GROUP BY cor0.col2
----
57

query I rowsort
SELECT DISTINCT - 9 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
15
29
70

onlyif mysql # DIV for integer division: 
query I rowsort label-1443
SELECT + - col2 DIV - col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
25
39
80

skipif mysql # not compatible
query I rowsort label-1443
SELECT + - col2 / - col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
25
39
80

query I rowsort
SELECT - tab2.col0 FROM tab2 WHERE NOT - tab2.col1 IS NOT NULL GROUP BY tab2.col0
----

query I rowsort
SELECT ALL tab0.col1 FROM tab0 WHERE - col1 IS NULL GROUP BY tab0.col1
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1446
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1446
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT + cor0.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 - 76 col2 FROM tab1 GROUP BY tab1.col1
----
-76
-76
-76

query I rowsort
SELECT DISTINCT - + 89 FROM tab1 GROUP BY col0
----
-89

query I rowsort
SELECT DISTINCT - 17 FROM tab0 cor0 GROUP BY cor0.col2
----
-17

query I rowsort
SELECT 75 AS col1 FROM tab2 GROUP BY tab2.col1
----
75
75
75

query I rowsort
SELECT - tab1.col2 + 2 FROM tab1 GROUP BY tab1.col2
----
-43
-6
-69

query I rowsort
SELECT DISTINCT - 87 FROM tab2 GROUP BY tab2.col2
----
-87

query I rowsort
SELECT DISTINCT 27 FROM tab1 GROUP BY col2
----
27

query I rowsort
SELECT DISTINCT + + tab1.col0 - 58 AS col1 FROM tab1 GROUP BY tab1.col0
----
-30
-36
24

query I rowsort
SELECT + + ( 65 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-1457
SELECT ALL + tab1.col1 DIV + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1457
SELECT ALL + tab1.col1 / + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT + + tab0.col1 + 54 FROM tab0 GROUP BY tab0.col1
----
135
54

query I rowsort
SELECT ALL + 48 FROM tab2 GROUP BY tab2.col0
----
48
48
48

query I rowsort
SELECT ALL + - col1 * 76 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3116
-4484
-4636

query I rowsort
SELECT 42 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT DISTINCT 76 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
76

query I rowsort
SELECT DISTINCT - cor0.col0 * - 45 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1170
1935
3735

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 85 ) * tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
4930
6715
7395

onlyif mysql # DIV for integer division: 
query I rowsort label-1465
SELECT cor0.col0 DIV - 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1465
SELECT cor0.col0 / - 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT tab0.col1 + 10 * col1 FROM tab0 GROUP BY tab0.col1
----
0
891

query I rowsort
SELECT + tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL - 10 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT 66 FROM tab1 GROUP BY col0
----
66

query I rowsort
SELECT - + 80 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1920
-3040
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
95

query I rowsort
SELECT DISTINCT - 54 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-54

onlyif mysql # DIV for integer division: 
query I rowsort label-1474
SELECT DISTINCT - NULLIF ( + 20, + tab1.col2 ) DIV COALESCE ( + 29, + tab1.col2 * - tab1.col0, - 76 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-1474
SELECT DISTINCT - NULLIF ( + 20, + tab1.col2 ) / COALESCE ( + 29, + tab1.col2 * - tab1.col0, - 76 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 27, - tab1.col2 + 19 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-27

query I rowsort
SELECT DISTINCT 2 FROM tab2 GROUP BY tab2.col2
----
2

query I rowsort
SELECT - + 94 + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-23
-49
-86

query I rowsort
SELECT + col2 * + cor0.col1 + 37 * - 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
195
2478
3124

query I rowsort
SELECT DISTINCT 69 + cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
1513
6310
645

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-158
-48
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col1 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 11 FROM tab2 GROUP BY tab2.col0
----
11
11
11

query I rowsort
SELECT - 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

query I rowsort
SELECT ALL 13 AS col2 FROM tab0 cor0 GROUP BY col0
----
13
13
13

query I rowsort
SELECT - 65 AS col1 FROM tab2 GROUP BY col0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT 15 + + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
15
96

query I rowsort
SELECT - - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + 94 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
94
94
94

query I rowsort
SELECT 60 AS col0 FROM tab0 GROUP BY tab0.col0
----
60
60
60

query I rowsort
SELECT 61 AS col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
162

query I rowsort
SELECT DISTINCT 52 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
52

query I rowsort
SELECT DISTINCT tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT - 27 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-27
-27
-27

query I rowsort
SELECT + 72 FROM tab1 GROUP BY tab1.col2
----
72
72
72

query I rowsort
SELECT + 98 AS col2 FROM tab0 GROUP BY tab0.col0
----
98
98
98

query I rowsort
SELECT DISTINCT 86 FROM tab1 AS cor0 GROUP BY col0
----
86

query I rowsort
SELECT ALL 95 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-3895
-5605
-5795

query I rowsort
SELECT ALL cor0.col1 + 3 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3
84

query I rowsort
SELECT ALL - - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - - 79 - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
41
55

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
-15
-91
-92

query I rowsort
SELECT col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-6561
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1505
SELECT + - CAST( NULL AS SIGNED ) * tab1.col1 - - 26 AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1505
SELECT + - CAST ( NULL AS INTEGER ) * tab1.col1 - - 26 AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 64 FROM tab0 GROUP BY tab0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT - 38 FROM tab0 GROUP BY tab0.col1
----
-38

query I rowsort
SELECT DISTINCT - 10 FROM tab2 GROUP BY tab2.col2
----
-10

query I rowsort
SELECT + 10 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
10
10
10

query I rowsort
SELECT ALL 48 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
139
140
63

query I rowsort
SELECT - 20 + 62 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
42
42
42

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1513
SELECT ALL - tab2.col2 DIV ( + tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1513
SELECT ALL - tab2.col2 / ( + tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT + 85 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
85
85
85

query I rowsort
SELECT ALL + + 68 FROM tab0 GROUP BY col0
----
68
68
68

onlyif mysql # DIV for integer division: 
query I rowsort label-1516
SELECT ALL + - 55 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1516
SELECT ALL + - 55 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-2
0

query I rowsort
SELECT ALL - tab2.col1 * 8 AS col1 FROM tab2 GROUP BY tab2.col1
----
-328
-472
-488

query I rowsort
SELECT - - 29 FROM tab2 GROUP BY tab2.col0
----
29
29
29

query I rowsort
SELECT NULLIF ( tab1.col0, + col0 ) * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - 63 FROM tab1 GROUP BY tab1.col0
----
-63
-63
-63

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1522
SELECT CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1522
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 12 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
972

query I rowsort
SELECT ALL + tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT tab2.col1 + tab2.col1 FROM tab2 GROUP BY col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 89 * + 4 col0 FROM tab2 GROUP BY tab2.col1
----
356
356
356

query I rowsort
SELECT ALL + 95 FROM tab0 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2 AS cor0 WHERE NOT NULL NOT IN ( cor0.col2 * cor0.col0 ) GROUP BY cor0.col0
----

query I rowsort
SELECT - tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ( + 23 ) + - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-58
23

query I rowsort
SELECT ALL 83 + + col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6478
83

query I rowsort
SELECT ALL - 31 + + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-23
14
40

query I rowsort
SELECT - + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col1, col2
----
24
38
79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( tab1.col0, 14, - tab1.col0 - - tab1.col2 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 24 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + - 54 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-13
5
7

query I rowsort
SELECT ( - 73 ) * tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1728
-2736
-5688

query I rowsort
SELECT ALL - 62 FROM tab0 GROUP BY tab0.col1
----
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT + 35 * - 87 - 36 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3981
-4593
-6033

query I rowsort
SELECT 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT ALL 77 AS col1 FROM tab2 GROUP BY tab2.col0
----
77
77
77

onlyif mysql # DIV for integer division: 
query I rowsort label-1546
SELECT ALL tab2.col2 DIV + 27 AS col1 FROM tab2 GROUP BY tab2.col2
----
2
2
3

skipif mysql # not compatible
query I rowsort label-1546
SELECT ALL tab2.col2 / + 27 AS col1 FROM tab2 GROUP BY tab2.col2
----
2
2
3

query I rowsort
SELECT ALL col2 + 7 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
31
45
86

query I rowsort
SELECT DISTINCT cor0.col0 * col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT - 38 FROM tab1 cor0 GROUP BY cor0.col1
----
-38
-38
-38

query I rowsort
SELECT DISTINCT cor1.col1 AS col0 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0, cor0.col0, cor1.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - 93 FROM tab2 GROUP BY tab2.col0
----
-93
-93
-93

onlyif mysql # DIV for integer division: 
query I rowsort label-1554
SELECT ALL + 53 DIV + tab1.col2 FROM tab1 GROUP BY col2
----
0
1
6

skipif mysql # not compatible
query I rowsort label-1554
SELECT ALL + 53 / + tab1.col2 FROM tab1 GROUP BY col2
----
0
1
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1555
SELECT DISTINCT - 47 + tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-46

skipif mysql # not compatible
query I rowsort label-1555
SELECT DISTINCT - 47 + tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-46

query I rowsort
SELECT - 95 AS col0 FROM tab1 GROUP BY tab1.col2
----
-95
-95
-95

query I rowsort
SELECT DISTINCT 3 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
3

onlyif mysql # DIV for integer division: 
query I rowsort label-1558
SELECT DISTINCT - + tab2.col1 DIV + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1

skipif mysql # not compatible
query I rowsort label-1558
SELECT DISTINCT - + tab2.col1 / + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1

query I rowsort
SELECT + tab1.col2 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # DIV for integer division: 
query I rowsort label-1560
SELECT + - tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1560
SELECT + - tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT - 38 * - tab1.col0 FROM tab1 GROUP BY col0
----
1064
3116
836

query I rowsort
SELECT DISTINCT + 26 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26

query I rowsort
SELECT 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT - ( - cor0.col1 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT + 76 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 3 col0 FROM tab2 GROUP BY tab2.col0
----
3
3
3

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT - cor0.col0 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-32
-51
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT ALL 62 FROM tab2 cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT + - 28 AS col0 FROM tab1 GROUP BY tab1.col0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 * tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT 24 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1056
1368
144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 99 AS col2 FROM tab0 GROUP BY tab0.col2
----
99
99
99

query I rowsort
SELECT - 94 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
1410
8554
8648

query I rowsort
SELECT - 56 AS col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-56
-56
-56

query I rowsort
SELECT 49 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT ALL 71 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1704
2698
5609

query I rowsort
SELECT - 39 AS col2 FROM tab2 GROUP BY tab2.col0
----
-39
-39
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 61 col0 FROM tab2 GROUP BY tab2.col2
----
61
61
61

query I rowsort
SELECT DISTINCT + tab0.col2 * 25 FROM tab0 GROUP BY tab0.col2
----
1975
600
950

query I rowsort
SELECT DISTINCT + 5 FROM tab1 GROUP BY col1
----
5

query I rowsort
SELECT ALL - 33 - 84 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-117
-117
-117

query I rowsort
SELECT DISTINCT cor0.col2 + + col2 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT 60 FROM tab0 GROUP BY tab0.col0
----
60
60
60

query I rowsort
SELECT 84 FROM tab2 GROUP BY tab2.col1
----
84
84
84

query I rowsort
SELECT + 40 AS col1 FROM tab1 GROUP BY tab1.col0
----
40
40
40

query I rowsort
SELECT DISTINCT tab0.col0 * 46 - + col0 * + 16 AS col1 FROM tab0 GROUP BY tab0.col0
----
1290
2490
780

query I rowsort
SELECT ALL + tab0.col2 - + 77 FROM tab0 GROUP BY tab0.col2
----
-39
-53
2

query I rowsort
SELECT tab1.col2 + 35 AS col0 FROM tab1 GROUP BY tab1.col2
----
106
43
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + 35 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-56
-57
20

query I rowsort
SELECT ALL col0 * ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT - ( tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + col0 * + 66 AS col1 FROM tab1 GROUP BY tab1.col0
----
1452
1848
5412

query I rowsort
SELECT DISTINCT - tab1.col0 * + 97 AS col2 FROM tab1 GROUP BY tab1.col0
----
-2134
-2716
-7954

query I rowsort
SELECT ALL tab2.col0 * - tab2.col0 + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
87

query I rowsort
SELECT - 77 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1848
2926
6083

query I rowsort
SELECT col0 - tab1.col0 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT - tab0.col0 + tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + 17 + 95 FROM tab2 GROUP BY tab2.col2
----
112
112
112

query I rowsort
SELECT 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT + + 4 + + 9 AS col1 FROM tab1 GROUP BY tab1.col1
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-1607
SELECT DISTINCT - tab1.col0 + tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-21
-27
-81

skipif mysql # not compatible
query I rowsort label-1607
SELECT DISTINCT - tab1.col0 + tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-21
-27
-81

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + tab2.col2 + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT - col0 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - + tab1.col1 * - 98 FROM tab1 GROUP BY tab1.col1
----
4312
5586
588

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 72 + - 3 * - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
195
249
255

query I rowsort
SELECT ALL + 48 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
3888

query I rowsort
SELECT col1 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1615
SELECT ALL cor0.col0 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
3

skipif mysql # not compatible
query I rowsort label-1615
SELECT ALL cor0.col0 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
3

onlyif mysql # DIV for integer division: 
query I rowsort label-1616
SELECT DISTINCT - tab2.col1 DIV 68 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-1616
SELECT DISTINCT - tab2.col1 / 68 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT cor0.col2 - 88 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-50
-64
-9

query I rowsort
SELECT col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + ( - 4 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT + tab0.col2 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT 67 FROM tab0 GROUP BY tab0.col2
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab0.col2 * - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1624
SELECT ALL + cor0.col2 + cor0.col2 DIV col2 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
25
39
80

skipif mysql # not compatible
query I rowsort label-1624
SELECT ALL + cor0.col2 + cor0.col2 / col2 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
25
39
80

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-1627
SELECT DISTINCT 63 DIV - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-1
-7
0

skipif mysql # not compatible
query I rowsort label-1627
SELECT DISTINCT 63 / - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-1
-7
0

query I rowsort
SELECT 77 + + cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1367
-499
-6164

query I rowsort
SELECT DISTINCT 39 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2
-20
-22

onlyif mysql # DIV for integer division: 
query I rowsort label-1630
SELECT - tab1.col2 DIV - tab1.col2 + 80 AS col2 FROM tab1 GROUP BY tab1.col2
----
81
81
81

skipif mysql # not compatible
query I rowsort label-1630
SELECT - tab1.col2 / - tab1.col2 + 80 AS col2 FROM tab1 GROUP BY tab1.col2
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + - 5 FROM tab1 GROUP BY tab1.col0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT + tab0.col2 + + 59 FROM tab0 GROUP BY tab0.col2
----
138
83
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1634
SELECT + CAST( NULL AS SIGNED ) * - 89 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1634
SELECT + CAST ( NULL AS INTEGER ) * - 89 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT - 7 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
-7
-7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1636
SELECT - CAST( NULL AS SIGNED ) * 8 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1636
SELECT - CAST ( NULL AS INTEGER ) * 8 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1637
SELECT ALL CAST( NULL AS SIGNED ) + 83 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1637
SELECT ALL CAST ( NULL AS INTEGER ) + 83 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1638
SELECT + + 19 DIV - tab1.col1 FROM tab1 GROUP BY col1
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-1638
SELECT + + 19 / - tab1.col1 FROM tab1 GROUP BY col1
----
-3
0
0

query I rowsort
SELECT - 33 AS col0 FROM tab1 GROUP BY col2
----
-33
-33
-33

query I rowsort
SELECT + - 51 FROM tab0 GROUP BY col2
----
-51
-51
-51

query I rowsort
SELECT 90 AS col0 FROM tab0 GROUP BY tab0.col2
----
90
90
90

query I rowsort
SELECT - 98 FROM tab0 GROUP BY tab0.col2
----
-98
-98
-98

query I rowsort
SELECT ALL + + 90 + - 0 FROM tab0 GROUP BY tab0.col2
----
90
90
90

query I rowsort
SELECT + 34 FROM tab1 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT 55 FROM tab1 GROUP BY tab1.col0
----
55
55
55

query I rowsort
SELECT - 44 AS col0 FROM tab2 GROUP BY tab2.col0
----
-44
-44
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT ALL - 48 + - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-127
-72
-86

query I rowsort
SELECT ALL + 64 FROM tab2 AS cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT ALL + + 66 AS col0 FROM tab2 GROUP BY tab2.col0
----
66
66
66

query I rowsort
SELECT ALL + 65 AS col2 FROM tab1 GROUP BY col1
----
65
65
65

query I rowsort
SELECT DISTINCT + 60 AS col0 FROM tab1 GROUP BY tab1.col1
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 98 col1 FROM tab2 GROUP BY tab2.col1
----
98
98
98

query I rowsort
SELECT DISTINCT + + 94 FROM tab1 GROUP BY col0
----
94

query I rowsort
SELECT 76 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4408
-6004
-6612

query I rowsort
SELECT ALL - 18 FROM tab0 cor0 GROUP BY cor0.col0
----
-18
-18
-18

query I rowsort
SELECT - 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-47
-47
-47

query I rowsort
SELECT ALL - - tab1.col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL 41 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41
41
41

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + 19, cor0.col2 * cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-19
-19
-19

query I rowsort
SELECT + 28 + - col0 FROM tab1 GROUP BY col0
----
-54
0
6

query I rowsort
SELECT 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
5
5
5

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 89, cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT ALL 79 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
137
158
166

query I rowsort
SELECT DISTINCT 27 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
1215
1917
216

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 23 col1 FROM tab0 GROUP BY tab0.col0
----
23

query I rowsort
SELECT DISTINCT tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT + - col0 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT + cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
114
12
88

query I rowsort
SELECT + 31 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
31
31
31

query I rowsort
SELECT DISTINCT 55 + - ( cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2
11
49

query I rowsort
SELECT DISTINCT - + col2 - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT - 33 FROM tab0 GROUP BY tab0.col1
----
-33
-33

query I rowsort
SELECT cor0.col0 * + col0 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
210
8190
8372

query I rowsort
SELECT + + 50 FROM tab0 GROUP BY tab0.col2
----
50
50
50

query I rowsort
SELECT DISTINCT - + 7 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-308
-399
-42

query I rowsort
SELECT ALL ( + 20 ) FROM tab2 AS cor0 GROUP BY col0, col2
----
20
20
20

query I rowsort
SELECT ALL + 7 FROM tab0 GROUP BY col0
----
7
7
7

query I rowsort
SELECT - cor0.col0 * + col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + cor0.col1 - - 92 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
173
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 * + 16 col2 FROM tab1 GROUP BY tab1.col1
----
704
912
96

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 30 FROM tab0 AS cor0 GROUP BY cor0.col2
----
30

query I rowsort
SELECT col0 - 77 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1716
2184
6396

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 67, - tab1.col1 + - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
67
67
67

query I rowsort
SELECT COALESCE ( + cor0.col0, - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 73 FROM tab1 GROUP BY tab1.col2
----
73

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 95, - col2 - - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
96
96
96

query I rowsort
SELECT - + 17 AS col0 FROM tab1 GROUP BY tab1.col1
----
-17
-17
-17

query I rowsort
SELECT ALL + 96 AS col2 FROM tab0 GROUP BY tab0.col1
----
96
96

query I rowsort
SELECT + ( + 64 ) * - cor0.col2 + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-960
-988
1185

query I rowsort
SELECT 27 - - cor0.col1 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
27
6588

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
59

query I rowsort
SELECT - cor0.col0 * ( - 29 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
2639
2668
435

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 DISTINCT 37 FROM tab1 GROUP BY tab1.col0
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 col2 FROM tab0 cor0 GROUP BY col0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
-58
-79
-87

query I rowsort
SELECT + tab1.col2 FROM tab1 GROUP BY col2 HAVING NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - col0 * cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-210
-8190
-8372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col2 * 36 col2 FROM tab2 GROUP BY tab2.col2
----
-2088
-2844
-3132

query I rowsort
SELECT DISTINCT + + col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT + 81 FROM tab0 cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL + 24 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-1710
SELECT - col0 + + col2 DIV cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-14
-90
-91

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1710
SELECT - col0 + + col2 / cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-14
-90
-91

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - - 24 + + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
103
48
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 99 col2 FROM tab0 GROUP BY col2
----
99

query I rowsort
SELECT ALL 73 + - 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1715
SELECT + CAST( NULL AS SIGNED ) col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1715
SELECT + CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * col2 + 11 * 35 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
2763
5046
5692

query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col1, cor0.col1 ) / 86 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT + + 2 AS col0 FROM tab1 GROUP BY tab1.col1
----
2
2
2

query I rowsort
SELECT + + ( + ( 85 ) ) FROM tab1 GROUP BY tab1.col1
----
85
85
85

query I rowsort
SELECT DISTINCT - + 46 FROM tab1 GROUP BY tab1.col1
----
-46

query I rowsort
SELECT 42 + - cor0.col2 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1486
618
6283

query I rowsort
SELECT + 23 - - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
106
49
66

query I rowsort
SELECT - 52 FROM tab2 GROUP BY tab2.col0
----
-52
-52
-52

query I rowsort
SELECT ALL 85 AS col1 FROM tab2 GROUP BY tab2.col0
----
85
85
85

query I rowsort
SELECT + 0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT tab0.col0 * + tab0.col0 + + 97 FROM tab0 GROUP BY tab0.col0
----
1946
6986
773

query I rowsort
SELECT ALL + 42 FROM tab1 GROUP BY col2
----
42
42
42

query I rowsort
SELECT - 55 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT ALL cor0.col1 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT col0 AS col2 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT col1 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 31 col0 FROM tab0 GROUP BY tab0.col1
----
31
31

query I rowsort
SELECT DISTINCT + cor0.col2 + 68 FROM tab2 AS cor0 GROUP BY cor0.col2
----
126
147
155

query I rowsort
SELECT ALL cor0.col0 * - 97 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1455
-8827
-8924

query I rowsort
SELECT ALL - 39 FROM tab0 GROUP BY tab0.col1
----
-39
-39

onlyif mysql # DIV for integer division: 
query I rowsort label-1736
SELECT ALL + cor0.col2 DIV + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1736
SELECT ALL + cor0.col2 / + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + 8 * - 98 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-784
-784
-784

query I rowsort
SELECT - 60 * - cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
2684
3477
366

query I rowsort
SELECT DISTINCT NULLIF ( - cor0.col2, cor0.col2 + cor0.col2 ) * - 31 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1798
2449
2697

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
38

query I rowsort
SELECT - 89 AS col0 FROM tab0 cor0 GROUP BY col1
----
-89
-89

query I rowsort
SELECT DISTINCT 83 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
83

query I rowsort
SELECT - 6 FROM tab2 AS cor0 GROUP BY col0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2378
-4661
-5307

query I rowsort
SELECT ALL + 97 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
138
156
158

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL - 94 + - 7 AS col2 FROM tab2 GROUP BY tab2.col2
----
-101
-101
-101

query I rowsort
SELECT - ( 93 ) FROM tab0 AS cor0 GROUP BY col0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT NULLIF ( + cor0.col2, cor0.col2 ) + + 83 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1849
676
6889

query I rowsort
SELECT - cor0.col2 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1032
-2054
-3154

query I rowsort
SELECT 43 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
1204
3526
946

query I rowsort
SELECT - 49 AS col1 FROM tab0 GROUP BY tab0.col1
----
-49
-49

query I rowsort
SELECT ALL 21 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1911
1932
315

query I rowsort
SELECT + 38 FROM tab1 cor0 GROUP BY cor0.col0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( cor0.col1 ) * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
41
59
61

query I rowsort
SELECT 34 * 5 FROM tab0 AS cor0 GROUP BY col2
----
170
170
170

query I rowsort
SELECT cor0.col2 - + 49 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-4
-41
22

query I rowsort
SELECT cor0.col2 * - 11 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-495
-781
-88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1762
SELECT CAST( - tab0.col0 AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-1762
SELECT CAST ( - tab0.col0 AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1763
SELECT CAST( tab2.col0 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif mysql # not compatible
query I rowsort label-1763
SELECT CAST ( tab2.col0 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 28 AS col1 FROM tab2 GROUP BY tab2.col1
----
28
28
28

query I rowsort
SELECT - ( + 88 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab2 GROUP BY tab2.col2
----
17

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT 6 AS col1 FROM tab2 GROUP BY tab2.col1
----
6
6
6

query I rowsort
SELECT 67 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
108
126
128

query I rowsort
SELECT - ( cor0.col1 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + 28 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT col1 + + 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
137
56

query I rowsort
SELECT - col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 66 col2 FROM tab0 GROUP BY col1
----
66
66

query I rowsort
SELECT 64 FROM tab0 AS cor0 GROUP BY cor0.col1
----
64
64

query I rowsort
SELECT cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 - + cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-478
-6680
-727

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1778
SELECT - + tab1.col0 * - CAST( + 51 AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
1122
1428
4182

skipif mysql # not compatible
query I rowsort label-1778
SELECT - + tab1.col0 * - CAST ( + 51 AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
1122
1428
4182

query I rowsort
SELECT ALL + cor0.col1 + 35 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
76
94
96

query I rowsort
SELECT ALL 32 + + 25 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
57
57
57

query I rowsort
SELECT ALL + + 78 FROM tab1 GROUP BY col0
----
78
78
78

query I rowsort
SELECT ALL - 44 AS col0 FROM tab1 GROUP BY tab1.col0
----
-44
-44
-44

query I rowsort
SELECT + tab0.col1 - - tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6642

query I rowsort
SELECT tab2.col0 + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT cor0.col1 - 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-6
7

query I rowsort
SELECT - + col0 + + tab0.col0 * 12 AS col0 FROM tab0 GROUP BY tab0.col0
----
286
473
913

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT + 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT + 53 AS col0 FROM tab2 GROUP BY tab2.col0
----
53
53
53

query I rowsort
SELECT - + 11 AS col0 FROM tab1 GROUP BY tab1.col2
----
-11
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 72, + tab1.col1 ) FROM tab1 GROUP BY tab1.col0
----
72
72
72

query I rowsort
SELECT ALL - 25 + tab0.col2 FROM tab0 GROUP BY col2
----
-1
13
54

query I rowsort
SELECT ALL cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 49 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1078
-1372
-4018

query I rowsort
SELECT cor0.col1 * col1 + 99 * 2 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1879
3679
3919

query I rowsort
SELECT DISTINCT 9 FROM tab2 AS cor0 GROUP BY col2
----
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT - 8 * col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-192
-304
-632

query I rowsort
SELECT ALL - 65 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-27
-41
14

query I rowsort
SELECT + tab1.col1 * - 85 AS col1 FROM tab1 GROUP BY tab1.col1
----
-3740
-4845
-510

query I rowsort
SELECT + cor0.col0 + + 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
149
89
95

query I rowsort
SELECT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col0, cor1.col2
----
22
28
82

query I rowsort
SELECT ALL - NULLIF ( tab0.col2, - tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 54 AS col0 FROM tab2 GROUP BY tab2.col0
----
-54

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1811
SELECT DISTINCT 26 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-1811
SELECT DISTINCT 26 / cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NULL < ( NULL )
----

query I rowsort
SELECT ALL 45 FROM tab2 AS cor0 GROUP BY cor0.col1
----
45
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col2 FROM tab2 AS cor0 GROUP BY col1
----
18
18
18

query I rowsort
SELECT DISTINCT + cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
158
48
76

query I rowsort
SELECT ALL 16 AS col1 FROM tab2 GROUP BY tab2.col0
----
16
16
16

query I rowsort
SELECT DISTINCT - + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + COALESCE ( - 65, + cor0.col1 + + col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-65

query I rowsort
SELECT 98 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
98
98
98

query I rowsort
SELECT 81 * - 58 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-4698
-4698
-4698

query I rowsort
SELECT 36 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + + col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL 15 AS col2 FROM tab1 GROUP BY tab1.col2
----
15
15
15

query I rowsort
SELECT DISTINCT 87 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
87

query I rowsort
SELECT ALL - + tab2.col1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 62 - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
5
56

query I rowsort
SELECT 86 FROM tab2 cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT ALL + 0 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1831
SELECT DISTINCT - cor0.col0 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1831
SELECT DISTINCT - cor0.col0 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL - 58 AS col1 FROM tab1 GROUP BY tab1.col1
----
-58
-58
-58

query I rowsort
SELECT NULLIF ( 2, - cor0.col0 * cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2
2
2

query I rowsort
SELECT + tab1.col1 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + 88 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
88

query I rowsort
SELECT - cor0.col2 - 27 FROM tab2 AS cor0 GROUP BY col2
----
-106
-114
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 82 col0 FROM tab1 GROUP BY tab1.col2
----
82
82
82

query I rowsort
SELECT ALL 78 FROM tab0 GROUP BY tab0.col2
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-1839
SELECT - 71 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-1839
SELECT - 71 / - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
0
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 * - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3828
-4959
-522

query I rowsort
SELECT + tab2.col0 * - 37 FROM tab2 GROUP BY col0
----
-3367
-3404
-555

query I rowsort
SELECT DISTINCT - 38 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-117
-125
-96

query I rowsort
SELECT ( 96 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
96
96
96

query I rowsort
SELECT ALL + 51 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT - 45 AS col0 FROM tab1 GROUP BY tab1.col1
----
-45
-45
-45

query I rowsort
SELECT ALL 95 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
136
154
156

query I rowsort
SELECT - - 56 AS col2 FROM tab0 GROUP BY tab0.col1
----
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 64 col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
64
64
64

query I rowsort
SELECT DISTINCT + - col2 * 84 FROM tab0 GROUP BY tab0.col2
----
-2016
-3192
-6636

query I rowsort
SELECT cor0.col1 + 78 FROM tab2 AS cor0 GROUP BY col1
----
119
137
139

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT + col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - col0 + + tab1.col0 * + 49 FROM tab1 GROUP BY tab1.col0
----
1056
1344
3936

query I rowsort
SELECT tab1.col0 + - 98 FROM tab1 GROUP BY tab1.col0
----
-16
-70
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-1855
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-1855
SELECT cor0.col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-1857
SELECT ALL tab1.col1 DIV 97 AS col0 FROM tab1 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1857
SELECT ALL tab1.col1 / 97 AS col0 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 + - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-495
-6241

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1859
SELECT ALL + + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1859
SELECT ALL + + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 34 * + 64 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2176

query I rowsort
SELECT ALL + cor0.col1 * + 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3726

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col2 + + 19 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
27
64
90

query I rowsort
SELECT ALL - 15 FROM tab1 GROUP BY tab1.col2
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 79 col2 FROM tab1 GROUP BY tab1.col2
----
79
79
79

query I rowsort
SELECT + 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
56
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-1867
SELECT - tab0.col2 DIV tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1867
SELECT - tab0.col2 / tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 33 AS col0 FROM tab0 GROUP BY tab0.col0
----
33

query I rowsort
SELECT - ( + tab2.col0 ) * + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + 99 - 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 62 FROM tab0 AS cor0 GROUP BY cor0.col1
----
62
62

query I rowsort
SELECT ALL - - 37 AS col2 FROM tab2 GROUP BY col1
----
37
37
37

query I rowsort
SELECT 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT 96 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL <> + tab2.col1
----

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 cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 34 + cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1410
-542
-6207

query I rowsort
SELECT DISTINCT + cor0.col0 - - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT - 58 - - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
21
29

query I rowsort
SELECT ( + tab1.col0 ) - - col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT - + 19 AS col2 FROM tab2 GROUP BY tab2.col2
----
-19
-19
-19

onlyif mysql # DIV for integer division: 
query I rowsort label-1883
SELECT DISTINCT + col0 + cor0.col0 DIV - 2 FROM tab0 cor0 GROUP BY cor0.col0
----
13
22
42

skipif mysql # not compatible
query I rowsort label-1883
SELECT DISTINCT + col0 + cor0.col0 / - 2 FROM tab0 cor0 GROUP BY cor0.col0
----
13
22
42

query I rowsort
SELECT - 98 - + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-139
-157
-159

query I rowsort
SELECT + tab2.col0 + + 76 FROM tab2 GROUP BY col0
----
167
168
91

query I rowsort
SELECT ALL - 64 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-64
-64

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 0 AS col0 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL - tab1.col0 * col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT + 94 FROM tab1 GROUP BY col1
----
94
94
94

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

query I rowsort
SELECT ALL col0 - + 85 * - 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2565
2641
2642

query I rowsort
SELECT ALL - 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT ALL 16 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
16
16
16

onlyif mysql # DIV for integer division: 
query I rowsort label-1896
SELECT ALL col2 DIV + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1896
SELECT ALL col2 / + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT + 89 FROM tab0 GROUP BY tab0.col1
----
89
89

query I rowsort
SELECT ALL + 20 FROM tab2 cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT + tab2.col1 + - 38 FROM tab2 GROUP BY tab2.col1
----
21
23
3

query I rowsort
SELECT DISTINCT - tab1.col2 * - 14 FROM tab1 GROUP BY tab1.col2
----
112
630
994

query I rowsort
SELECT - tab0.col1 - + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT + - 23 FROM tab1 GROUP BY tab1.col1
----
-23
-23
-23

query I rowsort
SELECT - 80 AS col0 FROM tab1 GROUP BY tab1.col0
----
-80
-80
-80

query I rowsort
SELECT - + 23 AS col2 FROM tab1 GROUP BY tab1.col0
----
-23
-23
-23

query I rowsort
SELECT ALL + col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + + tab0.col2 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-1908
SELECT DISTINCT + tab2.col2 DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1

skipif mysql # not compatible
query I rowsort label-1908
SELECT DISTINCT + tab2.col2 / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1

query I rowsort
SELECT 62 FROM tab0 GROUP BY tab0.col0
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-1910
SELECT - COALESCE ( cor0.col0, + cor0.col0 * - ( cor0.col2 * - cor0.col0 ) - cor0.col0, - cor0.col2 + + cor0.col0 DIV cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-22
-28
-82

skipif mysql # not compatible
query I rowsort label-1910
SELECT - COALESCE ( cor0.col0, + cor0.col0 * - ( cor0.col2 * - cor0.col0 ) - cor0.col0, - cor0.col2 + + cor0.col0 / cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-22
-28
-82

query I rowsort
SELECT + 34 * + 15 AS col1 FROM tab2 GROUP BY tab2.col1
----
510
510
510

query I rowsort
SELECT DISTINCT + 94 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
152
173
181

onlyif mysql # DIV for integer division: 
query I rowsort label-1913
SELECT col1 DIV - cor0.col2 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
0
0
78

skipif mysql # not compatible
query I rowsort label-1913
SELECT col1 / - cor0.col2 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
0
0
78

query I rowsort
SELECT cor0.col0 - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 * + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-405
-639
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-1916
SELECT ALL - cor0.col0 DIV 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1916
SELECT ALL - cor0.col0 / 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

query I rowsort
SELECT ALL + cor0.col0 * + ( 82 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1230
7462
7544

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col1
----
26
43
83

query I rowsort
SELECT - - col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - 64 FROM tab0 GROUP BY tab0.col1
----
-64
-64

query I rowsort
SELECT + + col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 56 FROM tab1 GROUP BY tab1.col1
----
56

onlyif mysql # DIV for integer division: 
query I rowsort label-1923
SELECT 66 DIV 72 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1923
SELECT 66 / 72 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL tab2.col1 * - 11 AS col2 FROM tab2 GROUP BY tab2.col1
----
-451
-649
-671

query I rowsort
SELECT DISTINCT + 84 FROM tab2 GROUP BY tab2.col1
----
84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1926
SELECT - CAST( + 11 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-11
-11
-11

skipif mysql # not compatible
query I rowsort label-1926
SELECT - CAST ( + 11 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-11
-11
-11

query I rowsort
SELECT + tab0.col1 + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL - 78 AS col2 FROM tab2 GROUP BY tab2.col2
----
-78
-78
-78

query I rowsort
SELECT ALL + + 94 AS col1 FROM tab1 GROUP BY tab1.col2
----
94
94
94

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
-58
-79
-87

query I rowsort
SELECT + col0 * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT tab1.col0 * - 74 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1628
-2072
-6068

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
16

query I rowsort
SELECT ( - tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * + 94 col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
4136
5358
564

query I rowsort
SELECT ALL - 45 FROM tab0 GROUP BY tab0.col1
----
-45
-45

query I rowsort
SELECT - ( - 22 ) * 43 FROM tab2 GROUP BY tab2.col1
----
946
946
946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 68 ) col0 FROM tab1 GROUP BY tab1.col1
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + 10 FROM tab1 cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT DISTINCT - + 28 FROM tab1 GROUP BY tab1.col2
----
-28

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 19, + tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
19

query I rowsort
SELECT ALL - 89 FROM tab2 cor0 GROUP BY col1, cor0.col1
----
-89
-89
-89

query I rowsort
SELECT ALL - tab2.col0 * + 9 AS col0 FROM tab2 GROUP BY tab2.col0
----
-135
-819
-828

query I rowsort
SELECT ALL - cor0.col1 * + 49 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
-2156
-2793
-294

query I rowsort
SELECT ALL 52 FROM tab0 cor0 GROUP BY cor0.col2
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT 42 - - col1 FROM tab2 GROUP BY col1
----
101
103
83

query I rowsort
SELECT ALL - cor0.col2 * - 21 FROM tab1 cor0 GROUP BY cor0.col2
----
1491
168
945

query I rowsort
SELECT ALL 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT ALL 11 FROM tab0 GROUP BY tab0.col2
----
11
11
11

query I rowsort
SELECT DISTINCT col0 * cor0.col0 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT 44 + 57 * + col0 FROM tab2 GROUP BY col0
----
5231
5288
899

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1953
SELECT + + CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1953
SELECT + + CAST ( NULL AS REAL ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING - tab1.col1 IS NULL
----

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL 70 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
3080
3990
420

query I rowsort
SELECT - tab2.col0 * 35 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-3094
-3128
-510

query I rowsort
SELECT + 66 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
66
66

query I rowsort
SELECT 16 FROM tab2 AS cor0 GROUP BY col0
----
16
16
16

query I rowsort
SELECT + - tab1.col2 * - 22 FROM tab1 GROUP BY tab1.col2
----
1562
176
990

query I rowsort
SELECT DISTINCT cor0.col2 + 72 FROM tab2 AS cor0 GROUP BY col2
----
130
151
159

onlyif mysql # DIV for integer division: 
query I rowsort label-1962
SELECT cor0.col2 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1962
SELECT cor0.col2 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT + 3 FROM tab1 GROUP BY col2
----
3
3
3

query I rowsort
SELECT 26 * tab0.col0 FROM tab0 GROUP BY col0
----
1118
2158
676

query I rowsort
SELECT 4 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
324

query I rowsort
SELECT cor0.col0 - - col0 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3864
5460
930

query I rowsort
SELECT ALL 68 AS col2 FROM tab2 GROUP BY tab2.col1
----
68
68
68

query I rowsort
SELECT ALL 18 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-40
-61
-69

query I rowsort
SELECT DISTINCT - 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-84

query I rowsort
SELECT 84 FROM tab0 AS cor0 GROUP BY cor0.col1
----
84
84

query I rowsort
SELECT ALL - 41 FROM tab0 GROUP BY tab0.col2
----
-41
-41
-41

query I rowsort
SELECT DISTINCT - - 56 AS col2 FROM tab2 GROUP BY tab2.col2
----
56

query I rowsort
SELECT DISTINCT + 10 AS col0 FROM tab1 GROUP BY tab1.col0
----
10

query I rowsort
SELECT ALL + + 75 FROM tab2 GROUP BY tab2.col1
----
75
75
75

onlyif mysql # DIV for integer division: 
query I rowsort label-1975
SELECT - 44 DIV + 3 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-14
-95

skipif mysql # not compatible
query I rowsort label-1975
SELECT - 44 / + 3 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-14
-95

query I rowsort
SELECT ALL 82 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3690
5822
656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 + + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
122
65
82

query I rowsort
SELECT + col0 + cor0.col1 * + ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
1773
3572
3736

query I rowsort
SELECT + + 16 AS col1 FROM tab0 GROUP BY tab0.col1
----
16
16

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + - tab0.col0 * COALESCE ( 71, col2 ) FROM tab0 GROUP BY tab0.col0
----
-1846
-3053
-5893

query I rowsort
SELECT 25 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1075
2075
650

query I rowsort
SELECT DISTINCT 8 AS col1 FROM tab1 GROUP BY tab1.col2
----
8

query I rowsort
SELECT DISTINCT + tab0.col1 + + 0 FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-1984
SELECT ALL + cor0.col1 - - cor0.col1 DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
59
6

skipif mysql # not compatible
query I rowsort label-1984
SELECT ALL + cor0.col1 - - cor0.col1 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
59
6

query I rowsort
SELECT tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 col2 FROM tab1 WHERE NULL IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT + - tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 87 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-87

query I rowsort
SELECT ALL - cor0.col0 * 65 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1690
-2795
-5395

query I rowsort
SELECT ALL 29 * - 82 + + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-2307
-2333
-2370

query I rowsort
SELECT - 35 FROM tab1 GROUP BY tab1.col0
----
-35
-35
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 49 col1 FROM tab1 GROUP BY tab1.col0
----
-49

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 50 * + 5 AS col0 FROM tab2 GROUP BY tab2.col2
----
250
250
250

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 97 col1 FROM tab0 GROUP BY tab0.col1
----
97

query I rowsort
SELECT ALL - 24 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1080
-1704
-192

query I rowsort
SELECT - 66 FROM tab0 AS cor0 GROUP BY col1
----
-66
-66

query I rowsort
SELECT - 2 FROM tab0 AS cor0 GROUP BY col0
----
-2
-2
-2

query I rowsort
SELECT + + 45 AS col1 FROM tab0 GROUP BY tab0.col2
----
45
45
45

query I rowsort
SELECT + tab0.col2 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - 12 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor0.col2
----
-12
-12
-12
-12
-12
-12

query I rowsort
SELECT + 23 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1909
598
989

query I rowsort
SELECT + col2 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 76 * + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
6156

query I rowsort
SELECT - 7 FROM tab2 GROUP BY tab2.col1
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 col0 FROM tab0 GROUP BY tab0.col1
----
16

onlyif mysql # DIV for integer division: 
query I rowsort label-2007
SELECT DISTINCT - + 16 DIV - 54 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-2007
SELECT DISTINCT - + 16 / - 54 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL + 26 FROM tab2 AS cor0 GROUP BY col1
----
26
26
26

query I rowsort
SELECT DISTINCT + 9 + + 0 FROM tab1 GROUP BY tab1.col0
----
9

query I rowsort
SELECT DISTINCT + tab0.col0 - + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT + 83 * + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2158
3569
6889

query I rowsort
SELECT DISTINCT 29 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
2378
638
812

query I rowsort
SELECT DISTINCT + 70 FROM tab1 GROUP BY col2
----
70

query I rowsort
SELECT DISTINCT ( 74 ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
74

query I rowsort
SELECT - 1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 col2 FROM tab0 GROUP BY tab0.col1
----
11
11

query I rowsort
SELECT DISTINCT - 87 FROM tab0 AS cor0 GROUP BY col0
----
-87

query I rowsort
SELECT - 79 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-79
-79
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-2019
SELECT + + 34 DIV 57 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2019
SELECT + + 34 / 57 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col0 - - 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
168
169
92

query I rowsort
SELECT 3 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3
3
3

query I rowsort
SELECT ALL COALESCE ( - cor0.col0, + cor0.col0 * + cor0.col1 ) FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT + 88 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
88
88
88

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT DISTINCT + 90 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
90

query I rowsort
SELECT ALL + cor0.col2 * 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1104
1748
3634

query I rowsort
SELECT + 43 FROM tab2 GROUP BY col1
----
43
43
43

query I rowsort
SELECT 44 FROM tab1 GROUP BY col1
----
44
44
44

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 98 * - tab2.col1 FROM tab2 GROUP BY col1
----
-4018
-5782
-5978

onlyif mysql # DIV for integer division: 
query I rowsort label-2031
SELECT col2 DIV - ( 1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

skipif mysql # not compatible
query I rowsort label-2031
SELECT col2 / - ( 1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + - 37 AS col0 FROM tab1 GROUP BY tab1.col0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT 86 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1290
7826
7912

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-2034
SELECT CAST( 91 AS SIGNED ) DIV + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1
11
2

skipif mysql # not compatible
query I rowsort label-2034
SELECT CAST ( 91 AS INTEGER ) / + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1
11
2

query I rowsort
SELECT ALL + 81 AS col0 FROM tab1 GROUP BY tab1.col2
----
81
81
81

query I rowsort
SELECT - 18 * + cor0.col1 - col1 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-4941
0
0

query I rowsort
SELECT - 47 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1034
-1316
-3854

query I rowsort
SELECT 59 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT ALL tab0.col0 + - 25 AS col2 FROM tab0 GROUP BY tab0.col0
----
1
18
58

query I rowsort
SELECT col1 + ( 49 ) FROM tab0 GROUP BY tab0.col1
----
130
49

onlyif mysql # DIV for integer division: 
query I rowsort label-2041
SELECT ALL - cor0.col0 DIV cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2041
SELECT ALL - cor0.col0 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-2
0

query I rowsort
SELECT ALL + + col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col0 * - 70 FROM tab2 cor0 GROUP BY cor0.col0
----
1050
6370
6440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + tab0.col1 * - col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 84 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
84
84
84

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col2 + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL > NULL
----

query I rowsort
SELECT ALL tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
484
6724
784

query I rowsort
SELECT col2 AS col2 FROM tab2 WHERE NOT ( col0 ) IS NOT NULL GROUP BY tab2.col2
----

query I rowsort
SELECT ALL tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING tab0.col2 IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT - tab0.col0 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT 58 FROM tab2 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT ALL col0 + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2057
SELECT ALL cor0.col0 DIV + cor0.col2 - cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2025
-5040
-62

skipif mysql # not compatible
query I rowsort label-2057
SELECT ALL cor0.col0 / + cor0.col2 - cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2025
-5040
-62

query I rowsort
SELECT - 22 AS col0 FROM tab1 GROUP BY tab1.col2
----
-22
-22
-22

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2059
SELECT + CASE col1 WHEN - CAST( NULL AS SIGNED ) THEN + cor0.col2 WHEN 60 THEN NULL ELSE NULL END FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2059
SELECT + CASE col1 WHEN - CAST ( NULL AS INTEGER ) THEN + cor0.col2 WHEN 60 THEN NULL ELSE NULL END FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2060
SELECT cor0.col2 * ( 74 DIV + 97 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2060
SELECT cor0.col2 * ( 74 / + 97 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 21 FROM tab0 GROUP BY tab0.col0
----
21
21
21

query I rowsort
SELECT DISTINCT + + col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT 41 FROM tab2 AS cor0 GROUP BY col2
----
41
41
41

onlyif mysql # DIV for integer division: 
query I rowsort label-2064
SELECT - tab1.col1 DIV - 4 FROM tab1 GROUP BY col1
----
1
11
14

skipif mysql # not compatible
query I rowsort label-2064
SELECT - tab1.col1 / - 4 FROM tab1 GROUP BY col1
----
1
11
14

query I rowsort
SELECT ALL - 85 FROM tab1 GROUP BY tab1.col2
----
-85
-85
-85

onlyif mysql # DIV for integer division: 
query I rowsort label-2066
SELECT ALL cor0.col0 DIV cor0.col0 + - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-21
-27
-81

skipif mysql # not compatible
query I rowsort label-2066
SELECT ALL cor0.col0 / cor0.col0 + - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-21
-27
-81

query I rowsort
SELECT DISTINCT - - 74 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3330
5254
592

query I rowsort
SELECT + 24 FROM tab0 GROUP BY tab0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT - 50 FROM tab2 GROUP BY tab2.col0
----
-50

query I rowsort
SELECT 16 FROM tab0 cor0 GROUP BY col1
----
16
16

query I rowsort
SELECT DISTINCT + 84 FROM tab0 AS cor0 GROUP BY cor0.col1
----
84

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2072
SELECT + CAST( NULL AS DECIMAL ) + 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2072
SELECT + CAST ( NULL AS REAL ) + 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - - 24 AS col2 FROM tab2 GROUP BY tab2.col2
----
24
24
24

query I rowsort
SELECT DISTINCT + 93 FROM tab1 GROUP BY tab1.col2
----
93

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL NOT BETWEEN col0 AND NULL
----

query I rowsort
SELECT col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + tab2.col0 * + tab2.col0 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT - cor0.col0 * 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5187
-5244
-855

query I rowsort
SELECT ALL + 10 * + 32 FROM tab2 GROUP BY tab2.col1
----
320
320
320

query I rowsort
SELECT - 91 FROM tab1 GROUP BY tab1.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT + 80 * - 10 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-800

query I rowsort
SELECT ALL ( - 11 ) FROM tab0 GROUP BY tab0.col0
----
-11
-11
-11

query I rowsort
SELECT ALL + - 85 FROM tab2 GROUP BY tab2.col0
----
-85
-85
-85

onlyif mysql # DIV for integer division: 
query I rowsort label-2084
SELECT + ( tab0.col0 ) DIV + 38 AS col2 FROM tab0 GROUP BY col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2084
SELECT + ( tab0.col0 ) / + 38 AS col2 FROM tab0 GROUP BY col0
----
0
1
2

query I rowsort
SELECT DISTINCT 94 - 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
64

query I rowsort
SELECT DISTINCT + 20 + + 31 FROM tab0 GROUP BY tab0.col0
----
51

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 + + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1825
-597
-6851

query I rowsort
SELECT ALL - col1 + - col1 * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1722
-3540
-3782

query I rowsort
SELECT ALL + 12 + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
53
71
73

query I rowsort
SELECT col2 - 91 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12
-33
-4

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1722
3540
3782

query I rowsort
SELECT + + 64 * col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1408
1792
5248

query I rowsort
SELECT - 50 AS col0 FROM tab2 GROUP BY tab2.col2
----
-50
-50
-50

query I rowsort
SELECT DISTINCT - 2 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-46
-59
-8

query I rowsort
SELECT DISTINCT 30 FROM tab0 AS cor0 GROUP BY cor0.col1
----
30

query I rowsort
SELECT ALL 46 AS col0 FROM tab0 GROUP BY tab0.col2
----
46
46
46

query I rowsort
SELECT DISTINCT 1 FROM tab0 AS cor0 GROUP BY col0
----
1

query I rowsort
SELECT + - 61 - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-105
-118
-67

query I rowsort
SELECT 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT DISTINCT + tab2.col2 * 61 + tab2.col2 FROM tab2 GROUP BY col2
----
3596
4898
5394

query I rowsort
SELECT ALL + 29 FROM tab0 GROUP BY tab0.col2
----
29
29
29

query I rowsort
SELECT ALL - 22 AS col1 FROM tab2 GROUP BY tab2.col2
----
-22
-22
-22

query I rowsort
SELECT ALL - ( - 67 ) FROM tab2 GROUP BY tab2.col0
----
67
67
67

query I rowsort
SELECT col0 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
3
3
3

query I rowsort
SELECT + 64 * 3 FROM tab1 GROUP BY tab1.col1
----
192
192
192

query I rowsort
SELECT + cor0.col1 + + 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
32
70
83

query I rowsort
SELECT + tab2.col1 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - ( - 46 ) + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
127
46

query I rowsort
SELECT 68 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
68
68
68

query I rowsort
SELECT DISTINCT + + 18 FROM tab2 GROUP BY tab2.col2
----
18

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
78

query I rowsort
SELECT + 36 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT - tab2.col0 + col0 * tab2.col0 FROM tab2 GROUP BY col0
----
210
8190
8372

query I rowsort
SELECT DISTINCT + 29 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
29

query I rowsort
SELECT - ( - 49 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
49
49
49

query I rowsort
SELECT ALL + col2 * 55 AS col0 FROM tab0 GROUP BY tab0.col2
----
1320
2090
4345

query I rowsort
SELECT - 57 AS col1 FROM tab0 GROUP BY tab0.col1
----
-57
-57

query I rowsort
SELECT - 94 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-94
-94
-94

query I rowsort
SELECT ALL + cor0.col2 - - 5 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
63
84
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab0.col1 + 58 * 19 AS col1 FROM tab0 GROUP BY tab0.col1
----
1021
1102

query I rowsort
SELECT ALL - 11 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-11
-11
-11

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
81

query I rowsort
SELECT - 32 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-32
-32
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT ALL 51 FROM tab2 AS cor0 GROUP BY cor0.col1
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
127
153
90

query I rowsort
SELECT DISTINCT - 13 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
533
767
793

query I rowsort
SELECT tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT - - 58 AS col0 FROM tab0 GROUP BY tab0.col1
----
58
58

query I rowsort
SELECT ALL 13 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL - cor0.col2 * 64 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-3712
-5056
-5568

query I rowsort
SELECT DISTINCT 87 FROM tab1 AS cor0 GROUP BY col1
----
87

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
225
8281
8464

query I rowsort
SELECT - 16 AS col0 FROM tab2 GROUP BY col2
----
-16
-16
-16

query I rowsort
SELECT - + col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - + 56 AS col1 FROM tab2 GROUP BY tab2.col0
----
-56
-56
-56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2142
SELECT ALL + + tab0.col2 * CAST( + 56 AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
1344
2128
4424

skipif mysql # not compatible
query I rowsort label-2142
SELECT ALL + + tab0.col2 * CAST ( + 56 AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
1344
2128
4424

query I rowsort
SELECT col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT 10 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-35
-61
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT 85 AS col0 FROM tab0 GROUP BY tab0.col1
----
85
85

query I rowsort
SELECT + - 15 - - 23 AS col2 FROM tab2 GROUP BY tab2.col1
----
8
8
8

query I rowsort
SELECT ALL - 3 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT DISTINCT 41 FROM tab2 GROUP BY tab2.col1
----
41

query I rowsort
SELECT + cor0.col2 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT 69 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT 22 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
66
79

query I rowsort
SELECT - - 90 FROM tab1 GROUP BY tab1.col0
----
90
90
90

query I rowsort
SELECT + 31 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
31
31
31

query I rowsort
SELECT + cor0.col0 * 55 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1430
2365
4565

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - 60 FROM tab1 GROUP BY col0
----
-60
-60
-60

query I rowsort
SELECT + cor0.col0 * cor0.col2 - cor0.col2 * - ( col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
10672
14378
2610

query I rowsort
SELECT DISTINCT + 43 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
43

query I rowsort
SELECT ALL + 39 + 31 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL + 46 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT ALL + 58 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
58
58

query I rowsort
SELECT DISTINCT 48 + - cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-16
-1977
-4993

query I rowsort
SELECT - - 34 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
34
34
34

query I rowsort
SELECT DISTINCT - cor0.col2 * + 14 - + 17 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1123
-353
-549

query I rowsort
SELECT DISTINCT + cor0.col2 + 67 FROM tab0 cor0 GROUP BY cor0.col2
----
105
146
91

query I rowsort
SELECT DISTINCT - 93 + 56 AS col0 FROM tab0 GROUP BY tab0.col1
----
-37

onlyif mysql # DIV for integer division: 
query I rowsort label-2169
SELECT ALL 30 DIV + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2169
SELECT ALL 30 / + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + cor0.col2 * + cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
2070
5112
72

query I rowsort
SELECT 50 + + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1731
3531
3771

query I rowsort
SELECT DISTINCT + ( 82 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
82

query I rowsort
SELECT - CASE + col0 WHEN + cor0.col0 THEN 57 END AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT ALL + cor0.col1 + + 54 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
135
54

query I rowsort
SELECT + 18 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col2 - + 10 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 7886e5c4ebdf9c97901c88f9d275e757

query I rowsort
SELECT - ( 37 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + tab0.col1 - 63 FROM tab0 GROUP BY tab0.col1
----
-63
18

query I rowsort
SELECT - ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT - ( cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
91
91
91

query I rowsort
SELECT ( 79 ) FROM tab2 AS cor0 GROUP BY col2
----
79
79
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2184
SELECT - CAST( NULL AS SIGNED ) / 83 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2184
SELECT - CAST ( NULL AS INTEGER ) / 83 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 45 * - 74 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3330
-3330
-3330

query I rowsort
SELECT ALL + 34 + 34 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
68
68
68

query I rowsort
SELECT ALL + cor0.col1 + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT cor0.col0 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
105
121
67

query I rowsort
SELECT ALL + - NULLIF ( + 26, - tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-26
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col0 FROM tab0 GROUP BY tab0.col1
----
95
95

query I rowsort
SELECT - 81 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-126
-152
-89

query I rowsort
SELECT cor0.col0 * col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-2195
SELECT ALL - col0 + 93 DIV - cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
-30
-33
-83

skipif mysql # not compatible
query I rowsort label-2195
SELECT ALL - col0 + 93 / - cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
-30
-33
-83

query I rowsort
SELECT ALL - - 16 AS col1 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT - + 31 FROM tab1 GROUP BY tab1.col2
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - + 73 * tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-1606
-2044
-5986

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 73 col2 FROM tab0 GROUP BY col1
----
-73

query I rowsort
SELECT ALL + 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2201
SELECT ALL - cor0.col2 DIV + cor0.col2 - 45 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

skipif mysql # not compatible
query I rowsort label-2201
SELECT ALL - cor0.col2 / + cor0.col2 - 45 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT ALL 91 * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
7371

query I rowsort
SELECT - 40 AS col1 FROM tab0 GROUP BY tab0.col0
----
-40
-40
-40

query I rowsort
SELECT + 63 AS col0 FROM tab2 GROUP BY tab2.col0
----
63
63
63

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT ALL + 37 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
108
45
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 22, cor0.col1 + cor0.col2, + cor0.col2 + + cor0.col1, - cor0.col2 * 1 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-22
-22
-22

query I rowsort
SELECT - 70 FROM tab1 GROUP BY tab1.col2
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + 78 AS col2 FROM tab0 GROUP BY col2
----
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + - tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT 79 AS col2 FROM tab0 GROUP BY tab0.col0
----
79
79
79

query I rowsort
SELECT - 15 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-15
-15

query I rowsort
SELECT + 52 FROM tab1 AS cor0 GROUP BY col1
----
52
52
52

query I rowsort
SELECT + + 36 FROM tab2 GROUP BY tab2.col1
----
36
36
36

query I rowsort
SELECT DISTINCT + 14 FROM tab1 GROUP BY col2
----
14

query I rowsort
SELECT ALL tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT tab0.col2 * + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

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 + tab1.col0 + col0 AS col0 FROM tab1 GROUP BY col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 + tab2.col2 * + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT tab2.col0 * - 71 AS col1 FROM tab2 GROUP BY tab2.col0
----
-1065
-6461
-6532

query I rowsort
SELECT ALL - tab0.col2 * - 70 FROM tab0 GROUP BY tab0.col2
----
1680
2660
5530

query I rowsort
SELECT cor0.col1 * 70 AS col1 FROM tab2 cor0 GROUP BY col1
----
2870
4130
4270

query I rowsort
SELECT + + 94 FROM tab2 GROUP BY tab2.col2
----
94
94
94

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

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.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2232
SELECT ALL tab0.col2 + + tab0.col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2232
SELECT ALL tab0.col2 + + tab0.col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - - 74 * col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
3330
5254
592

query I rowsort
SELECT ALL 33 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + tab0.col1 * COALESCE ( 70, tab0.col1 ) + + 28 FROM tab0 GROUP BY tab0.col1
----
28
5698

query I rowsort
SELECT cor0.col2 - - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-2238
SELECT col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2238
SELECT col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT - 85 FROM tab2 GROUP BY tab2.col1
----
-85
-85
-85

query I rowsort
SELECT - col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
14
14

query I rowsort
SELECT DISTINCT + - tab1.col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT - - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2245
SELECT cor0.col1 DIV 48 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2245
SELECT cor0.col1 / 48 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1
1

query I rowsort
SELECT ALL - 9 * + cor0.col2 FROM tab2 cor0 GROUP BY col2
----
-522
-711
-783

query I rowsort
SELECT ALL + + tab1.col0 * + 0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT 71 AS col0 FROM tab2 GROUP BY tab2.col0
----
71
71
71

query I rowsort
SELECT ALL - 31 + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1650
3450
3690

query I rowsort
SELECT DISTINCT 81 FROM tab2 AS cor0 GROUP BY cor0.col1
----
81

query I rowsort
SELECT DISTINCT - 89 + + col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-74
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
45

query I rowsort
SELECT ALL + 11 * cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
220
280
820

query I rowsort
SELECT cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
0
0
0

query I rowsort
SELECT 55 AS col0 FROM tab2 GROUP BY tab2.col0
----
55
55
55

query I rowsort
SELECT - tab0.col0 + tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
1806
650
6806

query I rowsort
SELECT - + 25 AS col0 FROM tab2 GROUP BY tab2.col0
----
-25
-25
-25

query I rowsort
SELECT ALL - 2 AS col0 FROM tab2 GROUP BY tab2.col1
----
-2
-2
-2

query I rowsort
SELECT DISTINCT 12 AS col1 FROM tab1 GROUP BY tab1.col1
----
12

query I rowsort
SELECT DISTINCT - - tab0.col0 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
21
21
21

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
164
44
56

query I rowsort
SELECT - 43 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-43
-43
-43

query I rowsort
SELECT ALL + - 8 * tab0.col0 FROM tab0 GROUP BY col0
----
-208
-344
-664

query I rowsort
SELECT - - col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT - 13 AS col0 FROM tab2 GROUP BY col0
----
-13

query I rowsort
SELECT - 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT ALL - 91 FROM tab1 GROUP BY tab1.col1
----
-91
-91
-91

query I rowsort
SELECT - 24 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-24
-24

query I rowsort
SELECT 75 FROM tab0 GROUP BY tab0.col2
----
75
75
75

query I rowsort
SELECT cor0.col1 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-3772
-5369
-915

query I rowsort
SELECT ALL - 86 + 63 FROM tab0 AS cor0 GROUP BY col1
----
-23
-23

query I rowsort
SELECT cor0.col1 + 91 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
4048
5244
552

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2274
SELECT ALL CAST( NULL AS SIGNED ) + 38 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2274
SELECT ALL CAST ( NULL AS INTEGER ) + 38 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + ( 95 ) - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-136
-154
-156

query I rowsort
SELECT + 62 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT - tab0.col0 * - tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT ALL - 86 FROM tab0 GROUP BY col1
----
-86
-86

query I rowsort
SELECT DISTINCT - 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * 93 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1395
8463
8556

query I rowsort
SELECT DISTINCT + 2 FROM tab0 GROUP BY tab0.col2
----
2

query I rowsort
SELECT ALL - - 27 FROM tab1 GROUP BY tab1.col2
----
27
27
27

query I rowsort
SELECT DISTINCT - cor0.col2 + + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col1 + cor0.col0 * col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1140
12236
13650

query I rowsort
SELECT ALL col1 + + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT ALL + - ( 39 ) FROM tab1 GROUP BY col0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT + - ( tab2.col1 ) AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT 43 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
43
43
43

query I rowsort
SELECT DISTINCT + 6 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
6

query I rowsort
SELECT 99 FROM tab0 GROUP BY tab0.col0
----
99
99
99

query I rowsort
SELECT + - 4 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
54
75
83

query I rowsort
SELECT - - ( + 9 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
9
9
9

query I rowsort
SELECT DISTINCT + - 0 - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col2 + + tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + tab1.col2 * tab1.col2 + - col2 FROM tab1 GROUP BY tab1.col2
----
1980
4970
56

query I rowsort
SELECT DISTINCT 36 - 44 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-8

query I rowsort
SELECT - cor0.col0 * col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col0 + - ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + ( 53 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 + + 82 col1 FROM tab2 GROUP BY tab2.col0
----
173
174
97

query I rowsort
SELECT + 67 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
67
67
67

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 35 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
35

query I rowsort
SELECT DISTINCT 88 - 15 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
33
33
33

query I rowsort
SELECT ALL 59 FROM tab1 cor0 GROUP BY col1
----
59
59
59

query I rowsort
SELECT ALL tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col2 * tab0.col2 + + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1482
600
6320

query I rowsort
SELECT + tab1.col0 AS col2 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2311
SELECT ALL + + col2 DIV + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2311
SELECT ALL + + col2 / + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col2 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-45
53

query I rowsort
SELECT + col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col2 * NULLIF ( - cor0.col1, cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 col0 FROM tab1 GROUP BY col1
----
50
50
50

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

query I rowsort
SELECT ALL - + tab1.col2 * - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1980
4970
56

query I rowsort
SELECT DISTINCT + 59 - - cor0.col0 * - cor0.col0 FROM tab1 cor0 GROUP BY col0
----
-425
-6665
-725

query I rowsort
SELECT 67 FROM tab2 GROUP BY col1
----
67
67
67

query I rowsort
SELECT ALL - + tab0.col0 - - ( 17 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-66
-9

query I rowsort
SELECT ALL + 68 FROM tab1 GROUP BY tab1.col0
----
68
68
68

query I rowsort
SELECT - col1 * NULLIF ( 17, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1003
-1037
-697

query I rowsort
SELECT DISTINCT col0 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT + + 60 FROM tab2 GROUP BY tab2.col0
----
60
60
60

query I rowsort
SELECT ALL 40 - + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-17
-4
34

query I rowsort
SELECT ALL - tab1.col0 * 40 FROM tab1 GROUP BY tab1.col0
----
-1120
-3280
-880

query I rowsort
SELECT ALL 57 FROM tab2 GROUP BY tab2.col1
----
57
57
57

query I rowsort
SELECT 21 FROM tab1 cor0 GROUP BY col0
----
21
21
21

query I rowsort
SELECT - - tab2.col2 * + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT - 22 FROM tab1 GROUP BY tab1.col2
----
-22
-22
-22

onlyif mysql # DIV for integer division: 
query I rowsort label-2332
SELECT ALL + 47 - cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
46
46
46

skipif mysql # not compatible
query I rowsort label-2332
SELECT ALL + 47 - cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
46
46
46

query I rowsort
SELECT ALL - cor0.col2 * + 18 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-1422
-432
-684

query I rowsort
SELECT - col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT - 37 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-37

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + - 95 FROM tab1 GROUP BY tab1.col1
----
-95
-95
-95

query I rowsort
SELECT DISTINCT - - tab0.col1 * - 45 FROM tab0 GROUP BY tab0.col1
----
-3645
0

query I rowsort
SELECT NULLIF ( tab2.col0, 48 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + - 74 FROM tab0 GROUP BY col2
----
-74
-74
-74

query I rowsort
SELECT DISTINCT + 33 FROM tab1 GROUP BY tab1.col2
----
33

onlyif mysql # DIV for integer division: 
query I rowsort label-2342
SELECT + + 32 DIV tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2342
SELECT + + 32 / tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
1

query I rowsort
SELECT - 13 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-13
-13
-13

query I rowsort
SELECT ALL 32 * cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
2912
2944
480

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
484
6724
784

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL - 60 FROM tab1 cor0 GROUP BY cor0.col2
----
-60
-60
-60

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 0 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT DISTINCT - 96 FROM tab0 AS cor0 GROUP BY col0
----
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 91 FROM tab2 GROUP BY tab2.col2
----
91
91
91

query I rowsort
SELECT ALL - 34 FROM tab0 GROUP BY tab0.col1
----
-34
-34

query I rowsort
SELECT 44 AS col1 FROM tab2 GROUP BY tab2.col1
----
44
44
44

query I rowsort
SELECT ALL - + col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
82
82
82

query I rowsort
SELECT + 36 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT - cor0.col1 * - 85 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
3740
4845
510

query I rowsort
SELECT DISTINCT ( - 13 ) + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-5
32
58

query I rowsort
SELECT DISTINCT + tab0.col0 - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 69, cor0.col2 + cor0.col0, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NOT + tab0.col0 IS NOT NULL
----

query I rowsort
SELECT + tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT cor0.col2 - 40 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
-32
31
5

query I rowsort
SELECT + cor0.col0 * - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1032
-2054
-3154

query I rowsort
SELECT DISTINCT 46 + - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-11
2
40

query I rowsort
SELECT ALL + 51 + col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
142
143
66

query I rowsort
SELECT ALL 37 FROM tab2 GROUP BY tab2.col0
----
37
37
37

query I rowsort
SELECT - 64 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-64
-64
-64

query I rowsort
SELECT DISTINCT + 48 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-34
20
26

onlyif mysql # DIV for integer division: 
query I rowsort label-2372
SELECT cor0.col0 DIV - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2372
SELECT cor0.col0 / - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2373
SELECT + tab2.col2 DIV 99 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2373
SELECT + tab2.col2 / 99 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 31 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-31

query I rowsort
SELECT ALL 10 AS col0 FROM tab0 GROUP BY tab0.col1
----
10
10

query I rowsort
SELECT ALL 50 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4550
4600
750

onlyif mysql # DIV for integer division: 
query I rowsort label-2377
SELECT 21 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2377
SELECT 21 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 40 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
119
64
78

query I rowsort
SELECT - - 78 - + tab1.col2 FROM tab1 GROUP BY col2
----
33
7
70

query I rowsort
SELECT ALL 49 * 27 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1323
1323
1323

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT + 85 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
85
85
85

query I rowsort
SELECT DISTINCT - - 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 + 71 col2 FROM tab1 GROUP BY col1
----
71
71
71

query I rowsort
SELECT ALL + col0 + cor0.col0 * 2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
246
66
84

query I rowsort
SELECT + tab0.col2 * 93 AS col1 FROM tab0 GROUP BY tab0.col2
----
2232
3534
7347

onlyif mysql # DIV for integer division: 
query I rowsort label-2387
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-2387
SELECT - cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 99 col2 FROM tab0 GROUP BY tab0.col0
----
-99

query I rowsort
SELECT - 26 FROM tab1 GROUP BY tab1.col0
----
-26
-26
-26

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2390
SELECT DISTINCT - CAST( - col2 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

skipif mysql # not compatible
query I rowsort label-2390
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
81
81

query I rowsort
SELECT + col0 * - col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IN ( + tab0.col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 col0 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) IS NOT NULL
----
45
71
8

query I rowsort
SELECT - 73 FROM tab1 AS cor0 GROUP BY col1
----
-73
-73
-73

query I rowsort
SELECT ALL col0 * - 94 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1410
-8554
-8648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col2, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL - 36 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT 91 AS col2 FROM tab2 GROUP BY col0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 87 + + 42 FROM tab0 AS cor0 GROUP BY cor0.col2
----
129
129
129

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 - - 44 col1 FROM tab1 GROUP BY tab1.col1
----
101
50
88

query I rowsort
SELECT DISTINCT 25 FROM tab0 GROUP BY tab0.col0
----
25

query I rowsort
SELECT ALL - 90 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-33
-46
-84

query I rowsort
SELECT - 34 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3094
3128
510

query I rowsort
SELECT ALL - 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT 69 AS col1 FROM tab0 GROUP BY col0
----
69

onlyif mysql # DIV for integer division: 
query I rowsort label-2408
SELECT - cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2408
SELECT - cor0.col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT - 28 AS col1 FROM tab1 GROUP BY tab1.col0
----
-28
-28
-28

query I rowsort
SELECT - + tab2.col1 + tab2.col1 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - tab1.col1 + 56 FROM tab1 GROUP BY col1
----
-1
12
50

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-81
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2415
SELECT ALL 63 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2415
SELECT ALL 63 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

query I rowsort
SELECT DISTINCT 16 FROM tab2 AS cor0 GROUP BY cor0.col2
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ( 13 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
13
13

query I rowsort
SELECT + cor0.col1 * - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 13 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
35
41
95

query I rowsort
SELECT ALL + 60 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT + 19 + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
110
111
34

query I rowsort
SELECT - tab0.col1 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + - 1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-2425
SELECT tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2425
SELECT tab0.col2 / tab0.col2 FROM tab0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT 12 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1092
1104
180

query I rowsort
SELECT DISTINCT + + 81 + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
122
140
142

query I rowsort
SELECT ALL - cor0.col0 + 78 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-5
35
52

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - ( + col1 ) + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col0 + - 85 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2
-42
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 41 col0 FROM tab1 GROUP BY col2
----
41

query I rowsort
SELECT ALL 5 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT ALL + 50 FROM tab1 GROUP BY tab1.col1
----
50
50
50

query I rowsort
SELECT ALL - 68 FROM tab2 GROUP BY tab2.col1
----
-68
-68
-68

query I rowsort
SELECT - 17 FROM tab0 GROUP BY tab0.col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - 84 FROM tab2 GROUP BY tab2.col2
----
-84

query I rowsort
SELECT ALL tab2.col2 * + 4 FROM tab2 GROUP BY tab2.col2
----
232
316
348

onlyif mysql # DIV for integer division: 
query I rowsort label-2440
SELECT ALL - COALESCE ( + 57, + 60 DIV + tab2.col0 ) FROM tab2 GROUP BY tab2.col1
----
-57
-57
-57

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2440
SELECT ALL - COALESCE ( + 57, + 60 / + tab2.col0 ) FROM tab2 GROUP BY tab2.col1
----
-57
-57
-57

query I rowsort
SELECT DISTINCT + 4 * 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 col1 FROM tab0 GROUP BY tab0.col1
----
-83
-83

query I rowsort
SELECT 76 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT 59 + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
130
67

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT ALL + 62 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-2447
SELECT DISTINCT + cor0.col1 DIV 80 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-2447
SELECT DISTINCT + cor0.col1 / 80 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
0

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT - 99 FROM tab1 AS cor0 GROUP BY col2
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 57 * 64 FROM tab2 cor0 GROUP BY cor0.col1
----
3648

query I rowsort
SELECT ALL 13 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
13
13
13

query I rowsort
SELECT - COALESCE ( + cor0.col2, cor0.col0 ) * + col0 - 18 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-1575
-6992
-8827

query I rowsort
SELECT ALL 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, col1
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 31 ) * cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-1178
-2449
-744

query I rowsort
SELECT + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1849
676
6889

query I rowsort
SELECT 11 FROM tab1 GROUP BY tab1.col0
----
11
11
11

query I rowsort
SELECT + tab1.col0 + + 82 FROM tab1 GROUP BY tab1.col0
----
104
110
164

query I rowsort
SELECT - 35 * 62 AS col2 FROM tab2 GROUP BY tab2.col0
----
-2170
-2170
-2170

query I rowsort
SELECT 59 * - 84 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-4956
-4956
-4956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT DISTINCT 21 FROM tab1 AS cor0 GROUP BY col1
----
21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2462
SELECT CAST( NULL AS SIGNED ) + 52 FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2462
SELECT CAST ( NULL AS INTEGER ) + 52 FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - + COALESCE ( 63, col0 * col2 + 97, - 0 * - tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-63
-63
-63

query I rowsort
SELECT DISTINCT 59 - - 35 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
94

query I rowsort
SELECT 46 AS col0 FROM tab1 GROUP BY tab1.col2
----
46
46
46

query I rowsort
SELECT 51 * + cor0.col2 + - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
2917
3970
4376

query I rowsort
SELECT 87 FROM tab2 AS cor0 GROUP BY col1
----
87
87
87

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT - col2 AS col0 FROM tab0 WHERE NULL IS NOT NULL GROUP BY tab0.col2
----

onlyif mysql # DIV for integer division: 
query I rowsort label-2471
SELECT 25 DIV 55 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2471
SELECT 25 / 55 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + - col0 AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-2473
SELECT - 17 DIV + 59 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2473
SELECT - 17 / + 59 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 10 AS col0 FROM tab2 GROUP BY col1
----
10
10
10

query I rowsort
SELECT - 63 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1512
-2394
-4977

query I rowsort
SELECT 35 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT ALL - 65 * + 11 FROM tab1 cor0 GROUP BY cor0.col1
----
-715
-715
-715

query I rowsort
SELECT - 73 FROM tab0 GROUP BY col2
----
-73
-73
-73

query I rowsort
SELECT - cor0.col0 + + 63 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-19
35
41

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - - 74 AS col1 FROM tab2 GROUP BY col0
----
74
74
74

query I rowsort
SELECT ALL + 35 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT + - tab2.col1 * - 38 FROM tab2 GROUP BY tab2.col1
----
1558
2242
2318

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT 78 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT 81 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
81
81

query I rowsort
SELECT - cor0.col1 * ( 58 ) + + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2508
-3249
-342

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col1 - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT + col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - 13 * col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-533
-767
-793

query I rowsort
SELECT - + 84 + + tab1.col2 FROM tab1 GROUP BY col2
----
-13
-39
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 73 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
73

onlyif mysql # DIV for integer division: 
query I rowsort label-2496
SELECT ALL cor0.col1 + col1 DIV + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
45
58
7

skipif mysql # not compatible
query I rowsort label-2496
SELECT ALL cor0.col1 + col1 / + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
45
58
7

query I rowsort
SELECT ALL + 14 AS col1 FROM tab0 GROUP BY tab0.col0
----
14
14
14

query I rowsort
SELECT DISTINCT - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 58 FROM tab1 cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + - 47 AS col0 FROM tab2 GROUP BY tab2.col1
----
-47

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-22
-28
-82

query I rowsort
SELECT + 14 FROM tab1 GROUP BY tab1.col2
----
14
14
14

query I rowsort
SELECT ALL 59 FROM tab2 GROUP BY tab2.col0
----
59
59
59

query I rowsort
SELECT 21 FROM tab1 GROUP BY tab1.col0
----
21
21
21

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT ALL 74 FROM tab0 GROUP BY tab0.col1
----
74
74

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
44
44
44

query I rowsort
SELECT ALL 52 FROM tab0 GROUP BY tab0.col0
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-2511
SELECT + cor0.col2 DIV 72 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2, cor0.col0
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2511
SELECT + cor0.col2 / 72 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2, cor0.col0
----
0
0
1

query I rowsort
SELECT ALL 58 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
58
58
58

query I rowsort
SELECT - - 4 AS col1 FROM tab0 GROUP BY tab0.col0
----
4
4
4

query I rowsort
SELECT DISTINCT ( + col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - - 23 FROM tab2 GROUP BY tab2.col0
----
23

query I rowsort
SELECT ALL + - ( - 19 ) FROM tab2 GROUP BY tab2.col1
----
19
19
19

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2, cor0.col0
----
-2025
-5041
-64

query I rowsort
SELECT + col2 + 85 * col2 FROM tab2 AS cor0 GROUP BY col2
----
4988
6794
7482

query I rowsort
SELECT 43 FROM tab0 GROUP BY tab0.col0
----
43
43
43

query I rowsort
SELECT - 82 AS col1 FROM tab0 GROUP BY tab0.col2
----
-82
-82
-82

query I rowsort
SELECT + 55 FROM tab1 GROUP BY tab1.col2
----
55
55
55

query I rowsort
SELECT 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 7 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

query I rowsort
SELECT - 47 AS col1 FROM tab2 GROUP BY tab2.col0
----
-47
-47
-47

query I rowsort
SELECT 24 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1416
1464
984

query I rowsort
SELECT DISTINCT - + col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT 43 AS col1 FROM tab2 GROUP BY tab2.col1
----
43
43
43

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT - 41 AS col1 FROM tab1 GROUP BY col1
----
-41

query I rowsort
SELECT 59 FROM tab0 GROUP BY tab0.col0
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-2532
SELECT ALL cor0.col1 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2532
SELECT ALL cor0.col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT col0 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
-1849
-676
-6889

query I rowsort
SELECT tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + tab0.col1 - + 22 AS col1 FROM tab0 GROUP BY tab0.col1
----
-22
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 77 + - 8 col2 FROM tab2 GROUP BY tab2.col1
----
-85
-85
-85

query I rowsort
SELECT col0 * - cor0.col0 - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-492
-6795
-829

query I rowsort
SELECT + cor0.col1 * 80 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6480

query I rowsort
SELECT - 64 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-64
-64
-64

query I rowsort
SELECT DISTINCT - tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT - + tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT ALL 48 + + col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
127
72
86

query I rowsort
SELECT cor0.col0 * + cor0.col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT + 22 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT 98 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
179
98

query I rowsort
SELECT + 25 FROM tab1 AS cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT DISTINCT + 95 FROM tab1 GROUP BY col1
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 11 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 88 + + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-31
-44
-82

query I rowsort
SELECT - cor0.col1 * + cor0.col2 + + ( - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2, col1
----
-1968
-38
-79

query I rowsort
SELECT + 47 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
47
47

query I rowsort
SELECT 10 AS col0 FROM tab0 GROUP BY tab0.col2
----
10
10
10

query I rowsort
SELECT - col2 * cor0.col2 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 ALL - tab1.col0 + ( - 71 ) col1 FROM tab1 GROUP BY tab1.col0
----
-153
-93
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-2556
SELECT + cor0.col1 DIV 12 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44
63
66

skipif mysql # not compatible
query I rowsort label-2556
SELECT + cor0.col1 / 12 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44
63
66

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + 18 + 29 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT DISTINCT + - 24 FROM tab2 GROUP BY tab2.col1
----
-24

query I rowsort
SELECT DISTINCT - 89 AS col1 FROM tab2 GROUP BY tab2.col2
----
-89

query I rowsort
SELECT ALL + + col1 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL + 3 + + cor0.col2 * - 95 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-2277
-3607
-7502

query I rowsort
SELECT DISTINCT - 54 FROM tab0 GROUP BY tab0.col2
----
-54

query I rowsort
SELECT DISTINCT + 60 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
60

query I rowsort
SELECT ALL cor0.col0 * - 77 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2002
-3311
-6391

query I rowsort
SELECT - 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-80
-80
-80

query I rowsort
SELECT ( tab2.col0 ) FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - - 7 FROM tab0 GROUP BY col0
----
7
7
7

query I rowsort
SELECT ALL + 15 FROM tab1 GROUP BY tab1.col1
----
15
15
15

query I rowsort
SELECT + 91 FROM tab2 GROUP BY tab2.col1
----
91
91
91

query I rowsort
SELECT - 13 FROM tab1 GROUP BY tab1.col1
----
-13
-13
-13

query I rowsort
SELECT ALL - cor0.col1 * + 8 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-352
-456
-48

query I rowsort
SELECT DISTINCT + - 82 AS col1 FROM tab2 GROUP BY col2
----
-82

query I rowsort
SELECT ALL + cor0.col0 + 93 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
115
121
175

query I rowsort
SELECT DISTINCT col1 * + col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT + 52 AS col2 FROM tab1 GROUP BY tab1.col1
----
52

query I rowsort
SELECT cor0.col0 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT 22 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT + tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + + col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL + 73 FROM tab0 cor0 GROUP BY cor0.col1
----
73
73

query I rowsort
SELECT ALL - - NULLIF ( + tab1.col2, + 75 ) AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + tab1.col1 * col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - 50 * - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2200
2850
300

query I rowsort
SELECT + CASE + cor0.col0 WHEN 70 THEN NULL WHEN + cor0.col1 THEN + cor0.col1 END FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 49 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-49

query I rowsort
SELECT - cor0.col1 * cor0.col1 + - cor0.col1 * - cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 57, + tab2.col2 ) FROM tab2 GROUP BY tab2.col1
----
-57

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2590
SELECT DISTINCT + CAST( 87 AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
87

skipif mysql # not compatible
query I rowsort label-2590
SELECT DISTINCT + CAST ( 87 AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
87

query I rowsort
SELECT 69 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5589

query I rowsort
SELECT 84 FROM tab0 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL BETWEEN NULL AND NULL
----

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 - tab2.col1 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT - col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT + col2 + - tab2.col2 IS NULL
----
3364
6241
7569

query I rowsort
SELECT + tab0.col2 + - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2598
SELECT DISTINCT - col0 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2598
SELECT DISTINCT - col0 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
0

query I rowsort
SELECT + 36 + - 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT - 20 * 80 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-1600
-1600
-1600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * 56 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-3248
-4424
-4872

onlyif mysql # DIV for integer division: 
query I rowsort label-2602
SELECT 16 DIV - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2602
SELECT 16 / - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL + 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT ALL - 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-96
-96
-96

query I rowsort
SELECT + 50 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4050

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col1 FROM tab2 GROUP BY tab2.col2
----
27
27
27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2608
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2608
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col1
----
NULL

query I rowsort
SELECT ALL + 29 AS col1 FROM tab2 GROUP BY tab2.col0
----
29
29
29

query I rowsort
SELECT 5 FROM tab0 GROUP BY tab0.col0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 35 + 21 col2 FROM tab2 GROUP BY tab2.col2
----
-14
-14
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-2612
SELECT COALESCE ( - 89, 74 DIV cor0.col0, + cor0.col0 + col2, - cor0.col1 ) FROM tab0 cor0 GROUP BY col0
----
-89
-89
-89

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2612
SELECT COALESCE ( - 89, 74 / cor0.col0, + cor0.col0 + col2, - cor0.col1 ) FROM tab0 cor0 GROUP BY col0
----
-89
-89
-89

query I rowsort
SELECT ALL - 7 AS col0 FROM tab2 GROUP BY tab2.col2
----
-7
-7
-7

query I rowsort
SELECT ALL 91 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
149
170
178

query I rowsort
SELECT 87 FROM tab1 cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT ALL + 2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
2
2

query I rowsort
SELECT + - col0 + 65 FROM tab0 GROUP BY tab0.col0
----
-18
22
39

onlyif mysql # DIV for integer division: 
query I rowsort label-2618
SELECT ALL tab2.col1 DIV + 34 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2618
SELECT ALL tab2.col1 / + 34 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + 89 FROM tab2 GROUP BY tab2.col1
----
89

onlyif mysql # DIV for integer division: 
query I rowsort label-2620
SELECT - cor0.col0 + - cor0.col0 DIV NULLIF ( cor0.col0, - 7 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23
-29
-83

skipif mysql # not compatible
query I rowsort label-2620
SELECT - cor0.col0 + - cor0.col0 / NULLIF ( cor0.col0, - 7 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23
-29
-83

query I rowsort
SELECT DISTINCT + ( - 85 ) FROM tab0 GROUP BY tab0.col0
----
-85

query I rowsort
SELECT + 82 AS col1 FROM tab2 GROUP BY tab2.col0
----
82
82
82

query I rowsort
SELECT + 51 AS col0 FROM tab1 GROUP BY tab1.col1
----
51
51
51

query I rowsort
SELECT 9 AS col1 FROM tab0 GROUP BY tab0.col0
----
9
9
9

query I rowsort
SELECT - 5 FROM tab2 cor0 GROUP BY cor0.col2
----
-5
-5
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - - 32 FROM tab0 GROUP BY tab0.col2
----
32
32
32

query I rowsort
SELECT ALL + - 92 AS col1 FROM tab0 GROUP BY tab0.col0
----
-92
-92
-92

query I rowsort
SELECT ALL - - 37 FROM tab1 GROUP BY tab1.col0
----
37
37
37

query I rowsort
SELECT ALL + 31 FROM tab2 GROUP BY tab2.col0
----
31
31
31

query I rowsort
SELECT ALL - - 86 FROM tab1 GROUP BY tab1.col2
----
86
86
86

query I rowsort
SELECT ALL + 77 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT 88 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
88
88

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
35

query I rowsort
SELECT + col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL 12 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
12
12
12

query I rowsort
SELECT DISTINCT 90 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
90

query I rowsort
SELECT + 77 - - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
103
120
160

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT - 52 FROM tab2 GROUP BY tab2.col2
----
-52
-52
-52

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT 71 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
71
71
71

query I rowsort
SELECT ALL - tab0.col0 + 78 FROM tab0 GROUP BY col0
----
-5
35
52

onlyif mysql # DIV for integer division: 
query I rowsort label-2646
SELECT ALL 60 DIV - 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2646
SELECT ALL 60 / - 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2647
SELECT - COALESCE ( 52, tab0.col2 ) DIV - 73 FROM tab0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2647
SELECT - COALESCE ( 52, tab0.col2 ) / - 73 FROM tab0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT + col0 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
153
30
73

query I rowsort
SELECT + col0 * + col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT - 93 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT + 75 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 * - col1 col2 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT + 71 FROM tab2 AS cor0 GROUP BY col1
----
71
71
71

query I rowsort
SELECT ALL 64 AS col1 FROM tab0 GROUP BY tab0.col2
----
64
64
64

query I rowsort
SELECT DISTINCT col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT 45 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
45
45
45

query I rowsort
SELECT 9 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
135
819
828

query I rowsort
SELECT ALL + tab1.col0 + - 95 AS col0 FROM tab1 GROUP BY tab1.col0
----
-13
-67
-73

query I rowsort
SELECT + 51 * - tab1.col2 FROM tab1 GROUP BY col2
----
-2295
-3621
-408

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 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2 GROUP BY col2 HAVING NOT ( NULL ) IS NOT NULL
----
58
79
87

query I rowsort
SELECT ALL - + 79 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-79
-79
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 44 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
44
44
44

query I rowsort
SELECT + cor0.col2 * + 84 - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1992
3154
6557

query I rowsort
SELECT - 94 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-94
-94
-94

query I rowsort
SELECT - 66 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT col2 * cor0.col0 + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1320
5428
7280

query I rowsort
SELECT + 2 FROM tab1 AS cor0 GROUP BY col1
----
2
2
2

query I rowsort
SELECT ALL + 85 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1870
2380
6970

query I rowsort
SELECT DISTINCT + 65 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
5265

query I rowsort
SELECT - 76 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT - 69 * 49 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3422
-3440
-3442

onlyif mysql # DIV for integer division: 
query I rowsort label-2676
SELECT - 33 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2676
SELECT - 33 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
1

query I rowsort
SELECT ALL - + 52 AS col1 FROM tab0 GROUP BY tab0.col1
----
-52
-52

query I rowsort
SELECT ALL - - 59 FROM tab1 GROUP BY tab1.col2
----
59
59
59

query I rowsort
SELECT DISTINCT + 10 AS col2 FROM tab1 GROUP BY tab1.col2
----
10

query I rowsort
SELECT DISTINCT - + 4 AS col1 FROM tab0 GROUP BY tab0.col2
----
-4

onlyif mysql # DIV for integer division: 
query I rowsort label-2681
SELECT - - tab2.col0 + - col0 DIV 64 FROM tab2 GROUP BY tab2.col0
----
15
90
91

skipif mysql # not compatible
query I rowsort label-2681
SELECT - - tab2.col0 + - col0 / 64 FROM tab2 GROUP BY tab2.col0
----
15
90
91

onlyif mysql # DIV for integer division: 
query I rowsort label-2682
SELECT + col2 + 47 DIV - 51 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2682
SELECT + col2 + 47 / - 51 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT - 70 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-70
-70
-70

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT 40 + 53 FROM tab1 GROUP BY col0
----
93

query I rowsort
SELECT ALL - col2 * - 39 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1800
2840
320

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-2689
SELECT ALL cor0.col2 DIV 62 FROM tab2 cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2689
SELECT ALL cor0.col2 / 62 FROM tab2 cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT ALL + 33 FROM tab2 GROUP BY tab2.col0
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-2691
SELECT ALL tab2.col0 DIV + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2691
SELECT ALL tab2.col0 / + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT ALL cor0.col1 + 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
57
70

query I rowsort
SELECT + 34 FROM tab0 cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT - 94 FROM tab1 GROUP BY col2
----
-94
-94
-94

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2696
SELECT DISTINCT + CAST( 80 AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
80

skipif mysql # not compatible
query I rowsort label-2696
SELECT DISTINCT + CAST ( 80 AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
80

query I rowsort
SELECT DISTINCT 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57

query I rowsort
SELECT - 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-63
-63
-63

query I rowsort
SELECT 58 FROM tab1 cor0 GROUP BY cor0.col1
----
58
58
58

onlyif mysql # DIV for integer division: 
query I rowsort label-2700
SELECT DISTINCT 48 DIV - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1
-6
0

skipif mysql # not compatible
query I rowsort label-2700
SELECT DISTINCT 48 / - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1
-6
0

query I rowsort
SELECT - 19 FROM tab0 GROUP BY col2
----
-19
-19
-19

query I rowsort
SELECT ALL - + 24 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-24
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 col2 FROM tab2 GROUP BY tab2.col2
----
65
65
65

query I rowsort
SELECT 47 AS col2 FROM tab0 GROUP BY tab0.col2
----
47
47
47

query I rowsort
SELECT DISTINCT - col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL ( - col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT - 70 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-70
-70
-70

onlyif mysql # DIV for integer division: 
query I rowsort label-2709
SELECT DISTINCT - - tab1.col0 DIV tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-2709
SELECT DISTINCT - - tab1.col0 / tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT DISTINCT 9 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
522
711
783

query I rowsort
SELECT ALL - tab1.col0 * - 24 AS col2 FROM tab1 GROUP BY tab1.col0
----
1968
528
672

query I rowsort
SELECT col2 * 39 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1482
3081
936

query I rowsort
SELECT 42 AS col0 FROM tab0 GROUP BY tab0.col2
----
42
42
42

query I rowsort
SELECT - cor0.col1 + + cor0.col1 * + 57 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2296
3304
3416

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT 64 AS col0 FROM tab1 GROUP BY tab1.col2
----
64

query I rowsort
SELECT DISTINCT - 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-63

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT 65 FROM tab0 cor0 GROUP BY cor0.col0
----
65

query I rowsort
SELECT 21 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT ALL 59 FROM tab2 GROUP BY col2
----
59
59
59

query I rowsort
SELECT DISTINCT - 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-2726
SELECT ALL - + tab2.col0 DIV + 49 FROM tab2 GROUP BY tab2.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2726
SELECT ALL - + tab2.col0 / + 49 FROM tab2 GROUP BY tab2.col0
----
-1
-1
0

query I rowsort
SELECT DISTINCT + 92 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
1380
8372
8464

query I rowsort
SELECT ALL + ( cor0.col2 ) * + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2025
5041
64

query I rowsort
SELECT 96 FROM tab0 GROUP BY tab0.col0
----
96
96
96

query I rowsort
SELECT - cor0.col2 - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-138
-148
-99

query I rowsort
SELECT + 61 FROM tab0 GROUP BY tab0.col1
----
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2732
SELECT col1 DIV 7 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6
8

skipif mysql # not compatible
query I rowsort label-2732
SELECT col1 / 7 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6
8

onlyif mysql # DIV for integer division: 
query I rowsort label-2733
SELECT - COALESCE ( - 80, tab2.col1 ) DIV + ( 52 ) col1 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2733
SELECT - COALESCE ( - 80, tab2.col1 ) / + ( 52 ) col1 FROM tab2 GROUP BY col0
----
1
1
1

query I rowsort
SELECT ALL - col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT cor0.col2 - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT - 17 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT + 79 FROM tab1 GROUP BY tab1.col0
----
79
79
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2739
SELECT col1 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2739
SELECT col1 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

query I rowsort
SELECT 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT 3 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
3
3
3

query I rowsort
SELECT - col0 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 0 col1 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT DISTINCT 86 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
86

query I rowsort
SELECT + 6 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
6
6
6

query I rowsort
SELECT ALL tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL 95 FROM tab1 GROUP BY tab1.col1
----
95
95
95

query I rowsort
SELECT DISTINCT - 15 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-615
-885
-915

query I rowsort
SELECT ALL + - 85 FROM tab1 GROUP BY tab1.col2
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-14
-14
-14

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * + 18 + - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1343
1479
986

query I rowsort
SELECT + 53 + - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-18
45
8

query I rowsort
SELECT - 55 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-55
-55
-55

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2025
5041
64

query I rowsort
SELECT - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NULL
----
-15
-91
-92

query I rowsort
SELECT 27 * + 18 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
486
486
486

query I rowsort
SELECT DISTINCT - ( col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + tab2.col1 * + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - cor0.col2 + - col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-158
-48
-76

query I rowsort
SELECT 56 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
56
56
56

query I rowsort
SELECT DISTINCT + 49 FROM tab1 GROUP BY tab1.col1
----
49

query I rowsort
SELECT ALL 78 * + 80 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
6240
6240
6240

query I rowsort
SELECT ( cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col2 * + 49 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2205
-3479
-392

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2768
SELECT ALL + - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2768
SELECT ALL + - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 67 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1474
1876
5494

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-2771
SELECT ALL cor0.col1 DIV 92 + + 11 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11
11

skipif mysql # not compatible
query I rowsort label-2771
SELECT ALL cor0.col1 / 92 + + 11 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11
11

query I rowsort
SELECT + - ( 44 ) AS col0 FROM tab2 GROUP BY col2
----
-44
-44
-44

query I rowsort
SELECT DISTINCT 40 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40

query I rowsort
SELECT 2 AS col2 FROM tab0 GROUP BY tab0.col1
----
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2775
SELECT + col2 * col2 + + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2775
SELECT + col2 * col2 + + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT + - 99 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-99
-99
-99

query I rowsort
SELECT + 73 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT DISTINCT - 61 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1586
-2623
-5063

query I rowsort
SELECT + - 13 FROM tab1 GROUP BY tab1.col2
----
-13
-13
-13

onlyif mysql # DIV for integer division: 
query I rowsort label-2782
SELECT + tab0.col2 + + tab0.col2 DIV tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
25
39
80

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2782
SELECT + tab0.col2 + + tab0.col2 / tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
25
39
80

query I rowsort
SELECT col2 FROM tab2 WHERE ( NULL ) IS NOT NULL GROUP BY tab2.col2
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL <> col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * 52 col1 FROM tab0 AS cor0 GROUP BY col2
----
1248
1976
4108

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
-58
-79
-87

query I rowsort
SELECT tab0.col1 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 22 AS col0 FROM tab2 GROUP BY tab2.col2
----
22

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 0, + tab1.col2, col1 * - tab1.col1 - + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2791
SELECT ALL + 54 + cor0.col0 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
54
55
56

skipif mysql # not compatible
query I rowsort label-2791
SELECT ALL + 54 + cor0.col0 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
54
55
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 22 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
22

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2793
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2793
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
NULL

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL + - tab2.col1 * - 58 FROM tab2 GROUP BY tab2.col1
----
2378
3422
3538

query I rowsort
SELECT ALL + 24 FROM tab1 GROUP BY tab1.col1
----
24
24
24

query I rowsort
SELECT - - 37 * - 74 FROM tab0 GROUP BY tab0.col0
----
-2738
-2738
-2738

query I rowsort
SELECT DISTINCT + + 99 FROM tab1 GROUP BY tab1.col1
----
99

query I rowsort
SELECT 37 + + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
128
129
52

query I rowsort
SELECT DISTINCT + 61 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
61

query I rowsort
SELECT DISTINCT + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + + tab2.col0 + 30 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
2821
2852
465

query I rowsort
SELECT + 14 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1892
-30
-3192

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 8, - cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-8
-8
-8

query I rowsort
SELECT ALL 54 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
54
54
54

query I rowsort
SELECT DISTINCT 29 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 14 ) col1 FROM tab2 cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT + 60 FROM tab2 GROUP BY col1
----
60
60
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2813
SELECT + - tab0.col1 + CAST( NULL AS SIGNED ) / 21 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2813
SELECT + - tab0.col1 + CAST ( NULL AS INTEGER ) / 21 FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + 55 AS col0 FROM tab2 GROUP BY tab2.col2
----
55

query I rowsort
SELECT DISTINCT + 93 FROM tab2 GROUP BY tab2.col2
----
93

onlyif mysql # DIV for integer division: 
query I rowsort label-2816
SELECT DISTINCT - 56 DIV 68 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-2816
SELECT DISTINCT - 56 / 68 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT 29 * cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 675567a0034d7d88157fb27097ec7ab9

query I rowsort
SELECT 89 FROM tab2 GROUP BY col1
----
89
89
89

query I rowsort
SELECT 29 * tab0.col0 FROM tab0 GROUP BY col0
----
1247
2407
754

query I rowsort
SELECT - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - - col2 * + 20 FROM tab2 GROUP BY tab2.col2
----
1160
1580
1740

onlyif mysql # DIV for integer division: 
query I rowsort label-2825
SELECT cor0.col1 DIV cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2825
SELECT cor0.col1 / cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 * - 70 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1846
-3053
-5893

query I rowsort
SELECT DISTINCT + 89 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
89

query I rowsort
SELECT DISTINCT 22 + tab0.col0 FROM tab0 GROUP BY col0
----
105
48
65

query I rowsort
SELECT + cor0.col1 * 43 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1892
2451
258

query I rowsort
SELECT ALL + ( 91 ) + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
132
150
152

query I rowsort
SELECT 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
75
75
75

query I rowsort
SELECT ALL + - 95 FROM tab1 GROUP BY tab1.col0
----
-95
-95
-95

query I rowsort
SELECT - + 37 AS col1 FROM tab1 GROUP BY tab1.col2
----
-37
-37
-37

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col0 + + 88 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1545
16289
16560

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT 96 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
96

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 - - tab1.col1 + + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT 37 + col1 FROM tab2 GROUP BY tab2.col1
----
78
96
98

query I rowsort
SELECT cor0.col1 - 0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT DISTINCT 68 * + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3060
4828
544

query I rowsort
SELECT - cor0.col0 * cor0.col0 + - 89 * col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-12113
-13532
-5654

query I rowsort
SELECT DISTINCT COALESCE ( + 34, 42 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT DISTINCT 46 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1104
1748
3634

query I rowsort
SELECT DISTINCT - 82 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3690
5822
656

query I rowsort
SELECT ALL - 26 * 87 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2262
-2262
-2262

query I rowsort
SELECT 42 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
42
42

query I rowsort
SELECT ALL + col1 + + tab1.col1 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT - 2 + - tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
482
6722
782

query I rowsort
SELECT + + tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT + 3 * col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
174
237
261

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 79 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-79
-79
-79

query I rowsort
SELECT ALL + - NULLIF ( 95, + tab1.col0 ) FROM tab1 GROUP BY col0
----
-95
-95
-95

query I rowsort
SELECT + 73 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1606
2044
5986

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 58 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT ALL 99 * + 47 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
4653
4653
4653

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab1 GROUP BY col2
----
76

query I rowsort
SELECT + cor0.col0 * + cor0.col0 - + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
462
6642
756

query I rowsort
SELECT + 22 FROM tab0 GROUP BY tab0.col1
----
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 col2 FROM tab2 GROUP BY tab2.col1
----
-18
-18
-18

query I rowsort
SELECT + - tab1.col1 - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT + tab2.col0 / tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL + tab0.col0 + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-2866
SELECT - col0 + + COALESCE ( 92, - tab2.col2 DIV + tab2.col2 + tab2.col2 * + tab2.col2 ) DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-9
-90
-91

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2866
SELECT - col0 + + COALESCE ( 92, - tab2.col2 / + tab2.col2 + tab2.col2 * + tab2.col2 ) / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-9
-90
-91

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT + - 64 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-64
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 13 + - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-28
-46
-48

query I rowsort
SELECT - tab2.col1 AS col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - - 29 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
112
55
72

query I rowsort
SELECT ( 56 ) FROM tab0 GROUP BY tab0.col0
----
56
56
56

query I rowsort
SELECT ALL + 68 FROM tab0 GROUP BY tab0.col1
----
68
68

query I rowsort
SELECT + ( - tab0.col2 ) - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT + cor0.col1 * 27 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
1188
1539
162

onlyif mysql # DIV for integer division: 
query I rowsort label-2879
SELECT col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2879
SELECT col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT + 61 AS col1 FROM tab0 GROUP BY tab0.col1
----
61
61

query I rowsort
SELECT ALL + 95 FROM tab2 GROUP BY tab2.col1
----
95
95
95

query I rowsort
SELECT + 31 FROM tab2 AS cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT 99 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
99
99
99

query I rowsort
SELECT + 48 FROM tab2 GROUP BY col0
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + tab2.col0 + 78 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1185
7189
7268

onlyif mysql # DIV for integer division: 
query I rowsort label-2887
SELECT - cor0.col1 DIV - 50 FROM tab1 AS cor0 GROUP BY col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2887
SELECT - cor0.col1 / - 50 FROM tab1 AS cor0 GROUP BY col1
----
0
0
1

query I rowsort
SELECT DISTINCT 27 FROM tab0 GROUP BY tab0.col0
----
27

query I rowsort
SELECT 75 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT 39 AS col2 FROM tab2 GROUP BY tab2.col1
----
39

query I rowsort
SELECT DISTINCT tab0.col1 + 18 FROM tab0 GROUP BY tab0.col1
----
18
99

query I rowsort
SELECT DISTINCT tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ( 47 ) FROM tab1 GROUP BY tab1.col2
----
47
47
47

query I rowsort
SELECT ( 9 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 92 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT 67 + cor0.col0 * - 90 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2273
-3803
-7403

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 70, cor0.col1, cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT - - 1 AS col0 FROM tab1 GROUP BY tab1.col0
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2899
SELECT ALL - 77 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-2899
SELECT ALL - 77 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2
-3
0

query I rowsort
SELECT 1 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT 13 AS col1 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT ALL + 15 FROM tab1 GROUP BY tab1.col2
----
15
15
15

query I rowsort
SELECT ALL - 29 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-21
16
42

query I rowsort
SELECT + NULLIF ( - cor0.col2, 99 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - - tab0.col1 * 37 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
2997

query I rowsort
SELECT DISTINCT 43 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-36
19
5

query I rowsort
SELECT + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL 77 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT ALL - 64 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-64
-64
-64

query I rowsort
SELECT ALL + - col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + tab2.col0 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
92
92
92

query I rowsort
SELECT DISTINCT - col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 + - 69 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1375
507
6172

query I rowsort
SELECT + 69 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
69
69

query I rowsort
SELECT 78 * 45 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3510
3510

query I rowsort
SELECT 68 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT DISTINCT 81 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
81

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 78 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT + cor0.col2 * + 58 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
4582
5046

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0

query I rowsort
SELECT + 9 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 43 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1118
1849
3569

query I rowsort
SELECT - col2 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL 70 FROM tab2 GROUP BY tab2.col2
----
70
70
70

query I rowsort
SELECT ALL 86 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
86
86
86

query I rowsort
SELECT + 34 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
34
34

query I rowsort
SELECT ALL 98 AS col2 FROM tab2 GROUP BY tab2.col2
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 10 AS col0 FROM tab1 GROUP BY tab1.col1
----
-10

query I rowsort
SELECT - - 23 FROM tab2 GROUP BY tab2.col0
----
23
23
23

query I rowsort
SELECT ALL + ( + cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + + 48 AS col0 FROM tab0 GROUP BY tab0.col2
----
48

query I rowsort
SELECT DISTINCT + 18 * 40 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
628
629
705

query I rowsort
SELECT DISTINCT 21 AS col0 FROM tab0 GROUP BY col2
----
21

query I rowsort
SELECT DISTINCT - - 55 FROM tab2 GROUP BY tab2.col2
----
55

query I rowsort
SELECT + 7 FROM tab2 AS cor0 GROUP BY cor0.col1
----
7
7
7

query I rowsort
SELECT + 59 AS col2 FROM tab2 GROUP BY col1
----
59
59
59

query I rowsort
SELECT ALL + 69 FROM tab1 AS cor0 GROUP BY col2
----
69
69
69

onlyif mysql # DIV for integer division: 
query I rowsort label-2946
SELECT tab2.col0 DIV + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2946
SELECT tab2.col0 / + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - 82 + tab2.col2 FROM tab2 GROUP BY col2
----
-24
-3
5

query I rowsort
SELECT DISTINCT 47 FROM tab0 GROUP BY tab0.col0
----
47

query I rowsort
SELECT ALL cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT - 89 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
5162
7031
7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + - 91 AS col1 FROM tab0 GROUP BY tab0.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 84 FROM tab1 AS cor0 GROUP BY col2
----
84

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + 68 AS col2 FROM tab0 GROUP BY tab0.col1
----
68
68

query I rowsort
SELECT + 64 FROM tab2 GROUP BY tab2.col1
----
64
64
64

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-2958
SELECT + CAST( 30 AS SIGNED ) DIV + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2958
SELECT + CAST ( 30 AS INTEGER ) / + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ( + cor0.col0 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT cor0.col1 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-16
-38
29

query I rowsort
SELECT ALL - - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2962
SELECT ALL + tab2.col1 DIV tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2962
SELECT ALL + tab2.col1 / tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT + cor0.col1 * 79 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6399

query I rowsort
SELECT - cor0.col1 * - 85 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6885

query I rowsort
SELECT DISTINCT + + tab2.col2 * 99 AS col1 FROM tab2 GROUP BY tab2.col2
----
5742
7821
8613

query I rowsort
SELECT 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT - 90 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-90
-90
-90

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2969
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) col1 FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2969
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) col1 FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT ALL - tab2.col0 + - tab2.col0 * 3 FROM tab2 GROUP BY tab2.col0
----
-364
-368
-60

query I rowsort
SELECT DISTINCT + 51 FROM tab1 GROUP BY tab1.col1
----
51

query I rowsort
SELECT ALL 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-2973
SELECT ALL cor0.col2 DIV + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2973
SELECT ALL cor0.col2 / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col1 * 60 + 88 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2728
3508
448

query I rowsort
SELECT + - 6 FROM tab0 GROUP BY tab0.col0
----
-6
-6
-6

query I rowsort
SELECT ALL - 8 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col2, cor0.col2
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT ALL 45 * col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2070
3266
368

query I rowsort
SELECT - 97 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2328
3686
7663

query I rowsort
SELECT 24 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT cor0.col1 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
2565
3124
48

query I rowsort
SELECT DISTINCT - tab1.col1 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT 69 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
69

query I rowsort
SELECT + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - + 36 AS col0 FROM tab0 GROUP BY tab0.col2
----
-36
-36
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-2986
SELECT DISTINCT + - tab2.col1 DIV tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-2986
SELECT DISTINCT + - tab2.col1 / tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
-1

query I rowsort
SELECT + 86 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
86
86
86

query I rowsort
SELECT - 77 FROM tab2 AS cor0 GROUP BY col1
----
-77
-77
-77

onlyif mysql # DIV for integer division: 
query I rowsort label-2989
SELECT DISTINCT + cor0.col0 - cor0.col0 DIV col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-2989
SELECT DISTINCT + cor0.col0 - cor0.col0 / col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT - 14 AS col2 FROM tab1 GROUP BY tab1.col2
----
-14
-14
-14

query I rowsort
SELECT + - tab2.col0 * - 48 + + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
4459
4508
735

query I rowsort
SELECT DISTINCT + 34 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
34

query I rowsort
SELECT - 27 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-27
-27
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-2995
SELECT DISTINCT + - 83 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2995
SELECT DISTINCT + - 83 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-2
-3

query I rowsort
SELECT tab2.col0 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
92

query I rowsort
SELECT ALL 72 FROM tab1 GROUP BY col0
----
72
72
72

query I rowsort
SELECT - cor0.col2 + + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 72 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
72

query I rowsort
SELECT ALL + + 57 AS col1 FROM tab1 GROUP BY tab1.col1
----
57
57
57

query I rowsort
SELECT - 18 + + 43 FROM tab1 GROUP BY tab1.col1
----
25
25
25

query I rowsort
SELECT ALL - cor0.col0 * cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-3772
-5369
-915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 16 * tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
704
912
96

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + + ( + col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 20 FROM tab0 GROUP BY tab0.col2
----
20
20
20

query I rowsort
SELECT 29 AS col1 FROM tab2 GROUP BY tab2.col1
----
29
29
29

query I rowsort
SELECT ALL + - 98 * - 97 AS col0 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
9506
9506

onlyif mysql # DIV for integer division: 
query I rowsort label-3011
SELECT ALL - 9 DIV 86 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

skipif mysql # not compatible
query I rowsort label-3011
SELECT ALL - 9 / 86 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 62 + 37 AS col0 FROM tab2 GROUP BY tab2.col1
----
99
99
99

query I rowsort
SELECT + - col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 41 FROM tab0 AS cor0 GROUP BY col2
----
-41
-41
-41

onlyif mysql # DIV for integer division: 
query I rowsort label-3015
SELECT + + COALESCE ( + tab0.col2, + tab0.col2 DIV - tab0.col2 ) * - 88 FROM tab0 GROUP BY tab0.col2
----
-2112
-3344
-6952

skipif mysql # not compatible
query I rowsort label-3015
SELECT + + COALESCE ( + tab0.col2, + tab0.col2 / - tab0.col2 ) * - 88 FROM tab0 GROUP BY tab0.col2
----
-2112
-3344
-6952

query I rowsort
SELECT ALL 4 * 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
224
224
224

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0

query I rowsort
SELECT ALL tab2.col0 + + tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 * + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-210
-8190
-8372

query I rowsort
SELECT - cor0.col2 + + 90 FROM tab2 AS cor0 GROUP BY col2
----
11
3
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 56 col2 FROM tab0 GROUP BY tab0.col1
----
-56

query I rowsort
SELECT - 23 * + 91 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2093
-2093
-2093

query I rowsort
SELECT ALL + ( + tab0.col1 ) AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT + cor0.col2 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 73 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT DISTINCT 72 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 col0 FROM tab2 GROUP BY tab2.col1
----
-79
-79
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 72 col2 FROM tab0 GROUP BY tab0.col0
----
72

query I rowsort
SELECT + 64 * + ( 48 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
3072
3072

query I rowsort
SELECT + 68 FROM tab0 AS cor0 GROUP BY col0
----
68
68
68

query I rowsort
SELECT - tab1.col0 FROM tab1 WHERE NULL IS NOT NULL GROUP BY tab1.col0
----

query I rowsort
SELECT + col0 + 31 * + 60 FROM tab2 GROUP BY tab2.col0
----
1875
1951
1952

query I rowsort
SELECT DISTINCT tab0.col1 * - 82 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6723
0

query I rowsort
SELECT ( - 29 ) * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-2639
-2668
-435

query I rowsort
SELECT - 20 * 98 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1960
-1960
-1960

onlyif mysql # DIV for integer division: 
query I rowsort label-3040
SELECT - cor0.col2 * 98 - + 65 DIV + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-5685
-7742
-8526

skipif mysql # not compatible
query I rowsort label-3040
SELECT - cor0.col2 * 98 - + 65 / + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-5685
-7742
-8526

query I rowsort
SELECT DISTINCT - 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-54

query I rowsort
SELECT ALL cor0.col1 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-132
-1596
-3608

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
8
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-3045
SELECT DISTINCT - 82 DIV tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3045
SELECT DISTINCT - 82 / tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 50 col1 FROM tab2 GROUP BY tab2.col1
----
50

query I rowsort
SELECT ALL + ( - 87 ) FROM tab1 cor0 GROUP BY cor0.col0
----
-87
-87
-87

query I rowsort
SELECT 63 * - 45 FROM tab0 cor0 GROUP BY cor0.col0
----
-2835
-2835
-2835

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3050
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3050
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + tab1.col0 * + col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-95

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 11 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT + cor0.col2 * - 61 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3538
-4819
-5307

query I rowsort
SELECT 89 AS col0 FROM tab2 GROUP BY tab2.col0
----
89
89
89

query I rowsort
SELECT - - 24 FROM tab0 GROUP BY tab0.col0
----
24
24
24

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + 52 * col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
2132
3068
3172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 col2 FROM tab1 GROUP BY col0
----
51

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( cor0.col2, ( + 73 ), - col2 * - cor0.col0 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 57 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-57

onlyif mysql # DIV for integer division: 
query I rowsort label-3063
SELECT - 72 + cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-71
-71
-71

skipif mysql # not compatible
query I rowsort label-3063
SELECT - 72 + cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-71
-71
-71

query I rowsort
SELECT DISTINCT 67 AS col0 FROM tab0 GROUP BY tab0.col0
----
67

query I rowsort
SELECT ALL + 36 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-55
-56
21

query I rowsort
SELECT ALL 2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + ( 2 ) FROM tab2 AS cor0 GROUP BY col2
----
2

onlyif mysql # DIV for integer division: 
query I rowsort label-3069
SELECT - + tab2.col0 * + tab2.col0 - - tab2.col0 DIV - 10 AS col2 FROM tab2 GROUP BY tab2.col0
----
-226
-8290
-8473

skipif mysql # not compatible
query I rowsort label-3069
SELECT - + tab2.col0 * + tab2.col0 - - tab2.col0 / - 10 AS col2 FROM tab2 GROUP BY tab2.col0
----
-226
-8290
-8473

query I rowsort
SELECT - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL + 70 FROM tab0 GROUP BY tab0.col0
----
70
70
70

query I rowsort
SELECT + 75 FROM tab1 GROUP BY tab1.col0
----
75
75
75

query I rowsort
SELECT + 0 + + 27 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
1026
2133
648

query I rowsort
SELECT ALL + 69 AS col2 FROM tab1 GROUP BY col0
----
69
69
69

query I rowsort
SELECT 47 + cor0.col0 * + 54 FROM tab1 AS cor0 GROUP BY col0
----
1235
1559
4475

query I rowsort
SELECT 3 * 17 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
51
51
51

query I rowsort
SELECT 94 * cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
4136
5358
564

query I rowsort
SELECT ALL + col0 + + 58 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2470
3513
3553

onlyif mysql # DIV for integer division: 
query I rowsort label-3079
SELECT ALL + - 36 DIV + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3079
SELECT ALL + - 36 / + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL - + 11 AS col1 FROM tab0 GROUP BY tab0.col1
----
-11
-11

query I rowsort
SELECT 61 FROM tab1 cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT 86 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col2
----
86

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - + 47 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-47

onlyif mysql # DIV for integer division: 
query I rowsort label-3085
SELECT - 85 DIV col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-3085
SELECT - 85 / col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-2

query I rowsort
SELECT + 90 FROM tab2 cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT + 16 + col0 AS col2 FROM tab1 GROUP BY col0
----
38
44
98

query I rowsort
SELECT 2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + + 17 FROM tab2 GROUP BY tab2.col2
----
17

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT 50 * - 72 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-3600
-3600
-3600

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 25 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col1 + 42 * - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-3483
0

query I rowsort
SELECT + cor0.col0 * - 80 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1200
-7280
-7360

query I rowsort
SELECT ALL 67 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT ALL - cor0.col0 - - 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-6
-60
0

query I rowsort
SELECT - 87 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-87
-87
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 col0 FROM tab0 AS cor0 GROUP BY col0
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * 53 col2 FROM tab0 AS cor0 GROUP BY col0
----
1378
2279
4399

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3405
-6300
-7630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 57 col1 FROM tab0 GROUP BY tab0.col2
----
-57
-57
-57

onlyif mysql # DIV for integer division: 
query I rowsort label-3104
SELECT ALL - tab0.col2 DIV - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3104
SELECT ALL - tab0.col2 / - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + + 77 AS col2 FROM tab2 GROUP BY col2
----
77

query I rowsort
SELECT col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 70 AS col2 FROM tab1 GROUP BY tab1.col0
----
-70
-70
-70

query I rowsort
SELECT 9 AS col2 FROM tab0 GROUP BY tab0.col0
----
9
9
9

query I rowsort
SELECT ALL - 60 FROM tab2 AS cor0 GROUP BY col0
----
-60
-60
-60

query I rowsort
SELECT + 74 FROM tab2 GROUP BY tab2.col0
----
74
74
74

query I rowsort
SELECT 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT ALL 42 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT DISTINCT 7 AS col2 FROM tab0 GROUP BY tab0.col1
----
7

onlyif mysql # DIV for integer division: 
query I rowsort label-3114
SELECT + cor0.col1 DIV + 39 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-3114
SELECT + cor0.col1 / + 39 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

query I rowsort
SELECT - cor0.col2 - - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( - 64 ) col2 FROM tab0 GROUP BY tab0.col0
----
64
64
64

query I rowsort
SELECT - ( 26 ) FROM tab1 GROUP BY tab1.col2
----
-26
-26
-26

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab1 GROUP BY tab1.col1
----
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - 96 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-96
-96
-96

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
78

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT ALL + cor0.col2 * 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3870
6106
688

query I rowsort
SELECT 75 + - cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col1
----
9 values hashing to 70617980418e33e6b5845f460d6ac9f7

query I rowsort
SELECT + col1 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + 15 col2 FROM tab0 GROUP BY col0
----
41
58
98

query I rowsort
SELECT - 19 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
22
40
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 10 + col2 col0 FROM tab0 GROUP BY tab0.col2
----
34
48
89

query I rowsort
SELECT DISTINCT + cor0.col2 + - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1, cor0.col2
----
-57
38
79

query I rowsort
SELECT + 39 AS col2 FROM tab0 GROUP BY tab0.col2
----
39
39
39

query I rowsort
SELECT DISTINCT 87 FROM tab0 cor0 GROUP BY cor0.col2
----
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3132
SELECT DISTINCT - tab2.col0 * CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3132
SELECT DISTINCT - tab2.col0 * CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT - 58 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-58

query I rowsort
SELECT DISTINCT - 80 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-80

query I rowsort
SELECT ( + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 58 * + 94 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
5371
5452

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 52 + + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
133
52

query I rowsort
SELECT - 28 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-28
-28
-28

query I rowsort
SELECT 78 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-3142
SELECT + cor0.col2 DIV cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3142
SELECT + cor0.col2 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + 89 * - 52 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-4628
-4628
-4628

query I rowsort
SELECT - 57 AS col1 FROM tab2 GROUP BY tab2.col0
----
-57
-57
-57

query I rowsort
SELECT - tab2.col1 + - col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT 56 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
56
56
56

query I rowsort
SELECT - 22 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-22
-22

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 62 FROM tab0 GROUP BY tab0.col2
----
62

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL + tab0.col0 * 95 AS col0 FROM tab0 GROUP BY tab0.col0
----
2470
4085
7885

query I rowsort
SELECT DISTINCT - 69 - 72 FROM tab0 GROUP BY tab0.col2
----
-141

query I rowsort
SELECT DISTINCT - 87 AS col1 FROM tab1 GROUP BY tab1.col2
----
-87

query I rowsort
SELECT DISTINCT - 33 AS col0 FROM tab0 GROUP BY tab0.col2
----
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-3156
SELECT + 37 DIV + 39 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-3156
SELECT + 37 / + 39 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3157
SELECT ( - 80 ) DIV + 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3157
SELECT ( - 80 ) / + 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 82 AS col2 FROM tab1 GROUP BY col1
----
82

query I rowsort
SELECT ALL 31 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
31
31
31

query I rowsort
SELECT ALL + + 40 FROM tab0 GROUP BY tab0.col0
----
40
40
40

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 91, - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
91
91
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3162
SELECT ALL - + cor0.col1 + - CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3162
SELECT ALL - + cor0.col1 + - CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ( + 60 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 34 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT ALL + 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3166
SELECT + - 32 DIV + 24 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3166
SELECT + - 32 / + 24 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - - 6 AS col2 FROM tab0 GROUP BY tab0.col2
----
6

query I rowsort
SELECT + ( + cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3169
SELECT + CAST( NULL AS SIGNED ) + - 70 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3169
SELECT + CAST ( NULL AS INTEGER ) + - 70 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3170
SELECT - 12 DIV tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3170
SELECT - 12 / tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

query I rowsort
SELECT - 60 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-15
-52
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 col1 FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col2 FROM tab0 GROUP BY tab0.col2
----
93
93
93

query I rowsort
SELECT - 45 - 57 FROM tab2 GROUP BY tab2.col1
----
-102
-102
-102

query I rowsort
SELECT ALL 46 AS col2 FROM tab1 GROUP BY tab1.col0
----
46
46
46

query I rowsort
SELECT ALL - ( - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 87 AS col1 FROM tab1 GROUP BY tab1.col0
----
87
87
87

query I rowsort
SELECT + - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL + 7 FROM tab2 cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT - 75 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT 31 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 col2 FROM tab1 AS cor0 GROUP BY col1
----
81
81
81

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
105
38
79

query I rowsort
SELECT ALL 43 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NOT NULL
----
44
57
6

query I rowsort
SELECT ALL cor0.col0 * cor0.col2 - + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1215
168
5751

query I rowsort
SELECT DISTINCT + - col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 91 + + 31 FROM tab2 AS cor0 GROUP BY cor0.col0
----
122
122
122

query I rowsort
SELECT + ( + cor0.col0 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-3193
SELECT + cor0.col2 + cor0.col0 DIV 64 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
39
79

skipif mysql # not compatible
query I rowsort label-3193
SELECT + cor0.col2 + cor0.col0 / 64 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
39
79

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + 41 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT + 0 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
0

query I rowsort
SELECT ALL 47 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
47
47
47

query I rowsort
SELECT 36 - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-45
36

query I rowsort
SELECT + tab2.col0 * tab2.col0 - 82 * + ( 86 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-6827
1229
1412

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + NULLIF ( 7, + col2 ) col2 FROM tab1 GROUP BY tab1.col2
----
15
52
78

query I rowsort
SELECT ALL - - ( 93 ) + + tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1774
3574
3814

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - 94 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-94
-94

query I rowsort
SELECT DISTINCT 42 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
42

query I rowsort
SELECT + 22 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT + tab1.col1 FROM tab1 WHERE NOT ( + col2 ) = NULL GROUP BY tab1.col1
----

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT + cor0.col1 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT + 0 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL 2 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
2
2
2

query I rowsort
SELECT - cor0.col2 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-102
-115
-14

query I rowsort
SELECT 2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT - 20 AS col2 FROM tab2 GROUP BY tab2.col0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT - 87 FROM tab2 GROUP BY tab2.col0
----
-87

query I rowsort
SELECT DISTINCT - 53 AS col1 FROM tab0 GROUP BY tab0.col2
----
-53

query I rowsort
SELECT ALL - + 80 FROM tab1 GROUP BY tab1.col2
----
-80
-80
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-3218
SELECT + + 61 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
10

skipif mysql # not compatible
query I rowsort label-3218
SELECT + + 61 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
10

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 93 + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
22
48
85

query I rowsort
SELECT - ( - 49 ) * tab2.col0 + - ( - col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
4550
4600
750

query I rowsort
SELECT DISTINCT 71 * 62 FROM tab1 cor0 GROUP BY col2
----
4402

query I rowsort
SELECT + 27 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1161
2241
702

query I rowsort
SELECT ALL 58 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 29 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
29

query I rowsort
SELECT 76 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1824
2888
6004

query I rowsort
SELECT - - 51 AS col1 FROM tab0 GROUP BY tab0.col1
----
51
51

query I rowsort
SELECT 15 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-1365
-1380
-225

query I rowsort
SELECT 2 FROM tab2 AS cor0 GROUP BY col0
----
2
2
2

query I rowsort
SELECT ALL 1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + - 99 FROM tab0 GROUP BY tab0.col1
----
-99

query I rowsort
SELECT DISTINCT - tab2.col1 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT + + 6 AS col0 FROM tab1 GROUP BY tab1.col1
----
6

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT ( - cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
-81
0

query I rowsort
SELECT ALL - tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT + 79 AS col2 FROM tab2 GROUP BY tab2.col2
----
79
79
79

query I rowsort
SELECT - + 30 AS col0 FROM tab2 GROUP BY tab2.col2
----
-30
-30
-30

query I rowsort
SELECT tab1.col1 * 7 AS col1 FROM tab1 GROUP BY tab1.col1
----
308
399
42

query I rowsort
SELECT DISTINCT cor0.col0 * 85 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1275
7735
7820

query I rowsort
SELECT ALL + 85 FROM tab1 GROUP BY tab1.col0
----
85
85
85

query I rowsort
SELECT + 75 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT 44 * 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1452

query I rowsort
SELECT - tab0.col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - cor0.col1 * - ( + cor0.col1 * cor0.col1 ) - cor0.col1 FROM tab2 cor0 GROUP BY col1
----
205320
226920
68880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + cor0.col0 + 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19
95
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 col2 FROM tab1 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3252
SELECT DISTINCT + ( 0 ) DIV col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-3252
SELECT DISTINCT + ( 0 ) / col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 26 FROM tab2 GROUP BY tab2.col1
----
26

query I rowsort
SELECT DISTINCT + + NULLIF ( 38, 2 ) FROM tab2 GROUP BY tab2.col1
----
38

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT tab0.col1 + + COALESCE ( + 48, tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
129
48

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + - 41 AS col2 FROM tab0 GROUP BY tab0.col0
----
-41

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - 58 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-4582
-5046

query I rowsort
SELECT ALL cor0.col0 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 22 col1 FROM tab1 GROUP BY tab1.col0
----
22
22
22

query I rowsort
SELECT ALL 95 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT ALL col1 * - 70 FROM tab0 AS cor0 GROUP BY col1
----
-5670
0

query I rowsort
SELECT DISTINCT col0 * - 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1122
-1428
-4182

query I rowsort
SELECT DISTINCT - cor0.col0 - - cor0.col0 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1288
-198
-5904

query I rowsort
SELECT + tab2.col0 + 9 FROM tab2 GROUP BY tab2.col0
----
100
101
24

query I rowsort
SELECT cor0.col1 * - cor0.col1 - - 55 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
-1881
-3194
19

query I rowsort
SELECT ALL - ( - tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3271
SELECT ALL + 97 + + col1 DIV 80 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97
98

skipif mysql # not compatible
query I rowsort label-3271
SELECT ALL + 97 + + col1 / 80 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97
98

query I rowsort
SELECT ALL 71 * cor0.col1 + ( + 77 ) * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
6068
8732
9028

query I rowsort
SELECT ALL + 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab1.col2 - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28

query I rowsort
SELECT + col2 + + tab1.col2 FROM tab1 GROUP BY col2
----
142
16
90

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 - cor0.col2 FROM tab1 AS cor0 WHERE ( NULL ) > - col1 GROUP BY col2
----

query I rowsort
SELECT DISTINCT + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL = NULL
----

query I rowsort
SELECT tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + 53 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
53
53
53

query I rowsort
SELECT DISTINCT - - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col0 * ( - tab1.col0 ) col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL 75 FROM tab0 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT ALL - 24 FROM tab2 GROUP BY tab2.col1
----
-24
-24
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-3288
SELECT - tab2.col2 DIV tab2.col2 FROM tab2 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3288
SELECT - tab2.col2 / tab2.col2 FROM tab2 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 7 AS col2 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT + 85 FROM tab1 GROUP BY tab1.col1
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 81 col2 FROM tab0 GROUP BY tab0.col0
----
-81
-81
-81

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col0 + 72 * COALESCE ( 75, - cor0.col0 * + 18, CASE + cor0.col0 WHEN cor0.col2 / 29 THEN NULL WHEN cor0.col2 THEN - cor0.col2 * 52 END * cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
5422
5428
5482

query I rowsort
SELECT ALL cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, col2, cor0.col1
----
44
57
6

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 ALL tab1.col0 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 33 FROM tab0 GROUP BY col2
----
33
33
33

query I rowsort
SELECT 79 AS col2 FROM tab0 GROUP BY col1
----
79
79

query I rowsort
SELECT 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT - 24 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1896
-576
-912

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 + 99 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
135
2035
3348

query I rowsort
SELECT + 83 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
83
83
83

query I rowsort
SELECT ALL + tab1.col1 * tab1.col1 + 55 AS col2 FROM tab1 GROUP BY tab1.col1
----
1991
3304
91

query I rowsort
SELECT col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT cor0.col1 * + cor0.col1 + + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6642

query I rowsort
SELECT ALL - tab0.col0 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 col0 FROM tab1 WHERE NOT ( NULL ) = tab1.col1 GROUP BY col0
----

query I rowsort
SELECT ALL 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72
72
72

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
----
-484
-6724
-784

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, cor0.col2
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col0 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT ALL 99 FROM tab2 AS cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT cor0.col1 * - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1892
-30
-3192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col0 + 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
109
49
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 1 * + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + + 9 AS col2 FROM tab1 GROUP BY tab1.col1
----
9
9
9

query I rowsort
SELECT + + 64 AS col0 FROM tab2 GROUP BY tab2.col1
----
64
64
64

query I rowsort
SELECT - + 91 FROM tab2 GROUP BY tab2.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 84 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT 36 * + 24 FROM tab1 GROUP BY col0
----
864
864
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + 70 FROM tab0 AS cor0 GROUP BY col1
----
70
70

query I rowsort
SELECT DISTINCT 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
12

onlyif mysql # DIV for integer division: 
query I rowsort label-3327
SELECT 66 DIV - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3327
SELECT 66 / - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 49 FROM tab1 cor0 GROUP BY col2
----
-49

query I rowsort
SELECT 99 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
20
61
75

query I rowsort
SELECT ALL - cor0.col2 * + ( cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 5 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT ALL 53 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
53
53
53

query I rowsort
SELECT tab0.col0 * col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT 9 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 11 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11

query I rowsort
SELECT ALL + 39 AS col0 FROM tab0 GROUP BY tab0.col0
----
39
39
39

query I rowsort
SELECT + cor0.col0 * col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 33 ) col2 FROM tab2 AS cor0 GROUP BY col0
----
33

query I rowsort
SELECT ALL - 24 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-24
-24

query I rowsort
SELECT DISTINCT - 0 AS col1 FROM tab1 cor0 GROUP BY col1
----
0

query I rowsort
SELECT - 19 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-19
-19

query I rowsort
SELECT DISTINCT - 99 FROM tab0 AS cor0 GROUP BY col2
----
-99

query I rowsort
SELECT DISTINCT - 55 AS col2 FROM tab0 GROUP BY tab0.col1
----
-55

onlyif mysql # DIV for integer division: 
query I rowsort label-3345
SELECT DISTINCT ( - col0 ) DIV + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3345
SELECT DISTINCT ( - col0 ) / + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
0

query I rowsort
SELECT DISTINCT - - tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL 63 - + 86 AS col0 FROM tab0 GROUP BY tab0.col0
----
-23
-23
-23

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1722
-3540
-3782

query I rowsort
SELECT + ( + 13 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NOT NULL
----
15
91
92

query I rowsort
SELECT DISTINCT + 95 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
95

query I rowsort
SELECT DISTINCT + tab0.col1 * + 58 FROM tab0 GROUP BY tab0.col1
----
0
4698

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3354
SELECT DISTINCT - cor0.col2 * COALESCE ( 45, - cor0.col2 * CAST( NULL AS SIGNED ) ) AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-3195
-360

skipif mysql # not compatible
query I rowsort label-3354
SELECT DISTINCT - cor0.col2 * COALESCE ( 45, - cor0.col2 * CAST ( NULL AS INTEGER ) ) AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-3195
-360

query I rowsort
SELECT cor0.col2 + 62 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
107
133
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * 58 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1392
2204
4582

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3357
SELECT DISTINCT - - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3357
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col0
----
NULL

query I rowsort
SELECT + 65 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT - + 76 FROM tab2 GROUP BY tab2.col0
----
-76
-76
-76

query I rowsort
SELECT + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - + 28 FROM tab2 GROUP BY tab2.col1
----
-28

query I rowsort
SELECT + cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT - col2 + + 95 AS col1 FROM tab1 GROUP BY tab1.col2
----
24
50
87

query I rowsort
SELECT 85 FROM tab2 GROUP BY tab2.col1
----
85
85
85

query I rowsort
SELECT col1 + + 74 FROM tab0 GROUP BY tab0.col1
----
155
74

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-3367
SELECT DISTINCT - 43 DIV - 90 col0 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3367
SELECT DISTINCT - 43 / - 90 col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT tab0.col2 * - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + + tab1.col2 + col2 AS col2 FROM tab1 GROUP BY col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-3370
SELECT DISTINCT + tab2.col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

skipif mysql # not compatible
query I rowsort label-3370
SELECT DISTINCT + tab2.col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT + cor0.col0 - + cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

onlyif mysql # DIV for integer division: 
query I rowsort label-3372
SELECT DISTINCT tab1.col2 DIV - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1

skipif mysql # not compatible
query I rowsort label-3372
SELECT DISTINCT tab1.col2 / - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1

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 NOT NULL
----
26
43
83

query I rowsort
SELECT ALL + + 69 FROM tab1 GROUP BY tab1.col1
----
69
69
69

query I rowsort
SELECT tab1.col0 * - 53 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1166
-1484
-4346

query I rowsort
SELECT - - tab0.col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + 19 FROM tab2 GROUP BY tab2.col2
----
19
19
19

query I rowsort
SELECT + cor0.col0 * + 14 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1162
364
602

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 DISTINCT - 43 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-43

query I rowsort
SELECT DISTINCT 60 FROM tab2 GROUP BY col0
----
60

query I rowsort
SELECT DISTINCT + 78 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
102
116
157

query I rowsort
SELECT + NULLIF ( - col0, 65 ) + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT - 27 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + - 87 FROM tab2 GROUP BY tab2.col0
----
-87

query I rowsort
SELECT DISTINCT 68 AS col1 FROM tab2 GROUP BY tab2.col0
----
68

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT - 70 AS col0 FROM tab1 GROUP BY tab1.col0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT - + 14 AS col1 FROM tab0 GROUP BY tab0.col0
----
-14

query I rowsort
SELECT - 16 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
704
912
96

query I rowsort
SELECT ALL - cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT 44 FROM tab1 AS cor0 GROUP BY cor0.col0
----
44

query I rowsort
SELECT ALL + + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + + COALESCE ( 65, 45 ) + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
146
65

query I rowsort
SELECT DISTINCT + 35 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
35

query I rowsort
SELECT - 9 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-396
-513
-54

query I rowsort
SELECT CASE cor0.col1 WHEN + cor0.col1 * + cor0.col0 THEN + cor0.col0 * - cor0.col0 END AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 28 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
28
28
28

query I rowsort
SELECT + + 5 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
63
84
92

query I rowsort
SELECT ALL 95 FROM tab0 GROUP BY col1
----
95
95

query I rowsort
SELECT DISTINCT - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT - 48 AS col0 FROM tab2 GROUP BY tab2.col2
----
-48
-48
-48

query I rowsort
SELECT ALL tab1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL NOT IN ( tab1.col1 )
----

query I rowsort
SELECT DISTINCT + 33 * 63 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2079

onlyif mysql # DIV for integer division: 
query I rowsort label-3406
SELECT - 10 DIV + col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3406
SELECT - 10 / + col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
114
12
88

query I rowsort
SELECT DISTINCT 79 FROM tab2 GROUP BY tab2.col2
----
79

query I rowsort
SELECT tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL + + 87 AS col2 FROM tab1 GROUP BY tab1.col2
----
87
87
87

query I rowsort
SELECT DISTINCT + col1 + 31 AS col2 FROM tab1 GROUP BY tab1.col1
----
37
75
88

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1 WHERE NOT ( + tab1.col2 ) = NULL GROUP BY tab1.col2
----

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
----
0
0
0

query I rowsort
SELECT ALL + 28 + col2 FROM tab0 GROUP BY tab0.col2
----
107
52
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + + COALESCE ( + tab2.col2, + tab2.col2, - 11, + tab2.col0 * 88 - tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 66 * 26 FROM tab0 cor0 GROUP BY col1
----
1716
1716

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( + col1 ) * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-3419
SELECT 83 + cor0.col2 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

skipif mysql # not compatible
query I rowsort label-3419
SELECT 83 + cor0.col2 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT ALL + 86 FROM tab0 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT 3 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT + 8 - 76 AS col2 FROM tab1 GROUP BY tab1.col0
----
-68
-68
-68

query I rowsort
SELECT ALL tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL + + 73 + - tab2.col2 * - col2 FROM tab2 GROUP BY tab2.col2
----
3437
6314
7642

query I rowsort
SELECT DISTINCT - 3 * 74 FROM tab0 GROUP BY tab0.col0
----
-222

query I rowsort
SELECT ALL - + ( 21 ) FROM tab1 GROUP BY tab1.col0
----
-21
-21
-21

query I rowsort
SELECT - ( 49 ) + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-49
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT - 97 FROM tab1 GROUP BY tab1.col1
----
-97
-97
-97

query I rowsort
SELECT + 98 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
98
98
98

query I rowsort
SELECT ALL + + 68 AS col1 FROM tab0 GROUP BY tab0.col2
----
68
68
68

query I rowsort
SELECT DISTINCT - 50 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 78 col2 FROM tab1 GROUP BY tab1.col2
----
78
78
78

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT - 78 FROM tab2 GROUP BY tab2.col1
----
-78
-78
-78

query I rowsort
SELECT 63 * tab0.col1 + 62 FROM tab0 GROUP BY tab0.col1
----
5165
62

onlyif mysql # DIV for integer division: 
query I rowsort label-3437
SELECT ALL cor0.col2 DIV cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3437
SELECT ALL cor0.col2 / cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + 6 FROM tab0 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT 88 + + 49 AS col0 FROM tab1 GROUP BY col1
----
137
137
137

query I rowsort
SELECT + col1 + 19 FROM tab1 GROUP BY tab1.col1
----
25
63
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 10 col1 FROM tab0 GROUP BY tab0.col1
----
10
10

query I rowsort
SELECT ALL - 39 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
3159

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT - 17 AS col1 FROM tab2 GROUP BY tab2.col1
----
-17
-17
-17

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY col0 HAVING NOT NULL >= NULL
----

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT - 24 AS col1 FROM tab0 GROUP BY tab0.col1
----
-24
-24

query I rowsort
SELECT + 36 FROM tab2 GROUP BY col2
----
36
36
36

query I rowsort
SELECT DISTINCT - - col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + + 7 AS col2 FROM tab1 GROUP BY tab1.col1
----
7
7
7

query I rowsort
SELECT ALL - 42 + cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-34
29
3

query I rowsort
SELECT DISTINCT 86 FROM tab1 GROUP BY col0
----
86

query I rowsort
SELECT - 51 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-51
-51
-51

query I rowsort
SELECT ALL col0 + + 52 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1326
-2193
-4233

query I rowsort
SELECT + + 68 FROM tab2 GROUP BY tab2.col2
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT NULLIF ( col2, tab0.col2 + + tab0.col2 ) col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - 86 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1892
2408
7052

query I rowsort
SELECT - 58 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-20
-34
21

query I rowsort
SELECT + 12 AS col0 FROM tab2 GROUP BY col2
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 - + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
0
0
0

query I rowsort
SELECT - + 59 AS col1 FROM tab1 GROUP BY tab1.col1
----
-59
-59
-59

query I rowsort
SELECT DISTINCT + tab2.col1 + + 82 AS col1 FROM tab2 GROUP BY tab2.col1
----
123
141
143

query I rowsort
SELECT + cor0.col2 * - cor0.col1 + + cor0.col1 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-5060
-5814
-84

query I rowsort
SELECT DISTINCT + cor0.col0 + - 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
77
78

query I rowsort
SELECT DISTINCT - 21 FROM tab2 GROUP BY tab2.col2
----
-21

query I rowsort
SELECT + - 63 + - tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1618
3418
3658

query I rowsort
SELECT + cor0.col0 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT + - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT ALL 69 FROM tab2 AS cor0 GROUP BY cor0.col2
----
69
69
69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3472
SELECT - CAST( col1 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-3472
SELECT - CAST ( col1 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + + 7 FROM tab2 GROUP BY col2
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 56 col1 FROM tab1 cor0 GROUP BY col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT - 23 FROM tab1 cor0 GROUP BY col0
----
-23

query I rowsort
SELECT ALL - 29 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-7
53

query I rowsort
SELECT + tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 54 FROM tab2 GROUP BY col0
----
54

query I rowsort
SELECT - 89 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 58 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
58
58

query I rowsort
SELECT + 74 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
74
74
74

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT - col2 * cor0.col2 + - 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3413
-6290
-7618

query I rowsort
SELECT DISTINCT col2 * 2 - 46 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-30
44
96

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 + 29 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1247
2407
754

query I rowsort
SELECT - 40 AS col1 FROM tab1 GROUP BY tab1.col0
----
-40
-40
-40

query I rowsort
SELECT - 13 FROM tab2 GROUP BY tab2.col0
----
-13
-13
-13

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 93 FROM tab0 cor0 GROUP BY col1
----
93

query I rowsort
SELECT ALL - - 84 FROM tab2 GROUP BY tab2.col0
----
84
84
84

query I rowsort
SELECT - 9 * 77 AS col2 FROM tab1 GROUP BY tab1.col1
----
-693
-693
-693

query I rowsort
SELECT 36 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1620
2556
288

onlyif mysql # DIV for integer division: 
query I rowsort label-3496
SELECT + col1 DIV - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3496
SELECT + col1 / - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3497
SELECT - tab0.col1 + + tab0.col1 / + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3497
SELECT - tab0.col1 + + tab0.col1 / + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - 30 AS col2 FROM tab1 GROUP BY tab1.col0
----
-30
-30
-30

query I rowsort
SELECT - 61 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-61
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3500
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3500
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3501
SELECT DISTINCT - cor0.col1 DIV 83 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-3501
SELECT DISTINCT - cor0.col1 / 83 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT 59 FROM tab0 GROUP BY tab0.col2
----
59

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1 HAVING ( NULL ) NOT IN ( cor0.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + tab0.col0 + - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY col1 HAVING NULL NOT IN ( - tab1.col1 )
----

query I rowsort
SELECT tab2.col0 * tab2.col0 + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

query I rowsort
SELECT + cor0.col0 + + cor0.col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
153
30
73

onlyif mysql # DIV for integer division: 
query I rowsort label-3509
SELECT - cor0.col2 DIV - 2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
39
43

skipif mysql # not compatible
query I rowsort label-3509
SELECT - cor0.col2 / - 2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
39
43

query I rowsort
SELECT - - 24 * 47 FROM tab2 GROUP BY tab2.col0
----
1128
1128
1128

query I rowsort
SELECT - - 32 AS col1 FROM tab1 GROUP BY tab1.col0
----
32
32
32

query I rowsort
SELECT - 44 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1144
-1892
-3652

query I rowsort
SELECT + + 36 - - 90 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
126
126
126

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 13 AS col1 FROM tab1 GROUP BY tab1.col2
----
13

query I rowsort
SELECT + 44 + 91 FROM tab1 GROUP BY tab1.col1
----
135
135
135

query I rowsort
SELECT + ( 1 ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

query I rowsort
SELECT 84 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT - + 20 FROM tab0 GROUP BY tab0.col1
----
-20
-20

query I rowsort
SELECT - - 96 FROM tab2 GROUP BY tab2.col0
----
96
96
96

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT ALL + 90 AS col1 FROM tab1 GROUP BY tab1.col2
----
90
90
90

query I rowsort
SELECT DISTINCT - 5 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
17
23
77

query I rowsort
SELECT ALL + 43 FROM tab0 GROUP BY col2
----
43
43
43

query I rowsort
SELECT 8 FROM tab1 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT ALL - col1 + cor0.col2 * - 70 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3207
-5014
-566

query I rowsort
SELECT ALL cor0.col0 * 80 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
1760
2240
6560

query I rowsort
SELECT 68 FROM tab0 GROUP BY tab0.col1
----
68
68

query I rowsort
SELECT ALL cor0.col2 * + ( + cor0.col2 ) - + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1980
4970
56

query I rowsort
SELECT col1 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
124
26
83

query I rowsort
SELECT ALL 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3532
SELECT DISTINCT - - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3532
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col0
----
NULL

query I rowsort
SELECT DISTINCT 9 AS col2 FROM tab1 GROUP BY tab1.col0
----
9

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL - - 50 AS col0 FROM tab2 GROUP BY tab2.col0
----
50
50
50

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL - 34 AS col1 FROM tab2 GROUP BY tab2.col0
----
-34
-34
-34

query I rowsort
SELECT - 79 + 45 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-1069
-1339
-3769

query I rowsort
SELECT - cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - - tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + 73 FROM tab0 cor0 GROUP BY cor0.col2
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 45 col1 FROM tab0 GROUP BY tab0.col1
----
-45
-45

onlyif mysql # DIV for integer division: 
query I rowsort label-3543
SELECT + 74 + - col2 DIV 60 AS col1 FROM tab0 GROUP BY col2
----
73
74
74

skipif mysql # not compatible
query I rowsort label-3543
SELECT + 74 + - col2 / 60 AS col1 FROM tab0 GROUP BY col2
----
73
74
74

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 * - 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-7938
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3545
SELECT ALL - CAST( NULL AS SIGNED ) + - 99 AS col1 FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3545
SELECT ALL - CAST ( NULL AS INTEGER ) + - 99 AS col1 FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT - NULLIF ( ( tab1.col0 ), - tab1.col0 + + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT DISTINCT col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT - 64 - 5 * - tab1.col1 FROM tab1 GROUP BY col1
----
-34
156
221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 66 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-66

query I rowsort
SELECT ALL 84 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
106
112
166

query I rowsort
SELECT ALL - col0 + 58 AS col0 FROM tab1 GROUP BY tab1.col0
----
-24
30
36

query I rowsort
SELECT DISTINCT ( + col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3554
SELECT ALL col2 DIV 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
3
4

skipif mysql # not compatible
query I rowsort label-3554
SELECT ALL col2 / 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
3
4

query I rowsort
SELECT ALL cor0.col2 * - 35 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-1575
-2485
-280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - 70 * + 63 + + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-4339
-4365
-4402

query I rowsort
SELECT - 35 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-35
-35
-35

query I rowsort
SELECT ALL + cor0.col0 + 35 FROM tab1 AS cor0 GROUP BY cor0.col0
----
117
57
63

query I rowsort
SELECT + cor0.col0 * + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + 98 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
98

query I rowsort
SELECT DISTINCT tab0.col1 + 74 FROM tab0 GROUP BY tab0.col1
----
155
74

query I rowsort
SELECT tab1.col2 * + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 36 col1 FROM tab1 GROUP BY tab1.col0
----
-36
-36
-36

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT + 50 FROM tab2 GROUP BY tab2.col0
----
50

query I rowsort
SELECT cor0.col1 - - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
114
12
88

query I rowsort
SELECT + 57 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
5187
5244
855

query I rowsort
SELECT - 43 + 89 FROM tab1 cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL 45 FROM tab0 GROUP BY tab0.col1
----
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 90 + col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-11
-52
-66

query I rowsort
SELECT 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
48
48
48

query I rowsort
SELECT 39 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1755
-2769
-312

query I rowsort
SELECT ALL + 1 FROM tab2 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT + tab1.col2 * - 92 AS col0 FROM tab1 GROUP BY tab1.col2
----
-4140
-6532
-736

query I rowsort
SELECT + 79 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT + 25 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1025
1475
1525

query I rowsort
SELECT 51 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
51
51
51

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 3 col1 FROM tab2 GROUP BY tab2.col2
----
-3
-3
-3

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( - 78, - tab1.col1 ) FROM tab1 GROUP BY tab1.col2
----
78
78
78

query I rowsort
SELECT + - 97 AS col1 FROM tab0 GROUP BY tab0.col2
----
-97
-97
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-3583
SELECT ALL - tab2.col2 + + tab2.col2 DIV 21 FROM tab2 GROUP BY tab2.col2
----
-56
-76
-83

skipif mysql # not compatible
query I rowsort label-3583
SELECT ALL - tab2.col2 + + tab2.col2 / 21 FROM tab2 GROUP BY tab2.col2
----
-56
-76
-83

query I rowsort
SELECT ALL 88 FROM tab1 GROUP BY tab1.col0
----
88
88
88

query I rowsort
SELECT + tab2.col2 FROM tab2 WHERE NOT NULL IN ( tab2.col0 ) GROUP BY tab2.col2
----

query I rowsort
SELECT DISTINCT tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + tab1.col1 - - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL tab0.col1 / col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL > ( NULL )
----

query I rowsort
SELECT tab2.col1 FROM tab2 WHERE NOT + col2 IS NULL GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 73 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-73

query I rowsort
SELECT 84 AS col1 FROM tab0 GROUP BY tab0.col2
----
84
84
84

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
-132
-1596
-3608

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3593
SELECT - CAST( + 9 AS SIGNED ) + + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3
35
48

skipif mysql # not compatible
query I rowsort label-3593
SELECT - CAST ( + 9 AS INTEGER ) + + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3
35
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT NULLIF ( col1, cor0.col1 * - cor0.col1 ) - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT cor0.col0 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3596
SELECT - CAST( NULL AS SIGNED ) / 80 AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3596
SELECT - CAST ( NULL AS INTEGER ) / 80 AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3597
SELECT ALL - col2 DIV - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3597
SELECT ALL - col2 / - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT 48 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col0, cor0.col2
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL + 45 FROM tab2 GROUP BY tab2.col2
----
45
45
45

query I rowsort
SELECT DISTINCT 69 FROM tab0 GROUP BY col0
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab2.col1 + 84 col0 FROM tab2 GROUP BY tab2.col1
----
125
143
145

query I rowsort
SELECT col2 + 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
114
51
88

onlyif mysql # DIV for integer division: 
query I rowsort label-3605
SELECT ALL cor0.col2 * + NULLIF ( cor0.col2 DIV - cor0.col2, - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif mysql # not compatible
query I rowsort label-3605
SELECT ALL cor0.col2 * + NULLIF ( cor0.col2 / - cor0.col2, - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 40 + 30 FROM tab2 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT ALL 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
57
57
57

query I rowsort
SELECT ALL - ( + 33 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-33
-33
-33

query I rowsort
SELECT cor0.col1 * + 10 + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
484
627
66

query I rowsort
SELECT DISTINCT - + 8 - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-34
-51
-91

query I rowsort
SELECT + 17 FROM tab0 GROUP BY tab0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT - 7 FROM tab1 GROUP BY col0
----
-7

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3613
SELECT + CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3613
SELECT + CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
43
43
43

query I rowsort
SELECT - ( + 76 ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-76
-76
-76

query I rowsort
SELECT DISTINCT - 72 FROM tab2 GROUP BY tab2.col1
----
-72

query I rowsort
SELECT ALL 82 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
140
161
169

query I rowsort
SELECT DISTINCT 84 AS col2 FROM tab1 GROUP BY tab1.col1
----
84

onlyif mysql # DIV for integer division: 
query I rowsort label-3619
SELECT col1 DIV 70 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-3619
SELECT col1 / 70 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
1

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT DISTINCT + - tab2.col0 * tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT cor0.col0 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
124
26
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3623
SELECT - 85 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3623
SELECT - 85 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

query I rowsort
SELECT + 74 AS col1 FROM tab0 GROUP BY col0
----
74
74
74

query I rowsort
SELECT - 5 + tab2.col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
36
54
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 col1 FROM tab0 GROUP BY tab0.col0
----
91
91
91

query I rowsort
SELECT - cor0.col1 * + cor0.col1 - cor0.col1 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-10044
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col1 + 26 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2352
-4635
-5281

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL 99 AS col0 FROM tab2 cor0 GROUP BY col2
----
99
99
99

query I rowsort
SELECT 32 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
32
32
32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3632
SELECT DISTINCT NULLIF ( col0, CAST( + 41 AS SIGNED ) ) + - tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

skipif mysql # not compatible
query I rowsort label-3632
SELECT DISTINCT NULLIF ( col0, CAST ( + 41 AS INTEGER ) ) + - tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT + cor0.col2 - - 80 FROM tab1 AS cor0 GROUP BY cor0.col2
----
125
151
88

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 54 * 64 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3456

query I rowsort
SELECT ALL + tab2.col2 + + 75 FROM tab2 GROUP BY tab2.col2
----
133
154
162

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab1 GROUP BY col0
----
58

query I rowsort
SELECT + 53 * tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
2385
3763
424

query I rowsort
SELECT ALL - tab2.col1 - 62 FROM tab2 GROUP BY tab2.col1
----
-103
-121
-123

query I rowsort
SELECT ALL 98 * + col0 FROM tab1 cor0 GROUP BY cor0.col0
----
2156
2744
8036

query I rowsort
SELECT - ( 29 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-29
-29
-29

onlyif mysql # DIV for integer division: 
query I rowsort label-3643
SELECT tab2.col1 DIV tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3643
SELECT tab2.col1 / tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-20

query I rowsort
SELECT ALL col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - 41, cor0.col0 * - cor0.col1, ( - cor0.col0 ) - cor0.col2 ) + + 87 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - - 16 AS col0 FROM tab2 GROUP BY tab2.col2
----
16
16
16

query I rowsort
SELECT DISTINCT 39 AS col0 FROM tab0 GROUP BY tab0.col2
----
39

query I rowsort
SELECT ALL + - tab2.col1 * - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 18 + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
109
110
33

query I rowsort
SELECT cor0.col2 - - col1 * 91 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
3789
5448
5638

query I rowsort
SELECT + ( - ( + cor0.col1 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT tab0.col2 * 38 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
3002
912

query I rowsort
SELECT - + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 68 * cor0.col1 + col1 * 23 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
7371

query I rowsort
SELECT DISTINCT 11 FROM tab2 GROUP BY tab2.col2
----
11

query I rowsort
SELECT - + 15 FROM tab0 GROUP BY col1
----
-15
-15

query I rowsort
SELECT DISTINCT cor0.col0 * - 41 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3731
-3772
-615

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT + tab1.col1 * + 3 AS col1 FROM tab1 GROUP BY tab1.col1
----
132
171
18

query I rowsort
SELECT + 38 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0, col0
----
38
38
38

query I rowsort
SELECT + - 16 FROM tab2 GROUP BY tab2.col0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - 58 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-58

query I rowsort
SELECT - ( - col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 83 * 80 FROM tab1 AS cor0 GROUP BY cor0.col1
----
6640
6640
6640

query I rowsort
SELECT DISTINCT + 77 FROM tab1 AS cor0 GROUP BY col1
----
77

query I rowsort
SELECT + + 4 + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
62
83
91

query I rowsort
SELECT - 86 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-86
-86
-86

query I rowsort
SELECT ALL - tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - - 53 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2385
3763
424

query I rowsort
SELECT ALL - + 6 FROM tab0 GROUP BY tab0.col1
----
-6
-6

query I rowsort
SELECT DISTINCT + - 51 AS col0 FROM tab2 GROUP BY tab2.col1
----
-51

onlyif mysql # DIV for integer division: 
query I rowsort label-3675
SELECT ALL cor0.col2 + - cor0.col2 DIV col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
7
70

skipif mysql # not compatible
query I rowsort label-3675
SELECT ALL cor0.col2 + - cor0.col2 / col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
7
70

query I rowsort
SELECT 38 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1558
-2242
-2318

query I rowsort
SELECT - 58 * + tab2.col1 FROM tab2 GROUP BY col1
----
-2378
-3422
-3538

query I rowsort
SELECT DISTINCT 23 - - 8 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT DISTINCT - 14 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-14

query I rowsort
SELECT tab1.col0 * 58 AS col1 FROM tab1 GROUP BY tab1.col0
----
1276
1624
4756

query I rowsort
SELECT ALL + 87 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT ALL + 6 AS col0 FROM tab2 GROUP BY tab2.col2
----
6
6
6

query I rowsort
SELECT - 83 AS col0 FROM tab0 GROUP BY tab0.col1
----
-83
-83

query I rowsort
SELECT col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT DISTINCT col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT + tab0.col0 - + tab0.col0 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + tab2.col1 FROM tab2 GROUP BY col1 HAVING NOT tab2.col1 IS NOT NULL
----

query I rowsort
SELECT ALL + - 45 FROM tab2 GROUP BY tab2.col0
----
-45
-45
-45

query I rowsort
SELECT + - 33 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-33
-33
-33

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0, cor0.col0, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 99 col2 FROM tab0 GROUP BY tab0.col2
----
-99

query I rowsort
SELECT DISTINCT + + 81 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-6
2
23

query I rowsort
SELECT - ( - 47 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT ALL 69 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT 78 * col0 AS col2 FROM tab2 GROUP BY col0
----
1170
7098
7176

query I rowsort
SELECT + + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3698
SELECT cor0.col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3698
SELECT cor0.col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + + tab1.col2 * ( tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col0 * - 94 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1410
-8554
-8648

query I rowsort
SELECT + 64 FROM tab0 GROUP BY tab0.col2
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 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 - 79 * tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-1185
-7189
-7268

query I rowsort
SELECT DISTINCT + + 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 DISTINCT - - 80 col2 FROM tab0 GROUP BY tab0.col0
----
80

query I rowsort
SELECT DISTINCT ( + 80 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
80

query I rowsort
SELECT DISTINCT + 10 * 0 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT + 64 FROM tab1 AS cor0 GROUP BY col2
----
64

query I rowsort
SELECT - 15 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-15
-15

query I rowsort
SELECT tab2.col2 AS col2 FROM tab2 WHERE NOT ( - tab2.col2 * tab2.col0 ) <= ( tab2.col0 ) GROUP BY tab2.col2
----

query I rowsort
SELECT - cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT col2 * + 86 FROM tab2 GROUP BY tab2.col2
----
4988
6794
7482

query I rowsort
SELECT DISTINCT cor0.col1 + 72 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
1872
3177
5976

query I rowsort
SELECT ALL + 86 * 15 + - tab2.col2 FROM tab2 GROUP BY col2
----
1203
1211
1232

query I rowsort
SELECT - 99 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-99
-99
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-3717
SELECT - 72 DIV + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-3717
SELECT - 72 / + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-3
0

query I rowsort
SELECT - + 9 FROM tab2 GROUP BY col1
----
-9
-9
-9

onlyif mysql # DIV for integer division: 
query I rowsort label-3719
SELECT - tab2.col0 DIV + col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3719
SELECT - tab2.col0 / + col0 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 col1 FROM tab0 GROUP BY col2
----
56
56
56

query I rowsort
SELECT + 63 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT DISTINCT tab1.col0 - - 48 AS col0 FROM tab1 GROUP BY tab1.col0
----
130
70
76

onlyif mysql # DIV for integer division: 
query I rowsort label-3723
SELECT tab2.col1 DIV tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3723
SELECT tab2.col1 / tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
1
1
1

query I rowsort
SELECT + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 70 + - cor0.col1 * 6 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-316
-424
-436

query I rowsort
SELECT DISTINCT + 14 FROM tab1 GROUP BY tab1.col1
----
14

query I rowsort
SELECT - 41 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-120
-65
-79

query I rowsort
SELECT DISTINCT + ( 36 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
36

onlyif mysql # DIV for integer division: 
query I rowsort label-3729
SELECT cor1.col0 DIV - 38 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-3729
SELECT cor1.col0 / - 38 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-2
0
0

query I rowsort
SELECT ALL tab2.col0 * - 98 + - 38 FROM tab2 GROUP BY tab2.col0
----
-1508
-8956
-9054

onlyif mysql # DIV for integer division: 
query I rowsort label-3731
SELECT - - col0 DIV 34 FROM tab1 GROUP BY tab1.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3731
SELECT - - col0 / 34 FROM tab1 GROUP BY tab1.col0
----
0
0
2

query I rowsort
SELECT 26 AS col0 FROM tab1 GROUP BY col1
----
26
26
26

query I rowsort
SELECT DISTINCT + 88 FROM tab1 GROUP BY tab1.col2
----
88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3734
SELECT DISTINCT + col0 * cor0.col0 + - CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3734
SELECT DISTINCT + col0 * cor0.col0 + - CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY col0
----
NULL

query I rowsort
SELECT ALL - 21 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT - 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
-81
-81

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 DISTINCT + + tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - tab1.col2 + + 50 FROM tab1 GROUP BY tab1.col2
----
-21
42
5

query I rowsort
SELECT ALL - 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 * + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1185
360
570

query I rowsort
SELECT DISTINCT tab1.col0 + + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS 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 + + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - tab2.col1 * + 66 FROM tab2 GROUP BY tab2.col1
----
-2706
-3894
-4026

query I rowsort
SELECT ALL 0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3748
SELECT DISTINCT + COALESCE ( - 49, tab0.col1 DIV col2 ) FROM tab0 GROUP BY tab0.col0
----
-49

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3748
SELECT DISTINCT + COALESCE ( - 49, tab0.col1 / col2 ) FROM tab0 GROUP BY tab0.col0
----
-49

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-46
32
51

query I rowsort
SELECT DISTINCT - 23 + - col2 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
-31
-68
-94

query I rowsort
SELECT 49 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 76 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
76

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab1.col0 + + col0 col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT + NULLIF ( + col2, col2 ) FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 97 AS col0 FROM tab0 GROUP BY tab0.col0
----
-97
-97
-97

query I rowsort
SELECT + col1 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 col2 FROM tab2 cor0 GROUP BY col0
----
-63
-63
-63

query I rowsort
SELECT ALL + + 6 AS col2 FROM tab1 GROUP BY tab1.col0
----
6
6
6

query I rowsort
SELECT col2 - col2 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT ALL 59 FROM tab2 GROUP BY tab2.col1
----
59
59
59

query I rowsort
SELECT DISTINCT - cor0.col2 + - COALESCE ( + cor0.col1, col1, cor0.col1 * 28, 49 + + col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-105
-38
-79

query I rowsort
SELECT - + 89 FROM tab0 GROUP BY tab0.col2
----
-89
-89
-89

query I rowsort
SELECT DISTINCT + 90 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-7290
0

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col1 * + col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-6561
0
0

query I rowsort
SELECT ALL + 40 FROM tab1 GROUP BY tab1.col1
----
40
40
40

onlyif mysql # DIV for integer division: 
query I rowsort label-3769
SELECT ALL + 62 DIV tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3769
SELECT ALL + 62 / tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT ALL - 67 AS col0 FROM tab0 GROUP BY tab0.col1
----
-67
-67

query I rowsort
SELECT + 95 FROM tab1 AS cor0 GROUP BY cor0.col0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 99 col2 FROM tab2 GROUP BY tab2.col0
----
99

query I rowsort
SELECT + 87 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
2262
3741
7221

query I rowsort
SELECT ALL - 87 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-87
-87

query I rowsort
SELECT + + 71 FROM tab2 GROUP BY tab2.col0
----
71
71
71

query I rowsort
SELECT - 29 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
-1276
-1653
-174

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL + - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3779
SELECT DISTINCT + + CAST( NULL AS SIGNED ) col0 FROM tab2 GROUP BY col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3779
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) col0 FROM tab2 GROUP BY col2
----
NULL

query I rowsort
SELECT - tab0.col2 + + 91 FROM tab0 GROUP BY tab0.col2
----
12
53
67

onlyif mysql # DIV for integer division: 
query I rowsort label-3781
SELECT ( 82 ) * cor0.col0 - + cor0.col0 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1801
2296
6723

skipif mysql # not compatible
query I rowsort label-3781
SELECT ( 82 ) * cor0.col0 - + cor0.col0 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1801
2296
6723

query I rowsort
SELECT - col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL + tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT ALL tab2.col0 / tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IN ( + tab0.col0 )
----

query I rowsort
SELECT DISTINCT + 22 AS col2 FROM tab1 GROUP BY tab1.col2
----
22

query I rowsort
SELECT ALL - 14 FROM tab2 GROUP BY tab2.col1
----
-14
-14
-14

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
164
44
56

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 39 col0 FROM tab0 cor0 GROUP BY col1
----
39
39

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
81

query I rowsort
SELECT DISTINCT - + ( 32 ) FROM tab0 GROUP BY tab0.col1
----
-32

query I rowsort
SELECT DISTINCT ( - ( 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 ( - tab1.col2 ) col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - + 34 AS col1 FROM tab1 GROUP BY tab1.col2
----
-34

query I rowsort
SELECT - 61 FROM tab0 AS cor0 GROUP BY col2
----
-61
-61
-61

query I rowsort
SELECT ALL + + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + col1 - 68 FROM tab2 GROUP BY tab2.col1
----
-27
-7
-9

query I rowsort
SELECT - 47 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 36 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-36

query I rowsort
SELECT - - 11 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT 79 AS col0 FROM tab1 GROUP BY tab1.col0
----
79
79
79

query I rowsort
SELECT ALL 33 AS col2 FROM tab0 GROUP BY tab0.col2
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-3807
SELECT ALL - - 14 DIV 13 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3807
SELECT ALL - - 14 / 13 FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 84 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT tab2.col1 * - 56 AS col1 FROM tab2 GROUP BY col1
----
-2296
-3304
-3416

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1892
30
3192

query I rowsort
SELECT ALL 62 FROM tab0 GROUP BY tab0.col2
----
62
62
62

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 - tab2.col1 * - 0 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL - 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-12
-12
-12

query I rowsort
SELECT ALL tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + tab0.col2 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT tab2.col2 * tab2.col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

query I rowsort
SELECT + cor0.col0 * 57 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
5187
5244
855

query I rowsort
SELECT + cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT tab1.col1 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT + - col1 - + 73 AS col0 FROM tab1 GROUP BY tab1.col1
----
-117
-130
-79

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT 48 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT + - 58 AS col0 FROM tab1 GROUP BY tab1.col0
----
-58
-58
-58

query I rowsort
SELECT ALL + 16 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT ( cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL <= NULL
----

query I rowsort
SELECT DISTINCT + + col1 + - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT ALL - col1 * - 75 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3300
4275
450

query I rowsort
SELECT DISTINCT 33 FROM tab1 AS cor0 GROUP BY col1
----
33

query I rowsort
SELECT cor0.col0 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, cor0.col0
----
-72
12
34

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 7 AS col2 FROM tab1 GROUP BY tab1.col0
----
7

query I rowsort
SELECT ALL + + 26 AS col2 FROM tab1 GROUP BY tab1.col0
----
26
26
26

query I rowsort
SELECT ALL + COALESCE ( cor0.col1, + ( + 5 ) ) AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3838
SELECT ALL cor0.col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3838
SELECT ALL cor0.col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - cor1.col2 FROM tab0 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor1.col0
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab0.col2 * + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT + cor0.col2 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
153
30
73

query I rowsort
SELECT + 29 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT 62 FROM tab1 GROUP BY tab1.col1
----
62
62
62

query I rowsort
SELECT + 2 FROM tab0 GROUP BY tab0.col0
----
2
2
2

query I rowsort
SELECT - + 92 FROM tab2 GROUP BY col1
----
-92
-92
-92

query I rowsort
SELECT DISTINCT - tab1.col0 + + 22 AS col2 FROM tab1 GROUP BY tab1.col0
----
-6
-60
0

query I rowsort
SELECT ALL 82 FROM tab0 cor0 GROUP BY cor0.col0
----
82
82
82

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 DISTINCT + + cor0.col2 * + 78 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
3510
5538
624

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT ( + 50 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT DISTINCT - 1 * + 58 AS col0 FROM tab0 GROUP BY tab0.col0
----
-58

query I rowsort
SELECT DISTINCT 19 + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
43
57
98

query I rowsort
SELECT - 76 * + 18 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-1368
-1368
-1368

query I rowsort
SELECT DISTINCT + 78 FROM tab0 GROUP BY tab0.col2
----
78

query I rowsort
SELECT DISTINCT tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT 52 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52
52

query I rowsort
SELECT ALL + 17 + 82 FROM tab1 GROUP BY tab1.col2
----
99
99
99

query I rowsort
SELECT ALL + 0 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT - - 9 FROM tab1 GROUP BY tab1.col0
----
9

query I rowsort
SELECT + cor0.col2 + 30 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
109
117
88

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 55 * + 89 FROM tab0 GROUP BY tab0.col0
----
4895

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3864
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3864
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT DISTINCT ( - tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 62 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
62
62
62

query I rowsort
SELECT DISTINCT 32 + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
113
32

query I rowsort
SELECT + 70 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT cor0.col0 * 1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT + - 2 * - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL 50 AS col1 FROM tab2 GROUP BY tab2.col1
----
50
50
50

query I rowsort
SELECT ALL + 29 + + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
35
73
86

query I rowsort
SELECT + 61 AS col1 FROM tab1 GROUP BY tab1.col0
----
61
61
61

query I rowsort
SELECT ALL + tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3875
SELECT ALL - tab2.col0 DIV - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3875
SELECT ALL - tab2.col0 / - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT 89 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
2314
3827
7387

onlyif mysql # DIV for integer division: 
query I rowsort label-3877
SELECT DISTINCT 23 DIV - 33 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
0

skipif mysql # not compatible
query I rowsort label-3877
SELECT DISTINCT 23 / - 33 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
0

query I rowsort
SELECT DISTINCT 19 AS col1 FROM tab1 GROUP BY tab1.col0
----
19

query I rowsort
SELECT ALL - ( 39 ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT - 48 AS col2 FROM tab1 GROUP BY tab1.col2
----
-48

query I rowsort
SELECT - ( cor0.col0 ) + 7 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
-176
-224
-656

query I rowsort
SELECT ALL 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT 1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT COALESCE ( + COALESCE ( - cor0.col0, ( - cor0.col0 ) ), 41 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + - 41 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1804
-2337
-246

query I rowsort
SELECT col1 * + 83 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
6723

query I rowsort
SELECT DISTINCT 83 AS col2 FROM tab1 GROUP BY tab1.col0
----
83

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 * + cor0.col0 + ( - 0 ) * cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-4732
-4784
-780

query I rowsort
SELECT cor0.col1 + 40 FROM tab0 AS cor0 GROUP BY cor0.col1
----
121
40

query I rowsort
SELECT DISTINCT - cor0.col1 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT cor1.col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT ALL - 17 FROM tab1 GROUP BY tab1.col0
----
-17
-17
-17

query I rowsort
SELECT ALL - CASE - tab0.col0 WHEN - tab0.col0 THEN - 60 ELSE NULL END FROM tab0 GROUP BY tab0.col0
----
60
60
60

query I rowsort
SELECT + - 98 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-6
-7
-83

query I rowsort
SELECT DISTINCT + + 4 FROM tab0 GROUP BY col0
----
4

query I rowsort
SELECT ( 89 ) AS col2 FROM tab2 AS cor0 GROUP BY col0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 13 col2 FROM tab1 GROUP BY tab1.col1
----
-13
-13
-13

query I rowsort
SELECT ALL - + 31 * - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
2542
682
868

query I rowsort
SELECT DISTINCT 43 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
43

query I rowsort
SELECT cor0.col0 * 21 FROM tab2 AS cor0 GROUP BY col0
----
1911
1932
315

onlyif mysql # DIV for integer division: 
query I rowsort label-3902
SELECT + + tab2.col0 DIV + tab2.col0 + + 77 FROM tab2 GROUP BY tab2.col0
----
78
78
78

skipif mysql # not compatible
query I rowsort label-3902
SELECT + + tab2.col0 / + tab2.col0 + + 77 FROM tab2 GROUP BY tab2.col0
----
78
78
78

query I rowsort
SELECT - - tab1.col1 * + 19 FROM tab1 GROUP BY tab1.col1
----
1083
114
836

query I rowsort
SELECT tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT + tab1.col2 * 79 FROM tab1 GROUP BY tab1.col2
----
3555
5609
632

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab2 GROUP BY tab2.col2
----
52

query I rowsort
SELECT ALL - 41 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-41
-41
-41

query I rowsort
SELECT - 99 - 57 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-156
-156
-156

query I rowsort
SELECT - tab1.col0 * tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT + 23 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
23
23
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3911
SELECT ALL tab2.col2 + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3911
SELECT ALL tab2.col2 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3912
SELECT - cor0.col1 * + CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3912
SELECT - cor0.col1 * + CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
225
8281
8464

query I rowsort
SELECT 49 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL + 53 FROM tab0, tab0 cor0 GROUP BY tab0.col0
----
53
53
53

query I rowsort
SELECT ALL - 80 AS col2 FROM tab0 GROUP BY tab0.col1
----
-80
-80

query I rowsort
SELECT DISTINCT - 5 + 54 FROM tab1 GROUP BY tab1.col1
----
49

onlyif mysql # DIV for integer division: 
query I rowsort label-3918
SELECT - 69 DIV - 27 FROM tab1 GROUP BY tab1.col0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-3918
SELECT - 69 / - 27 FROM tab1 GROUP BY tab1.col0
----
2
2
2

query I rowsort
SELECT cor0.col0 + 71 FROM tab0 AS cor0 GROUP BY cor0.col0
----
114
154
97

query I rowsort
SELECT ALL + 84 FROM tab2 GROUP BY tab2.col1
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT + 50 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT ALL - tab0.col0 * + col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + + ( cor0.col0 - cor0.col0 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT ALL 98 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 73 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT ALL 26 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
108
48
54

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + tab0.col0 AS col0 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL + 19 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 48 col1 FROM tab1 GROUP BY tab1.col1
----
-48
-48
-48

query I rowsort
SELECT ALL - 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
-82
-82
-82

query I rowsort
SELECT + 16 * - col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1136
-128
-720

query I rowsort
SELECT 95 AS col1 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT ALL + + col1 - + tab0.col1 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT ALL + 71 FROM tab2 AS cor0 GROUP BY col2
----
71
71
71

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col1
----
40

query I rowsort
SELECT ALL - + 41 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-3321
0

query I rowsort
SELECT ALL 15 FROM tab2 GROUP BY tab2.col2
----
15
15
15

query I rowsort
SELECT + 80 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
80
80
80

query I rowsort
SELECT ALL + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL + 92 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
133
151
153

query I rowsort
SELECT DISTINCT + tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

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-3948
SELECT DISTINCT + tab2.col0 DIV + tab2.col0 + - col0 FROM tab2 GROUP BY tab2.col0
----
-14
-90
-91

skipif mysql # not compatible
query I rowsort label-3948
SELECT DISTINCT + tab2.col0 / + tab2.col0 + - col0 FROM tab2 GROUP BY tab2.col0
----
-14
-90
-91

onlyif mysql # DIV for integer division: 
query I rowsort label-3949
SELECT ALL cor0.col0 DIV + cor0.col2 + - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-23
-36
-79

skipif mysql # not compatible
query I rowsort label-3949
SELECT ALL cor0.col0 / + cor0.col2 + - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-23
-36
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL - 82 AS col2 FROM tab0 GROUP BY tab0.col1
----
-82
-82

query I rowsort
SELECT - 87 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-87
-87
-87

query I rowsort
SELECT - 68 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
2788
4012
4148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 + - 32 col0 FROM tab2 GROUP BY col2
----
26
47
55

query I rowsort
SELECT + 17 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
17
17
17

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 DISTINCT 73 AS col1 FROM tab2 GROUP BY tab2.col1
----
73

query I rowsort
SELECT DISTINCT - 22 FROM tab1 GROUP BY tab1.col1
----
-22

query I rowsort
SELECT + 81 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
81
81
81

onlyif mysql # DIV for integer division: 
query I rowsort label-3960
SELECT ALL + cor0.col0 + + cor0.col0 DIV 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-3960
SELECT ALL + cor0.col0 + + cor0.col0 / 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-41
-59
-61

query I rowsort
SELECT - 33 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-33
-33
-33

query I rowsort
SELECT ALL + tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 6 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-6
-6
-6

query I rowsort
SELECT tab1.col1 * tab1.col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT tab0.col0 * tab0.col0 + 66 AS col2 FROM tab0 GROUP BY col0
----
1915
6955
742

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 - - 37 AS col0 FROM tab2 GROUP BY tab2.col1
----
37

query I rowsort
SELECT ( tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 70 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-70
-70
-70

query I rowsort
SELECT - + 94 FROM tab2 GROUP BY tab2.col1
----
-94
-94
-94

query I rowsort
SELECT + col2 * + cor0.col0 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 - + 51 col0 FROM tab2 GROUP BY tab2.col1
----
-51
-51
-51

query I rowsort
SELECT DISTINCT + 50 AS col1 FROM tab0 GROUP BY tab0.col0
----
50

query I rowsort
SELECT col1 * 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3567
5133
5307

query I rowsort
SELECT - + 26 FROM tab0 GROUP BY tab0.col0
----
-26
-26
-26

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 92 AS col1 FROM tab1 GROUP BY tab1.col1
----
92

query I rowsort
SELECT DISTINCT + + tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-3985
SELECT - tab0.col0 + 97 DIV + 62 col0 FROM tab0 GROUP BY tab0.col0
----
-25
-42
-82

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3985
SELECT - tab0.col0 + 97 / + 62 col0 FROM tab0 GROUP BY tab0.col0
----
-25
-42
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3986
SELECT + CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3986
SELECT + CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - cor0.col1 ) + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3989
SELECT + + tab0.col2 DIV 20 FROM tab0 GROUP BY tab0.col2
----
1
1
3

skipif mysql # not compatible
query I rowsort label-3989
SELECT + + tab0.col2 / 20 FROM tab0 GROUP BY tab0.col2
----
1
1
3

query I rowsort
SELECT + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL - 85 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-85
-85
-85

onlyif mysql # DIV for integer division: 
query I rowsort label-3992
SELECT DISTINCT tab1.col1 DIV - 34 col1 FROM tab1 GROUP BY tab1.col1
----
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3992
SELECT DISTINCT tab1.col1 / - 34 col1 FROM tab1 GROUP BY tab1.col1
----
-1
0

query I rowsort
SELECT - 35 AS col1 FROM tab2 GROUP BY tab2.col0
----
-35
-35
-35

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3994
SELECT - CAST( NULL AS SIGNED ) + + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3994
SELECT - CAST ( NULL AS INTEGER ) + + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT + 7 AS col2 FROM tab0 GROUP BY tab0.col2
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 1 + - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-40
-58
-60

query I rowsort
SELECT 50 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
50
50
50

query I rowsort
SELECT + cor0.col1 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col2 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2025
5041
64

query I rowsort
SELECT ALL + - 3 FROM tab0 GROUP BY col0
----
-3
-3
-3

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + cor1.col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab2.col1 + + col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NOT NULL
----
118
122
82

query I rowsort
SELECT DISTINCT + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab2 WHERE NOT NULL BETWEEN NULL AND - tab2.col1 GROUP BY tab2.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + 22 FROM tab2 GROUP BY tab2.col1
----
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 19 col0 FROM tab1 GROUP BY tab1.col0
----
-19

query I rowsort
SELECT ALL 82 AS col0 FROM tab1, tab2 cor0 GROUP BY tab1.col1
----
82
82
82

query I rowsort
SELECT - 57 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-57
-57
-57

query I rowsort
SELECT ALL - - 90 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
11
52
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 col1 FROM tab1 GROUP BY tab1.col0
----
83
83
83

query I rowsort
SELECT DISTINCT + 24 FROM tab1 GROUP BY tab1.col2
----
24

query I rowsort
SELECT + 14 FROM tab1 AS cor0 GROUP BY col2
----
14
14
14

query I rowsort
SELECT - 71 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT ALL - + 95 FROM tab2 GROUP BY col0
----
-95
-95
-95

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4021
SELECT ALL + CAST( NULL AS SIGNED ) * + 75 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4021
SELECT ALL + CAST ( NULL AS INTEGER ) * + 75 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 50 FROM tab1 GROUP BY tab1.col1
----
-50
-50
-50

query I rowsort
SELECT ALL 57 FROM tab0 GROUP BY tab0.col1
----
57
57

query I rowsort
SELECT DISTINCT col1 + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT 36 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT ALL 17 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
1377

query I rowsort
SELECT DISTINCT 60 FROM tab2 GROUP BY tab2.col2
----
60

query I rowsort
SELECT ALL + col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - ( 25 ) + tab1.col0 FROM tab1 GROUP BY col0
----
-3
3
57

query I rowsort
SELECT 23 - 20 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1637
-497
-837

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT 8 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
8
8
8

query I rowsort
SELECT - 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-4035
SELECT ALL - + tab1.col2 DIV - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4035
SELECT ALL - + tab1.col2 / - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
25

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 cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL + 59 AS col0 FROM tab0 GROUP BY tab0.col2
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-4040
SELECT DISTINCT + - 42 DIV - 39 AS col0 FROM tab2 GROUP BY tab2.col0
----
1

skipif mysql # not compatible
query I rowsort label-4040
SELECT DISTINCT + - 42 / - 39 AS col0 FROM tab2 GROUP BY tab2.col0
----
1

query I rowsort
SELECT - 4 FROM tab0 GROUP BY tab0.col2
----
-4
-4
-4

query I rowsort
SELECT ALL 50 - - 14 FROM tab2 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT - tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 66 col1 FROM tab2 GROUP BY tab2.col1
----
-66
-66
-66

query I rowsort
SELECT ALL + 90 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT 49 FROM tab2 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT ALL + 63 FROM tab0 GROUP BY tab0.col2
----
63
63
63

query I rowsort
SELECT DISTINCT - 28 AS col2 FROM tab2 GROUP BY tab2.col2
----
-28

query I rowsort
SELECT 36 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
36
36
36

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, col2
----
44
57
6

query I rowsort
SELECT - ( - tab0.col2 ) AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 95 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
103
140
166

query I rowsort
SELECT - 4 AS col2 FROM tab1 GROUP BY tab1.col2
----
-4
-4
-4

query I rowsort
SELECT DISTINCT 60 AS col1 FROM tab0 GROUP BY tab0.col2
----
60

onlyif mysql # DIV for integer division: 
query I rowsort label-4056
SELECT + cor0.col2 DIV - 99 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4056
SELECT + cor0.col2 / - 99 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + + ( 89 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
89

query I rowsort
SELECT ALL - 36 FROM tab2 GROUP BY tab2.col0
----
-36
-36
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-4060
SELECT cor0.col0 DIV 82 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4060
SELECT cor0.col0 / 82 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT DISTINCT + 69 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT ALL + - 37 FROM tab0 GROUP BY tab0.col2
----
-37
-37
-37

query I rowsort
SELECT DISTINCT ( tab1.col2 ) + 17 FROM tab1 GROUP BY tab1.col2
----
25
62
88

query I rowsort
SELECT NULLIF ( CASE cor0.col0 WHEN - cor0.col2 THEN NULL ELSE - cor0.col1 * 33 END, - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-1452
-1881
-198

onlyif mysql # DIV for integer division: 
query I rowsort label-4067
SELECT - tab1.col2 DIV + 67 - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
70
8

skipif mysql # not compatible
query I rowsort label-4067
SELECT - tab1.col2 / + 67 - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
70
8

query I rowsort
SELECT ALL 89 * cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
7209

query I rowsort
SELECT ALL ( - 1 ) FROM tab0 AS cor0 GROUP BY col0, col0
----
-1
-1
-1

query I rowsort
SELECT ALL NULLIF ( tab2.col1, + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - NULLIF ( cor0.col1, + col1 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT 11 * + tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1044
696
948

query I rowsort
SELECT DISTINCT col2 + 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT - cor0.col1 + - ( - cor0.col1 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL + NULLIF ( - 6, col2 ) FROM tab1 GROUP BY tab1.col2
----
-6
-6
-6

query I rowsort
SELECT 85 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
85

query I rowsort
SELECT DISTINCT + + 50 FROM tab0 GROUP BY tab0.col0
----
50

query I rowsort
SELECT - tab2.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 - 56 * + 18 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1008
-1008
-1008

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT 71 * cor0.col0 - ( 68 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6393
6464
997

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-4083
SELECT tab1.col2 DIV + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4083
SELECT tab1.col2 / + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT ALL 35 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col0
----
35
35
35

query I rowsort
SELECT ALL + 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL cor0.col1 AS col2 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 - 78 * + 27 col2 FROM tab1 GROUP BY tab1.col2
----
-2106
-2106
-2106

query I rowsort
SELECT - ( - 57 ) + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
115
136
144

query I rowsort
SELECT DISTINCT - 42 FROM tab0 cor0 GROUP BY col2
----
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 73 ) col2 FROM tab1 GROUP BY tab1.col0
----
73
73
73

query I rowsort
SELECT ALL - - 56 FROM tab0 GROUP BY tab0.col0
----
56
56
56

query I rowsort
SELECT DISTINCT + + 92 AS col1 FROM tab2 GROUP BY tab2.col0
----
92

query I rowsort
SELECT - tab0.col0 * + 39 + 46 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1631
-3191
-968

query I rowsort
SELECT - 57 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-101
-114
-63

query I rowsort
SELECT ALL 56 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT DISTINCT 88 FROM tab0 AS cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT ALL - + tab2.col1 + - ( + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + tab2.col1 * + 14 AS col2 FROM tab2 GROUP BY tab2.col1
----
574
826
854

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT col1 * 54 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4374

query I rowsort
SELECT ( tab1.col1 ) FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + - 41 FROM tab1 GROUP BY col1
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 80 col2 FROM tab2 GROUP BY col2
----
80

query I rowsort
SELECT ALL 58 + 30 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
88
88
88

query I rowsort
SELECT 49 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT 68 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
5508

query I rowsort
SELECT - 23 AS col1 FROM tab0 GROUP BY tab0.col1
----
-23
-23

query I rowsort
SELECT ALL 89 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT ALL - 92 FROM tab2 cor0 GROUP BY cor0.col2
----
-92
-92
-92

query I rowsort
SELECT ALL tab1.col0 AS col2 FROM tab1 WHERE - tab1.col0 * tab1.col2 + + tab1.col0 IS NOT NULL GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + 46 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
46
46
46

query I rowsort
SELECT col1 - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1681
-3481
-3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + col2 + - tab0.col2 * + 81 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1920
-3040
-6320

query I rowsort
SELECT + 78 AS col1 FROM tab2 GROUP BY tab2.col1
----
78
78
78

query I rowsort
SELECT ALL + tab1.col0 + + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT + ( + cor0.col2 ) * cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2025
5041
64

query I rowsort
SELECT DISTINCT - 59 FROM tab2 GROUP BY tab2.col0
----
-59

query I rowsort
SELECT 85 FROM tab0 GROUP BY tab0.col0
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 41 * col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1558
3239
984

query I rowsort
SELECT col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - 62 FROM tab1 AS cor0 GROUP BY col0
----
-62
-62
-62

query I rowsort
SELECT 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
34
34
34

query I rowsort
SELECT + 81 AS col1 FROM tab1 GROUP BY tab1.col1
----
81
81
81

query I rowsort
SELECT ALL col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - 6 FROM tab1 GROUP BY tab1.col1
----
-6

query I rowsort
SELECT ALL + 5 AS col2 FROM tab1 GROUP BY tab1.col0
----
5
5
5

query I rowsort
SELECT DISTINCT 97 + 58 AS col0 FROM tab2 GROUP BY tab2.col1
----
155

query I rowsort
SELECT + 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
75
75

query I rowsort
SELECT DISTINCT - + 5 FROM tab1 GROUP BY tab1.col2
----
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - - 25 FROM tab0 GROUP BY tab0.col2
----
25
25
25

query I rowsort
SELECT - tab0.col1 * + 4 FROM tab0 GROUP BY col1
----
-324
0

query I rowsort
SELECT DISTINCT - cor0.col0 * 84 FROM tab1 cor0 GROUP BY cor0.col0
----
-1848
-2352
-6888

onlyif mysql # DIV for integer division: 
query I rowsort label-4143
SELECT 42 DIV + 11 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-4143
SELECT 42 / + 11 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT - 88 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 49 + + 67 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
116
116

query I rowsort
SELECT + cor0.col2 * - 5 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-120
-190
-395

query I rowsort
SELECT 72 * + 67 AS col2 FROM tab2 GROUP BY tab2.col2
----
4824
4824
4824

query I rowsort
SELECT DISTINCT + tab1.col1 - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
0

query I rowsort
SELECT DISTINCT 13 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
13

query I rowsort
SELECT + - 82 FROM tab0 GROUP BY tab0.col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT 15 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
15
15
15

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4154
SELECT tab2.col1 DIV - 20 FROM tab2 GROUP BY col1
----
-2
-2
-3

skipif mysql # not compatible
query I rowsort label-4154
SELECT tab2.col1 / - 20 FROM tab2 GROUP BY col1
----
-2
-2
-3

query I rowsort
SELECT ALL - + 64 FROM tab2 GROUP BY tab2.col2
----
-64
-64
-64

query I rowsort
SELECT DISTINCT + - 15 FROM tab2 GROUP BY col2
----
-15

query I rowsort
SELECT + 6 FROM tab0 GROUP BY tab0.col1
----
6
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4158
SELECT DISTINCT + + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4158
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
2565
3124
48

query I rowsort
SELECT DISTINCT - 65 AS col2 FROM tab2 GROUP BY tab2.col0
----
-65

query I rowsort
SELECT + - 86 AS col0 FROM tab2 GROUP BY col1
----
-86
-86
-86

query I rowsort
SELECT + 65 FROM tab0 GROUP BY tab0.col2
----
65
65
65

query I rowsort
SELECT + - tab0.col1 + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT - col2 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL + 28 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
2268

query I rowsort
SELECT ALL 10 FROM tab0 GROUP BY tab0.col2
----
10
10
10

query I rowsort
SELECT + 23 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT 7 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT + 42 AS col1 FROM tab1 GROUP BY tab1.col0
----
42
42
42

query I rowsort
SELECT - tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT ( - col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 14 FROM tab1 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT DISTINCT 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
30

query I rowsort
SELECT + cor0.col0 * 65 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1430
1820
5330

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col2 FROM tab1 GROUP BY tab1.col1
----
6
6
6

query I rowsort
SELECT ( tab0.col1 ) + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + 78 FROM tab0 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT DISTINCT - cor0.col2 + + 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-38
-59
-67

query I rowsort
SELECT ALL col2 * 46 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2070
3266
368

query I rowsort
SELECT DISTINCT col2 * 74 + - 55 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3275
5199
537

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT + 72 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
72
72
72

query I rowsort
SELECT - tab1.col2 + + 76 FROM tab1 GROUP BY tab1.col2
----
31
5
68

query I rowsort
SELECT cor0.col2 * 23 FROM tab2 AS cor0 GROUP BY col2
----
1334
1817
2001

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 68 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-68
-68
-68

query I rowsort
SELECT 41 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
41
41

query I rowsort
SELECT - 69 FROM tab1 GROUP BY col2
----
-69
-69
-69

query I rowsort
SELECT - 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-95
-95
-95

query I rowsort
SELECT 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
20
20
20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4190
SELECT + - tab1.col1 + CAST( NULL AS SIGNED ) / 7 AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4190
SELECT + - tab1.col1 + CAST ( NULL AS INTEGER ) / 7 AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + tab0.col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 41 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-41

query I rowsort
SELECT ALL 74 AS col1 FROM tab1 GROUP BY tab1.col0
----
74
74
74

query I rowsort
SELECT - 90 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT col1 - - 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
53
71
73

query I rowsort
SELECT ALL 15 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15
15
15

onlyif mysql # DIV for integer division: 
query I rowsort label-4198
SELECT - 90 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-4198
SELECT - 90 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + 15 * cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1421
1424
286

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - 86 AS col2 FROM tab0 GROUP BY tab0.col1
----
-86
-86

query I rowsort
SELECT 5 FROM tab1 GROUP BY tab1.col2
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 + - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-25
56

query I rowsort
SELECT DISTINCT - tab1.col2 * - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT + 80 FROM tab0 GROUP BY col0
----
80
80
80

query I rowsort
SELECT 59 - - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
150
151
74

query I rowsort
SELECT ALL 90 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1980
2520
7380

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 42 col2 FROM tab1 GROUP BY tab1.col0
----
42
42
42

query I rowsort
SELECT 21 + + 17 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
38
38
38

query I rowsort
SELECT DISTINCT + 50 FROM tab0 GROUP BY col0
----
50

query I rowsort
SELECT DISTINCT 86 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
86

query I rowsort
SELECT + 52 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2340
3692
416

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT 15 FROM tab1 AS cor0 GROUP BY col2
----
15
15
15

query I rowsort
SELECT cor0.col0 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-29
16
38

query I rowsort
SELECT 11 FROM tab2 GROUP BY tab2.col2
----
11
11
11

query I rowsort
SELECT - 87 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-87
-87
-87

query I rowsort
SELECT cor0.col0 * + 84 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2184
3612
6972

query I rowsort
SELECT + 73 FROM tab1 AS cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT ALL 0 * cor0.col2 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT + tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NULL NOT BETWEEN + tab2.col1 AND ( NULL )
----

query I rowsort
SELECT 35 AS col1 FROM tab0 GROUP BY tab0.col0
----
35
35
35

query I rowsort
SELECT + 2 AS col2 FROM tab1 GROUP BY col0
----
2
2
2

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 70 * 55 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3850
3850
3850

query I rowsort
SELECT DISTINCT 40 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1640
2360
2440

query I rowsort
SELECT ALL 73 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT DISTINCT 51 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
51

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
2565
3124
48

query I rowsort
SELECT + 65 AS col2 FROM tab0 GROUP BY tab0.col0
----
65
65
65

query I rowsort
SELECT ALL + 10 AS col1 FROM tab0 GROUP BY tab0.col0
----
10
10
10

query I rowsort
SELECT - 57 FROM tab2 GROUP BY tab2.col1
----
-57
-57
-57

query I rowsort
SELECT - 30 AS col0 FROM tab2 GROUP BY tab2.col0
----
-30
-30
-30

query I rowsort
SELECT 66 AS col1 FROM tab1 GROUP BY tab1.col0
----
66
66
66

query I rowsort
SELECT + 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT ALL + ( 19 ) FROM tab2 GROUP BY tab2.col1
----
19
19
19

query I rowsort
SELECT ALL - 25 FROM tab1 GROUP BY tab1.col1
----
-25
-25
-25

query I rowsort
SELECT + 49 AS col2 FROM tab2 GROUP BY tab2.col2
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 41 * - col0 FROM tab2 GROUP BY tab2.col0
----
3731
3772
615

query I rowsort
SELECT DISTINCT tab2.col0 * 50 FROM tab2 GROUP BY tab2.col0
----
4550
4600
750

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL 95 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 65 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col2 * - tab1.col2 col0 FROM tab1 GROUP BY col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 14 col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
14
14
14

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 20 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-111
-112
-35

query I rowsort
SELECT ALL 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT + 92 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 * + cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to c635e2bf6718a415651678d4487cf473

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4254
SELECT DISTINCT - + CAST( - 86 AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
86

skipif mysql # not compatible
query I rowsort label-4254
SELECT DISTINCT - + CAST ( - 86 AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
86

query I rowsort
SELECT - 89 FROM tab1 GROUP BY tab1.col2
----
-89
-89
-89

query I rowsort
SELECT ALL + 5 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT + 45 FROM tab1 GROUP BY tab1.col1
----
45
45
45

query I rowsort
SELECT ALL col2 - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + + 11 FROM tab2 GROUP BY tab2.col1
----
11
11
11

query I rowsort
SELECT ALL + 96 AS col2 FROM tab2 GROUP BY tab2.col1
----
96
96
96

query I rowsort
SELECT DISTINCT 77 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
77

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
-116
-158
-174

query I rowsort
SELECT - - 78 FROM tab2 GROUP BY tab2.col2
----
78
78
78

query I rowsort
SELECT - + tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 97 * - 33 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3201
-3201
-3201

query I rowsort
SELECT DISTINCT + 99 FROM tab1 GROUP BY tab1.col0
----
99

query I rowsort
SELECT - cor0.col1 * + 55 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-2255
-3245
-3355

query I rowsort
SELECT 15 + 80 FROM tab1 GROUP BY col0
----
95
95
95

query I rowsort
SELECT tab1.col0 FROM tab1 WHERE NOT - tab1.col2 * + col2 IS NULL GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4270
SELECT cor0.col2 DIV - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4270
SELECT cor0.col2 / - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 47 * - 61 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2867

query I rowsort
SELECT + col1 * + tab0.col1 - - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6642

query I rowsort
SELECT 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT - 36 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2088
2844
3132

query I rowsort
SELECT + tab1.col1 + 37 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1672
2166
228

onlyif mysql # DIV for integer division: 
query I rowsort label-4276
SELECT + + tab0.col0 DIV 63 FROM tab0 GROUP BY tab0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4276
SELECT + + tab0.col0 / 63 FROM tab0 GROUP BY tab0.col0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 51 * + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1224
-1938
-4029

query I rowsort
SELECT - 38 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-38
-38
-38

query I rowsort
SELECT DISTINCT + 50 + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
109
111
91

query I rowsort
SELECT - cor0.col2 + + ( - cor0.col0 + + cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + + 40 FROM tab2 GROUP BY col2
----
40

query I rowsort
SELECT tab2.col1 * - tab2.col1 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1640
-3422
-3660

query I rowsort
SELECT DISTINCT + - 70 FROM tab1 GROUP BY col1
----
-70

query I rowsort
SELECT + 32 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
-51
6

query I rowsort
SELECT + 79 AS col2 FROM tab0 GROUP BY tab0.col1
----
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 68 col2 FROM tab0 GROUP BY tab0.col1
----
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1056
1672
3476

onlyif mysql # DIV for integer division: 
query I rowsort label-4290
SELECT - 42 DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4290
SELECT - 42 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
0

query I rowsort
SELECT + 25 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-98

query I rowsort
SELECT + cor0.col0 + + 4 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19
95
96

query I rowsort
SELECT DISTINCT - + 26 FROM tab0 GROUP BY tab0.col1
----
-26

query I rowsort
SELECT + + 76 + + 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 - + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - tab2.col1 + + 35 FROM tab2 GROUP BY tab2.col1
----
-24
-26
-6

query I rowsort
SELECT 74 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
74
74
74

query I rowsort
SELECT ALL - - 53 + 43 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT - 51 AS col1 FROM tab2 GROUP BY tab2.col2
----
-51
-51
-51

query I rowsort
SELECT - 59 FROM tab1 cor0 GROUP BY cor0.col0
----
-59
-59
-59

query I rowsort
SELECT + + col2 + + 3 AS col1 FROM tab0 GROUP BY col2
----
27
41
82

query I rowsort
SELECT + cor0.col2 * 63 FROM tab0 AS cor0 GROUP BY col2
----
1512
2394
4977

query I rowsort
SELECT ALL + tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL 24 AS col1 FROM tab0 GROUP BY tab0.col1
----
24
24

query I rowsort
SELECT ALL - 1 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL - 37 + 46 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
4149
4195
653

onlyif mysql # DIV for integer division: 
query I rowsort label-4310
SELECT DISTINCT + COALESCE ( + cor0.col1, cor0.col1, + col1 DIV + col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-4310
SELECT DISTINCT + COALESCE ( + cor0.col1, cor0.col1, + col1 / + col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT 16 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + - 18 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1494
-468
-774

query I rowsort
SELECT DISTINCT cor0.col2 * - col1 + + 64 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-5002
-8437
-9211

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - ( tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 10 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-14
-28
-69

query I rowsort
SELECT + col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 + - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
126
1539
3564

query I rowsort
SELECT - 60 AS col0 FROM tab1 cor0 GROUP BY col2
----
-60
-60
-60

query I rowsort
SELECT + 63 FROM tab2 GROUP BY tab2.col2
----
63
63
63

query I rowsort
SELECT ALL + 40 FROM tab2 GROUP BY tab2.col2
----
40
40
40

query I rowsort
SELECT 79 * + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6399

query I rowsort
SELECT - 62 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT DISTINCT 80 AS col1 FROM tab1 GROUP BY tab1.col1
----
80

query I rowsort
SELECT DISTINCT 53 FROM tab2 GROUP BY tab2.col1
----
53

query I rowsort
SELECT 86 AS col0 FROM tab1 GROUP BY tab1.col0
----
86
86
86

query I rowsort
SELECT 44 * col1 FROM tab0 GROUP BY tab0.col1
----
0
3564

query I rowsort
SELECT 7 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
88

query I rowsort
SELECT ALL - 82 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT 36 FROM tab1 GROUP BY col0
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 col1 FROM tab2 GROUP BY tab2.col0
----
48
48
48

query I rowsort
SELECT - NULLIF ( 13, cor0.col1 * cor0.col1 + + cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-13
-13
-13

onlyif mysql # DIV for integer division: 
query I rowsort label-4335
SELECT ALL + tab1.col1 DIV - col1 AS col2 FROM tab1 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4335
SELECT ALL + tab1.col1 / - col1 AS col2 FROM tab1 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + cor0.col2 * 31 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
1178
2449
744

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL 26 * + cor0.col2 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
1170
1846
208

query I rowsort
SELECT - - 10 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
51
69
71

query I rowsort
SELECT tab0.col2 + 60 AS col1 FROM tab0 GROUP BY tab0.col2
----
139
84
98

query I rowsort
SELECT DISTINCT - tab2.col1 * + 52 + - 1 FROM tab2 GROUP BY tab2.col1
----
-2133
-3069
-3173

query I rowsort
SELECT DISTINCT 75 * 80 AS col2 FROM tab2 GROUP BY tab2.col1
----
6000

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT - 79 AS col1 FROM tab0 GROUP BY tab0.col0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT - 71 AS col2 FROM tab2 GROUP BY tab2.col0
----
-71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4347
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY col2, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4347
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY col2, col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - 84 FROM tab2 GROUP BY tab2.col1
----
-84
-84
-84

query I rowsort
SELECT DISTINCT + 15 FROM tab2 GROUP BY tab2.col2
----
15

query I rowsort
SELECT + 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT 69 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT ALL - - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4354
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4354
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 57 * + 54 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3078

query I rowsort
SELECT ALL 32 + cor0.col0 * + 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
2476
4074
7834

query I rowsort
SELECT + 69 * + cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1820
3010
5810

onlyif mysql # DIV for integer division: 
query I rowsort label-4358
SELECT 46 DIV - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4358
SELECT 46 / - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-3
0
0

query I rowsort
SELECT - 44 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1804
-2596
-2684

query I rowsort
SELECT DISTINCT - 26 + ( - 88 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-114

query I rowsort
SELECT DISTINCT tab0.col0 + col0 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT ALL + 87 FROM tab0 GROUP BY tab0.col1
----
87
87

query I rowsort
SELECT DISTINCT + - 7 AS col1 FROM tab2 GROUP BY tab2.col1
----
-7

query I rowsort
SELECT - 13 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-13
-13

query I rowsort
SELECT DISTINCT tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT DISTINCT 59 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
59

query I rowsort
SELECT - cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL + col1 + 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11
92

query I rowsort
SELECT 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT + 47 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT 86 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86

query I rowsort
SELECT DISTINCT cor0.col0 - + 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10
-64
-70

query I rowsort
SELECT DISTINCT + + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL NULLIF ( - cor0.col2, + cor0.col2 + 53 * - cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT DISTINCT - tab1.col0 + tab1.col0 FROM tab1 GROUP BY col0
----
0

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT 12 + - 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-15
-15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4380
SELECT ALL CAST( NULL AS SIGNED ) + + 22 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4380
SELECT ALL CAST ( NULL AS INTEGER ) + + 22 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 74 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-74

query I rowsort
SELECT DISTINCT 26 AS col2 FROM tab2 GROUP BY tab2.col2
----
26

query I rowsort
SELECT - 18 FROM tab1 GROUP BY tab1.col1
----
-18
-18
-18

query I rowsort
SELECT ALL - 72 FROM tab0 AS cor0 GROUP BY col1
----
-72
-72

query I rowsort
SELECT DISTINCT + - 48 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1056
-1344
-3936

query I rowsort
SELECT DISTINCT - - 20 FROM tab2 GROUP BY tab2.col1
----
20

onlyif mysql # DIV for integer division: 
query I rowsort label-4387
SELECT - tab2.col1 DIV tab2.col1 + + tab2.col1 DIV 91 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4387
SELECT - tab2.col1 / tab2.col1 + + tab2.col1 / 91 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT ALL - col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 + - col1 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-57
38
79

query I rowsort
SELECT ALL - 54 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-54
-54

query I rowsort
SELECT + + 46 AS col1 FROM tab1 GROUP BY tab1.col1
----
46
46
46

query I rowsort
SELECT - 34 + - tab0.col1 * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-34
-6595

query I rowsort
SELECT ALL - 29 + - 82 AS col0 FROM tab2 GROUP BY tab2.col0
----
-111
-111
-111

query I rowsort
SELECT ALL + ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-4395
SELECT DISTINCT cor0.col1 DIV + col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-4395
SELECT DISTINCT cor0.col1 / + col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

query I rowsort
SELECT DISTINCT + cor0.col1 + + 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
112
61
99

query I rowsort
SELECT ALL - 94 + 58 AS col2 FROM tab2 GROUP BY tab2.col0
----
-36
-36
-36

query I rowsort
SELECT + 87 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
87
87
87

query I rowsort
SELECT 89 + 57 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
1457
2255
4592

query I rowsort
SELECT ( 22 ) * + col1 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1357
1389
994

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + 4 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT 32 AS col1 FROM tab2 GROUP BY tab2.col0
----
32
32
32

query I rowsort
SELECT 59 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2419
3481
3599

query I rowsort
SELECT DISTINCT + 1 - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-21
-27
-81

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - 79 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1185
-7189
-7268

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
2025
5041
64

query I rowsort
SELECT ALL + - 96 FROM tab1 GROUP BY tab1.col1
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 68 col2 FROM tab0 GROUP BY tab0.col0
----
-68

query I rowsort
SELECT - - ( - 30 ) FROM tab0 GROUP BY tab0.col0
----
-30
-30
-30

query I rowsort
SELECT 53 AS col2 FROM tab0 GROUP BY tab0.col2
----
53
53
53

query I rowsort
SELECT ALL cor0.col2 - 33 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-9
46
5

query I rowsort
SELECT + 7 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT ALL 78 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
78
78
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4416
SELECT DISTINCT + - CAST( + tab1.col1 AS SIGNED ) FROM tab1 GROUP BY col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-4416
SELECT DISTINCT + - CAST ( + tab1.col1 AS INTEGER ) FROM tab1 GROUP BY col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-4417
SELECT + col2 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4417
SELECT + col2 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT + 8 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL - + 68 AS col1 FROM tab0 GROUP BY tab0.col1
----
-68
-68

query I rowsort
SELECT + 63 * - 63 FROM tab0 GROUP BY tab0.col2
----
-3969
-3969
-3969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 86 col0 FROM tab2 GROUP BY tab2.col2
----
-86
-86
-86

query I rowsort
SELECT + cor0.col2 * 5 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
225
355
40

query I rowsort
SELECT DISTINCT + - 2 FROM tab0 GROUP BY tab0.col2
----
-2

query I rowsort
SELECT - cor0.col0 * cor0.col0 + + 86 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0, cor0.col0
----
-139
-8195
-8378

query I rowsort
SELECT 98 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
98
98
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4427
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4427
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ( + 29 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL - 93 + 37 FROM tab0 AS cor0 GROUP BY col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT - col1 - 90 FROM tab1 GROUP BY col1
----
-134
-147
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 * - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 60 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2700
-4260
-480

query I rowsort
SELECT 83 AS col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
83
83
83

query I rowsort
SELECT ALL + 2 AS col2 FROM tab0 GROUP BY col1
----
2
2

query I rowsort
SELECT ALL + + 37 FROM tab0 GROUP BY col2
----
37
37
37

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 37 AS col0 FROM tab0 GROUP BY tab0.col1
----
-37

query I rowsort
SELECT - 4 FROM tab2 GROUP BY tab2.col1
----
-4
-4
-4

query I rowsort
SELECT + cor0.col1 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
2378
4661
5307

query I rowsort
SELECT ALL 82 * - 71 FROM tab2 GROUP BY col2
----
-5822
-5822
-5822

query I rowsort
SELECT DISTINCT - - tab2.col2 * 14 AS col2 FROM tab2 GROUP BY tab2.col2
----
1106
1218
812

onlyif mysql # DIV for integer division: 
query I rowsort label-4446
SELECT cor0.col2 DIV 56 col0 FROM tab1 AS cor0 GROUP BY col2
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4446
SELECT cor0.col2 / 56 col0 FROM tab1 AS cor0 GROUP BY col2
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 13 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-13

query I rowsort
SELECT col2 + - 64 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6
15
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 90 * - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
3690
5310
5490

query I rowsort
SELECT - + tab1.col0 * tab1.col0 + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-462
-6642
-756

query I rowsort
SELECT ALL cor0.col0 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
102
150
170

onlyif mysql # DIV for integer division: 
query I rowsort label-4453
SELECT - col1 * - 26 + COALESCE ( 38, + col0 * + NULLIF ( - cor0.col1 DIV + col0, cor0.col0 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1182
1520
194

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4453
SELECT - col1 * - 26 + COALESCE ( 38, + col0 * + NULLIF ( - cor0.col1 / + col0, cor0.col0 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1182
1520
194

query I rowsort
SELECT ALL tab1.col1 * 53 AS col0 FROM tab1 GROUP BY tab1.col1
----
2332
3021
318

query I rowsort
SELECT DISTINCT - tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col1 - + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NOT NULL <> NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57

query I rowsort
SELECT ALL + 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT 3 FROM tab1 cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT tab1.col1 * tab1.col1 + 8 FROM tab1 GROUP BY tab1.col1
----
1944
3257
44

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT tab2.col0 + - ( tab2.col0 ) * tab2.col0 FROM tab2 GROUP BY col0
----
-210
-8190
-8372

query I rowsort
SELECT - - tab2.col0 + - 28 AS col0 FROM tab2 GROUP BY tab2.col0
----
-13
63
64

query I rowsort
SELECT ALL - - 81 FROM tab0 GROUP BY tab0.col2
----
81
81
81

query I rowsort
SELECT ALL 74 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-3330
-5254
-592

query I rowsort
SELECT ALL - 19 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
19
5
60

query I rowsort
SELECT DISTINCT + + 77 FROM tab1 GROUP BY tab1.col0
----
77

query I rowsort
SELECT 76 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3
38
52

query I rowsort
SELECT ALL cor0.col1 + 7 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
88

onlyif mysql # DIV for integer division: 
query I rowsort label-4471
SELECT + 39 DIV 71 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4471
SELECT + 39 / 71 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

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 DISTINCT - 24 + - 71 FROM tab0 GROUP BY tab0.col2
----
-95

query I rowsort
SELECT DISTINCT - - tab1.col1 + + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + 35 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
35

query I rowsort
SELECT ALL - 26 AS col1 FROM tab2 GROUP BY tab2.col1
----
-26
-26
-26

query I rowsort
SELECT 21 FROM tab1 GROUP BY tab1.col1
----
21
21
21

query I rowsort
SELECT DISTINCT - 32 - + col0 FROM tab2 GROUP BY tab2.col0
----
-123
-124
-47

query I rowsort
SELECT ALL + 36 AS col0 FROM tab0 GROUP BY tab0.col2
----
36
36
36

query I rowsort
SELECT DISTINCT 70 - - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
151
70

query I rowsort
SELECT DISTINCT + 51 FROM tab1 GROUP BY tab1.col0
----
51

query I rowsort
SELECT ALL - + 2 FROM tab0 GROUP BY tab0.col0
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 + - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
-11
-24
27

query I rowsort
SELECT + ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( tab2.col2, 7, tab2.col1 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4487
SELECT ALL - CAST( 69 AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
-69
-69
-69

skipif mysql # not compatible
query I rowsort label-4487
SELECT ALL - CAST ( 69 AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
-69
-69
-69

query I rowsort
SELECT - 68 + + ( col0 ) FROM tab1 AS cor0 GROUP BY col0
----
-40
-46
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT 14 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1162
364
602

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 82, + col2 * COALESCE ( 77, tab1.col1 ) ) + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-104
-110
-164

query I rowsort
SELECT DISTINCT - + ( + 28 ) FROM tab1 GROUP BY col0
----
-28

query I rowsort
SELECT - 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
-82
-82
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4494
SELECT + NULLIF ( cor0.col2, cor0.col2 ) * - CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4494
SELECT + NULLIF ( cor0.col2, cor0.col2 ) * - CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 6 FROM tab0 GROUP BY tab0.col0
----
-6
-6
-6

query I rowsort
SELECT ALL - 55 AS col0 FROM tab0 GROUP BY tab0.col0
----
-55
-55
-55

query I rowsort
SELECT - ( - cor0.col1 ) * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT ALL + - tab2.col2 * tab2.col2 + + 53 AS col1 FROM tab2 GROUP BY col2
----
-3311
-6188
-7516

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - COALESCE ( 73, cor0.col1 + cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-73
-73
-73

query I rowsort
SELECT DISTINCT 59 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
59

onlyif mysql # DIV for integer division: 
query I rowsort label-4501
SELECT ALL - - tab2.col1 DIV + tab2.col1 + 15 FROM tab2 GROUP BY tab2.col1
----
16
16
16

skipif mysql # not compatible
query I rowsort label-4501
SELECT ALL - - tab2.col1 / + tab2.col1 + 15 FROM tab2 GROUP BY tab2.col1
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 28 col0 FROM tab1 GROUP BY tab1.col2
----
-28
-28
-28

query I rowsort
SELECT - + tab0.col1 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT DISTINCT - cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT tab1.col0 + ( + col0 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - cor0.col1 * 25 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-2025
0

query I rowsort
SELECT - + 75 AS col0 FROM tab2 GROUP BY tab2.col0
----
-75
-75
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-4509
SELECT cor0.col1 * + CASE cor0.col0 DIV + cor0.col2 WHEN + cor0.col0 DIV cor0.col0 THEN cor0.col1 * + cor0.col1 WHEN cor0.col0 DIV - cor0.col0 THEN NULL END FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
205379
68921
NULL

skipif mysql # not compatible
query I rowsort label-4509
SELECT cor0.col1 * + CASE cor0.col0 / + cor0.col2 WHEN + cor0.col0 / cor0.col0 THEN cor0.col1 * + cor0.col1 WHEN cor0.col0 / - cor0.col0 THEN NULL END FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
205379
68921
NULL

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4513
SELECT ALL col0 DIV + ( + 74 ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4513
SELECT ALL col0 / + ( + 74 ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
1

query I rowsort
SELECT - ( 87 ) FROM tab0 GROUP BY tab0.col1
----
-87
-87

query I rowsort
SELECT ALL 6 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT - 40 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT + - tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT + ( 11 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
11
11
11

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + + COALESCE ( 93, tab0.col1 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
93

query I rowsort
SELECT DISTINCT + 47 * 92 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
4346
4352
4406

query I rowsort
SELECT ALL + + 21 FROM tab0 GROUP BY col2
----
21
21
21

onlyif mysql # DIV for integer division: 
query I rowsort label-4523
SELECT DISTINCT - tab0.col2 DIV + col2 col2 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4523
SELECT DISTINCT - tab0.col2 / + col2 col2 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ( - col0 ) + col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12
-34
72

query I rowsort
SELECT - cor0.col1 + - 75 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-116
-134
-136

query I rowsort
SELECT DISTINCT 0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + + tab1.col0 * ( - 84 + - 46 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-10660
-2860
-3640

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 90cf6ec6406229dce3ed591cac36d8fb

onlyif mysql # DIV for integer division: 
query I rowsort label-4530
SELECT - cor0.col2 DIV - cor0.col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4530
SELECT - cor0.col2 / - cor0.col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
1
1
1

query I rowsort
SELECT ALL + cor0.col1 + - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-20
-26

query I rowsort
SELECT ALL tab0.col2 + - 66 FROM tab0 GROUP BY tab0.col2
----
-28
-42
13

query I rowsort
SELECT - 74 FROM tab2 GROUP BY col2
----
-74
-74
-74

query I rowsort
SELECT + cor0.col0 + - 49 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-23
-6
34

query I rowsort
SELECT + 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4538
SELECT + NULLIF ( col1, CAST( NULL AS SIGNED ) * 49 + - tab0.col1 ) * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

skipif mysql # not compatible
query I rowsort label-4538
SELECT + NULLIF ( col1, CAST ( NULL AS INTEGER ) * 49 + - tab0.col1 ) * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4542
SELECT - - tab1.col2 / CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4542
SELECT - - tab1.col2 / CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 * ( 77 ) AS col2 FROM tab1 AS cor0 GROUP BY col0
----
1694
2156
6314

query I rowsort
SELECT - cor0.col2 + + 4 FROM tab1 AS cor0 GROUP BY col2
----
-4
-41
-67

query I rowsort
SELECT ALL 78 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
78
78

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col1 * col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4550
SELECT ALL - cor0.col1 * + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4550
SELECT ALL - cor0.col1 * + CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - 24 + + col2 * 29 AS col2 FROM tab2 GROUP BY tab2.col2
----
1658
2267
2499

query I rowsort
SELECT + 75 AS col0 FROM tab2 GROUP BY tab2.col2
----
75
75
75

query I rowsort
SELECT DISTINCT + - col1 - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4554
SELECT cor1.col1 + + CAST( 82 AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
123
141
143

skipif mysql # not compatible
query I rowsort label-4554
SELECT cor1.col1 + + CAST ( 82 AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
123
141
143

query I rowsort
SELECT DISTINCT + col2 * + 79 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4582
6241
6873

query I rowsort
SELECT - tab2.col0 * 15 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1365
-1380
-225

query I rowsort
SELECT ALL - tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - - 90 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-2340
-3870
-7470

query I rowsort
SELECT DISTINCT cor0.col0 + 49 * 96 FROM tab1 cor0 GROUP BY cor0.col0
----
4726
4732
4786

query I rowsort
SELECT + + col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 35 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT DISTINCT tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col0 + + 84 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
175
176
99

query I rowsort
SELECT DISTINCT + 61 * tab0.col2 FROM tab0 GROUP BY col2
----
1464
2318
4819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 col1 FROM tab2 GROUP BY tab2.col0
----
45
45
45

query I rowsort
SELECT DISTINCT + 72 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-3168
-4104
-432

query I rowsort
SELECT cor0.col0 * 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
130
215
415

query I rowsort
SELECT ALL col2 + + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col1, col0
----
102
115
14

query I rowsort
SELECT ALL cor0.col2 * + ( 46 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2070
3266
368

query I rowsort
SELECT ALL + 90 AS col2 FROM tab0 GROUP BY tab0.col1
----
90
90

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + COALESCE ( tab1.col1, tab1.col1, - tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT + 18 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
109
110
33

query I rowsort
SELECT ALL + 59 - 25 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT ALL + 5 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
405

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - cor0.col1 * - 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3198
4602
4758

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 9, col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-9

query I rowsort
SELECT + - 63 FROM tab0 GROUP BY tab0.col0
----
-63
-63
-63

query I rowsort
SELECT ALL + + tab2.col1 * - 97 FROM tab2 GROUP BY tab2.col1
----
-3977
-5723
-5917

query I rowsort
SELECT 12 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1044
696
948

query I rowsort
SELECT 10 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-35
-61
2

query I rowsort
SELECT DISTINCT + 99 FROM tab0 GROUP BY tab0.col1
----
99

query I rowsort
SELECT DISTINCT + 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 42 ) col1 FROM tab1 GROUP BY tab1.col0
----
-42
-42
-42

query I rowsort
SELECT - 30 FROM tab0 GROUP BY tab0.col0
----
-30
-30
-30

query I rowsort
SELECT 25 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
25
25
25

query I rowsort
SELECT DISTINCT NULLIF ( tab1.col1, + tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT DISTINCT - 7 * + 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-364

query I rowsort
SELECT DISTINCT 75 FROM tab0 AS cor0 GROUP BY cor0.col2
----
75

query I rowsort
SELECT 18 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1026
108
792

query I rowsort
SELECT - ( - ( tab1.col0 ) ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + + 23 * 51 FROM tab2 GROUP BY tab2.col0
----
1173
1173
1173

query I rowsort
SELECT ALL 29 AS col2 FROM tab2 GROUP BY tab2.col0
----
29
29
29

query I rowsort
SELECT DISTINCT - + 65 - 3 FROM tab1 GROUP BY tab1.col0
----
-68

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
59

query I rowsort
SELECT 19 + 6 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
25
25
25

query I rowsort
SELECT ALL - tab2.col0 * 73 FROM tab2 GROUP BY tab2.col0
----
-1095
-6643
-6716

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4601
SELECT + + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4601
SELECT + + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + + 67 FROM tab2 GROUP BY tab2.col2
----
67
67
67

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col2 + 94 FROM tab2 AS cor0 GROUP BY col2
----
152
173
181

onlyif mysql # DIV for integer division: 
query I rowsort label-4605
SELECT DISTINCT - cor0.col2 DIV + 94 FROM tab0 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-4605
SELECT DISTINCT - cor0.col2 / + 94 FROM tab0 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT ALL - cor0.col0 * 79 FROM tab0 AS cor0 GROUP BY col0
----
-2054
-3397
-6557

query I rowsort
SELECT ALL + - 13 + - col0 FROM tab0 GROUP BY tab0.col0
----
-39
-56
-96

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-26
-43
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( 78, 35 * + tab1.col0 ) FROM tab1 GROUP BY col1
----
78
78
78

query I rowsort
SELECT DISTINCT + 92 FROM tab2 GROUP BY tab2.col1
----
92

query I rowsort
SELECT + 30 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 97 col0 FROM tab0 GROUP BY tab0.col1
----
97

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 FROM tab0 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT + cor0.col0 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
1260
176
5822

query I rowsort
SELECT + 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT tab1.col0 + + 5 FROM tab1 GROUP BY tab1.col0
----
27
33
87

query I rowsort
SELECT + 62 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-4618
SELECT ALL cor0.col0 DIV 32 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
93
94

skipif mysql # not compatible
query I rowsort label-4618
SELECT ALL cor0.col0 / 32 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
93
94

query I rowsort
SELECT - 46 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-46
-46
-46

onlyif mysql # DIV for integer division: 
query I rowsort label-4620
SELECT DISTINCT + cor0.col1 DIV + 56 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-4620
SELECT DISTINCT + cor0.col1 / + 56 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT DISTINCT - 29 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-29

query I rowsort
SELECT ALL - col2 * - ( 80 * tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
162000
403280
5120

query I rowsort
SELECT - 44 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-44
-44
-44

query I rowsort
SELECT ALL + 21 FROM tab2 GROUP BY tab2.col0
----
21
21
21

query I rowsort
SELECT DISTINCT 13 * - cor0.col0 - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-1162
-364
-602

query I rowsort
SELECT + tab1.col0 + 77 FROM tab1 GROUP BY tab1.col0
----
105
159
99

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4627
SELECT ALL + CAST( NULL AS SIGNED ) * - col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4627
SELECT ALL + CAST ( NULL AS INTEGER ) * - col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4628
SELECT - - CAST( NULL AS DECIMAL ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4628
SELECT - - CAST ( NULL AS REAL ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 12 * 39 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
468
468
468

query I rowsort
SELECT DISTINCT - 77 * col2 + - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4524
-6162
-6786

query I rowsort
SELECT ALL - 98 + + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-27
-53
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-4632
SELECT - tab1.col0 DIV + 40 AS col1 FROM tab1 GROUP BY tab1.col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4632
SELECT - tab1.col0 / + 40 AS col1 FROM tab1 GROUP BY tab1.col0
----
-2
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

query I rowsort
SELECT cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT + 22 - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
113
114
37

query I rowsort
SELECT + 32 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
32
32

query I rowsort
SELECT + 17 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
1394
374
476

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
2

query I rowsort
SELECT 75 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6075

query I rowsort
SELECT + col0 * + 28 AS col0 FROM tab1 GROUP BY col0
----
2296
616
784

query I rowsort
SELECT ALL - cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 45 * - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1980
-2565
-270

query I rowsort
SELECT DISTINCT - 54 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col0
----
-54

query I rowsort
SELECT ALL + - 53 FROM tab0 GROUP BY tab0.col0
----
-53
-53
-53

query I rowsort
SELECT ALL - tab2.col0 * - 74 FROM tab2 GROUP BY tab2.col0
----
1110
6734
6808

query I rowsort
SELECT DISTINCT - - 45 AS col0 FROM tab2 GROUP BY tab2.col0
----
45

query I rowsort
SELECT DISTINCT 65 AS col1 FROM tab2 GROUP BY tab2.col2
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + cor0.col1 * cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3564

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
225
8281
8464

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 98 FROM tab0 GROUP BY col0
----
98
98
98

query I rowsort
SELECT + 74 FROM tab1 GROUP BY tab1.col1
----
74
74
74

query I rowsort
SELECT + 48 AS col1 FROM tab2 GROUP BY tab2.col1
----
48
48
48

onlyif mysql # DIV for integer division: 
query I rowsort label-4654
SELECT - cor0.col1 DIV 45 FROM tab1 AS cor0 GROUP BY col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4654
SELECT - cor0.col1 / 45 FROM tab1 AS cor0 GROUP BY col1
----
-1
0
0

query I rowsort
SELECT cor0.col2 + 19 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
106
77
98

query I rowsort
SELECT 40 * - tab0.col1 + 27 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-1053
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - 15 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
43
64
72

onlyif mysql # DIV for integer division: 
query I rowsort label-4659
SELECT + tab2.col2 * + tab2.col2 + + 10 DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

skipif mysql # not compatible
query I rowsort label-4659
SELECT + tab2.col2 * + tab2.col2 + + 10 / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
73
73
73

query I rowsort
SELECT ALL + 15 + - 1 AS col0 FROM tab1 GROUP BY tab1.col1
----
14
14
14

onlyif mysql # DIV for integer division: 
query I rowsort label-4662
SELECT ALL + - tab2.col1 DIV 86 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4662
SELECT ALL + - tab2.col1 / 86 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4663
SELECT ALL - - CAST( 98 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
98
98
98

skipif mysql # not compatible
query I rowsort label-4663
SELECT ALL - - CAST ( 98 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
98
98
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4664
SELECT - CAST( NULL AS SIGNED ) + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4664
SELECT - CAST ( NULL AS INTEGER ) + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + + tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
118
122
82

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 + + tab2.col1 - + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ( + tab1.col1 ) - tab1.col1 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 - COALESCE ( + 65, tab1.col2 ) + 87 AS col2 FROM tab1 GROUP BY tab1.col1
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 6 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-6

query I rowsort
SELECT DISTINCT - 92 + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1352
484
6149

query I rowsort
SELECT DISTINCT - + col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT + col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-4674
SELECT DISTINCT - 33 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-4674
SELECT DISTINCT - 33 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1
0

query I rowsort
SELECT DISTINCT ( 61 ) FROM tab2 AS cor0 GROUP BY col2
----
61

query I rowsort
SELECT ALL - 27 + ( 71 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 col1 FROM tab0 GROUP BY tab0.col2
----
-94
-94
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-4678
SELECT - 79 DIV tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-9

skipif mysql # not compatible
query I rowsort label-4678
SELECT - 79 / tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-9

query I rowsort
SELECT DISTINCT + 69 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
69

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-43
-43
-43

query I rowsort
SELECT cor0.col2 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
158
48
76

query I rowsort
SELECT DISTINCT - ( tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 49 col1 FROM tab1 GROUP BY tab1.col2
----
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 76 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-76

query I rowsort
SELECT ALL 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT + col1 - - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT ALL - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT tab0.col2 IS NULL
----
-24
-38
-79

query I rowsort
SELECT - col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + ( + col2 ) + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - cor0.col1 * + 10 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-810
0

query I rowsort
SELECT DISTINCT - ( + tab0.col0 ) AS col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col0 * - 95 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2470
-4085
-7885

query I rowsort
SELECT 88 FROM tab0 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT + 51 AS col2 FROM tab1 GROUP BY col0
----
51
51
51

query I rowsort
SELECT ALL 91 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
91
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4697
SELECT ALL + col2 * CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4697
SELECT ALL + col2 * CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT - 53 * 65 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3445
-3445

query I rowsort
SELECT ALL 35 * - cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-1540
-1995
-210

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
41
59
61

query I rowsort
SELECT ALL - col0 * 51 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4641
-4692
-765

query I rowsort
SELECT - col1 * - tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1640
3422
3660

query I rowsort
SELECT col1 + - ( - 97 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
178
97

query I rowsort
SELECT 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
39
39

query I rowsort
SELECT ALL + 13 + + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
13
94

query I rowsort
SELECT DISTINCT + cor0.col0 - + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-17
11
14

query I rowsort
SELECT DISTINCT 40 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
40

query I rowsort
SELECT ALL 93 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1395
8463
8556

query I rowsort
SELECT DISTINCT + 37 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
37

query I rowsort
SELECT 26 + - col1 FROM tab1 cor0 GROUP BY col1
----
-18
-31
20

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT ALL + 20 * - tab1.col1 + + col1 FROM tab1 GROUP BY col1
----
-1083
-114
-836

query I rowsort
SELECT - cor0.col1 * cor0.col1 + - 62 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1743
-3543
-3783

query I rowsort
SELECT cor0.col0 - 66 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-51
25
26

query I rowsort
SELECT + + 57 FROM tab0 GROUP BY tab0.col1
----
57
57

query I rowsort
SELECT DISTINCT 99 + - cor0.col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
17
71
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + 7 * + 29 FROM tab1 AS cor0 GROUP BY cor0.col1
----
203
203
203

onlyif mysql # DIV for integer division: 
query I rowsort label-4723
SELECT DISTINCT tab2.col0 DIV 59 AS col1 FROM tab2 GROUP BY col0
----
0
1

skipif mysql # not compatible
query I rowsort label-4723
SELECT DISTINCT tab2.col0 / 59 AS col1 FROM tab2 GROUP BY col0
----
0
1

query I rowsort
SELECT ALL - 55 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-55
-55

query I rowsort
SELECT DISTINCT - 17 FROM tab2 AS cor0 GROUP BY col1
----
-17

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4726
SELECT - CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4726
SELECT - CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + + 80 FROM tab0 GROUP BY col2
----
80
80
80

query I rowsort
SELECT ALL + 6 FROM tab0 GROUP BY col1
----
6
6

query I rowsort
SELECT ALL 7 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( - 88, tab1.col1 ) col2 FROM tab1 GROUP BY tab1.col1
----
-88

query I rowsort
SELECT DISTINCT 10 FROM tab2 GROUP BY tab2.col1
----
10

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col0
----
182
184
30

query I rowsort
SELECT ALL 97 + 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
151
151
151

query I rowsort
SELECT + 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
59
59
59

query I rowsort
SELECT ALL + 57 AS col0 FROM tab1 GROUP BY tab1.col0
----
57
57
57

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL 75 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT + 80 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
80

query I rowsort
SELECT DISTINCT cor0.col2 - - 6 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
30
44
85

query I rowsort
SELECT ALL - tab0.col1 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT + + 70 FROM tab0 GROUP BY col0
----
70
70
70

onlyif mysql # DIV for integer division: 
query I rowsort label-4742
SELECT cor0.col2 DIV cor0.col2 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
39
80

skipif mysql # not compatible
query I rowsort label-4742
SELECT cor0.col2 / cor0.col2 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
39
80

query I rowsort
SELECT ALL 31 AS col0 FROM tab2 GROUP BY tab2.col2
----
31
31
31

query I rowsort
SELECT ALL + - 54 FROM tab2 GROUP BY tab2.col0
----
-54
-54
-54

onlyif mysql # DIV for integer division: 
query I rowsort label-4745
SELECT DISTINCT + 8 DIV tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0

skipif mysql # not compatible
query I rowsort label-4745
SELECT DISTINCT + 8 / tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - + COALESCE ( COALESCE ( - 1, col0 * col1 ), - 62 + - tab1.col0, CASE tab1.col1 WHEN + tab1.col0 + col2 THEN tab1.col0 WHEN 53 THEN - tab1.col2 * 20 ELSE tab1.col1 - - tab1.col0 * - tab1.col2 END + + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 21 FROM tab1 cor0 GROUP BY col2
----
21

query I rowsort
SELECT 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT tab0.col0 - - ( tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT tab0.col0 * 9 FROM tab0 GROUP BY tab0.col0
----
234
387
747

query I rowsort
SELECT DISTINCT cor0.col2 + 40 FROM tab2 cor0 GROUP BY cor0.col2
----
119
127
98

query I rowsort
SELECT ALL - col1 * - 21 FROM tab0 GROUP BY tab0.col1
----
0
1701

query I rowsort
SELECT DISTINCT + 47 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
47

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 + 18 FROM tab1 GROUP BY tab1.col2
----
18
18
18

query I rowsort
SELECT 42 AS col2 FROM tab2 GROUP BY tab2.col2
----
42
42
42

query I rowsort
SELECT DISTINCT + 61 AS col2 FROM tab0 GROUP BY tab0.col1
----
61

query I rowsort
SELECT 29 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
29
29
29

query I rowsort
SELECT + - ( - col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 14 + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
20
58
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1444
-576
-6241

query I rowsort
SELECT - + tab2.col2 * 69 AS col2 FROM tab2 GROUP BY tab2.col2
----
-4002
-5451
-6003

query I rowsort
SELECT - ( - 32 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
32
32

query I rowsort
SELECT ALL - - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 42 + tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
121
66
80

query I rowsort
SELECT DISTINCT - tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT - tab0.col1 * 20 AS col1 FROM tab0 GROUP BY tab0.col1
----
-1620
0

query I rowsort
SELECT DISTINCT + + 98 FROM tab2 GROUP BY col2
----
98

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col2, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT + 7 + - 1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
6

query I rowsort
SELECT ALL cor0.col0 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to 90cf6ec6406229dce3ed591cac36d8fb

query I rowsort
SELECT ALL tab2.col1 * 37 FROM tab2 GROUP BY tab2.col1
----
1517
2183
2257

query I rowsort
SELECT DISTINCT + 4 FROM tab0 GROUP BY tab0.col0
----
4

query I rowsort
SELECT DISTINCT + + 81 FROM tab1 GROUP BY tab1.col0
----
81

query I rowsort
SELECT 68 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-11
30
44

query I rowsort
SELECT cor0.col1 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-132
-1596
-3608

query I rowsort
SELECT ALL + cor0.col1 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 + - tab2.col2 * tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT + - 7 FROM tab1 GROUP BY tab1.col0
----
-7

query I rowsort
SELECT + cor0.col0 * + 11 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1053
1060
226

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4783
SELECT CASE 51 WHEN - cor0.col1 THEN CAST( NULL AS SIGNED ) + + cor0.col1 WHEN 37 THEN NULL END FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4783
SELECT CASE 51 WHEN - cor0.col1 THEN CAST ( NULL AS INTEGER ) + + cor0.col1 WHEN 37 THEN NULL END FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT ALL + 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT + tab0.col2 * - 52 FROM tab0 GROUP BY tab0.col2
----
-1248
-1976
-4108

query I rowsort
SELECT col1 + + 29 FROM tab1 AS cor0 GROUP BY cor0.col1
----
35
73
86

onlyif mysql # DIV for integer division: 
query I rowsort label-4788
SELECT DISTINCT cor0.col0 DIV col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-4788
SELECT DISTINCT cor0.col0 / col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-4789
SELECT + 8 DIV 87 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4789
SELECT + 8 / 87 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
0
0
81

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
1849
676
6889

query I rowsort
SELECT ALL cor0.col1 - 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-12
69

query I rowsort
SELECT 98 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7938

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
81

query I rowsort
SELECT col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT 51 FROM tab1 GROUP BY tab1.col1
----
51

query I rowsort
SELECT tab0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + tab0.col2 - + tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING ( tab0.col2 ) IS NOT NULL
----
0
0
0

query I rowsort
SELECT - tab2.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 70 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1820
-3010
-5810

query I rowsort
SELECT + tab1.col0 + 75 FROM tab1 GROUP BY col0
----
103
157
97

onlyif mysql # DIV for integer division: 
query I rowsort label-4806
SELECT - ( + tab0.col2 ) DIV - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4806
SELECT - ( + tab0.col2 ) / - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT + 10 AS col0 FROM tab0 GROUP BY tab0.col2
----
10
10
10

query I rowsort
SELECT - cor0.col0 * + 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2912
-2944
-480

query I rowsort
SELECT ALL + - 66 FROM tab0 GROUP BY tab0.col0
----
-66
-66
-66

query I rowsort
SELECT - COALESCE ( 64, cor0.col2 ) + + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-26
-40
15

query I rowsort
SELECT ALL ( - cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, col0
----
24
38
79

query I rowsort
SELECT cor0.col1 * + 51 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 93 col1 FROM tab0 cor0 GROUP BY col1
----
-93

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
58
79
87

query I rowsort
SELECT + 46 FROM tab0 GROUP BY tab0.col2
----
46
46
46

query I rowsort
SELECT DISTINCT + cor0.col0 + 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
125
65
71

query I rowsort
SELECT + col0 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - 7 FROM tab0 AS cor0 GROUP BY col1
----
-7
-7

query I rowsort
SELECT 81 FROM tab0 cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT col1 + + ( - cor0.col1 ) * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6480
0

query I rowsort
SELECT ALL - - 60 FROM tab1 GROUP BY tab1.col2
----
60
60
60

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 38 FROM tab1 GROUP BY tab1.col0
----
-38

query I rowsort
SELECT ALL + 20 FROM tab0 GROUP BY col1
----
20
20

query I rowsort
SELECT DISTINCT + 15 FROM tab1 GROUP BY tab1.col1
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL tab2.col0 / + tab2.col0 FROM tab2 WHERE NOT ( NULL ) IS NULL GROUP BY tab2.col0
----

query I rowsort
SELECT + col1 + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT - + 23 FROM tab1 GROUP BY tab1.col1
----
-23
-23
-23

query I rowsort
SELECT DISTINCT cor0.col2 + 12 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
20
57
83

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col2 + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
138
148
99

query I rowsort
SELECT DISTINCT + 63 + col2 FROM tab0 GROUP BY tab0.col2
----
101
142
87

query I rowsort
SELECT ALL - col1 + + tab2.col1 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL - 7 FROM tab1 GROUP BY tab1.col0
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 18 + + tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
100
40
46

query I rowsort
SELECT DISTINCT 38 FROM tab0 cor0 GROUP BY cor0.col1
----
38

onlyif mysql # DIV for integer division: 
query I rowsort label-4840
SELECT - - tab1.col2 DIV + 70 + - 86 FROM tab1 GROUP BY tab1.col2
----
-85
-86
-86

skipif mysql # not compatible
query I rowsort label-4840
SELECT - - tab1.col2 / + 70 + - 86 FROM tab1 GROUP BY tab1.col2
----
-85
-86
-86

query I rowsort
SELECT DISTINCT + - 81 AS col0 FROM tab2 GROUP BY tab2.col1
----
-81

query I rowsort
SELECT ALL + ( - col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT + 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT ALL ( - cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - ( + 93 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT DISTINCT 28 + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
109
28

query I rowsort
SELECT ( 79 ) * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3476
4503
474

query I rowsort
SELECT ALL + NULLIF ( - cor0.col1, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 71 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT cor0.col0 + - 20 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
71
72

query I rowsort
SELECT DISTINCT - 63 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-63

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4852
SELECT CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4852
SELECT CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 24 + 1 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
25
25
25

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 cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + cor0.col0 + + 99 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
114
190
191

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + tab0.col2 * 38 AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
3002
912

query I rowsort
SELECT ( cor0.col2 ) * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - + tab2.col1 + - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT - 31 AS col1 FROM tab2 GROUP BY tab2.col0
----
-31

query I rowsort
SELECT DISTINCT col2 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-2378
-4661
-5307

query I rowsort
SELECT DISTINCT - col0 + + 43 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-48
-49
28

query I rowsort
SELECT + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - 43 AS col2 FROM tab1 GROUP BY tab1.col0
----
-43
-43
-43

onlyif mysql # DIV for integer division: 
query I rowsort label-4866
SELECT 94 DIV 38 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
2

skipif mysql # not compatible
query I rowsort label-4866
SELECT 94 / 38 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
2

query I rowsort
SELECT ALL 66 AS col0 FROM tab1 GROUP BY col2
----
66
66
66

query I rowsort
SELECT 79 AS col2 FROM tab2 GROUP BY tab2.col1
----
79
79
79

query I rowsort
SELECT + 29 * 4 FROM tab0 GROUP BY tab0.col1
----
116
116

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4870
SELECT ALL cor0.col0 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4870
SELECT ALL cor0.col0 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 * 63 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5824
5888
960

query I rowsort
SELECT ALL - 27 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-27
-27
-27

query I rowsort
SELECT ALL + col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - cor0.col2 + 13 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-45
-66
-74

query I rowsort
SELECT ALL - 25 * cor0.col2 + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2, col1
----
-1896
-576
-912

query I rowsort
SELECT cor0.col2 - 32 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-24
13
39

query I rowsort
SELECT + 46 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT - cor0.col0 - + 86 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-108
-114
-168

query I rowsort
SELECT 79 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3239
4661
4819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 85 * - 58 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4930
-4930
-4930

query I rowsort
SELECT DISTINCT - 40 FROM tab1 GROUP BY tab1.col1
----
-40

query I rowsort
SELECT - 37 AS col0 FROM tab1 GROUP BY tab1.col2
----
-37
-37
-37

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
164
44
56

query I rowsort
SELECT + 4 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0, cor0.col1
----
4
4
4

query I rowsort
SELECT DISTINCT + 63 * - 71 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col2
----
-4473

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col2 ) col1 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-4887
SELECT + COALESCE ( 87, cor0.col1 DIV - 34, - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4887
SELECT + COALESCE ( 87, cor0.col1 / - 34, - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT + + tab0.col1 + ( - 96 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-15
-96

query I rowsort
SELECT + tab0.col0 * - tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
240
8372
8556

onlyif mysql # DIV for integer division: 
query I rowsort label-4891
SELECT ALL - cor0.col1 * 99 + cor0.col1 DIV 74 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4356
-5643
-594

skipif mysql # not compatible
query I rowsort label-4891
SELECT ALL - cor0.col1 * 99 + cor0.col1 / 74 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4356
-5643
-594

query I rowsort
SELECT cor0.col1 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
0
0
1944

onlyif mysql # DIV for integer division: 
query I rowsort label-4893
SELECT COALESCE ( 25, col2, + cor0.col1 + ( - cor0.col0 ) DIV + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4893
SELECT COALESCE ( 25, col2, + cor0.col1 + ( - cor0.col0 ) / + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 33 FROM tab2 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT 47 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
47
47
47

query I rowsort
SELECT ALL tab2.col0 * 45 FROM tab2 GROUP BY tab2.col0
----
4095
4140
675

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col2 * + 86 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4988
6794
7482

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + 0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - tab2.col2 + + COALESCE ( COALESCE ( 9, tab2.col2 ), ( - tab2.col2 ) * + tab2.col2 + - tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
-49
-70
-78

query I rowsort
SELECT 29 * - cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-2639
-2668
-435

query I rowsort
SELECT + col0 * + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT 79 FROM tab1 GROUP BY tab1.col1
----
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 29 + + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1
----
35
73
86

query I rowsort
SELECT ALL - 81 FROM tab2 AS cor0 GROUP BY col1
----
-81
-81
-81

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 WHERE NOT ( - tab1.col0 ) BETWEEN - tab1.col2 AND tab1.col0 AND NULL NOT BETWEEN NULL AND ( + tab1.col0 + tab1.col2 ) GROUP BY tab1.col2
----

query I rowsort
SELECT - cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 25 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-2275
-2300
-375

query I rowsort
SELECT - cor0.col1 * 38 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1672
-2166
-228

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4912
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4912
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
6
6
6

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col2 + - cor0.col2 * + 47 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1786
-3072
-3713

query I rowsort
SELECT ALL + 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-4916
SELECT ALL 2 DIV cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4916
SELECT ALL 2 / cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT 26 AS col2 FROM tab2 GROUP BY col2
----
26

query I rowsort
SELECT + cor0.col0 + + 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
100
40
46

query I rowsort
SELECT DISTINCT - 57 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-57

query I rowsort
SELECT ALL 18 * 2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 77 + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
103
120
160

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
70

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1980
-3306
-42

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 73 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1898
-3139
-6059

query I rowsort
SELECT DISTINCT + 95 FROM tab1 AS cor0 GROUP BY cor0.col0
----
95

query I rowsort
SELECT + col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL tab1.col1 * - 9 FROM tab1 GROUP BY tab1.col1
----
-396
-513
-54

query I rowsort
SELECT ALL - 35 AS col0 FROM tab0 GROUP BY tab0.col0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT 26 AS col1 FROM tab1 GROUP BY tab1.col2
----
26

query I rowsort
SELECT + + 42 FROM tab0 GROUP BY tab0.col2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 col0 FROM tab1 GROUP BY tab1.col2
----
77
77
77

query I rowsort
SELECT ALL - + 63 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-48
28
29

query I rowsort
SELECT ALL + tab1.col1 + - 18 FROM tab1 GROUP BY tab1.col1
----
-12
26
39

query I rowsort
SELECT ALL + 57 AS col1 FROM tab2 GROUP BY tab2.col1
----
57
57
57

query I rowsort
SELECT + 3 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3
3

query I rowsort
SELECT + - 61 AS col2 FROM tab1 GROUP BY tab1.col0
----
-61
-61
-61

query I rowsort
SELECT - + 0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL - 16 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-16
-16
-16

onlyif mysql # DIV for integer division: 
query I rowsort label-4941
SELECT + NULLIF ( 31, + cor0.col1 ) + - cor0.col1 DIV - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
31
31
33

skipif mysql # not compatible
query I rowsort label-4941
SELECT + NULLIF ( 31, + cor0.col1 ) + - cor0.col1 / - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
31
31
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT + 6 FROM tab2 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + 27 * cor0.col1 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1232
1596
168

query I rowsort
SELECT ALL - 27 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-27
-27
-27

query I rowsort
SELECT + 20 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT - cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT 83 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3403
4897
5063

query I rowsort
SELECT + 8 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
89

query I rowsort
SELECT - 28 FROM tab1 GROUP BY tab1.col1
----
-28
-28
-28

query I rowsort
SELECT 94 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT - - 8 FROM tab1 GROUP BY tab1.col0
----
8
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-4955
SELECT ALL - + tab1.col0 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4955
SELECT ALL - + tab1.col0 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + tab2.col2 * 51 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3016
4108
4524

query I rowsort
SELECT 78 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 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 10 - 70 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-60

query I rowsort
SELECT DISTINCT 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT DISTINCT cor0.col0 * CASE - ( cor0.col0 ) WHEN + cor0.col0 * 64 THEN - cor0.col0 END FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT - 4 FROM tab1 GROUP BY tab1.col1
----
-4
-4
-4

query I rowsort
SELECT DISTINCT 69 FROM tab0 cor0 GROUP BY col0, col0
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
142
16
90

query I rowsort
SELECT + ( cor0.col0 ) + col2 * 78 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3538
5620
646

query I rowsort
SELECT ALL cor0.col0 + + 27 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-2366
-2392
-390

query I rowsort
SELECT DISTINCT - 59 FROM tab2 GROUP BY tab2.col1
----
-59

query I rowsort
SELECT - tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL 88 * col0 FROM tab0 GROUP BY tab0.col0
----
2288
3784
7304

query I rowsort
SELECT - cor0.col1 + - 19 * - 71 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1268
1349

query I rowsort
SELECT - 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-64
-64
-64

query I rowsort
SELECT DISTINCT 31 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
31

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
118
122
82

query I rowsort
SELECT 49 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2156
2793
294

query I rowsort
SELECT 9 AS col0 FROM tab1 GROUP BY col2
----
9
9
9

query I rowsort
SELECT - - 59 * tab0.col0 + + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1560
2580
4980

query I rowsort
SELECT - col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT - tab0.col1 + 72 AS col1 FROM tab0 GROUP BY col1
----
-9
72

query I rowsort
SELECT ALL 87 AS col0 FROM tab2 GROUP BY tab2.col2
----
87
87
87

query I rowsort
SELECT ALL 72 AS col1 FROM tab1 GROUP BY tab1.col2
----
72
72
72

query I rowsort
SELECT ALL col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT ALL 93 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT - 41 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-2419
-2501

query I rowsort
SELECT + + 38 FROM tab0 GROUP BY tab0.col2
----
38
38
38

query I rowsort
SELECT DISTINCT 79 * + col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1738
2212
6478

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT ( 17 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT + col2 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT + 17 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT ALL + 49 AS col0 FROM tab1 GROUP BY tab1.col1
----
49
49
49

query I rowsort
SELECT DISTINCT + ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + - 55 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-14
4
6

query I rowsort
SELECT - 1 FROM tab0 GROUP BY tab0.col1
----
-1
-1

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + cor0.col0 * 11 FROM tab0 cor0 GROUP BY cor0.col0
----
286
473
913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 + + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
22
28
82

query I rowsort
SELECT ALL - 54 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4374
0

query I rowsort
SELECT ALL + tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT - cor0.col1 + NULLIF ( - 75, + cor0.col2 * 35 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-116
-134
-136

query I rowsort
SELECT DISTINCT - + tab1.col2 * + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT + 8 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col1
----
8
8
8

query I rowsort
SELECT DISTINCT - cor0.col0 * + 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-1560
-2580
-4980

query I rowsort
SELECT DISTINCT cor0.col0 * col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + 59 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
59
59
59

query I rowsort
SELECT 95 FROM tab1 AS cor0 GROUP BY col1
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-5011
SELECT COALESCE ( 8, - cor0.col1 * cor0.col2 + cor0.col1 * + cor0.col2, - cor0.col2 + cor0.col1, 74, + cor0.col1 ) DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5011
SELECT COALESCE ( 8, - cor0.col1 * cor0.col2 + cor0.col1 * + cor0.col2, - cor0.col2 + cor0.col1, 74, + cor0.col1 ) / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT + COALESCE ( 92, cor0.col2 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + tab2.col1 * col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + + tab2.col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * 22 col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-1804
-484
-616

query I rowsort
SELECT 62 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT DISTINCT + col2 * 49 AS col1 FROM tab1 GROUP BY tab1.col2
----
2205
3479
392

query I rowsort
SELECT DISTINCT - 28 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-28

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 76 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
76

query I rowsort
SELECT - 0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 89 FROM tab1 GROUP BY tab1.col1
----
89
89
89

query I rowsort
SELECT + ( + 69 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT cor0.col0 + - 11 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
4
80
81

query I rowsort
SELECT + - 53 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-8
18

query I rowsort
SELECT ALL + 9 - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-17
-34
-74

query I rowsort
SELECT + tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT + ( 79 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
79
79
79

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT cor0.col2 * COALESCE ( - cor0.col2, - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL cor0.col2 * 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1350
2130
240

query I rowsort
SELECT + 70 + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-12
42
48

query I rowsort
SELECT ALL + 66 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
3828
5214
5742

onlyif mysql # DIV for integer division: 
query I rowsort label-5037
SELECT DISTINCT col2 * + cor0.col2 + + cor0.col2 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3365
6242
7570

skipif mysql # not compatible
query I rowsort label-5037
SELECT DISTINCT col2 * + cor0.col2 + + cor0.col2 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3365
6242
7570

query I rowsort
SELECT 62 FROM tab0 GROUP BY col1
----
62
62

query I rowsort
SELECT - 71 FROM tab1 GROUP BY col1
----
-71
-71
-71

query I rowsort
SELECT ALL - tab2.col0 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-24
-24
-24

query I rowsort
SELECT DISTINCT 94 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94

query I rowsort
SELECT DISTINCT - tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL ( 3 ) FROM tab2 cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT - 3 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-135
-213
-24

query I rowsort
SELECT ALL tab1.col2 + tab1.col2 * + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT - 39 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1014
-1677
-3237

query I rowsort
SELECT DISTINCT - - tab1.col1 * 28 FROM tab1 GROUP BY tab1.col1
----
1232
1596
168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 31 col1 FROM tab0 GROUP BY tab0.col1
----
31
31

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 + tab2.col2 * + tab2.col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col2 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT - 23 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT cor0.col0 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT cor0.col1 * - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - 35 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-35
-35

query I rowsort
SELECT DISTINCT col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-5058
SELECT DISTINCT tab1.col0 DIV - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1

skipif mysql # not compatible
query I rowsort label-5058
SELECT DISTINCT tab1.col0 / - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1

query I rowsort
SELECT DISTINCT 7 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
48
66
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT + - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 27 + + 97 * col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
27
7884

query I rowsort
SELECT + + ( - 45 ) FROM tab0 GROUP BY tab0.col0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT + 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8

query I rowsort
SELECT cor0.col2 - + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 43 FROM tab2 GROUP BY tab2.col2
----
43
43
43

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5069
SELECT - CAST( NULL AS DECIMAL ) + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5069
SELECT - CAST ( NULL AS REAL ) + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 75 - 30 AS col2 FROM tab2 GROUP BY tab2.col0
----
45
45
45

query I rowsort
SELECT DISTINCT tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT + 44 FROM tab1 GROUP BY tab1.col2
----
44

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 - - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
2070
5112
72

query I rowsort
SELECT - cor0.col1 * 83 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6723
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5077
SELECT ALL - cor0.col0 DIV cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5077
SELECT ALL - cor0.col0 / cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL tab1.col1 * - tab1.col1 + tab1.col1 FROM tab1 GROUP BY col1 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-5081
SELECT + tab0.col2 DIV + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5081
SELECT + tab0.col2 / + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-5082
SELECT ALL + tab2.col2 DIV 17 FROM tab2 GROUP BY col2
----
3
4
5

skipif mysql # not compatible
query I rowsort label-5082
SELECT ALL + tab2.col2 / 17 FROM tab2 GROUP BY col2
----
3
4
5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5083
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5083
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + 76 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1976
3268
6308

query I rowsort
SELECT + 44 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT 8 - 23 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1326
-1809
-1993

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5088
SELECT DISTINCT - col1 DIV + 75 + 94 FROM tab1 GROUP BY tab1.col1
----
94

skipif mysql # not compatible
query I rowsort label-5088
SELECT DISTINCT - col1 / + 75 + 94 FROM tab1 GROUP BY tab1.col1
----
94

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT + - 57 FROM tab2 GROUP BY col0
----
-57

query I rowsort
SELECT + + 77 AS col2 FROM tab0 GROUP BY tab0.col1
----
77
77

query I rowsort
SELECT DISTINCT + tab0.col2 + - 5 AS col0 FROM tab0 GROUP BY tab0.col2
----
19
33
74

query I rowsort
SELECT ALL + tab1.col1 + ( col1 ) * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5094
SELECT cor0.col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5094
SELECT cor0.col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 8 * 46 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-368
-368
-368

query I rowsort
SELECT ALL 37 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
37
37
37

onlyif mysql # DIV for integer division: 
query I rowsort label-5097
SELECT + cor0.col1 DIV + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5097
SELECT + cor0.col1 / + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
0
0
4

query I rowsort
SELECT ALL + 81 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
81
81
81

query I rowsort
SELECT DISTINCT - + 58 AS col0 FROM tab1 GROUP BY tab1.col2
----
-58

query I rowsort
SELECT DISTINCT 53 FROM tab0 GROUP BY tab0.col2
----
53

query I rowsort
SELECT - cor0.col0 - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-166
-52
-86

query I rowsort
SELECT + 6 - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-20
-37
-77

query I rowsort
SELECT DISTINCT + 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73

onlyif mysql # DIV for integer division: 
query I rowsort label-5104
SELECT ALL cor0.col1 DIV + col1 + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
45
58
7

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5104
SELECT ALL cor0.col1 / + col1 + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
45
58
7

onlyif mysql # DIV for integer division: 
query I rowsort label-5105
SELECT 90 DIV 65 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5105
SELECT 90 / 65 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT + - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col1 + - 69 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-12
-25
-63

query I rowsort
SELECT ALL - 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-28
-28
-28

query I rowsort
SELECT + - tab0.col0 * + col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT - 11 FROM tab2 cor0 GROUP BY cor0.col2
----
-11
-11
-11

query I rowsort
SELECT - tab0.col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL 70 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70
70
70

onlyif mysql # DIV for integer division: 
query I rowsort label-5113
SELECT + tab2.col1 DIV + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5113
SELECT + tab2.col1 / + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT - 34 FROM tab1 GROUP BY tab1.col1
----
-34
-34
-34

query I rowsort
SELECT - 50 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
4050

query I rowsort
SELECT + 49 AS col0 FROM tab1 GROUP BY tab1.col2
----
49
49
49

query I rowsort
SELECT DISTINCT + + 31 FROM tab0 GROUP BY tab0.col2
----
31

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 0 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
116
158
174

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT 6 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-5124
SELECT ALL + cor0.col0 DIV 15 FROM tab2 AS cor0 GROUP BY col0
----
1
6
6

skipif mysql # not compatible
query I rowsort label-5124
SELECT ALL + cor0.col0 / 15 FROM tab2 AS cor0 GROUP BY col0
----
1
6
6

query I rowsort
SELECT - 84 FROM tab2 GROUP BY tab2.col2
----
-84
-84
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 col0 FROM tab1 GROUP BY tab1.col1
----
17

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
38
38
38

query I rowsort
SELECT + ( cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 32 AS col2 FROM tab0 GROUP BY tab0.col1
----
32
32

query I rowsort
SELECT ALL tab2.col2 * - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3306
-6162
-7482

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 11 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
11
11
11

query I rowsort
SELECT ALL + 28 FROM tab0 GROUP BY col1
----
28
28

query I rowsort
SELECT + 52 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
52
52
52

query I rowsort
SELECT + 71 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col1
----
71
71
71

query I rowsort
SELECT + 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT ALL + 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85
85
85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5140
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5140
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT ALL + 34 * + 47 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1598
1598
1598

query I rowsort
SELECT + 65 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT + 86 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
86
86

query I rowsort
SELECT DISTINCT cor0.col1 + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT - + ( col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - tab2.col0 * 27 FROM tab2 GROUP BY col0
----
-2457
-2484
-405

onlyif mysql # DIV for integer division: 
query I rowsort label-5147
SELECT DISTINCT + COALESCE ( 30, + col1, + col2 DIV tab2.col2 + - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
30

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5147
SELECT DISTINCT + COALESCE ( 30, + col1, + col2 / tab2.col2 + - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
30

query I rowsort
SELECT - + 36 AS col1 FROM tab0 GROUP BY tab0.col2
----
-36
-36
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 68 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-68
-68
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 * tab0.col1 col2 FROM tab0 GROUP BY col1
----
0
4212

query I rowsort
SELECT DISTINCT + - tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT ALL - cor0.col1 + + 60 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-21
60
60

query I rowsort
SELECT DISTINCT 90 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
90

query I rowsort
SELECT + ( + cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 37 * - 19 FROM tab0 GROUP BY tab0.col1
----
-703
-703

query I rowsort
SELECT DISTINCT - + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 * - col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-462
-6642
-756

query I rowsort
SELECT DISTINCT 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
27

query I rowsort
SELECT ALL + cor0.col1 - - 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
11
92

query I rowsort
SELECT 90 FROM tab0 GROUP BY tab0.col2
----
90
90
90

query I rowsort
SELECT ALL - 50 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-50
31

query I rowsort
SELECT DISTINCT + 12 FROM tab0 AS cor0 GROUP BY cor0.col0
----
12

onlyif mysql # DIV for integer division: 
query I rowsort label-5164
SELECT DISTINCT - + tab1.col0 DIV + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1

skipif mysql # not compatible
query I rowsort label-5164
SELECT DISTINCT - + tab1.col0 / + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1

query I rowsort
SELECT 9 * - 70 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-630
-630
-630

query I rowsort
SELECT ALL - - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-5167
SELECT DISTINCT - 14 DIV + 34 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
query I rowsort label-5167
SELECT DISTINCT - 14 / + 34 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 81 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
81
81
81

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 cor0.col2 - 6 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52
73
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 71 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 + - 63 col0 FROM tab2 GROUP BY tab2.col1
----
-104
-122
-124

query I rowsort
SELECT ALL 77 FROM tab2 GROUP BY tab2.col2
----
77
77
77

query I rowsort
SELECT DISTINCT + 47 AS col1 FROM tab1 GROUP BY col1
----
47

onlyif mysql # DIV for integer division: 
query I rowsort label-5177
SELECT ALL + 6 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5177
SELECT ALL + 6 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT + col0 + - tab1.col0 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL tab1.col1 - tab1.col1 FROM tab1 GROUP BY col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 col2 FROM tab2 GROUP BY col0
----
77
77
77

query I rowsort
SELECT DISTINCT - cor0.col1 + 65 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
21
59
8

query I rowsort
SELECT DISTINCT - 75 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-3300
-4275
-450

query I rowsort
SELECT + 27 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT ALL - col1 + + cor0.col2 * - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-2419
-4720
-5368

query I rowsort
SELECT + ( - 3 ) AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-3
-3
-3

query I rowsort
SELECT + 36 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT ALL 42 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1848
2394
252

query I rowsort
SELECT cor0.col2 - + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5193
SELECT DISTINCT CAST( 92 AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
92

skipif mysql # not compatible
query I rowsort label-5193
SELECT DISTINCT CAST ( 92 AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT DISTINCT - 90 FROM tab0 GROUP BY tab0.col2
----
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 57 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT ALL - 75 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-75
-75

query I rowsort
SELECT 61 FROM tab2 GROUP BY tab2.col2
----
61
61
61

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT DISTINCT 36 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
36

query I rowsort
SELECT + + 61 FROM tab0 GROUP BY tab0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT + - 26 * + 70 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1739
-1820

query I rowsort
SELECT DISTINCT - - 38 FROM tab1 GROUP BY tab1.col0
----
38

query I rowsort
SELECT 62 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
62
62
62

query I rowsort
SELECT ALL + - col1 FROM tab0 GROUP BY col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5205
SELECT tab1.col1 DIV ( 38 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5205
SELECT tab1.col1 / ( 38 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
0
1
1

query I rowsort
SELECT DISTINCT + + col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col1 FROM tab0 GROUP BY tab0.col0
----
35
35
35

query I rowsort
SELECT ALL 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
67
67

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT + + 15 AS col2 FROM tab1 GROUP BY tab1.col2
----
15
15
15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5211
SELECT - CAST( NULL AS SIGNED ) * - cor0.col0 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5211
SELECT - CAST ( NULL AS INTEGER ) * - cor0.col0 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 96 FROM tab0 GROUP BY tab0.col0
----
96
96
96

query I rowsort
SELECT ALL + 31 * 77 FROM tab2 GROUP BY tab2.col0
----
2387
2387
2387

query I rowsort
SELECT 75 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
75
75

query I rowsort
SELECT - 22 * 33 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-726
-726
-726

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 38, - col1 + + tab1.col2 ) * tab1.col1 + 90 FROM tab1 GROUP BY tab1.col1
----
1762
2256
318

query I rowsort
SELECT DISTINCT col2 * - 94 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4230
-6674
-752

query I rowsort
SELECT + 59 FROM tab2 cor0 GROUP BY cor0.col2
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( + 42, cor0.col0 + 72 * cor0.col0, + col1 + cor0.col0 ) * - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1722
-2478
-2562

query I rowsort
SELECT + 74 FROM tab0 GROUP BY col1
----
74
74

query I rowsort
SELECT - 95 AS col1 FROM tab0 GROUP BY col0
----
-95
-95
-95

query I rowsort
SELECT + cor0.col0 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-72
12
34

query I rowsort
SELECT DISTINCT col0 - + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT DISTINCT + - 13 AS col2 FROM tab2 GROUP BY tab2.col1
----
-13

query I rowsort
SELECT ALL 80 FROM tab1 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT + ( 45 ) FROM tab0 AS cor0 GROUP BY col1
----
45
45

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT - tab1.col1 + tab1.col1 FROM tab1 GROUP BY col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 11 FROM tab1 cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT DISTINCT - 5 FROM tab0 GROUP BY tab0.col2
----
-5

query I rowsort
SELECT DISTINCT - + tab2.col1 * + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL 74 * + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1628
2072
6068

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 42 col2 FROM tab1 GROUP BY tab1.col0
----
42
42
42

query I rowsort
SELECT ALL - + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 22 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
22
22

query I rowsort
SELECT + - 57 AS col1 FROM tab2 GROUP BY tab2.col0
----
-57
-57
-57

query I rowsort
SELECT ALL - 49 FROM tab1 AS cor0 GROUP BY col2
----
-49
-49
-49

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT - 45 * + 33 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1485
-1485
-1485

onlyif mysql # DIV for integer division: 
query I rowsort label-5241
SELECT - col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5241
SELECT - col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT - 41 * - 97 AS col2 FROM tab2 GROUP BY tab2.col1
----
3977
3977
3977

query I rowsort
SELECT ( + 80 ) FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-76
-76
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-5245
SELECT DISTINCT - 17 DIV + 47 + - 71 AS col1 FROM tab1 GROUP BY tab1.col0
----
-71

skipif mysql # not compatible
query I rowsort label-5245
SELECT DISTINCT - 17 / + 47 + - 71 AS col1 FROM tab1 GROUP BY tab1.col0
----
-71

query I rowsort
SELECT - 66 - + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-148
-88
-94

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT - 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-9
-9
-9

query I rowsort
SELECT - 36 FROM tab2 GROUP BY tab2.col2
----
-36
-36
-36

query I rowsort
SELECT 61 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT - 31 FROM tab1 GROUP BY tab1.col0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 col1 FROM tab2 GROUP BY tab2.col1
----
22
22
22

query I rowsort
SELECT DISTINCT 97 AS col0 FROM tab0 GROUP BY tab0.col0
----
97

query I rowsort
SELECT 43 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1763
2537
2623

query I rowsort
SELECT + 39 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
110
47
84

query I rowsort
SELECT ALL - col0 + 60 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
32
38

query I rowsort
SELECT - ( - col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 32 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
32

query I rowsort
SELECT 76 FROM tab2 GROUP BY tab2.col0
----
76
76
76

query I rowsort
SELECT DISTINCT - 31 FROM tab1 GROUP BY tab1.col0
----
-31

query I rowsort
SELECT 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 74 FROM tab2 GROUP BY tab2.col1
----
-74
-74
-74

onlyif mysql # DIV for integer division: 
query I rowsort label-5264
SELECT ALL 72 DIV 96 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5264
SELECT ALL 72 / 96 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 73 col0 FROM tab2 GROUP BY col1
----
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 col2 FROM tab1 AS cor0 GROUP BY col0
----
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 28 col2 FROM tab2 GROUP BY tab2.col0
----
28

query I rowsort
SELECT ALL 33 - - 40 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 71 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT DISTINCT - 30 AS col1 FROM tab1 GROUP BY tab1.col1
----
-30

query I rowsort
SELECT + 43 AS col1 FROM tab0 GROUP BY tab0.col2
----
43
43
43

query I rowsort
SELECT DISTINCT 71 AS col2 FROM tab0 GROUP BY tab0.col1
----
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 92 + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-13
-34
-5

query I rowsort
SELECT ALL 25 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
2275
2300
375

query I rowsort
SELECT DISTINCT - + 15 FROM tab2 GROUP BY tab2.col0
----
-15

query I rowsort
SELECT - cor0.col1 + cor0.col1 * 31 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2430

query I rowsort
SELECT ALL - NULLIF ( cor0.col1, col1 ) * - 52 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 2 + 93 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-5280
SELECT - tab2.col0 DIV + 59 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
90
91

skipif mysql # not compatible
query I rowsort label-5280
SELECT - tab2.col0 / + 59 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
90
91

query I rowsort
SELECT + - ( - tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-63
-63
-63

query I rowsort
SELECT DISTINCT 34 FROM tab1 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT - 1 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
57
78
86

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT + 73 * tab2.col0 FROM tab2 GROUP BY col0
----
1095
6643
6716

query I rowsort
SELECT DISTINCT + cor0.col1 * ( + 99 ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
4356
5643
594

query I rowsort
SELECT DISTINCT 78 + - 24 FROM tab2 GROUP BY col1
----
54

query I rowsort
SELECT 99 AS col1 FROM tab1 GROUP BY tab1.col0
----
99
99
99

query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 + + 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1819
-646
-6859

query I rowsort
SELECT ALL + - 84 + - 46 AS col1 FROM tab1 GROUP BY tab1.col1
----
-130
-130
-130

onlyif mysql # DIV for integer division: 
query I rowsort label-5292
SELECT + cor0.col2 DIV + 8 FROM tab1 cor0 GROUP BY cor0.col2
----
1
5
8

skipif mysql # not compatible
query I rowsort label-5292
SELECT + cor0.col2 / + 8 FROM tab1 cor0 GROUP BY cor0.col2
----
1
5
8

query I rowsort
SELECT DISTINCT 56 - 90 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-34

query I rowsort
SELECT + col0 + + tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT ALL 19 FROM tab0 GROUP BY tab0.col0
----
19
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-5296
SELECT - - tab1.col0 DIV + 58 + - col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-81

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5296
SELECT - - tab1.col0 / + 58 + - col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-81

query I rowsort
SELECT 75 * - 14 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1050
-1050
-1050

query I rowsort
SELECT ALL 23 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
23
23
23

query I rowsort
SELECT - col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

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 ALL + tab0.col0 + 0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 85 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
107
113
167

query I rowsort
SELECT tab2.col1 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + 15 AS col1 FROM tab1 GROUP BY tab1.col2
----
15
15
15

query I rowsort
SELECT DISTINCT + - col2 + - tab0.col2 FROM tab0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT ALL + - 1 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ( 97 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97
97

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
28

query I rowsort
SELECT ALL + 58 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT - tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
-3364
-6241
-7569

query I rowsort
SELECT - cor0.col2 + 38 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-33
-7
30

query I rowsort
SELECT 68 FROM tab0 AS cor0 GROUP BY cor0.col1
----
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - tab1.col2 col1 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT tab0.col2 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + - 97 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1455
-8827
-8924

query I rowsort
SELECT DISTINCT - + 54 AS col0 FROM tab1 GROUP BY tab1.col0
----
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT - 26 * col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1066
-1534
-1586

query I rowsort
SELECT cor0.col0 + 5 FROM tab2 AS cor0 GROUP BY col0, col0
----
20
96
97

query I rowsort
SELECT DISTINCT + 21 FROM tab2 GROUP BY tab2.col1
----
21

query I rowsort
SELECT - 32 FROM tab2 GROUP BY tab2.col2
----
-32
-32
-32

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL tab0.col1 + - col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5330
SELECT ALL + 0 DIV cor0.col2 - 66 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2970
-4686
-528

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5330
SELECT ALL + 0 / cor0.col2 - 66 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2970
-4686
-528

query I rowsort
SELECT DISTINCT cor0.col1 * col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
1944

query I rowsort
SELECT DISTINCT + - 49 AS col0 FROM tab2 GROUP BY tab2.col0
----
-49

query I rowsort
SELECT DISTINCT 21 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
27
65
78

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
15
91
92

query I rowsort
SELECT - col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
-41
-59
-61

query I rowsort
SELECT - 66 FROM tab2 AS cor0 GROUP BY col1
----
-66
-66
-66

query I rowsort
SELECT + 82 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4756
-6478
-7134

query I rowsort
SELECT ALL + 98 FROM tab1 GROUP BY tab1.col1
----
98
98
98

query I rowsort
SELECT 60 - + tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6501
60

query I rowsort
SELECT - cor0.col0 * + COALESCE ( cor0.col0, - 87 * - cor0.col0 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 * + 30 FROM tab1 AS cor0 GROUP BY col0
----
-2378
-638
-812

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5343
SELECT DISTINCT cor0.col1 / + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5343
SELECT DISTINCT cor0.col1 / + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

onlyif mysql # DIV for integer division: 
query I rowsort label-5346
SELECT ALL + cor0.col2 DIV + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5346
SELECT ALL + cor0.col2 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-5347
SELECT + cor0.col1 * cor0.col0 - + cor0.col1 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1594
3608

skipif mysql # not compatible
query I rowsort label-5347
SELECT + cor0.col1 * cor0.col0 - + cor0.col1 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1594
3608

query I rowsort
SELECT 28 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT - 45 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-45

query I rowsort
SELECT ALL 42 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
123
42

query I rowsort
SELECT ALL - tab2.col2 + 66 AS col1 FROM tab2 GROUP BY tab2.col2
----
-13
-21
8

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col2, col1
----
41
59
61

query I rowsort
SELECT - col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 50 AS col0 FROM tab1 GROUP BY tab1.col1
----
-50
-50
-50

onlyif mysql # DIV for integer division: 
query I rowsort label-5358
SELECT ALL tab2.col0 DIV 16 FROM tab2 GROUP BY tab2.col0
----
0
5
5

skipif mysql # not compatible
query I rowsort label-5358
SELECT ALL tab2.col0 / 16 FROM tab2 GROUP BY tab2.col0
----
0
5
5

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
0

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT + 71 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col0
----
71
71
71

query I rowsort
SELECT ALL - NULLIF ( + tab2.col0, tab2.col0 ) + ( 39 ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( + cor0.col0 ) + + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
-11
-14
17

onlyif mysql # DIV for integer division: 
query I rowsort label-5364
SELECT ALL - ( 41 ) DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-5364
SELECT ALL - ( 41 ) / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-5
0
0

query I rowsort
SELECT + + 56 AS col2 FROM tab1 GROUP BY col1
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 29 col1 FROM tab1 GROUP BY tab1.col1
----
29

query I rowsort
SELECT + 45 FROM tab2 cor0 GROUP BY col2
----
45
45
45

query I rowsort
SELECT DISTINCT + + 47 + + tab2.col1 * 6 AS col0 FROM tab2 GROUP BY tab2.col1
----
293
401
413

query I rowsort
SELECT DISTINCT cor0.col0 - 33 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-7
10
50

query I rowsort
SELECT ALL - 73 FROM tab0 GROUP BY tab0.col1
----
-73
-73

query I rowsort
SELECT ALL + 8 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL + - tab0.col0 * 8 FROM tab0 GROUP BY tab0.col0
----
-208
-344
-664

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5373
SELECT + CAST( NULL AS SIGNED ) * col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5373
SELECT + CAST ( NULL AS INTEGER ) * col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5374
SELECT + 25 DIV + 82 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5374
SELECT + 25 / + 82 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 92 FROM tab0 GROUP BY col0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT tab2.col1 * 50 FROM tab2 GROUP BY tab2.col1
----
2050
2950
3050

query I rowsort
SELECT ALL - 95 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-95
-95

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
26

query I rowsort
SELECT tab2.col2 * - 50 - 36 FROM tab2 GROUP BY tab2.col2
----
-2936
-3986
-4386

query I rowsort
SELECT + - tab1.col0 + 17 AS col1 FROM tab1 GROUP BY tab1.col0
----
-11
-5
-65

query I rowsort
SELECT DISTINCT cor0.col1 + 48 * 60 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
2880
2961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 12 + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY col1
----
12
93

query I rowsort
SELECT ALL + - 69 FROM tab2 GROUP BY tab2.col0
----
-69
-69
-69

query I rowsort
SELECT ALL - + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col2 - 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
23
31

query I rowsort
SELECT + 80 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
80
80
80

query I rowsort
SELECT ALL + 16 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
16
16
16

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 + 6 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1675
-3475
-3715

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL >= + tab1.col2
----

query I rowsort
SELECT ALL tab2.col2 + + 30 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1798
2449
2697

query I rowsort
SELECT + tab1.col1 * - 62 FROM tab1 GROUP BY tab1.col1
----
-2728
-3534
-372

query I rowsort
SELECT + + tab2.col1 * + ( - tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT + 69 + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
107
148
93

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-5398
SELECT DISTINCT + + 27 DIV - tab0.col2 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-25
-38
-79

skipif mysql # not compatible
query I rowsort label-5398
SELECT DISTINCT + + 27 / - tab0.col2 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-25
-38
-79

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + 69 FROM tab1 AS cor0 GROUP BY col1
----
69
69
69

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT ( + 88 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
88

query I rowsort
SELECT - + 38 FROM tab2 GROUP BY tab2.col1
----
-38
-38
-38

query I rowsort
SELECT DISTINCT - cor0.col2 + 20 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-18
-4
-59

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 0 - col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-44
-57
-6

query I rowsort
SELECT 89 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT tab2.col2 - tab2.col2 FROM tab2 GROUP BY col2
----
0
0
0

query I rowsort
SELECT 6 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6
6
6

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT DISTINCT 56 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
56

query I rowsort
SELECT DISTINCT + 28 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
28

query I rowsort
SELECT DISTINCT cor0.col2 + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT DISTINCT 96 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
96

query I rowsort
SELECT DISTINCT + cor0.col0 * - 80 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-1760
-2240
-6560

onlyif mysql # DIV for integer division: 
query I rowsort label-5417
SELECT - col2 DIV 47 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-5417
SELECT - col2 / 47 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
78
86

query I rowsort
SELECT + tab2.col1 + col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL - 36 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-36
-36

query I rowsort
SELECT 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT - cor0.col1 + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - cor0.col2 * - 48 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
2784
3792
4176

query I rowsort
SELECT DISTINCT + - 46 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-125
-70
-84

query I rowsort
SELECT DISTINCT 24 FROM tab0 GROUP BY tab0.col0
----
24

query I rowsort
SELECT DISTINCT + 3 FROM tab0 cor0 GROUP BY col0
----
3

query I rowsort
SELECT 34 + col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
113
58
72

query I rowsort
SELECT DISTINCT - + tab0.col2 * 80 FROM tab0 GROUP BY col2
----
-1920
-3040
-6320

query I rowsort
SELECT ALL - col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + 86 FROM tab2 GROUP BY tab2.col1
----
86
86
86

query I rowsort
SELECT ALL + 40 FROM tab0 GROUP BY tab0.col0
----
40
40
40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5432
SELECT + CAST( NULL AS SIGNED ) col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5432
SELECT + CAST ( NULL AS INTEGER ) col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + ( + cor0.col1 ) ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 46 - - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
105
107
87

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 89 + - 54 AS col0 FROM tab0 GROUP BY col2
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-5437
SELECT DISTINCT + 47 DIV tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
0
1
5

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5437
SELECT DISTINCT + 47 / tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
0
1
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 9 col0 FROM tab2 GROUP BY tab2.col1
----
9

query I rowsort
SELECT ALL + - 24 FROM tab0 GROUP BY col2
----
-24
-24
-24

query I rowsort
SELECT - 71 FROM tab2 GROUP BY tab2.col2
----
-71
-71
-71

query I rowsort
SELECT + 15 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
15
15
15

query I rowsort
SELECT + ( - cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT 88 FROM tab0 cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
21
21

query I rowsort
SELECT ALL 68 FROM tab0 GROUP BY tab0.col1
----
68
68

query I rowsort
SELECT ALL - + tab1.col0 * - 30 FROM tab1 GROUP BY tab1.col0
----
2460
660
840

onlyif mysql # DIV for integer division: 
query I rowsort label-5447
SELECT DISTINCT 8 DIV + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-5447
SELECT DISTINCT 8 / + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
15
91
92

query I rowsort
SELECT 7 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT + 69 + 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT ALL cor0.col1 * CASE + 0 WHEN + cor0.col1 THEN + cor0.col1 ELSE cor0.col1 END FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-5452
SELECT + - tab1.col2 DIV - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5452
SELECT + - tab1.col2 / - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 58 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2610
4118
464

query I rowsort
SELECT - 82 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1230
-7462
-7544

query I rowsort
SELECT + ( 26 ) FROM tab1 GROUP BY tab1.col1
----
26
26
26

query I rowsort
SELECT ALL - + tab1.col1 - - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 90 AS col1 FROM tab2 GROUP BY tab2.col1
----
90
90
90

query I rowsort
SELECT DISTINCT cor0.col2 * 79 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
4582
6241
6873

query I rowsort
SELECT ALL 67 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
125
146
154

query I rowsort
SELECT DISTINCT + - tab2.col1 + 88 AS col2 FROM tab2 GROUP BY tab2.col1
----
27
29
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6
6
6

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-5463
SELECT - tab1.col2 DIV - ( - 6 ) - - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
38
60
7

skipif mysql # not compatible
query I rowsort label-5463
SELECT - tab1.col2 / - ( - 6 ) - - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
38
60
7

query I rowsort
SELECT cor0.col1 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
162

query I rowsort
SELECT - col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT - 89 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-89
-89
-89

query I rowsort
SELECT 98 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
98
98
98

query I rowsort
SELECT ALL + 39 + + 6 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT - 59 + col2 AS col2 FROM tab1 cor0 GROUP BY col2
----
-14
-51
12

query I rowsort
SELECT ALL 79 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
1185
7189
7268

query I rowsort
SELECT - 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 - - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + tab2.col1 * - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0 HAVING NULL < NULL
----

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT tab0.col1 * - tab0.col1 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT - col0 AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 14 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT DISTINCT 16 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16

query I rowsort
SELECT DISTINCT - tab1.col2 + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT - 8 AS col1 FROM tab0 GROUP BY tab0.col1
----
-8
-8

query I rowsort
SELECT DISTINCT - 92 AS col2 FROM tab2 GROUP BY col0
----
-92

query I rowsort
SELECT + 23 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1909
598
989

query I rowsort
SELECT DISTINCT + 34 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
34

query I rowsort
SELECT DISTINCT + 13 - + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-28
-46
-48

query I rowsort
SELECT ALL - + 64 AS col1 FROM tab0 GROUP BY tab0.col0
----
-64
-64
-64

query I rowsort
SELECT ALL + + 70 FROM tab1 GROUP BY tab1.col1
----
70
70
70

query I rowsort
SELECT DISTINCT 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
46

query I rowsort
SELECT - 36 + - 33 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-69
-69
-69

onlyif mysql # DIV for integer division: 
query I rowsort label-5491
SELECT ALL cor0.col1 DIV cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5491
SELECT ALL cor0.col1 / cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
4

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT - 45 + - 13 AS col1 FROM tab1 GROUP BY col0
----
-58
-58
-58

query I rowsort
SELECT 30 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-1230
-1770
-1830

query I rowsort
SELECT ALL - 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - 77 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-49
-55
5

query I rowsort
SELECT - 37 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT - col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - ( tab1.col1 ) FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT 3 FROM tab1 AS cor0 GROUP BY col1
----
3
3
3

query I rowsort
SELECT - 67 * cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1584
-2508
-5214

query I rowsort
SELECT 36 AS col2 FROM tab0 GROUP BY tab0.col1
----
36
36

query I rowsort
SELECT - 50 FROM tab0 GROUP BY tab0.col0
----
-50
-50
-50

query I rowsort
SELECT ALL 83 + 1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT 69 FROM tab2 GROUP BY tab2.col2
----
69
69
69

query I rowsort
SELECT DISTINCT - + tab2.col0 * - tab2.col0 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT 50 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
108
129
137

query I rowsort
SELECT ALL + 80 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT + 1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 + cor0.col1 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
1180
1586
697

query I rowsort
SELECT DISTINCT - - tab2.col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT + cor0.col1 * + col0 - col1 * col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-2806
1888
2091

query I rowsort
SELECT ALL 38 + 10 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT ALL - tab1.col0 FROM tab1 WHERE + col2 IN ( tab1.col0 * - tab1.col2 ) GROUP BY tab1.col0
----

query I rowsort
SELECT DISTINCT + - 11 AS col0 FROM tab2 GROUP BY tab2.col1
----
-11

query I rowsort
SELECT 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
6
6
6

query I rowsort
SELECT 15 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
15
15
15

query I rowsort
SELECT ALL + cor0.col2 - - cor0.col2 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT 60 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
60
60
60

query I rowsort
SELECT - 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14
-14

query I rowsort
SELECT col1 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 92 + + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
133
151
153

query I rowsort
SELECT - - tab1.col0 + 53 FROM tab1 GROUP BY tab1.col0
----
135
75
81

query I rowsort
SELECT - 79 * tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-1896
-3002
-6241

query I rowsort
SELECT + cor0.col1 * - 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-405
0
0

query I rowsort
SELECT ALL - 87 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-87
-87
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5529
SELECT CAST( - 99 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-99
-99

skipif mysql # not compatible
query I rowsort label-5529
SELECT CAST ( - 99 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-99
-99

query I rowsort
SELECT - 58 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT ALL + col2 * + 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1392
2204
4582

query I rowsort
SELECT DISTINCT + + 91 AS col0 FROM tab1 GROUP BY tab1.col1
----
91

query I rowsort
SELECT - 5 AS col1 FROM tab2 GROUP BY tab2.col2
----
-5
-5
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 50 * + 14 FROM tab2 AS cor0 GROUP BY cor0.col2
----
700
700
700

query I rowsort
SELECT cor0.col0 * - cor0.col0 - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-210
-8190
-8372

query I rowsort
SELECT 41 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT - 67 AS col0 FROM tab1 cor0 GROUP BY col1
----
-67
-67
-67

query I rowsort
SELECT DISTINCT - 11 FROM tab2 GROUP BY tab2.col2
----
-11

query I rowsort
SELECT 24 * - cor0.col1 + + 67 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
2902
3877
4365

query I rowsort
SELECT - - 17 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1343
408
646

query I rowsort
SELECT ALL 92 FROM tab2 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT ALL 20 * + 85 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1700
1700
1700

query I rowsort
SELECT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 74 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-74
-74
-74

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-5547
SELECT + 25 DIV - cor0.col1 + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col1, col1
----
-58
-79
-87

skipif mysql # not compatible
query I rowsort label-5547
SELECT + 25 / - cor0.col1 + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col1, col1
----
-58
-79
-87

query I rowsort
SELECT tab0.col0 + + 22 AS col2 FROM tab0 GROUP BY tab0.col0
----
105
48
65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5549
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5549
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5550
SELECT DISTINCT 86 DIV cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14

skipif mysql # not compatible
query I rowsort label-5550
SELECT DISTINCT 86 / cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0 WHERE col0 IN ( tab0.col2 + - tab0.col2 ) GROUP BY tab0.col0
----

query I rowsort
SELECT ALL - tab0.col2 - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT ALL - 2 * col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT - 76 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-157
-76
-76

query I rowsort
SELECT ALL cor0.col0 * cor0.col2 + + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1075
2080
3237

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * 97 col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-2522
-4171
-8051

query I rowsort
SELECT ALL + 75 FROM tab2 AS cor0 GROUP BY cor0.col1
----
75
75
75

onlyif mysql # DIV for integer division: 
query I rowsort label-5560
SELECT 20 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5560
SELECT 20 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + - col2 AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 64 col1 FROM tab1 GROUP BY tab1.col1
----
64
64
64

query I rowsort
SELECT DISTINCT + 12 + + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
34
40
94

query I rowsort
SELECT ALL - 85 * + cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2064
-3268
-6794

query I rowsort
SELECT + 11 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
11
11
11

onlyif mysql # DIV for integer division: 
query I rowsort label-5566
SELECT DISTINCT cor0.col2 + + cor0.col2 DIV 44 col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
46
72
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5566
SELECT DISTINCT cor0.col2 + + cor0.col2 / 44 col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
46
72
8

query I rowsort
SELECT DISTINCT + col0 + + 41 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
124
67
84

query I rowsort
SELECT ALL + 83 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
128
154
91

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT 27 * + cor0.col2 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1064
2212
672

query I rowsort
SELECT DISTINCT + 96 FROM tab2 AS cor0 GROUP BY cor0.col0
----
96

query I rowsort
SELECT DISTINCT + 91 - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
0
76

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 58 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - - 70 FROM tab1 GROUP BY tab1.col0
----
70

query I rowsort
SELECT ALL - 78 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-78
-78
-78

onlyif mysql # DIV for integer division: 
query I rowsort label-5579
SELECT + - tab0.col1 DIV + 72 AS col2 FROM tab0 GROUP BY tab0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-5579
SELECT + - tab0.col1 / + 72 AS col2 FROM tab0 GROUP BY tab0.col1
----
-1
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5580
SELECT DISTINCT - 12 DIV tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-5580
SELECT DISTINCT - 12 / tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col2 col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 51 FROM tab0 GROUP BY col2
----
-51
-51
-51

query I rowsort
SELECT ALL - + ( + tab2.col2 ) + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5584
SELECT DISTINCT - + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5584
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col0
----
NULL

query I rowsort
SELECT DISTINCT ( + 84 ) FROM tab0 GROUP BY tab0.col1
----
84

query I rowsort
SELECT ALL - 57 FROM tab0 GROUP BY tab0.col1
----
-57
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab1.col0 col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL 0 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5589
SELECT ALL - cor0.col0 DIV - 89 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5589
SELECT ALL - cor0.col0 / - 89 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
0
1
1

query I rowsort
SELECT + 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT - cor0.col0 * col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT - 92 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-49
-66
-9

query I rowsort
SELECT - 78 AS col2 FROM tab1 GROUP BY tab1.col1
----
-78
-78
-78

query I rowsort
SELECT ALL - ( col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + 81 + - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-6
2
23

query I rowsort
SELECT DISTINCT + - 38 AS col0 FROM tab1 GROUP BY col0
----
-38

query I rowsort
SELECT + 78 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT + - 38 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-109
-46
-83

query I rowsort
SELECT DISTINCT + tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
0

query I rowsort
SELECT + ( - 63 ) FROM tab1 GROUP BY tab1.col2
----
-63
-63
-63

query I rowsort
SELECT DISTINCT 31 FROM tab1 AS cor0 GROUP BY cor0.col2
----
31

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - ( - col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - 41 AS col1 FROM tab1 GROUP BY tab1.col0
----
-41
-41
-41

query I rowsort
SELECT ALL + 21 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
21
21
21

onlyif mysql # DIV for integer division: 
query I rowsort label-5606
SELECT DISTINCT - 68 DIV + col0 FROM tab1 GROUP BY tab1.col0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-5606
SELECT DISTINCT - 68 / + col0 FROM tab1 GROUP BY tab1.col0
----
-2
-3
0

query I rowsort
SELECT cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
166
52
86

query I rowsort
SELECT + 21 + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
104
47
64

onlyif mysql # DIV for integer division: 
query I rowsort label-5609
SELECT ALL 30 DIV - 11 FROM tab0 GROUP BY tab0.col1
----
-2
-2

skipif mysql # not compatible
query I rowsort label-5609
SELECT ALL 30 / - 11 FROM tab0 GROUP BY tab0.col1
----
-2
-2

query I rowsort
SELECT + NULLIF ( - 34, cor0.col2 + col0 ) * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2788
748
952

query I rowsort
SELECT + ( - cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT 18 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
101
44
61

query I rowsort
SELECT - tab1.col1 + 41 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
-16
-3
35

query I rowsort
SELECT ALL - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + 94 AS col2 FROM tab2 GROUP BY tab2.col2
----
94
94
94

query I rowsort
SELECT ALL + 96 AS col0 FROM tab1 GROUP BY tab1.col2
----
96
96
96

query I rowsort
SELECT DISTINCT - - 91 + + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
115
129
170

query I rowsort
SELECT ALL 10 * - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-810
0

query I rowsort
SELECT ALL 1 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT + - 12 AS col1 FROM tab1 GROUP BY tab1.col0
----
-12
-12
-12

query I rowsort
SELECT + NULLIF ( 23, cor0.col2 ) + - 17 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
6
6
6

query I rowsort
SELECT ( - 95 ) AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-95
-95
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-5623
SELECT ALL + col0 DIV - 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5623
SELECT ALL + col0 / - 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
0
0

query I rowsort
SELECT 28 - 35 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1477
-2877
-882

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5625
SELECT ALL CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5625
SELECT ALL CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT cor0.col2 + cor0.col2 * + 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4350
5925
6525

query I rowsort
SELECT ALL 82 - + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
82

query I rowsort
SELECT ALL ( cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT 64 FROM tab0 GROUP BY tab0.col0
----
64
64
64

query I rowsort
SELECT + 62 FROM tab1 GROUP BY tab1.col2
----
62
62
62

query I rowsort
SELECT ALL 42 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT DISTINCT 33 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 9 col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
9

query I rowsort
SELECT ALL 1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + - tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 27 + - 18 FROM tab0 GROUP BY tab0.col2
----
-45
-45
-45

query I rowsort
SELECT + 25 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL + 63 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT - 7 * 47 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-329

query I rowsort
SELECT DISTINCT + 12 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
12

onlyif mysql # DIV for integer division: 
query I rowsort label-5643
SELECT DISTINCT 89 DIV + col0 FROM tab1 AS cor0 GROUP BY col0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-5643
SELECT DISTINCT 89 / + col0 FROM tab1 AS cor0 GROUP BY col0
----
1
3
4

query I rowsort
SELECT ALL 99 FROM tab1 AS cor0 GROUP BY col1
----
99
99
99

query I rowsort
SELECT ALL - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
-6561
0

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL <= - tab0.col0
----

query I rowsort
SELECT tab1.col2 AS col0 FROM tab1 WHERE NOT ( NULL ) > - col1 * - tab1.col2 GROUP BY tab1.col2
----

onlyif mysql # DIV for integer division: 
query I rowsort label-5651
SELECT DISTINCT + tab2.col1 DIV - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-5651
SELECT DISTINCT + tab2.col1 / - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-1

query I rowsort
SELECT ALL cor0.col2 * - ( - cor0.col1 * + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
115425
221804
384

query I rowsort
SELECT DISTINCT tab1.col2 * - 53 FROM tab1 GROUP BY tab1.col2
----
-2385
-3763
-424

query I rowsort
SELECT 11 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
451
649
671

query I rowsort
SELECT DISTINCT 13 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
13

query I rowsort
SELECT + 18 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT DISTINCT + 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
15

query I rowsort
SELECT - 14 AS col0 FROM tab0 GROUP BY tab0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 86 FROM tab0 AS cor0 GROUP BY col1
----
86

query I rowsort
SELECT 79 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
79
79
79

query I rowsort
SELECT 86 + 6 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT + 56 FROM tab0 GROUP BY tab0.col1
----
56
56

query I rowsort
SELECT DISTINCT + 47 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
2068
2679
282

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT + 67 FROM tab2 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT + 16 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16

query I rowsort
SELECT 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT DISTINCT - 67 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-67

query I rowsort
SELECT ALL + cor0.col2 + - CASE cor0.col2 WHEN - cor0.col1 THEN + cor0.col2 * NULLIF ( - CASE cor0.col1 WHEN cor0.col1 THEN cor0.col2 + + cor0.col2 / - col1 END, + cor0.col2 ) END FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * + col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT 66 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT ALL - + 53 FROM tab1 GROUP BY tab1.col2
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + 9 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
53
66

query I rowsort
SELECT DISTINCT + cor0.col1 * - 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2200
-2850
-300

query I rowsort
SELECT ALL 36 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
2088
2844
3132

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5678
SELECT DISTINCT + - tab2.col0 + tab2.col0 * + COALESCE ( + 30, tab2.col2 + CAST( + tab2.col0 AS SIGNED ) * col1, + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
2639
2668
435

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5678
SELECT DISTINCT + - tab2.col0 + tab2.col0 * + COALESCE ( + 30, tab2.col2 + CAST ( + tab2.col0 AS INTEGER ) * col1, + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
2639
2668
435

query I rowsort
SELECT ALL + 82 * 90 FROM tab0 GROUP BY tab0.col2
----
7380
7380
7380

query I rowsort
SELECT DISTINCT - + 99 FROM tab1 GROUP BY tab1.col2
----
-99

query I rowsort
SELECT ALL + 44 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
44
44

query I rowsort
SELECT 64 FROM tab1 AS cor0 GROUP BY col1
----
64
64
64

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 51, - cor0.col2, cor0.col2, + cor0.col1 ) * + 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
204
204
204

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-5685
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-5685
SELECT tab2.col1 / tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 98 - tab1.col2 FROM tab1 GROUP BY col2
----
-106
-143
-169

query I rowsort
SELECT DISTINCT 99 FROM tab0 GROUP BY tab0.col1
----
99

query I rowsort
SELECT DISTINCT - cor0.col1 - + 27 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-68
-86
-88

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - 69 AS col0 FROM tab2 GROUP BY tab2.col0
----
-69
-69
-69

query I rowsort
SELECT DISTINCT + 44 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
44

query I rowsort
SELECT - 79 * + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-4582
-6241
-6873

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT ALL + 83 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT ALL - 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-77
-77
-77

query I rowsort
SELECT ALL + 45 FROM tab2 AS cor0 GROUP BY col0
----
45
45
45

onlyif mysql # DIV for integer division: 
query I rowsort label-5697
SELECT ALL - 37 DIV + 28 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5697
SELECT ALL - 37 / + 28 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col2 + - 51 FROM tab2 AS cor0 GROUP BY cor0.col2
----
28
36
7

query I rowsort
SELECT + ( 6 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

query I rowsort
SELECT DISTINCT 52 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52

query I rowsort
SELECT DISTINCT 35 FROM tab2 GROUP BY tab2.col2
----
35

query I rowsort
SELECT - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 20 FROM tab1 cor0 GROUP BY col1
----
20
20
20

query I rowsort
SELECT ALL - 16 AS col0 FROM tab2 GROUP BY tab2.col1
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab0.col2 col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
-1260
-176
-5822

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5709
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5709
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - tab1.col0 + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NULL
----
462
6642
756

query I rowsort
SELECT ALL + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL >= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 89 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
89

query I rowsort
SELECT ALL + 21 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col2, cor1.col2
----
21
21
21

query I rowsort
SELECT + 69 * + cor0.col0 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1510
1887
5587

query I rowsort
SELECT 40 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
40
40
40

query I rowsort
SELECT ALL + 1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + 1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 89 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-5721
SELECT DISTINCT + - tab2.col0 DIV - 13 + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
16
98
99

skipif mysql # not compatible
query I rowsort label-5721
SELECT DISTINCT + - tab2.col0 / - 13 + + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
16
98
99

query I rowsort
SELECT ALL - 86 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-86
-86

onlyif mysql # DIV for integer division: 
query I rowsort label-5723
SELECT cor0.col1 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5723
SELECT cor0.col1 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
4

query I rowsort
SELECT ALL + 25 FROM tab0 GROUP BY tab0.col2
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5726
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5726
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - + 85 FROM tab0 GROUP BY tab0.col1
----
-85
-85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5729
SELECT DISTINCT CAST( NULL AS SIGNED ) / + 19 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5729
SELECT DISTINCT CAST ( NULL AS INTEGER ) / + 19 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

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 ALL cor0.col1 + 87 * 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4959
5040

query I rowsort
SELECT DISTINCT 79 FROM tab0 GROUP BY tab0.col2
----
79

onlyif mysql # DIV for integer division: 
query I rowsort label-5733
SELECT DISTINCT - COALESCE ( + cor0.col1, + cor0.col0 DIV - col1, - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-5733
SELECT DISTINCT - COALESCE ( + cor0.col1, + cor0.col0 / - col1, - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0

query I rowsort
SELECT cor0.col0 * + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
506
6806
812

query I rowsort
SELECT + tab0.col2 * + tab0.col2 - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1406
552
6162

query I rowsort
SELECT - cor0.col0 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + 52 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT DISTINCT tab1.col1 * + ( + 0 * col1 ) FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT - 86 * + col0 FROM tab0 GROUP BY tab0.col0
----
-2236
-3698
-7138

query I rowsort
SELECT DISTINCT - 17 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-17

query I rowsort
SELECT DISTINCT - - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT cor0.col0 + - 22 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
21
4
61

query I rowsort
SELECT 68 AS col2 FROM tab2 GROUP BY tab2.col2
----
68
68
68

query I rowsort
SELECT DISTINCT - 88 FROM tab1 GROUP BY tab1.col0
----
-88

query I rowsort
SELECT + tab2.col2 * 33 FROM tab2 GROUP BY tab2.col2
----
1914
2607
2871

query I rowsort
SELECT - tab2.col1 * 87 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3567
-5133
-5307

query I rowsort
SELECT tab0.col1 * 33 FROM tab0 GROUP BY col1
----
0
2673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 74 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74

query I rowsort
SELECT ALL NULLIF ( cor0.col1, + cor0.col0 * + 58 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 20 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, col0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 6 col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
6

query I rowsort
SELECT ALL + col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + + col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT + - 21 FROM tab1 GROUP BY tab1.col1
----
-21
-21
-21

query I rowsort
SELECT + + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 33 * + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
1452
1881
198

query I rowsort
SELECT DISTINCT + 50 FROM tab2 GROUP BY tab2.col2
----
50

query I rowsort
SELECT ALL + - 80 AS col0 FROM tab0 GROUP BY tab0.col2
----
-80
-80
-80

query I rowsort
SELECT ALL + 12 AS col1 FROM tab2 GROUP BY tab2.col0
----
12
12
12

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
73

query I rowsort
SELECT DISTINCT - 88 FROM tab2 cor0 GROUP BY cor0.col0
----
-88

query I rowsort
SELECT + 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT ( - 40 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-40
-40
-40

query I rowsort
SELECT - 24 FROM tab0 GROUP BY tab0.col1
----
-24
-24

query I rowsort
SELECT + 46 FROM tab1 GROUP BY tab1.col1
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-5770
SELECT ALL - 69 DIV - 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
11
11
11

skipif mysql # not compatible
query I rowsort label-5770
SELECT ALL - 69 / - 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT ( 15 ) + + 70 FROM tab2 cor0 GROUP BY cor0.col1
----
85
85
85

query I rowsort
SELECT 36 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
36
36
36

query I rowsort
SELECT ALL - ( + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 34 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1292
2686
816

query I rowsort
SELECT DISTINCT - 57 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-57

query I rowsort
SELECT DISTINCT 87 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
132
158
95

query I rowsort
SELECT 50 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT - 37 FROM tab1 GROUP BY tab1.col2
----
-37
-37
-37

query I rowsort
SELECT ALL + ( - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT - col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + 88 FROM tab0 cor0 GROUP BY cor0.col1
----
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 91 col0 FROM tab1 cor0 GROUP BY col0
----
-91

query I rowsort
SELECT ALL 84 FROM tab0 AS cor0 GROUP BY cor0.col1
----
84
84

query I rowsort
SELECT DISTINCT cor0.col2 + 76 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
100
114
155

query I rowsort
SELECT 87 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
87
87

query I rowsort
SELECT - 24 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
-24
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-5788
SELECT DISTINCT + + 56 DIV tab2.col0 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-12
-91
-92

skipif mysql # not compatible
query I rowsort label-5788
SELECT DISTINCT + + 56 / tab2.col0 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-12
-91
-92

query I rowsort
SELECT DISTINCT ( 47 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
47

query I rowsort
SELECT DISTINCT + 19 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
19

onlyif mysql # DIV for integer division: 
query I rowsort label-5791
SELECT col2 DIV + 60 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5791
SELECT col2 / + 60 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-5792
SELECT + cor0.col2 DIV + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5792
SELECT + cor0.col2 / + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - 60 FROM tab1 GROUP BY tab1.col2
----
-60
-60
-60

query I rowsort
SELECT + col2 * 24 FROM tab0 GROUP BY tab0.col2
----
1896
576
912

query I rowsort
SELECT ALL + ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + 30 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
30
30
30

query I rowsort
SELECT ALL - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT + ( + 83 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
83
83
83

query I rowsort
SELECT DISTINCT - 31 AS col0 FROM tab1 GROUP BY tab1.col1
----
-31

query I rowsort
SELECT + 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT ALL - 3 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-3
-3
-3

onlyif mysql # DIV for integer division: 
query I rowsort label-5802
SELECT tab1.col0 DIV + col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5802
SELECT tab1.col0 / + col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 14 - + col2 FROM tab1 GROUP BY tab1.col2
----
-31
-57
6

query I rowsort
SELECT ALL tab2.col1 + tab2.col1 FROM tab2 GROUP BY col1
----
118
122
82

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2 HAVING NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT - 31 AS col0 FROM tab2 GROUP BY tab2.col0
----
-31

query I rowsort
SELECT DISTINCT - 78 AS col2 FROM tab1 GROUP BY tab1.col0
----
-78

query I rowsort
SELECT DISTINCT + - tab0.col0 * 82 FROM tab0 GROUP BY tab0.col0
----
-2132
-3526
-6806

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5810
SELECT DISTINCT CAST( NULL AS SIGNED ) * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5810
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 + - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-38
-79
6537

query I rowsort
SELECT ALL tab2.col1 - - tab2.col1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT ALL - 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-24
-24
-24

query I rowsort
SELECT cor0.col2 * + 72 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3240
5112
576

query I rowsort
SELECT DISTINCT + + 87 FROM tab0 GROUP BY col2
----
87

query I rowsort
SELECT DISTINCT 48 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2112
2736
288

query I rowsort
SELECT - 40 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-25
51
52

query I rowsort
SELECT + tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 * - ( 29 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2378
-638
-812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col0 * - col0 col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT - tab0.col1 * 45 AS col0 FROM tab0 GROUP BY tab0.col1
----
-3645
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5827
SELECT ALL - col2 + 15 DIV + 68 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif mysql # not compatible
query I rowsort label-5827
SELECT ALL - col2 + 15 / + 68 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - tab2.col2 + - ( tab2.col2 + 55 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-171
-213
-229

query I rowsort
SELECT DISTINCT tab0.col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT + 14 FROM tab2 GROUP BY tab2.col2
----
14
14
14

query I rowsort
SELECT ALL + 4 AS col1 FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT ALL tab1.col1 + col1 AS col0 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1681
3481
3721

query I rowsort
SELECT ALL COALESCE ( + cor0.col0, col1 * + 84 + 43 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT + 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
72
72
72

query I rowsort
SELECT ALL + + 48 AS col0 FROM tab1 GROUP BY col2
----
48
48
48

query I rowsort
SELECT ALL - 35 * 32 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1120
-1120
-1120

query I rowsort
SELECT 11 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
11
11
11

query I rowsort
SELECT DISTINCT 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
54

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
116
158
174

query I rowsort
SELECT ALL - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + col0 + ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

query I rowsort
SELECT - 71 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-71
-71
-71

query I rowsort
SELECT ( + col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( - 62 ) + tab2.col2 * - 97 col1 FROM tab2 GROUP BY tab2.col2
----
-5688
-7725
-8501

query I rowsort
SELECT ( - tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 col1 FROM tab2 GROUP BY tab2.col2
----
-17
-17
-17

onlyif mysql # DIV for integer division: 
query I rowsort label-5848
SELECT ALL - 23 DIV - 91 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5848
SELECT ALL - 23 / - 91 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - 22 FROM tab2 AS cor0 GROUP BY col1
----
-22
-22
-22

query I rowsort
SELECT 37 + 22 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
105
38
79

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + 89 - - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
115
132
172

query I rowsort
SELECT ALL - 82 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
4756
6478
7134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 94 col1 FROM tab1 GROUP BY tab1.col2
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 25 col0 FROM tab2 GROUP BY tab2.col0
----
-25
-25
-25

query I rowsort
SELECT + cor0.col0 * 38 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1634
3154
988

query I rowsort
SELECT - + tab1.col2 * 78 FROM tab1 GROUP BY col2
----
-3510
-5538
-624

onlyif mysql # DIV for integer division: 
query I rowsort label-5859
SELECT DISTINCT + 1 DIV + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-5859
SELECT DISTINCT + 1 / + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL - + tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

onlyif mysql # DIV for integer division: 
query I rowsort label-5861
SELECT + 89 DIV - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-5861
SELECT + 89 / - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-11

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 90 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-90

query I rowsort
SELECT ALL - 61 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2501
3599
3721

query I rowsort
SELECT 73 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
111
152
97

query I rowsort
SELECT DISTINCT + 67 AS col1 FROM tab1 GROUP BY tab1.col2
----
67

query I rowsort
SELECT ( - 22 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-22
-22
-22

query I rowsort
SELECT 25 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT col2 + ( col2 ) FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT + + ( + tab2.col0 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 63 * 2 FROM tab0 GROUP BY tab0.col1
----
126
126

query I rowsort
SELECT cor0.col0 + + cor0.col0 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 + + col2 col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL + tab0.col0 / tab0.col0 AS col2 FROM tab0 WHERE NULL IS NOT NULL GROUP BY col0 HAVING NOT NULL IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-5875
SELECT ALL 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-5875
SELECT ALL cor0.col2 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT - + 31 AS col0 FROM tab1 GROUP BY tab1.col0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT + 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45

query I rowsort
SELECT DISTINCT - - col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT 43 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1204
3526
946

query I rowsort
SELECT ALL + tab1.col2 + 35 FROM tab1 GROUP BY col2
----
106
43
80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5882
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5882
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT ALL + ( tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5369
915

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5886
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5886
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT 91 * + col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
2366
3913
7553

query I rowsort
SELECT + col2 - 6 FROM tab1 GROUP BY tab1.col2
----
2
39
65

onlyif mysql # DIV for integer division: 
query I rowsort label-5889
SELECT + - tab0.col2 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5889
SELECT + - tab0.col2 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT + 66 * tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
5427

query I rowsort
SELECT + 45 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
45
45
45

query I rowsort
SELECT ALL 64 FROM tab2 GROUP BY tab2.col0
----
64
64
64

query I rowsort
SELECT 31 * - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
-1271
-1829
-1891

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5894
SELECT - CAST( 19 AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
-19
-19
-19

skipif mysql # not compatible
query I rowsort label-5894
SELECT - CAST ( 19 AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
-19
-19
-19

query I rowsort
SELECT DISTINCT tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IN ( - tab2.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + 32 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
-22
-28
-82

query I rowsort
SELECT ALL + 61 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT ALL 22 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT + cor0.col0 * + 42 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1176
3444
924

query I rowsort
SELECT ALL ( - 36 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
-36
-36
-36

query I rowsort
SELECT + 18 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT - ( - tab1.col1 ) FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - tab2.col2 + 98 AS col2 FROM tab2 GROUP BY col2
----
11
19
40

query I rowsort
SELECT ALL - 92 AS col0 FROM tab2 GROUP BY col1
----
-92
-92
-92

query I rowsort
SELECT 18 + 49 FROM tab1 AS cor0 GROUP BY cor0.col0
----
67
67
67

onlyif mysql # DIV for integer division: 
query I rowsort label-5913
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-5913
SELECT tab2.col2 / tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT ALL 44 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44
44
44

query I rowsort
SELECT - 11 + + 19 FROM tab1 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT - 58 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-58
-58
-58

query I rowsort
SELECT ALL cor0.col2 + - 21 FROM tab0 cor0 GROUP BY cor0.col2
----
17
3
58

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT cor0.col2 + + 59 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
130
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5921
SELECT + col2 * - CAST( NULL AS SIGNED ) + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5921
SELECT + col2 * - CAST ( NULL AS INTEGER ) + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 93 FROM tab0 GROUP BY tab0.col0
----
93
93
93

query I rowsort
SELECT 9 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT DISTINCT tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT + 74 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
74
74
74

query I rowsort
SELECT ALL + - col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col0 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5928
SELECT CAST( - 60 AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-60
-60
-60

skipif mysql # not compatible
query I rowsort label-5928
SELECT CAST ( - 60 AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-60
-60
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 83 ) col2 FROM tab2 GROUP BY tab2.col1
----
83
83
83

query I rowsort
SELECT - NULLIF ( - 64, - tab0.col1 * - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
64
64

query I rowsort
SELECT - 50 * - 64 FROM tab2 GROUP BY tab2.col1
----
3200
3200
3200

query I rowsort
SELECT + ( 29 ) FROM tab1 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT - ( tab2.col1 ) - + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-5934
SELECT DISTINCT 46 DIV 76 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-5934
SELECT DISTINCT 46 / 76 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 5 * 9 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-21
-7
34

query I rowsort
SELECT DISTINCT + - 56 AS col2 FROM tab0 GROUP BY tab0.col1
----
-56

query I rowsort
SELECT ALL - - 50 AS col1 FROM tab0 GROUP BY tab0.col0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 93 col2 FROM tab2 GROUP BY tab2.col0
----
93

query I rowsort
SELECT - 62 FROM tab2 GROUP BY tab2.col0
----
-62
-62
-62

query I rowsort
SELECT tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL >= ( NULL )
----

query I rowsort
SELECT ALL - 39 - - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2
20
22

query I rowsort
SELECT - + 24 + + tab1.col0 FROM tab1 GROUP BY col0
----
-2
4
58

query I rowsort
SELECT + 75 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
75
75
75

query I rowsort
SELECT DISTINCT 9 FROM tab0 cor0 GROUP BY cor0.col2
----
9

query I rowsort
SELECT ALL 41 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 8 AS col2 FROM tab0 GROUP BY tab0.col2
----
-8

query I rowsort
SELECT ALL + cor0.col1 * 34 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1496
1938
204

query I rowsort
SELECT DISTINCT - 67 AS col1 FROM tab1 GROUP BY tab1.col2
----
-67

query I rowsort
SELECT 4 + 58 AS col2 FROM tab1 GROUP BY tab1.col1
----
62
62
62

query I rowsort
SELECT DISTINCT - - 50 FROM tab2 GROUP BY tab2.col2
----
50

query I rowsort
SELECT - 37 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-13
1
42

query I rowsort
SELECT ALL + col0 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

query I rowsort
SELECT tab1.col2 - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL + + 91 AS col1 FROM tab2 GROUP BY tab2.col0
----
91
91
91

query I rowsort
SELECT ALL + 8 FROM tab1 GROUP BY tab1.col0
----
8
8
8

query I rowsort
SELECT + 24 AS col2 FROM tab0 GROUP BY tab0.col0
----
24
24
24

query I rowsort
SELECT - 36 FROM tab2 AS cor0 GROUP BY col0
----
-36
-36
-36

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT ALL 22 AS col2 FROM tab1 GROUP BY tab1.col1
----
22
22
22

query I rowsort
SELECT - - 45 + + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
116
53
90

query I rowsort
SELECT ALL + - 51 AS col2 FROM tab2 GROUP BY tab2.col1
----
-51
-51
-51

query I rowsort
SELECT - 44 * - ( cor0.col1 * cor0.col1 ) + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
143013
1590
85228

query I rowsort
SELECT - NULLIF ( cor0.col1, - cor0.col0 + - cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-81
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5965
SELECT ALL + cor0.col0 DIV + 8 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
10
2
3

skipif mysql # not compatible
query I rowsort label-5965
SELECT ALL + cor0.col0 / + 8 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
10
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col1 FROM tab0 GROUP BY tab0.col1
----
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5967
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-5967
SELECT cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + tab1.col0 * tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 18 AS col1 FROM tab1 GROUP BY tab1.col2
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab2.col2 col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
142
16
90

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT - col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT tab1.col2 * tab1.col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT 32 - - col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-452
-6692
-752

query I rowsort
SELECT DISTINCT - - 3 AS col0 FROM tab2 GROUP BY tab2.col0
----
3

query I rowsort
SELECT ALL - - 70 AS col2 FROM tab2 GROUP BY tab2.col2
----
70
70
70

query I rowsort
SELECT DISTINCT cor0.col2 + + 84 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2040
3230
6715

query I rowsort
SELECT ALL + 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
67
67
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5986
SELECT - CAST( - 19 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19
19
19

skipif mysql # not compatible
query I rowsort label-5986
SELECT - CAST ( - 19 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT ALL + - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 - - 69 col1 FROM tab1 GROUP BY tab1.col1
----
113
126
75

query I rowsort
SELECT - cor0.col1 * + 70 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2870
-4130
-4270

query I rowsort
SELECT - cor0.col0 * 93 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1395
-8463
-8556

query I rowsort
SELECT + tab2.col1 + - tab2.col1 FROM tab2 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
83
83
83

query I rowsort
SELECT ALL + 76 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
1672
2128
6232

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT ALL 68 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2, cor0.col2
----
-3060
-4828
-544

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5996
SELECT CAST( - 87 AS SIGNED ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-87
-87
-87

skipif mysql # not compatible
query I rowsort label-5996
SELECT CAST ( - 87 AS INTEGER ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-87
-87
-87

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col0
----
58
79
87

query I rowsort
SELECT 62 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
105
145
88

query I rowsort
SELECT ALL - 19 FROM tab0 cor0 GROUP BY cor0.col1
----
-19
-19

query I rowsort
SELECT - 42 - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1891
-6931
-718

query I rowsort
SELECT + 23 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-20
-3
-60

query I rowsort
SELECT DISTINCT 95 FROM tab2 AS cor0 GROUP BY col0
----
95

query I rowsort
SELECT ALL + 52 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
133
52

query I rowsort
SELECT - tab1.col2 * tab1.col2 - 34 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2059
-5075
-98

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL 33 FROM tab0 GROUP BY tab0.col1
----
33
33

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 DISTINCT + 19 FROM tab0 AS cor0 GROUP BY col2
----
19

query I rowsort
SELECT ALL - 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-54
-54
-54

query I rowsort
SELECT ALL col0 * - 38 FROM tab1 GROUP BY col0
----
-1064
-3116
-836

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 * + 31 col2 FROM tab2 GROUP BY col0
----
2821
2852
465

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 33 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
33

query I rowsort
SELECT 58 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
58
58
58

query I rowsort
SELECT 44 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col2
----
44
44
44

query I rowsort
SELECT ALL ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2
2
2

query I rowsort
SELECT + + 35 FROM tab0 GROUP BY tab0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT 38 - + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-21
-23
-3

query I rowsort
SELECT DISTINCT + 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
24

onlyif mysql # DIV for integer division: 
query I rowsort label-6021
SELECT DISTINCT + 39 DIV - 62 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-6021
SELECT DISTINCT + 39 / - 62 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT + cor0.col1 + 69 FROM tab2 AS cor0 GROUP BY cor0.col1
----
110
128
130

onlyif mysql # DIV for integer division: 
query I rowsort label-6024
SELECT ALL + 40 DIV + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6024
SELECT ALL + 40 / + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL - 38 AS col0 FROM tab1 GROUP BY tab1.col1
----
-38
-38
-38

query I rowsort
SELECT 40 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
40
40
40

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 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 + 80 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
80

query I rowsort
SELECT DISTINCT - tab2.col0 - + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 69 + 76 FROM tab0 GROUP BY col0
----
7
7
7

query I rowsort
SELECT + 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT - 80 FROM tab2 GROUP BY tab2.col0
----
-80
-80
-80

query I rowsort
SELECT ALL + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 18 * - tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-1476
-396
-504

query I rowsort
SELECT 64 FROM tab0 GROUP BY tab0.col1
----
64
64

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
-1260
-176
-5822

query I rowsort
SELECT DISTINCT - 77 FROM tab1 cor0 GROUP BY cor0.col2
----
-77

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6041
SELECT ALL + 66 DIV - 84 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6041
SELECT ALL + 66 / - 84 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - 82 FROM tab1 GROUP BY col0
----
-82

query I rowsort
SELECT + 44 AS col1 FROM tab1 GROUP BY tab1.col2
----
44
44
44

onlyif mysql # DIV for integer division: 
query I rowsort label-6045
SELECT ALL - + tab2.col0 DIV tab2.col0 col2 FROM tab2 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6045
SELECT ALL - + tab2.col0 / tab2.col0 col2 FROM tab2 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT - 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT + 49 FROM tab0 AS cor0 GROUP BY cor0.col2
----
49

query I rowsort
SELECT 23 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
23
23
23

onlyif mysql # DIV for integer division: 
query I rowsort label-6049
SELECT cor0.col0 + - cor0.col2 DIV + col2 FROM tab0 cor0 GROUP BY col2, col0
----
25
42
82

skipif mysql # not compatible
query I rowsort label-6049
SELECT cor0.col0 + - cor0.col2 / + col2 FROM tab0 cor0 GROUP BY col2, col0
----
25
42
82

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col0 + + 79 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
170
171
94

query I rowsort
SELECT - 11 AS col1 FROM tab0 GROUP BY col0
----
-11
-11
-11

query I rowsort
SELECT - tab2.col1 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-6056
SELECT DISTINCT + col0 - - cor0.col0 DIV cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6056
SELECT DISTINCT + col0 - - cor0.col0 / cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

query I rowsort
SELECT ALL - 9 FROM tab2 GROUP BY tab2.col2
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 0 * - tab1.col2 + - tab1.col2 * + col2 col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - + 21 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1911
-1932
-315

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 66 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
6006
6072
990

query I rowsort
SELECT - 1 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col0 * 29 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
2378
638
812

query I rowsort
SELECT DISTINCT + - 59 FROM tab0 GROUP BY tab0.col1
----
-59

onlyif mysql # DIV for integer division: 
query I rowsort label-6065
SELECT DISTINCT + cor0.col2 DIV - 35 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6065
SELECT DISTINCT + cor0.col2 / - 35 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
-1
-2
0

query I rowsort
SELECT 84 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
64
64
64

query I rowsort
SELECT ALL - 65 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-65
-65
-65

query I rowsort
SELECT DISTINCT + ( 2 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
2

query I rowsort
SELECT - + 65 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-65
16

query I rowsort
SELECT DISTINCT 97 FROM tab1 cor0 GROUP BY cor0.col2
----
97

query I rowsort
SELECT - 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-12
-12
-12

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + + tab1.col1 * + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL + tab0.col2 + + 95 FROM tab0 GROUP BY tab0.col2
----
119
133
174

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT ( cor0.col1 ) * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT DISTINCT 34 * - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-2788
-748
-952

query I rowsort
SELECT ALL - 82 * + col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-4756
-6478
-7134

query I rowsort
SELECT 45 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1170
-1935
-3735

query I rowsort
SELECT ALL - cor0.col2 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2
-27
12

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT col0 - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 14 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1162
364
602

query I rowsort
SELECT - 93 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-93
-93
-93

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT ALL - 21 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6091
SELECT DISTINCT + tab0.col2 DIV + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6091
SELECT DISTINCT + tab0.col2 / + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 col1 FROM tab1 GROUP BY col2 HAVING NOT ( + col1 ) < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ( 26 ) + - cor0.col0 * + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-1279
-5310
-7163

onlyif mysql # DIV for integer division: 
query I rowsort label-6095
SELECT cor0.col2 * 55 - cor0.col2 DIV cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3189
4344
4784

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6095
SELECT cor0.col2 * 55 - cor0.col2 / cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3189
4344
4784

query I rowsort
SELECT DISTINCT 26 + 62 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
88

query I rowsort
SELECT + - 26 * col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1118
-2158
-676

query I rowsort
SELECT 0 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - 4 AS col2 FROM tab2 GROUP BY tab2.col2
----
-4
-4
-4

query I rowsort
SELECT DISTINCT 7 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-21
-75

query I rowsort
SELECT DISTINCT 29 AS col2 FROM tab1 GROUP BY tab1.col0
----
29

query I rowsort
SELECT DISTINCT - 37 FROM tab0 GROUP BY tab0.col0
----
-37

query I rowsort
SELECT 63 AS col0 FROM tab0 GROUP BY tab0.col1
----
63
63

query I rowsort
SELECT + tab1.col1 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6105
SELECT ALL 31 DIV col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-6105
SELECT ALL 31 / col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
0
0
2

query I rowsort
SELECT ALL - + tab1.col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT ALL + 6 AS col0 FROM tab2 GROUP BY tab2.col1
----
6
6
6

query I rowsort
SELECT ALL - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NULL
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - 75 AS col1 FROM tab1 GROUP BY tab1.col1
----
-75
-75
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 52 col2 FROM tab1 GROUP BY tab1.col2
----
-52

query I rowsort
SELECT + 7 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
22
98
99

query I rowsort
SELECT DISTINCT - + 7 FROM tab0 GROUP BY tab0.col1
----
-7

query I rowsort
SELECT ALL + ( + col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + 22 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
30
67
93

query I rowsort
SELECT 24 - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-19
-2
-59

query I rowsort
SELECT ALL 18 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1476
396
504

query I rowsort
SELECT ALL - 30 FROM tab2 AS cor0 GROUP BY col1
----
-30
-30
-30

onlyif mysql # DIV for integer division: 
query I rowsort label-6119
SELECT DISTINCT - - 38 DIV 62 FROM tab0 GROUP BY tab0.col2
----
0

skipif mysql # not compatible
query I rowsort label-6119
SELECT DISTINCT - - 38 / 62 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT DISTINCT 77 * - tab2.col0 FROM tab2 GROUP BY col0
----
-1155
-7007
-7084

query I rowsort
SELECT + - ( tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( + 25, + col2 * tab1.col0 ) FROM tab1 GROUP BY col1
----
-25
-25
-25

query I rowsort
SELECT + + 6 AS col2 FROM tab1 GROUP BY tab1.col1
----
6
6
6

query I rowsort
SELECT - 74 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1776
-2812
-5846

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 48 col2 FROM tab2 GROUP BY tab2.col0
----
48
48
48

query I rowsort
SELECT ALL - 50 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
29
37
8

query I rowsort
SELECT DISTINCT - 51 * + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-1224
-1938
-4029

onlyif mysql # DIV for integer division: 
query I rowsort label-6129
SELECT tab2.col2 DIV - 71 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6129
SELECT tab2.col2 / - 71 FROM tab2 GROUP BY tab2.col2
----
-1
-1
0

query I rowsort
SELECT ALL + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - - ( + 63 ) FROM tab1 GROUP BY tab1.col2
----
63
63
63

query I rowsort
SELECT ALL - 62 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT 81 * + 74 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
5994
5994
5994

query I rowsort
SELECT - - 3 * 16 AS col2 FROM tab2 GROUP BY tab2.col0
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + cor0.col0 ) col1 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-6136
SELECT ALL + cor0.col2 - - cor0.col0 DIV + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-6136
SELECT ALL + cor0.col2 - - cor0.col0 / + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
59
80
88

query I rowsort
SELECT + 98 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT DISTINCT - 58 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-58

query I rowsort
SELECT DISTINCT + 4 FROM tab0 AS cor0 GROUP BY cor0.col0
----
4

query I rowsort
SELECT + 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
66
66
66

onlyif mysql # DIV for integer division: 
query I rowsort label-6142
SELECT cor0.col0 DIV 55 FROM tab1 AS cor0 GROUP BY col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6142
SELECT cor0.col0 / 55 FROM tab1 AS cor0 GROUP BY col0
----
0
0
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6143
SELECT CAST( NULL AS SIGNED ) + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6143
SELECT CAST ( NULL AS INTEGER ) + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 27 FROM tab2 cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT + 26 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
26
26
26

query I rowsort
SELECT ALL + 37 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT ALL - + ( - 83 ) - - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
127
140
89

query I rowsort
SELECT ALL + 30 FROM tab2 GROUP BY col0
----
30
30
30

query I rowsort
SELECT col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 + ( 90 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
116
133
173

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT + 89 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT - 46 FROM tab1 AS cor0 GROUP BY col0
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 32 + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
-32
49

query I rowsort
SELECT + 85 FROM tab1 GROUP BY col1
----
85
85
85

query I rowsort
SELECT ALL - tab2.col0 / tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 + - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT 67 + - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-16
24
41

onlyif mysql # DIV for integer division: 
query I rowsort label-6160
SELECT DISTINCT - 20 DIV + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-6160
SELECT DISTINCT - 20 / + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT ALL 32 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 + - cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT - tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL < NULL
----

query I rowsort
SELECT + 51 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
51
51
51

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT 19 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
19
19
19

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
----
2025
5041
64

query I rowsort
SELECT ALL + 94 FROM tab2 GROUP BY tab2.col2
----
94
94
94

query I rowsort
SELECT DISTINCT - - 98 FROM tab1 GROUP BY tab1.col0
----
98

query I rowsort
SELECT DISTINCT + tab2.col0 * + 70 AS col2 FROM tab2 GROUP BY tab2.col0
----
1050
6370
6440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 - col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-156
-177
-185

query I rowsort
SELECT 78 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
78
78
78

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 + 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
99
99

query I rowsort
SELECT cor0.col0 * + 32 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
2624
704
896

query I rowsort
SELECT DISTINCT + + 65 FROM tab1 GROUP BY tab1.col2
----
65

query I rowsort
SELECT DISTINCT - + 42 * + col0 FROM tab0 GROUP BY tab0.col0
----
-1092
-1806
-3486

query I rowsort
SELECT 6 + - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-18
-32
-73

query I rowsort
SELECT + 63 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT 50 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2900
3950
4350

query I rowsort
SELECT DISTINCT + 20 FROM tab2 GROUP BY tab2.col1
----
20

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 + + 97 * col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
12696
14196
2370

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + - COALESCE ( - 74, + tab2.col0 ) * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
4292
5846
6438

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
2378
4661
5307

query I rowsort
SELECT + 27 FROM tab2 AS cor0 GROUP BY cor0.col0
----
27
27
27

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 + tab0.col0 * - col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - 61 AS col0 FROM tab1 GROUP BY tab1.col0
----
-61

query I rowsort
SELECT ( - 41 ) FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
-41
-41
-41

query I rowsort
SELECT - 15 * tab0.col0 + 64 FROM tab0 GROUP BY tab0.col0
----
-1181
-326
-581

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - + 40 AS col1 FROM tab1 GROUP BY tab1.col0
----
-40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6194
SELECT + CAST( NULL AS SIGNED ) - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6194
SELECT + CAST ( NULL AS INTEGER ) - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 14 FROM tab1 GROUP BY tab1.col2
----
14
14
14

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6196
SELECT - CAST( + 85 AS SIGNED ) col2 FROM tab0 AS cor0 GROUP BY col0
----
-85
-85
-85

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6196
SELECT - CAST ( + 85 AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY col0
----
-85
-85
-85

query I rowsort
SELECT ALL 36 FROM tab2 GROUP BY tab2.col2
----
36
36
36

query I rowsort
SELECT 95 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
101
139
152

query I rowsort
SELECT 94 + 66 FROM tab1 AS cor0 GROUP BY cor0.col1
----
160
160
160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( 57, cor0.col0 ) * + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1254
1596
4674

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col0 FROM tab2 GROUP BY tab2.col1
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - tab0.col0 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + cor0.col2 + + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
142
16
90

query I rowsort
SELECT ALL - - 91 + 2 AS col2 FROM tab2 GROUP BY tab2.col2
----
93
93
93

query I rowsort
SELECT 53 FROM tab1 AS cor0 GROUP BY cor0.col1
----
53
53
53

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6208
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6208
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + CASE + cor0.col2 WHEN + cor0.col2 - cor0.col2 THEN - 18 + - cor0.col2 * + cor0.col0 END * + 86 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - tab2.col2 + 85 FROM tab2 GROUP BY tab2.col2
----
-2
27
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 * col1 col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT ( + 4 ) FROM tab1 GROUP BY tab1.col1
----
4

query I rowsort
SELECT DISTINCT + 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24

query I rowsort
SELECT + 8 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
120
728
736

query I rowsort
SELECT cor0.col0 * + 67 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1005
6097
6164

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 75 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-75
-75
-75

query I rowsort
SELECT DISTINCT - 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-52

query I rowsort
SELECT DISTINCT - 20 AS col1 FROM tab2 GROUP BY tab2.col0
----
-20

query I rowsort
SELECT + 44 * col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1980
3124
352

query I rowsort
SELECT ALL cor0.col1 * + 41 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
3321

onlyif mysql # DIV for integer division: 
query I rowsort label-6221
SELECT cor0.col2 + cor0.col2 DIV - 50 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
70
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6221
SELECT cor0.col2 + cor0.col2 / - 50 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
70
8

query I rowsort
SELECT - ( 41 ) FROM tab2 GROUP BY tab2.col2
----
-41
-41
-41

query I rowsort
SELECT - + 52 FROM tab2 GROUP BY tab2.col0
----
-52
-52
-52

query I rowsort
SELECT ALL - 79 FROM tab0 cor0 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT ALL 72 FROM tab2 GROUP BY tab2.col1
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 * 6 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
156
258
498

query I rowsort
SELECT ALL - 84 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT DISTINCT + tab2.col2 * 7 AS col1 FROM tab2 GROUP BY tab2.col2
----
406
553
609

query I rowsort
SELECT ALL 84 AS col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
84
84
84

query I rowsort
SELECT + + 87 AS col1 FROM tab2 GROUP BY tab2.col2
----
87
87
87

query I rowsort
SELECT - cor0.col0 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12
-34
72

query I rowsort
SELECT DISTINCT 71 - - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
115
128
77

onlyif mysql # DIV for integer division: 
query I rowsort label-6234
SELECT + tab1.col1 - + ( + tab1.col1 ) DIV 87 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-6234
SELECT + tab1.col1 - + ( + tab1.col1 ) / 87 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ( 4 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT DISTINCT + 13 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13

query I rowsort
SELECT ALL - ( + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
1944

query I rowsort
SELECT DISTINCT + 61 - - col0 FROM tab2 GROUP BY tab2.col0
----
152
153
76

query I rowsort
SELECT + 43 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
4

query I rowsort
SELECT DISTINCT tab0.col1 + tab0.col1 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT ALL - 65 * col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5915
-5980
-975

query I rowsort
SELECT cor0.col0 + + ( cor0.col0 ) * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT - col0 * 9 FROM tab0 cor0 GROUP BY cor0.col0
----
-234
-387
-747

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 17 col2 FROM tab1 GROUP BY tab1.col0
----
-17
-17
-17

query I rowsort
SELECT - col1 + 31 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
-26
25

query I rowsort
SELECT DISTINCT - 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-5

query I rowsort
SELECT ALL + col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + 41 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
41
41

query I rowsort
SELECT DISTINCT - - tab0.col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 92 AS col2 FROM tab2 GROUP BY tab2.col0
----
-92

query I rowsort
SELECT - 68 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1020
-6188
-6256

query I rowsort
SELECT DISTINCT + 58 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
58

query I rowsort
SELECT DISTINCT - + 20 AS col1 FROM tab0 GROUP BY tab0.col1
----
-20

query I rowsort
SELECT ALL col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 - ( 55 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-17
-31
24

query I rowsort
SELECT ALL 33 AS col0 FROM tab1 GROUP BY tab1.col0
----
33
33
33

query I rowsort
SELECT DISTINCT tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT 3 + col0 FROM tab0 GROUP BY tab0.col0
----
29
46
86

query I rowsort
SELECT DISTINCT + 88 FROM tab2 AS cor0 GROUP BY cor0.col1
----
88

query I rowsort
SELECT + cor0.col1 - 32 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-26
12
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT + + 92 AS col2 FROM tab0 GROUP BY tab0.col2
----
92
92
92

query I rowsort
SELECT ALL - 19 AS col0 FROM tab2 GROUP BY tab2.col2
----
-19
-19
-19

query I rowsort
SELECT DISTINCT 53 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
53

query I rowsort
SELECT ALL + 90 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1980
2520
7380

query I rowsort
SELECT + 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT DISTINCT - 60 FROM tab0 GROUP BY tab0.col1
----
-60

onlyif mysql # DIV for integer division: 
query I rowsort label-6274
SELECT DISTINCT 1 DIV col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0

skipif mysql # not compatible
query I rowsort label-6274
SELECT DISTINCT 1 / col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT DISTINCT 96 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT + tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY col1 HAVING ( + col1 ) IS NOT NULL
----
0
6561

query I rowsort
SELECT ALL + tab0.col2 * col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1482
600
6320

query I rowsort
SELECT + tab1.col0 AS col2 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT tab0.col2 * tab0.col2 NOT IN ( tab0.col2 )
----

query I rowsort
SELECT DISTINCT tab2.col1 + 60 * - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-2419
-3481
-3599

query I rowsort
SELECT ALL + tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT DISTINCT ( - 69 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-69

query I rowsort
SELECT DISTINCT - + 75 AS col1 FROM tab0 GROUP BY tab0.col2
----
-75

query I rowsort
SELECT DISTINCT 32 FROM tab0 GROUP BY tab0.col2
----
32

query I rowsort
SELECT ALL 59 AS col1 FROM tab2 GROUP BY tab2.col2
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-6290
SELECT + COALESCE ( - 8, - cor0.col2 ) + - col1 DIV ( + cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-9
-9
-9

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-6290
SELECT + COALESCE ( - 8, - cor0.col2 ) + - col1 / ( + cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-9
-9
-9

onlyif mysql # DIV for integer division: 
query I rowsort label-6291
SELECT cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6291
SELECT cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT - 58 AS col2 FROM tab1 GROUP BY tab1.col1
----
-58
-58
-58

query I rowsort
SELECT DISTINCT - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT DISTINCT + - 35 FROM tab2 GROUP BY tab2.col1
----
-35

query I rowsort
SELECT DISTINCT - 11 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-11

query I rowsort
SELECT - + ( - tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + 95 AS col1 FROM tab2 GROUP BY tab2.col2
----
95
95
95

query I rowsort
SELECT ( - 66 ) * - 71 + + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
4708
4714
4768

query I rowsort
SELECT ALL + col2 * - 73 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1752
-2774
-5767

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT tab2.col2 * 91 FROM tab2 GROUP BY tab2.col2
----
5278
7189
7917

query I rowsort
SELECT ALL + col1 + - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 30 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
30

query I rowsort
SELECT ALL - 43 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-102
-104
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-6305
SELECT ALL cor0.col0 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6305
SELECT ALL cor0.col0 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col2 FROM tab0 GROUP BY tab0.col1
----
-62
-62

query I rowsort
SELECT - 70 - 11 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 19, cor0.col0 - + cor0.col0 * cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT ALL - + 49 AS col0 FROM tab2 GROUP BY tab2.col1
----
-49
-49
-49

query I rowsort
SELECT DISTINCT 61 FROM tab2 GROUP BY tab2.col0
----
61

query I rowsort
SELECT DISTINCT 19 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
19

query I rowsort
SELECT ALL 44 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-35
20
6

query I rowsort
SELECT 80 FROM tab0 GROUP BY col2
----
80
80
80

query I rowsort
SELECT - ( 77 ) * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6237

query I rowsort
SELECT ALL - ( - col0 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 26 FROM tab1 AS cor0 GROUP BY col2
----
26

query I rowsort
SELECT ALL tab1.col1 + - 78 FROM tab1 GROUP BY tab1.col1
----
-21
-34
-72

query I rowsort
SELECT ALL 22 * + cor0.col0 + 18 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1844
590
964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 + + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-16
-57
-71

onlyif mysql # DIV for integer division: 
query I rowsort label-6320
SELECT DISTINCT 74 DIV tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
query I rowsort label-6320
SELECT DISTINCT 74 / tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1

query I rowsort
SELECT DISTINCT + + 22 AS col1 FROM tab2 GROUP BY tab2.col0
----
22

query I rowsort
SELECT cor0.col1 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT DISTINCT - tab1.col2 + 35 AS col2 FROM tab1 GROUP BY tab1.col2
----
-10
-36
27

query I rowsort
SELECT DISTINCT cor0.col1 * + 33 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1394
2006
2074

query I rowsort
SELECT 93 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
93
93
93

query I rowsort
SELECT ALL 94 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
94
94
94

query I rowsort
SELECT ALL tab1.col1 + tab1.col1 * 1 AS col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - 30 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-30

query I rowsort
SELECT DISTINCT + 17 AS col2 FROM tab1 GROUP BY tab1.col2
----
17

query I rowsort
SELECT ALL - 89 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-4005
-6319
-712

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 * col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-184
-5893

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT + col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT + 52 FROM tab0 GROUP BY col1
----
52
52

query I rowsort
SELECT DISTINCT ( cor0.col0 ) + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-70

query I rowsort
SELECT ALL + tab2.col2 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) < NULL
----

query I rowsort
SELECT DISTINCT + 48 + + 14 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
62

query I rowsort
SELECT ALL 20 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 30 + 57 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 * + 57 col1 FROM tab2 GROUP BY tab2.col1
----
2337
3363
3477

query I rowsort
SELECT - 30 + tab1.col1 * - 81 AS col1 FROM tab1 GROUP BY tab1.col1
----
-3594
-4647
-516

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 + - tab2.col0 * col0 col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT - - ( - 56 ) FROM tab2 GROUP BY tab2.col2
----
-56
-56
-56

query I rowsort
SELECT - 8 + - 81 FROM tab2 GROUP BY tab2.col2
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - 85 FROM tab1 GROUP BY tab1.col2
----
-85

onlyif mysql # DIV for integer division: 
query I rowsort label-6352
SELECT DISTINCT 55 DIV 74 FROM tab0 GROUP BY tab0.col2
----
0

skipif mysql # not compatible
query I rowsort label-6352
SELECT DISTINCT 55 / 74 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT - cor0.col1 + + 32 FROM tab0 cor0 GROUP BY cor0.col1
----
-49
32

query I rowsort
SELECT + 0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6355
SELECT - + 36 DIV tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-6355
SELECT - + 36 / tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-6
0
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 + - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 0 col1 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT + 85 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
85

query I rowsort
SELECT DISTINCT 52 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
52

query I rowsort
SELECT + + 4 FROM tab2 GROUP BY col2
----
4
4
4

query I rowsort
SELECT ALL COALESCE ( 51, + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
51
51
51

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - 2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-2
-2
-2

query I rowsort
SELECT - 35 FROM tab1 GROUP BY tab1.col2
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-6366
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-6366
SELECT + cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT ALL + 35 AS col2 FROM tab0 GROUP BY tab0.col2
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 81 - + 10 col0 FROM tab2 GROUP BY tab2.col2
----
-91
-91
-91

query I rowsort
SELECT 12 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT DISTINCT + - 77 FROM tab0 GROUP BY tab0.col1
----
-77

query I rowsort
SELECT + col1 * + col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NULL
----
1936
3249
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6372
SELECT - cor0.col1 * + CAST( NULL AS SIGNED ) - 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6372
SELECT - cor0.col1 * + CAST ( NULL AS INTEGER ) - 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
64

query I rowsort
SELECT ALL + - 65 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-2860
-3705
-390

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 58, tab2.col1, col1 * tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
58
58
58

query I rowsort
SELECT + - tab0.col2 * - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL 10 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-34
-47
4

query I rowsort
SELECT DISTINCT - 81 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-81

query I rowsort
SELECT + + 22 FROM tab0 GROUP BY tab0.col0
----
22
22
22

query I rowsort
SELECT - 86 AS col2 FROM tab2 GROUP BY tab2.col0
----
-86
-86
-86

query I rowsort
SELECT - - 78 FROM tab0 GROUP BY tab0.col0
----
78
78
78

query I rowsort
SELECT col0 * tab2.col0 + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab1 GROUP BY col0 HAVING + col0 * - tab1.col0 IS NULL
----

query I rowsort
SELECT DISTINCT tab2.col2 + + col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT cor0.col1 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1944
0
0

query I rowsort
SELECT ALL - + tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 10 * cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
260
430
830

onlyif mysql # DIV for integer division: 
query I rowsort label-6390
SELECT + 92 * 45 + - cor0.col0 DIV NULLIF ( + 81, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
4139
4140
4140

skipif mysql # not compatible
query I rowsort label-6390
SELECT + 92 * 45 + - cor0.col0 / NULLIF ( + 81, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
4139
4140
4140

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT + 89 FROM tab1 GROUP BY tab1.col0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 55 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
55

query I rowsort
SELECT tab1.col0 * + tab1.col0 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL + 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1032
2054
3154

onlyif mysql # DIV for integer division: 
query I rowsort label-6397
SELECT 78 DIV col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6397
SELECT 78 / col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT + cor0.col2 + 58 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
137
82
96

query I rowsort
SELECT DISTINCT + col1 + + 56 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
137
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 + - cor0.col1 * - 79 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6476
77

query I rowsort
SELECT + 48 * 88 AS col2 FROM tab1 GROUP BY tab1.col2
----
4224
4224
4224

query I rowsort
SELECT + - 54 AS col1 FROM tab1 GROUP BY tab1.col2
----
-54
-54
-54

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6403
SELECT + + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6403
SELECT + + CAST ( NULL AS REAL ) AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 86 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
86
86
86

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + 60 FROM tab0 GROUP BY tab0.col2
----
60

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT + 44 * + cor0.col2 + - 70 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2482
3406
3758

onlyif mysql # DIV for integer division: 
query I rowsort label-6409
SELECT DISTINCT + - tab1.col0 DIV + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-1

skipif mysql # not compatible
query I rowsort label-6409
SELECT DISTINCT + - tab1.col0 / + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-6410
SELECT - 65 DIV tab1.col1 + + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-4
43
56

skipif mysql # not compatible
query I rowsort label-6410
SELECT - 65 / tab1.col1 + + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-4
43
56

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + 98 FROM tab2 AS cor0 GROUP BY col1
----
98

query I rowsort
SELECT ALL - 85 FROM tab1 GROUP BY tab1.col1
----
-85
-85
-85

query I rowsort
SELECT + 4 FROM tab1 GROUP BY tab1.col0
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-6415
SELECT DISTINCT - tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1

skipif mysql # not compatible
query I rowsort label-6415
SELECT DISTINCT - tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 7 * 2 + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
20
58
71

query I rowsort
SELECT - tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL + - tab1.col0 * + tab1.col0 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT - 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 65 + + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
110
136
73

query I rowsort
SELECT ALL 38 FROM tab1 GROUP BY tab1.col1
----
38
38
38

query I rowsort
SELECT ALL - 56 FROM tab0 GROUP BY tab0.col0
----
-56
-56
-56

query I rowsort
SELECT - 0 + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + - 18 AS col0 FROM tab0 GROUP BY tab0.col2
----
-18
-18
-18

query I rowsort
SELECT DISTINCT + + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + cor0.col0 * - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - 18 * - tab0.col1 + + tab0.col1 * - 94 FROM tab0 GROUP BY tab0.col1
----
-6156
0

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT - tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + + 82 FROM tab0 GROUP BY tab0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT + - tab0.col0 + + col0 AS col1 FROM tab0 GROUP BY col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 + + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT cor0.col2 * 93 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2232
3534
7347

query I rowsort
SELECT ALL 72 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
117
143
80

onlyif mysql # DIV for integer division: 
query I rowsort label-6437
SELECT cor0.col0 DIV cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6437
SELECT cor0.col0 / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
2

onlyif mysql # DIV for integer division: 
query I rowsort label-6438
SELECT ALL 9 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6438
SELECT ALL 9 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 77 FROM tab1 GROUP BY tab1.col2
----
77

query I rowsort
SELECT + 13 FROM tab0 GROUP BY tab0.col0
----
13
13
13

query I rowsort
SELECT cor0.col1 + + 95 FROM tab0 AS cor0 GROUP BY cor0.col1
----
176
95

query I rowsort
SELECT + ( - 9 ) * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-216
-342
-711

query I rowsort
SELECT + - tab0.col2 * - 17 FROM tab0 GROUP BY tab0.col2
----
1343
408
646

query I rowsort
SELECT ALL + 75 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
75
75

query I rowsort
SELECT + cor1.col2 + 1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
25
39
80

onlyif mysql # DIV for integer division: 
query I rowsort label-6446
SELECT ALL - cor0.col1 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6446
SELECT ALL - cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-6447
SELECT cor0.col1 DIV cor0.col0 + 18 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
18
18
20

skipif mysql # not compatible
query I rowsort label-6447
SELECT cor0.col1 / cor0.col0 + 18 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
18
18
20

query I rowsort
SELECT DISTINCT + + 76 FROM tab0 GROUP BY col1
----
76

onlyif mysql # DIV for integer division: 
query I rowsort label-6449
SELECT col1 DIV + 93 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-6449
SELECT col1 / + 93 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT COALESCE ( - cor0.col0, col0 + 12 * - cor0.col0, cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + - 50 FROM tab0 GROUP BY tab0.col1
----
-50
-50

query I rowsort
SELECT + + 94 + 19 AS col2 FROM tab1 GROUP BY tab1.col1
----
113
113
113

query I rowsort
SELECT DISTINCT - 53 * cor0.col1 FROM tab2 cor0 GROUP BY col1
----
-2173
-3127
-3233

query I rowsort
SELECT DISTINCT 49 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-32
49

query I rowsort
SELECT 73 + - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-10
30
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col0 + tab1.col0 col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT - 20 FROM tab2 GROUP BY tab2.col2
----
-20

query I rowsort
SELECT ALL + + 11 FROM tab1 GROUP BY tab1.col1
----
11
11
11

query I rowsort
SELECT + 23 + + tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
23
6584

query I rowsort
SELECT + 55 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
55
55

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT NULLIF ( + 0, + tab2.col2 * tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL col2 + + 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
112
138
75

query I rowsort
SELECT - + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + ( tab0.col2 ) AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - 48 AS col1 FROM tab2 cor0 GROUP BY col2
----
-48
-48
-48

query I rowsort
SELECT ALL - 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-33
-33
-33

query I rowsort
SELECT ALL 4 + 56 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
60
60
60

query I rowsort
SELECT - + ( 92 ) FROM tab2 GROUP BY tab2.col2
----
-92
-92
-92

query I rowsort
SELECT DISTINCT - + 37 AS col2 FROM tab2 GROUP BY tab2.col0
----
-37

query I rowsort
SELECT ALL + tab1.col2 + - col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - col2 FROM tab2 GROUP BY col2 HAVING + tab2.col2 IS NOT NULL
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + cor0.col2 * + 56 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3248
4424
4872

query I rowsort
SELECT ALL 53 * tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
2214
3186
3294

query I rowsort
SELECT DISTINCT - tab1.col0 + 67 FROM tab1 GROUP BY tab1.col0
----
-15
39
45

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT DISTINCT + tab1.col2 + - 48 AS col2 FROM tab1 GROUP BY tab1.col2
----
-3
-40
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
42
42
42

onlyif mysql # DIV for integer division: 
query I rowsort label-6480
SELECT DISTINCT + ( - col2 ) + - tab2.col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-59
-80
-88

skipif mysql # not compatible
query I rowsort label-6480
SELECT DISTINCT + ( - col2 ) + - tab2.col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-59
-80
-88

query I rowsort
SELECT + 38 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-20
-41
-49

query I rowsort
SELECT ALL 68 + cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1512
6309
644

query I rowsort
SELECT - 51 * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-2295
-3621
-408

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT 7 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
7
7
7

query I rowsort
SELECT ALL - + 19 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-100
-19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6487
SELECT ALL - col1 * CAST( - 19 AS SIGNED ) AS col0 FROM tab1 GROUP BY tab1.col1
----
1083
114
836

skipif mysql # not compatible
query I rowsort label-6487
SELECT ALL - col1 * CAST ( - 19 AS INTEGER ) AS col0 FROM tab1 GROUP BY tab1.col1
----
1083
114
836

query I rowsort
SELECT + - ( - 3 ) * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
129
249
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6489
SELECT ALL - CAST( - 46 AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
46
46
46

skipif mysql # not compatible
query I rowsort label-6489
SELECT ALL - CAST ( - 46 AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
46
46
46

query I rowsort
SELECT ALL + ( - 94 ) * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
5452
7426
8178

query I rowsort
SELECT ALL - 24 AS col1 FROM tab1 GROUP BY tab1.col1
----
-24
-24
-24

query I rowsort
SELECT ALL 62 AS col0 FROM tab1 GROUP BY tab1.col1
----
62
62
62

query I rowsort
SELECT + 3 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
135
213
24

query I rowsort
SELECT DISTINCT 87 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
87

query I rowsort
SELECT DISTINCT 7 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7

onlyif mysql # DIV for integer division: 
query I rowsort label-6496
SELECT - - col1 DIV 45 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6496
SELECT - - col1 / 45 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
1
1

query I rowsort
SELECT + 94 AS col0 FROM tab1 GROUP BY tab1.col2
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col2 FROM tab2 GROUP BY tab2.col2
----
16
16
16

query I rowsort
SELECT DISTINCT + 38 AS col2 FROM tab2 GROUP BY tab2.col2
----
38

query I rowsort
SELECT DISTINCT + COALESCE ( + tab2.col0, + NULLIF ( - tab2.col0, tab2.col0 / tab2.col0 ) ) AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - NULLIF ( tab1.col0, - 98 ) col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col1 + - cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
1980
3306
42

query I rowsort
SELECT - 27 FROM tab2 GROUP BY col0
----
-27
-27
-27

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE NOT - tab0.col0 NOT BETWEEN ( NULL ) AND NULL GROUP BY col2
----

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING ( tab2.col1 ) IS NOT NULL
----
41
59
61

query I rowsort
SELECT DISTINCT - col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT col2 + + 98 FROM tab0 AS cor0 GROUP BY cor0.col2
----
122
136
177

query I rowsort
SELECT DISTINCT + 67 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col0 * - 74 col0 FROM tab0 GROUP BY col0
----
1924
3182
6142

onlyif mysql # DIV for integer division: 
query I rowsort label-6514
SELECT ALL - tab2.col2 DIV tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6514
SELECT ALL - tab2.col2 / tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - + 31 AS col0 FROM tab1 GROUP BY tab1.col1
----
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 * + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2378
638
812

query I rowsort
SELECT 22 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
105
48
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-98
-98
-98

query I rowsort
SELECT + - tab2.col2 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - 70 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-70

query I rowsort
SELECT ALL - - 18 FROM tab0 GROUP BY tab0.col0
----
18
18
18

query I rowsort
SELECT ALL 38 FROM tab0 AS cor0 GROUP BY col0
----
38
38
38

query I rowsort
SELECT ALL 63 * 86 AS col0 FROM tab0 GROUP BY tab0.col2
----
5418
5418
5418

query I rowsort
SELECT DISTINCT 23 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1357
1403
943

query I rowsort
SELECT ALL 5 FROM tab1 GROUP BY tab1.col2
----
5
5
5

query I rowsort
SELECT - + 40 - 56 FROM tab1 GROUP BY tab1.col0
----
-96
-96
-96

query I rowsort
SELECT 57 + ( + cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
148
149
72

query I rowsort
SELECT - 50 AS col0 FROM tab2 GROUP BY tab2.col1
----
-50
-50
-50

query I rowsort
SELECT + 99 * + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
4059
5841
6039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
81

query I rowsort
SELECT DISTINCT 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
60

onlyif mysql # DIV for integer division: 
query I rowsort label-6533
SELECT DISTINCT + + tab1.col2 DIV col2 FROM tab1 GROUP BY tab1.col2
----
1

skipif mysql # not compatible
query I rowsort label-6533
SELECT DISTINCT + + tab1.col2 / col2 FROM tab1 GROUP BY tab1.col2
----
1

query I rowsort
SELECT - 47 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-47
-47
-47

query I rowsort
SELECT DISTINCT + cor0.col0 - ( + COALESCE ( + cor0.col2, cor0.col0 ) ) FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-17
11
14

query I rowsort
SELECT ALL + - 88 + 85 * + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
3737
592
5947

query I rowsort
SELECT - 11 - 93 AS col2 FROM tab2 GROUP BY tab2.col2
----
-104
-104
-104

query I rowsort
SELECT DISTINCT 44 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
44

query I rowsort
SELECT - 18 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-18
-18
-18

query I rowsort
SELECT DISTINCT + cor0.col0 - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 74 + - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
13
15
33

query I rowsort
SELECT ALL + ( + col2 ) AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 77 AS col2 FROM tab2 GROUP BY col0
----
77

query I rowsort
SELECT ALL + 39 AS col2 FROM tab2 GROUP BY tab2.col0
----
39
39
39

query I rowsort
SELECT DISTINCT 9 FROM tab1 GROUP BY tab1.col2
----
9

query I rowsort
SELECT DISTINCT - 95 * - 2 FROM tab0 GROUP BY col1
----
190

query I rowsort
SELECT - 14 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-14
-14
-14

query I rowsort
SELECT DISTINCT - - tab1.col2 * 37 FROM tab1 GROUP BY tab1.col2
----
1665
2627
296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab0.col2 * 5 col1 FROM tab0 GROUP BY tab0.col2
----
120
190
395

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + + 85 FROM tab0 GROUP BY tab0.col2
----
85

query I rowsort
SELECT 75 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 58 ) col1 FROM tab1 GROUP BY tab1.col1
----
-58
-58
-58

query I rowsort
SELECT + cor0.col0 - - cor0.col0 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1075
2080
3237

query I rowsort
SELECT 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) + + 29 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
35
73
86

query I rowsort
SELECT ALL + col2 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT tab2.col2 + col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL + - 91 FROM tab1 GROUP BY tab1.col0
----
-91
-91
-91

query I rowsort
SELECT ALL tab0.col0 * + 59 AS col2 FROM tab0 GROUP BY col0
----
1534
2537
4897

query I rowsort
SELECT + 86 FROM tab1 GROUP BY tab1.col2
----
86
86
86

query I rowsort
SELECT DISTINCT 75 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
75

onlyif mysql # DIV for integer division: 
query I rowsort label-6563
SELECT DISTINCT 36 DIV col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
2

skipif mysql # not compatible
query I rowsort label-6563
SELECT DISTINCT 36 / col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
2

onlyif mysql # DIV for integer division: 
query I rowsort label-6564
SELECT ALL - + COALESCE ( - 45, tab2.col0 ) DIV - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
40
59
61

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-6564
SELECT ALL - + COALESCE ( - 45, tab2.col0 ) / - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
40
59
61

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
124
26
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6566
SELECT DISTINCT - cor0.col2 DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-6566
SELECT DISTINCT - cor0.col2 / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT DISTINCT col0 * - 24 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1968
-528
-672

query I rowsort
SELECT DISTINCT - tab2.col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT - + ( + tab0.col2 ) FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 23 FROM tab0 GROUP BY tab0.col1
----
23

query I rowsort
SELECT 10 FROM tab1 AS cor0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT DISTINCT + ( - 26 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-26

query I rowsort
SELECT + tab1.col2 + + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT ALL + 27 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-6577
SELECT DISTINCT - 77 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1

skipif mysql # not compatible
query I rowsort label-6577
SELECT DISTINCT - 77 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6578
SELECT DISTINCT CAST( 84 AS SIGNED ) * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6804

skipif mysql # not compatible
query I rowsort label-6578
SELECT DISTINCT CAST ( 84 AS INTEGER ) * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6804

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 + - 21 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1840
3458
600

query I rowsort
SELECT - 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6583
SELECT 38 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6583
SELECT 38 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
4

query I rowsort
SELECT ALL - 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-43
-43

query I rowsort
SELECT 12 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
36
50
91

query I rowsort
SELECT 85 - + 3 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
151
169
331

query I rowsort
SELECT DISTINCT ( 43 ) - - col1 * + tab1.col1 FROM tab1 GROUP BY col1
----
1979
3292
79

query I rowsort
SELECT ALL + 67 AS col0 FROM tab0 GROUP BY col1
----
67
67

query I rowsort
SELECT 81 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT ALL - 14 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-14
-14
-14

query I rowsort
SELECT - 66 AS col2 FROM tab0 GROUP BY col1
----
-66
-66

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL tab1.col1 * col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT 92 * 39 FROM tab1 cor0 GROUP BY cor0.col2
----
3588
3588
3588

query I rowsort
SELECT DISTINCT - 95 * tab2.col0 - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1440
-8736
-8832

query I rowsort
SELECT + col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + 25 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1100
1425
150

query I rowsort
SELECT + 39 AS col2 FROM tab1 GROUP BY tab1.col1
----
39
39
39

query I rowsort
SELECT 8 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
8
8
8

query I rowsort
SELECT ALL 67 AS col1 FROM tab1 GROUP BY tab1.col0
----
67
67
67

query I rowsort
SELECT + 35 FROM tab2 AS cor0 GROUP BY col0
----
35
35
35

query I rowsort
SELECT ALL 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT - 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-51
-51
-51

query I rowsort
SELECT ALL - col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0 HAVING ( NULL ) IS NULL AND ( + col2 ) IN ( - col2 )
----

query I rowsort
SELECT - tab2.col2 * - col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT - cor1.col2 * + 91 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-4095
-6461
-728

query I rowsort
SELECT ALL 34 FROM tab0 cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT ALL - tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT + tab0.col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-6611
SELECT col0 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6611
SELECT col0 / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + ( - 68 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-68
-68
-68

query I rowsort
SELECT ALL 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
45
45
45

query I rowsort
SELECT + tab1.col0 + + 87 FROM tab1 GROUP BY col0
----
109
115
169

query I rowsort
SELECT DISTINCT - 58 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-58

query I rowsort
SELECT DISTINCT + 61 FROM tab1 AS cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT 77 AS col0 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
82
82

query I rowsort
SELECT ALL - + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - + tab1.col1 * 64 FROM tab1 GROUP BY col1
----
-2816
-3648
-384

query I rowsort
SELECT ALL + tab2.col2 + + 95 AS col0 FROM tab2 GROUP BY tab2.col2
----
153
174
182

query I rowsort
SELECT ALL + 60 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-11
15
52

onlyif mysql # DIV for integer division: 
query I rowsort label-6623
SELECT + 75 + - cor0.col0 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
74
74
74

skipif mysql # not compatible
query I rowsort label-6623
SELECT + 75 + - cor0.col0 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
74
74
74

query I rowsort
SELECT 81 * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1944
3078
6399

query I rowsort
SELECT ALL 87 FROM tab1 AS cor0 GROUP BY col0
----
87
87
87

query I rowsort
SELECT DISTINCT + 57 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
57

query I rowsort
SELECT DISTINCT - - 51 FROM tab0 GROUP BY tab0.col1
----
51

query I rowsort
SELECT - 85 AS col2 FROM tab2 GROUP BY tab2.col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - 77 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1694
-2156
-6314

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - 8 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
83
84

query I rowsort
SELECT - + 35 FROM tab2 GROUP BY tab2.col1
----
-35
-35
-35

query I rowsort
SELECT 3 FROM tab2 GROUP BY tab2.col1
----
3
3
3

query I rowsort
SELECT 6 + tab0.col2 * 80 AS col0 FROM tab0 GROUP BY tab0.col2
----
1926
3046
6326

query I rowsort
SELECT - cor0.col2 + + 83 * + col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
3581
4686
490

query I rowsort
SELECT ALL 29 AS col1 FROM tab0 GROUP BY tab0.col1
----
29
29

query I rowsort
SELECT ALL - ( - 62 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
62
62
62

query I rowsort
SELECT ALL - - ( + 48 ) + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
130
70
76

query I rowsort
SELECT DISTINCT + - 93 FROM tab0 GROUP BY tab0.col0
----
-93

query I rowsort
SELECT + + tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - tab2.col2 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - 79 FROM tab0 GROUP BY tab0.col2
----
-79
-79
-79

query I rowsort
SELECT + 96 AS col0 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT 83 AS col0 FROM tab0 GROUP BY tab0.col0
----
83
83
83

query I rowsort
SELECT + - 10 FROM tab0 GROUP BY col1
----
-10
-10

query I rowsort
SELECT ALL + 83 AS col1 FROM tab1 GROUP BY tab1.col1
----
83
83
83

query I rowsort
SELECT ALL NULLIF ( - tab2.col0, + tab2.col0 / 50 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - - ( - tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 19 * - tab2.col2 FROM tab2 GROUP BY col2
----
1102
1501
1653

query I rowsort
SELECT - 53 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT ALL - 19 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + - 80 FROM tab2 GROUP BY tab2.col0
----
-80
-80
-80

query I rowsort
SELECT ALL - ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6657
SELECT + CAST( + col1 AS SIGNED ) + 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
105
24

skipif mysql # not compatible
query I rowsort label-6657
SELECT + CAST ( + col1 AS INTEGER ) + 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
105
24

query I rowsort
SELECT DISTINCT + cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-6659
SELECT - ( tab2.col0 ) DIV tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6659
SELECT - ( tab2.col0 ) / tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 55 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT ALL - 8 * + 11 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-88
-88
-88

query I rowsort
SELECT ALL - 59 * + 81 AS col2 FROM tab0 GROUP BY tab0.col1
----
-4779
-4779

query I rowsort
SELECT - 72 FROM tab1 GROUP BY tab1.col1
----
-72
-72
-72

query I rowsort
SELECT DISTINCT 85 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
85

query I rowsort
SELECT 58 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1392
2204
4582

query I rowsort
SELECT ALL - - 74 AS col2 FROM tab0 GROUP BY tab0.col2
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL = NULL
----

query I rowsort
SELECT + tab1.col0 FROM tab1 WHERE ( NULL ) IS NULL GROUP BY col0
----
22
28
82

query I rowsort
SELECT - tab0.col1 - 92 AS col0 FROM tab0 GROUP BY tab0.col1
----
-173
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6670
SELECT cor0.col2 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6670
SELECT cor0.col2 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 - 57 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-19
-33
22

query I rowsort
SELECT - 19 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6674
SELECT ALL cor0.col2 - cor0.col1 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
21
38
79

skipif mysql # not compatible
query I rowsort label-6674
SELECT ALL cor0.col2 - cor0.col1 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
21
38
79

query I rowsort
SELECT cor0.col0 * cor0.col0 + 93 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
577
6817
877

query I rowsort
SELECT ALL - 63 FROM tab1 GROUP BY tab1.col2
----
-63
-63
-63

query I rowsort
SELECT col0 * tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL + cor0.col2 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 8 + cor0.col2 * 48 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
2152
3400
376

query I rowsort
SELECT + 25 + 50 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
75
75
75

query I rowsort
SELECT + + tab1.col1 - 63 FROM tab1 GROUP BY tab1.col1
----
-19
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col1 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 8 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT + 75 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
113
154
99

onlyif mysql # DIV for integer division: 
query I rowsort label-6685
SELECT ALL cor0.col0 + cor0.col0 DIV col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
26
44
85

skipif mysql # not compatible
query I rowsort label-6685
SELECT ALL cor0.col0 + cor0.col0 / col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
26
44
85

query I rowsort
SELECT DISTINCT 31 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
41
59
61

query I rowsort
SELECT - tab2.col1 + + 18 AS col0 FROM tab2 GROUP BY tab2.col1
----
-23
-41
-43

query I rowsort
SELECT ALL 26 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1508
2054
2262

onlyif mysql # DIV for integer division: 
query I rowsort label-6690
SELECT DISTINCT - tab2.col1 DIV 13 + + 34 FROM tab2 GROUP BY tab2.col1
----
30
31

skipif mysql # not compatible
query I rowsort label-6690
SELECT DISTINCT - tab2.col1 / 13 + + 34 FROM tab2 GROUP BY tab2.col1
----
30
31

query I rowsort
SELECT ( + col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 94 FROM tab0 AS cor0 GROUP BY cor0.col2
----
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - tab0.col0 + 13 FROM tab0 GROUP BY tab0.col0
----
-13
-30
-70

query I rowsort
SELECT cor0.col2 + - cor0.col2 * - 68 FROM tab0 AS cor0 GROUP BY col2
----
1656
2622
5451

query I rowsort
SELECT - ( tab2.col0 ) FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - + tab0.col2 - + tab0.col2 FROM tab0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT ALL tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + + tab1.col1 * - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT + 21 FROM tab0 GROUP BY tab0.col1
----
21
21

query I rowsort
SELECT DISTINCT - 13 FROM tab0 GROUP BY tab0.col2
----
-13

query I rowsort
SELECT DISTINCT - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - tab1.col1 * col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT + 11 * 77 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
847
847
847

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col0 FROM tab2 GROUP BY tab2.col0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 + 89 col1 FROM tab1 GROUP BY tab1.col0
----
111
117
171

query I rowsort
SELECT DISTINCT + 83 FROM tab0 GROUP BY tab0.col1
----
83

query I rowsort
SELECT DISTINCT 27 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2214
594
756

query I rowsort
SELECT DISTINCT - 36 + + cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
189
8245
8428

query I rowsort
SELECT ALL + 23 AS col2 FROM tab2 GROUP BY tab2.col2
----
23
23
23

query I rowsort
SELECT cor0.col2 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT ALL - 4 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
42

query I rowsort
SELECT - 77 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-77
-77
-77

query I rowsort
SELECT DISTINCT - tab2.col0 * col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT 40 + cor0.col1 * 79 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
40
40
6439

query I rowsort
SELECT + tab0.col0 * tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT + 76 FROM tab0 GROUP BY tab0.col2
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 col2 FROM tab1 GROUP BY tab1.col2
----
49
49
49

query I rowsort
SELECT + 71 AS col2 FROM tab2 GROUP BY tab2.col2
----
71
71
71

query I rowsort
SELECT DISTINCT + 6 AS col1 FROM tab1 GROUP BY tab1.col1
----
6

query I rowsort
SELECT ALL - - 1 AS col1 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT ALL + - 46 FROM tab0 GROUP BY tab0.col1
----
-46
-46

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab1 GROUP BY tab1.col2
----
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 99 col0 FROM tab0 AS cor0 GROUP BY col2
----
-99

query I rowsort
SELECT DISTINCT 61 FROM tab0 cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT ALL cor0.col2 + - 19 FROM tab1 cor0 GROUP BY cor0.col2
----
-11
26
52

query I rowsort
SELECT DISTINCT - col2 + 75 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3330
5254
592

query I rowsort
SELECT - 15 FROM tab1 GROUP BY tab1.col0
----
-15
-15
-15

query I rowsort
SELECT - 62 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-2542
-3658
-3782

query I rowsort
SELECT 74 FROM tab1 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT DISTINCT - + 40 AS col1 FROM tab1 GROUP BY tab1.col1
----
-40

query I rowsort
SELECT DISTINCT + - NULLIF ( + 48, + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-48

query I rowsort
SELECT ALL + 75 AS col1 FROM tab0 GROUP BY tab0.col1
----
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab1 GROUP BY tab1.col0
----
19

query I rowsort
SELECT DISTINCT col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT col1 * - cor0.col0 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3402
0
0

query I rowsort
SELECT - col2 * - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6744
SELECT - CAST( 39 AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-39
-39
-39

skipif mysql # not compatible
query I rowsort label-6744
SELECT - CAST ( 39 AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-39
-39
-39

query I rowsort
SELECT ALL + 66 FROM tab0 GROUP BY tab0.col2
----
66
66
66

query I rowsort
SELECT 33 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col2
----
33
33
33

query I rowsort
SELECT ALL 26 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT + 96 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
96
96
96

query I rowsort
SELECT NULLIF ( 36, + 82 ) + col1 FROM tab2 GROUP BY tab2.col1
----
77
95
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 col2 FROM tab0 GROUP BY tab0.col0
----
-18
-18
-18

query I rowsort
SELECT 3 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-42
-5
-68

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 37 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-37
-37

query I rowsort
SELECT DISTINCT - 17 FROM tab2 cor0 GROUP BY cor0.col2
----
-17

query I rowsort
SELECT ALL 57 AS col0 FROM tab2 GROUP BY tab2.col0
----
57
57
57

onlyif mysql # DIV for integer division: 
query I rowsort label-6756
SELECT ( 54 ) DIV 74 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
0

skipif mysql # not compatible
query I rowsort label-6756
SELECT ( 54 ) / 74 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT 91 AS col0 FROM tab2 GROUP BY tab2.col2
----
91
91
91

query I rowsort
SELECT DISTINCT + - 14 + tab2.col0 FROM tab2 GROUP BY col0
----
1
77
78

query I rowsort
SELECT DISTINCT - + CASE + tab1.col1 WHEN - col1 THEN - tab1.col1 END + - ( tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT - 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

query I rowsort
SELECT + tab0.col0 + - 0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + 21 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
100
108
79

query I rowsort
SELECT + 59 AS col1 FROM tab0 GROUP BY tab0.col2
----
59
59
59

query I rowsort
SELECT ALL ( - cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 7 + col1 col2 FROM tab2 GROUP BY tab2.col1
----
34
52
54

query I rowsort
SELECT + 69 AS col0 FROM tab0 GROUP BY col2
----
69
69
69

query I rowsort
SELECT ALL 27 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT ALL + 26 + + 66 FROM tab2 GROUP BY tab2.col0
----
92
92
92

query I rowsort
SELECT DISTINCT 59 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
59

query I rowsort
SELECT - 73 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT ALL 7 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT ALL 67 * - col2 FROM tab1 AS cor0 GROUP BY col2
----
-3015
-4757
-536

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0 GROUP BY col2 HAVING NULL <= ( NULL )
----

query I rowsort
SELECT tab1.col2 FROM tab1 WHERE NULL IS NOT NULL GROUP BY tab1.col2 HAVING NOT tab1.col2 < NULL
----

query I rowsort
SELECT col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT 67 FROM tab1 cor0 GROUP BY col0
----
67
67
67

query I rowsort
SELECT 26 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-65
-66
11

onlyif mysql # DIV for integer division: 
query I rowsort label-6780
SELECT DISTINCT - - col1 + col1 DIV + 70 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-6780
SELECT DISTINCT - - col1 + col1 / + 70 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 30 FROM tab0 GROUP BY tab0.col0
----
30
30
30

query I rowsort
SELECT + 96 FROM tab1 GROUP BY tab1.col1
----
96
96
96

query I rowsort
SELECT col2 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT - 90 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-90
-90
-90

query I rowsort
SELECT ALL - - 6 FROM tab2 GROUP BY tab2.col2
----
6
6
6

query I rowsort
SELECT ALL tab2.col2 + - ( + tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + 98 * tab2.col1 FROM tab2 GROUP BY col1
----
4018
5782
5978

query I rowsort
SELECT - 1 + - 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-79
-79
-79

query I rowsort
SELECT tab0.col1 - 12 AS col0 FROM tab0 GROUP BY tab0.col1
----
-12
69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6790
SELECT DISTINCT cor0.col0 * + CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6790
SELECT DISTINCT cor0.col0 * + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 + + 68 FROM tab0 AS cor0 GROUP BY cor0.col1
----
149
68

query I rowsort
SELECT DISTINCT 3 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
273
276
45

query I rowsort
SELECT ALL 64 FROM tab2 AS cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT ALL + 48 AS col2 FROM tab2 GROUP BY col0
----
48
48
48

query I rowsort
SELECT DISTINCT - 80 FROM tab1 GROUP BY tab1.col0
----
-80

query I rowsort
SELECT ALL col1 * + 75 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3075
4425
4575

onlyif mysql # DIV for integer division: 
query I rowsort label-6798
SELECT cor0.col2 DIV - col2 + 45 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
44
44

skipif mysql # not compatible
query I rowsort label-6798
SELECT cor0.col2 / - col2 + 45 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
44
44

query I rowsort
SELECT DISTINCT + - tab2.col1 * - 28 FROM tab2 GROUP BY tab2.col1
----
1148
1652
1708

query I rowsort
SELECT ALL col0 + 6 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28
34
88

query I rowsort
SELECT DISTINCT + + col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 9 col1 FROM tab2 GROUP BY tab2.col1
----
9
9
9

query I rowsort
SELECT DISTINCT - 52 AS col2 FROM tab1 GROUP BY tab1.col1
----
-52

query I rowsort
SELECT DISTINCT cor0.col0 * - 87 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-1906
-2391
-7063

query I rowsort
SELECT ALL + 30 AS col1 FROM tab1 GROUP BY tab1.col2
----
30
30
30

query I rowsort
SELECT DISTINCT + 23 AS col0 FROM tab2 GROUP BY tab2.col0
----
23

query I rowsort
SELECT + - 50 AS col2 FROM tab1 GROUP BY tab1.col0
----
-50
-50
-50

query I rowsort
SELECT ALL 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
95
95
95

query I rowsort
SELECT ALL + 14 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1274
1288
210

query I rowsort
SELECT ALL 48 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2112
2736
288

query I rowsort
SELECT DISTINCT + 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56

query I rowsort
SELECT + 27 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
27
27
27

query I rowsort
SELECT DISTINCT - 67 + + 55 FROM tab2 GROUP BY tab2.col2
----
-12

query I rowsort
SELECT + 30 FROM tab1 AS cor0 GROUP BY col2
----
30
30
30

query I rowsort
SELECT - 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT ALL - 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-98
-98
-98

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 DISTINCT + - tab1.col2 * + 94 FROM tab1 GROUP BY tab1.col2
----
-4230
-6674
-752

query I rowsort
SELECT 15 FROM tab0 GROUP BY tab0.col0
----
15
15
15

query I rowsort
SELECT 32 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT - tab2.col1 * + 97 FROM tab2 GROUP BY tab2.col1
----
-3977
-5723
-5917

query I rowsort
SELECT ALL + + 69 FROM tab2 GROUP BY tab2.col1
----
69
69
69

onlyif mysql # DIV for integer division: 
query I rowsort label-6823
SELECT + 3 DIV - cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-6823
SELECT + 3 / - cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 7 FROM tab0 GROUP BY tab0.col2
----
7
7
7

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6826
SELECT - tab2.col2 DIV 46 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6826
SELECT - tab2.col2 / 46 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT + ( + 52 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
52
52
52

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 9 + - cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-475
-6715
-775

query I rowsort
SELECT + col2 * + 26 + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
1566
2133
2349

query I rowsort
SELECT ALL - cor0.col0 * col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT tab1.col1 * 44 FROM tab1 GROUP BY tab1.col1
----
1936
2508
264

query I rowsort
SELECT DISTINCT - - tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6834
SELECT DISTINCT tab0.col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6834
SELECT DISTINCT tab0.col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL 47 AS col0 FROM tab1 GROUP BY tab1.col0
----
47
47
47

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col2 - - ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-38
-79
57

query I rowsort
SELECT ALL 85 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
4930
6715
7395

query I rowsort
SELECT 62 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5642
-5704
-930

query I rowsort
SELECT + 51 + + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
134
77
94

query I rowsort
SELECT DISTINCT cor0.col2 * - 61 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2745
-4331
-488

query I rowsort
SELECT 89 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
89
89
89

query I rowsort
SELECT ALL + 56 AS col1 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
56
56
56

query I rowsort
SELECT + + 14 AS col0 FROM tab0 GROUP BY tab0.col1
----
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 70 col0 FROM tab1 GROUP BY tab1.col1
----
70
70
70

query I rowsort
SELECT + - 53 * 86 FROM tab1 GROUP BY tab1.col1
----
-4558
-4558
-4558

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6849
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6849
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 GROUP BY col1
----
NULL

query I rowsort
SELECT ALL + 44 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2552
-3476
-3828

query I rowsort
SELECT + 70 - + 62 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT - cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, col2
----
1444
576
6241

query I rowsort
SELECT ALL + - 68 AS col2 FROM tab2 GROUP BY tab2.col0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + 21 + 46 FROM tab1 GROUP BY tab1.col2
----
67

query I rowsort
SELECT - 16 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1264
-1392
-928

query I rowsort
SELECT - 9 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-405
-639
-72

query I rowsort
SELECT - cor0.col0 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
0
0
0

query I rowsort
SELECT ALL - 22 FROM tab1 GROUP BY tab1.col0
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - 64 col2 FROM tab2 GROUP BY col0
----
-49
27
28

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + 53 AS col0 FROM tab0 GROUP BY col2
----
53
53
53

query I rowsort
SELECT + + tab1.col1 + 29 FROM tab1 GROUP BY tab1.col1
----
35
73
86

query I rowsort
SELECT - 8 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-8
-8
-8

query I rowsort
SELECT DISTINCT - 47 * + 20 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + + 78 AS col0 FROM tab2 GROUP BY tab2.col0
----
78
78
78

query I rowsort
SELECT 64 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL ( 22 ) * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1562
176
990

query I rowsort
SELECT ALL 26 FROM tab2 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT + tab1.col0 - 12 FROM tab1 GROUP BY tab1.col0
----
10
16
70

query I rowsort
SELECT - 37 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-37
-37
-37

query I rowsort
SELECT 18 FROM tab0 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col1 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
-26
-3526
-83

query I rowsort
SELECT + 1 FROM tab0 GROUP BY tab0.col1
----
1
1

query I rowsort
SELECT ALL + 97 FROM tab0 GROUP BY tab0.col1
----
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 34 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-34
-34
-34

query I rowsort
SELECT 78 + - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
21
34
72

query I rowsort
SELECT ALL - tab1.col2 * - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - 47 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-47

query I rowsort
SELECT + cor0.col2 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
6
6
6

query I rowsort
SELECT 43 * + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1204
3526
946

query I rowsort
SELECT DISTINCT - 81 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-81

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6888
SELECT DISTINCT + tab0.col2 DIV - tab0.col2 FROM tab0 GROUP BY col2
----
-1

skipif mysql # not compatible
query I rowsort label-6888
SELECT DISTINCT + tab0.col2 / - tab0.col2 FROM tab0 GROUP BY col2
----
-1

query I rowsort
SELECT DISTINCT + tab1.col0 * - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - + 97 + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-97
6464

query I rowsort
SELECT ALL 72 FROM tab2 GROUP BY tab2.col0
----
72
72
72

query I rowsort
SELECT - 6 FROM tab2 AS cor0 GROUP BY col1
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 89 AS col2 FROM tab1 GROUP BY tab1.col0
----
-89
-89
-89

onlyif mysql # DIV for integer division: 
query I rowsort label-6895
SELECT ALL - - 49 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-6895
SELECT ALL - - 49 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
3

query I rowsort
SELECT ALL - tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT 74 * - cor0.col2 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1733
-2729
-5820

query I rowsort
SELECT DISTINCT - 38 AS col0 FROM tab0 GROUP BY tab0.col2
----
-38

query I rowsort
SELECT col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - 76 FROM tab0 GROUP BY tab0.col1
----
-76
-76

query I rowsort
SELECT cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2, cor1.col2, cor0.col2
----
9 values hashing to 7a3bee88c68cb011ab3d0cb5e0bd7e7c

query I rowsort
SELECT 67 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1608
2546
5293

query I rowsort
SELECT DISTINCT + 97 - 88 FROM tab1 GROUP BY tab1.col0
----
9

query I rowsort
SELECT + + tab2.col1 - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6905
SELECT DISTINCT - cor0.col2 DIV cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-6905
SELECT DISTINCT - cor0.col2 / cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING ( NULL ) IS NULL
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - ( + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - 15 AS col2 FROM tab1 GROUP BY tab1.col1
----
-15
-15
-15

query I rowsort
SELECT ALL + ( tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - 87 AS col1 FROM tab1 GROUP BY tab1.col1
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 90 AS col2 FROM tab2 GROUP BY tab2.col0
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL col1 + - 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-22
-24
-42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6917
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6917
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 17 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-21
-62
-7

query I rowsort
SELECT DISTINCT 19 AS col1 FROM tab1 GROUP BY tab1.col1
----
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 32 * - col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1408
-1824
-192

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6921
SELECT ALL + CAST( NULL AS SIGNED ) col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6921
SELECT ALL + CAST ( NULL AS INTEGER ) col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - + 95 AS col1 FROM tab0 GROUP BY tab0.col1
----
-95

query I rowsort
SELECT DISTINCT + 34 * 39 AS col2 FROM tab2 GROUP BY tab2.col1
----
1326

query I rowsort
SELECT DISTINCT 77 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
77

query I rowsort
SELECT 29 AS col0 FROM tab1 GROUP BY tab1.col0
----
29
29
29

query I rowsort
SELECT - 90 FROM tab0 GROUP BY tab0.col2
----
-90
-90
-90

query I rowsort
SELECT + 68 * + 1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT DISTINCT + 77 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
77

query I rowsort
SELECT DISTINCT 49 FROM tab0 GROUP BY tab0.col1
----
49

query I rowsort
SELECT DISTINCT - - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL 49 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT ALL cor0.col1 * 61 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2501
3599
3721

query I rowsort
SELECT ( 47 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
47
47
47

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + + COALESCE ( + 80, - tab0.col1 + col2 ) - + 10 FROM tab0 GROUP BY tab0.col1
----
70
70

query I rowsort
SELECT ALL + - 59 * 79 AS col0 FROM tab2 GROUP BY col1
----
-4661
-4661
-4661

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

query I rowsort
SELECT DISTINCT tab0.col2 AS col0 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6938
SELECT - - tab2.col1 DIV 80 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6938
SELECT - - tab2.col1 / 80 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 * 96 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1440
8736
8832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 16 col0 FROM tab0 GROUP BY tab0.col0
----
16

onlyif mysql # DIV for integer division: 
query I rowsort label-6942
SELECT 88 DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, col0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-6942
SELECT 88 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, col0
----
1
3
4

query I rowsort
SELECT ALL + - tab1.col2 * - 80 AS col2 FROM tab1 GROUP BY tab1.col2
----
3600
5680
640

query I rowsort
SELECT ALL + tab2.col2 + + 75 AS col0 FROM tab2 GROUP BY tab2.col2
----
133
154
162

query I rowsort
SELECT ALL 57 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
2508
3249
342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col1, col0, cor0.col0
----
124
26
83

query I rowsort
SELECT ALL - ( 15 ) FROM tab1 GROUP BY tab1.col0
----
-15
-15
-15

onlyif mysql # DIV for integer division: 
query I rowsort label-6948
SELECT DISTINCT + col1 DIV - 26 FROM tab1 GROUP BY tab1.col1
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6948
SELECT DISTINCT + col1 / - 26 FROM tab1 GROUP BY tab1.col1
----
-1
-2
0

query I rowsort
SELECT DISTINCT 5 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + 65 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-14
27
41

query I rowsort
SELECT + 49 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT DISTINCT + NULLIF ( + 61, col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
61

query I rowsort
SELECT 9 FROM tab1 AS cor0 GROUP BY col1
----
9
9
9

query I rowsort
SELECT 51 FROM tab1 cor0 GROUP BY col1
----
51
51
51

query I rowsort
SELECT DISTINCT + cor0.col0 * 27 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2457
2484
405

query I rowsort
SELECT ALL tab1.col0 + + ( - 9 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
13
19
73

onlyif mysql # DIV for integer division: 
query I rowsort label-6957
SELECT DISTINCT + tab1.col1 DIV + 78 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

skipif mysql # not compatible
query I rowsort label-6957
SELECT DISTINCT + tab1.col1 / + 78 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT DISTINCT tab0.col1 * 81 FROM tab0 GROUP BY tab0.col1
----
0
6561

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

query I rowsort
SELECT ALL cor0.col1 - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-32
-51
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
70
70
70

query I rowsort
SELECT DISTINCT 48 AS col0 FROM tab0 GROUP BY tab0.col0
----
48

query I rowsort
SELECT DISTINCT 74 FROM tab2 AS cor0 GROUP BY col2
----
74

query I rowsort
SELECT ALL + - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL + 86 + + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
167
86

query I rowsort
SELECT - 28 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col0
----
-28
-28
-28

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT + col1 + - ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2

query I rowsort
SELECT - 61 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-61
-61
-61

query I rowsort
SELECT ALL 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT 44 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
127
70
87

query I rowsort
SELECT - 95 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-95
-95
-95

query I rowsort
SELECT - 55 AS col2 FROM tab1 GROUP BY tab1.col0
----
-55
-55
-55

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 66 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-21
-58
5

query I rowsort
SELECT ALL 93 FROM tab2 GROUP BY tab2.col2
----
93
93
93

query I rowsort
SELECT col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - NULLIF ( - cor0.col0, - cor0.col2 ) * + cor0.col0 + 34 col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
518
6758
818

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 58 + - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
-21
20
34

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 66, tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
66
66
66

query I rowsort
SELECT ALL 65 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2860
3705
390

query I rowsort
SELECT + cor0.col1 + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT + cor0.col1 + + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6988
SELECT ALL + + NULLIF ( + tab0.col1, CAST( NULL AS SIGNED ) ) * 2 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

skipif mysql # not compatible
query I rowsort label-6988
SELECT ALL + + NULLIF ( + tab0.col1, CAST ( NULL AS INTEGER ) ) * 2 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

query I rowsort
SELECT ( - 81 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-81
-81
-81

query I rowsort
SELECT ALL - 62 AS col2 FROM tab0 GROUP BY tab0.col0
----
-62
-62
-62

query I rowsort
SELECT 28 * col0 FROM tab0 GROUP BY tab0.col0
----
1204
2324
728

query I rowsort
SELECT ALL + - 65 + - cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-103
-144
-89

query I rowsort
SELECT - 26 FROM tab0 GROUP BY tab0.col2
----
-26
-26
-26

query I rowsort
SELECT 32 FROM tab0 GROUP BY tab0.col1
----
32
32

query I rowsort
SELECT ALL + col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING col1 IS NOT NULL
----
41
59
61

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT + tab2.col2 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - - 93 AS col2 FROM tab0 GROUP BY col1
----
93
93

query I rowsort
SELECT + + tab1.col2 * + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col1 + - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3402

query I rowsort
SELECT ALL - 19 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-19
-19
-19

query I rowsort
SELECT ALL - 25 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT DISTINCT + 48 + - 12 * - 88 FROM tab1 GROUP BY tab1.col0
----
1104

query I rowsort
SELECT ALL - + 29 + + tab0.col0 * + 87 AS col0 FROM tab0 GROUP BY tab0.col0
----
2233
3712
7192

query I rowsort
SELECT ALL + 24 FROM tab0 GROUP BY tab0.col0
----
24
24
24

query I rowsort
SELECT ALL 5 FROM tab1 AS cor0 GROUP BY col2
----
5
5
5

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 ALL + 72 AS col2 FROM tab0 GROUP BY tab0.col0
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 col0 FROM tab0 GROUP BY tab0.col0
----
46
46
46

query I rowsort
SELECT - 71 - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-153
-93
-99

query I rowsort
SELECT 80 + - cor0.col1 * col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6481
80

query I rowsort
SELECT DISTINCT + ( - 67 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-67

query I rowsort
SELECT + 49 AS col0 FROM tab2 GROUP BY tab2.col0
----
49
49
49

query I rowsort
SELECT ALL 71 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
109
150
95

query I rowsort
SELECT ALL + col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + ( - col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab1 GROUP BY tab1.col1
----
50

query I rowsort
SELECT DISTINCT + tab2.col1 + + 35 FROM tab2 GROUP BY tab2.col1
----
76
94
96

query I rowsort
SELECT DISTINCT + + 97 FROM tab1 GROUP BY tab1.col1
----
97

query I rowsort
SELECT + 2 FROM tab0 AS cor0 GROUP BY col0
----
2
2
2

query I rowsort
SELECT DISTINCT 30 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col2
----
30

query I rowsort
SELECT DISTINCT - - 49 FROM tab2 GROUP BY tab2.col0
----
49

onlyif mysql # DIV for integer division: 
query I rowsort label-7025
SELECT ALL 50 DIV - 58 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-7025
SELECT ALL 50 / - 58 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL + tab0.col2 - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) IS NOT NULL
----
0
0
0

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
37

query I rowsort
SELECT - 59 * 71 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-4189
-4189
-4189

query I rowsort
SELECT + 96 - + 86 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-6870
96

query I rowsort
SELECT DISTINCT cor0.col1 + + col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
126
28
85

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + + tab0.col2 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - 3 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42
5
68

query I rowsort
SELECT DISTINCT + 50 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
50

query I rowsort
SELECT cor0.col1 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7038
SELECT ALL + tab1.col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7038
SELECT ALL + tab1.col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 - - 91 FROM tab1 GROUP BY tab1.col2
----
20
46
83

query I rowsort
SELECT ALL - tab1.col2 * + 32 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1440
-2272
-256

query I rowsort
SELECT ALL 64 FROM tab2 GROUP BY tab2.col2
----
64
64
64

query I rowsort
SELECT DISTINCT + - ( + 90 ) * + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-7290
0

query I rowsort
SELECT DISTINCT tab1.col0 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT cor0.col1 * cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT ALL - 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

query I rowsort
SELECT tab1.col0 + 38 AS col2 FROM tab1 GROUP BY tab1.col0
----
120
60
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT - - 17 - 30 FROM tab2 GROUP BY tab2.col0
----
-13

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab1 GROUP BY tab1.col2
----
39

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
0

query I rowsort
SELECT ALL - cor0.col0 * - 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2730
2760
450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 - 25 * 23 col1 FROM tab1 GROUP BY tab1.col1
----
-518
-531
-569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * - col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1032
-2054
-3154

query I rowsort
SELECT DISTINCT + ( tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - tab0.col1 + - 59 FROM tab0 GROUP BY tab0.col1
----
-140
-59

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
99

query I rowsort
SELECT + 22 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT - 0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL 12 * 4 FROM tab0 AS cor0 GROUP BY cor0.col1
----
48
48

query I rowsort
SELECT - cor0.col1 + cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1722
-3540
-3782

query I rowsort
SELECT 98 AS col0 FROM tab2 GROUP BY tab2.col2
----
98
98
98

query I rowsort
SELECT - 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-43
-43
-43

query I rowsort
SELECT col0 + - 57 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-42
34
35

onlyif mysql # DIV for integer division: 
query I rowsort label-7064
SELECT ALL + cor0.col1 + + cor0.col1 DIV + 1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
162

skipif mysql # not compatible
query I rowsort label-7064
SELECT ALL + cor0.col1 + + cor0.col1 / + 1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
162

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + ( 58 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT - 71 FROM tab1 GROUP BY tab1.col0
----
-71
-71
-71

query I rowsort
SELECT - + 70 AS col0 FROM tab0 GROUP BY tab0.col0
----
-70
-70
-70

query I rowsort
SELECT ALL - - 26 * tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
2132
572
728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 8 col1 FROM tab2 GROUP BY col0
----
8

query I rowsort
SELECT DISTINCT - + 10 + + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
12
18
72

onlyif mysql # DIV for integer division: 
query I rowsort label-7072
SELECT ALL - - tab1.col2 DIV - col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7072
SELECT ALL - - tab1.col2 / - col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

query I rowsort
SELECT 92 FROM tab2 GROUP BY tab2.col1
----
92
92
92

query I rowsort
SELECT 58 AS col0 FROM tab0 GROUP BY tab0.col1
----
58
58

query I rowsort
SELECT 97 AS col1 FROM tab1 GROUP BY tab1.col2
----
97
97
97

query I rowsort
SELECT - 27 AS col0 FROM tab1 GROUP BY tab1.col2
----
-27
-27
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
142
16
90

query I rowsort
SELECT - cor0.col2 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT 29 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29

query I rowsort
SELECT DISTINCT 11 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-242
-308
-902

query I rowsort
SELECT + 24 AS col0 FROM tab2 GROUP BY tab2.col0
----
24
24
24

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT 50 FROM tab0 cor0 GROUP BY cor0.col1
----
50
50

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
93

query I rowsort
SELECT + 98 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
7938

query I rowsort
SELECT - 87 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

query I rowsort
SELECT DISTINCT + 53 FROM tab1 GROUP BY tab1.col1
----
53

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 3 + cor0.col2 * col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
1263
179
5825

query I rowsort
SELECT + 19 FROM tab0 GROUP BY tab0.col0
----
19
19
19

query I rowsort
SELECT - tab1.col2 + tab1.col2 AS col1 FROM tab1 WHERE NOT ( tab1.col2 ) IS NOT NULL GROUP BY tab1.col2
----

query I rowsort
SELECT - 16 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-16
-16
-16

query I rowsort
SELECT - cor0.col1 * 91 + cor0.col1 * col2 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
-1353
-244
-708

query I rowsort
SELECT DISTINCT + 4 FROM tab2 GROUP BY tab2.col1
----
4

query I rowsort
SELECT + 79 AS col1 FROM tab2 GROUP BY tab2.col1
----
79
79
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7096
SELECT DISTINCT - 73 DIV tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-4
0

skipif mysql # not compatible
query I rowsort label-7096
SELECT DISTINCT - 73 / tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-4
0

query I rowsort
SELECT DISTINCT + 52 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52

query I rowsort
SELECT ALL tab1.col0 + - tab1.col0 AS col0 FROM tab1 WHERE NOT tab1.col1 IS NULL GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL + col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 84 + - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
46
5
60

onlyif mysql # DIV for integer division: 
query I rowsort label-7101
SELECT 56 DIV tab1.col0 + + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
24
30
82

skipif mysql # not compatible
query I rowsort label-7101
SELECT 56 / tab1.col0 + + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
24
30
82

query I rowsort
SELECT DISTINCT - ( 52 ) + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-52
29

query I rowsort
SELECT DISTINCT - ( 66 ) + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-38
-44
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( cor0.col1 ) col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + - 72 FROM tab0 GROUP BY tab0.col1
----
-72

query I rowsort
SELECT + 64 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT ALL 72 FROM tab2 cor0 GROUP BY col2
----
72
72
72

query I rowsort
SELECT 11 FROM tab0 cor0 GROUP BY cor0.col0
----
11
11
11

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 40, tab0.col2 + + 50 ) + + 13 FROM tab0 GROUP BY col0
----
-27

query I rowsort
SELECT ALL - - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + - 51 FROM tab1 GROUP BY tab1.col1
----
-51
-51
-51

query I rowsort
SELECT ALL + - tab1.col2 + tab1.col2 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 91, tab1.col0 * + tab1.col2, COALESCE ( tab1.col0, - tab1.col1, tab1.col0 * tab1.col2, col0 ) + - col0 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
-91
-91
-91

query I rowsort
SELECT - cor0.col1 * 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3034
-4366
-4514

onlyif mysql # DIV for integer division: 
query I rowsort label-7116
SELECT ALL + + 20 DIV tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7116
SELECT ALL + + 20 / tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL - 73 AS col2 FROM tab1 GROUP BY tab1.col0
----
-73
-73
-73

query I rowsort
SELECT + tab2.col2 + tab2.col2 AS col0 FROM tab2 WHERE NOT ( - tab2.col2 ) IS NULL GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT + tab2.col0 * - tab2.col0 FROM tab2 WHERE NOT + tab2.col2 IS NULL GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7121
SELECT DISTINCT - cor0.col1 / CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7121
SELECT DISTINCT - cor0.col1 / CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7122
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7122
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT - - 16 FROM tab1 GROUP BY col1
----
16
16
16

query I rowsort
SELECT - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT + tab0.col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7126
SELECT cor0.col1 DIV cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7126
SELECT cor0.col1 / cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT 19 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-26
-52
11

query I rowsort
SELECT + 59 AS col0 FROM tab2 GROUP BY tab2.col1
----
59
59
59

query I rowsort
SELECT + 53 FROM tab1 cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT + 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
83

query I rowsort
SELECT DISTINCT tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + ( tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab0.col2 + + 78 * tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
1896
3002
6241

query I rowsort
SELECT DISTINCT + + col1 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT - tab0.col1 + - col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT 30 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
30
30
30

query I rowsort
SELECT + 32 FROM tab1 AS cor0 GROUP BY col0
----
32
32
32

query I rowsort
SELECT ALL + - col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + tab0.col2 * + 4 FROM tab0 GROUP BY tab0.col2
----
152
316
96

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT + - col2 - + 20 AS col1 FROM tab2 GROUP BY tab2.col2
----
-107
-78
-99

query I rowsort
SELECT tab1.col1 * + 99 AS col1 FROM tab1 GROUP BY tab1.col1
----
4356
5643
594

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + 98 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
4410
6958
784

query I rowsort
SELECT DISTINCT 80 + + 66 AS col0 FROM tab0 GROUP BY tab0.col1
----
146

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 24 col0 FROM tab1 GROUP BY tab1.col2
----
24

query I rowsort
SELECT DISTINCT 46 + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
128
68
74

query I rowsort
SELECT DISTINCT - ( - ( + tab2.col0 ) ) AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT tab2.col2 * 93 AS col1 FROM tab2 GROUP BY tab2.col2
----
5394
7347
8091

query I rowsort
SELECT 63 AS col0 FROM tab1 GROUP BY col1
----
63
63
63

query I rowsort
SELECT ALL 91 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col1 - 91 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-34
-47
-85

query I rowsort
SELECT DISTINCT + 7 * cor0.col1 FROM tab1 cor0 GROUP BY col2, col1
----
308
399
42

query I rowsort
SELECT - 51 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-36
40
41

query I rowsort
SELECT DISTINCT cor1.col1 AS col0 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT - 52 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-52

query I rowsort
SELECT ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT 95 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
95
95
95

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - 66 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-66
-66
-66

onlyif mysql # DIV for integer division: 
query I rowsort label-7162
SELECT - ( cor0.col0 ) DIV 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7162
SELECT - ( cor0.col0 ) / 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7163
SELECT DISTINCT - 35 DIV + 14 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2

skipif mysql # not compatible
query I rowsort label-7163
SELECT DISTINCT - 35 / + 14 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-7164
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-7164
SELECT - tab1.col0 / - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT cor0.col0 * col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT 59 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
59
59
59

query I rowsort
SELECT - 48 FROM tab1 GROUP BY tab1.col2
----
-48
-48
-48

query I rowsort
SELECT ALL 27 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
27
27
27

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT ALL - 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-72
-72
-72

query I rowsort
SELECT - tab0.col2 + + tab0.col2 FROM tab0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 - 63 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-20
-37
20

query I rowsort
SELECT + cor0.col0 - + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 40 AS col1 FROM tab0 GROUP BY tab0.col1
----
40
40

query I rowsort
SELECT tab0.col1 * tab0.col1 + + 99 AS col1 FROM tab0 GROUP BY tab0.col1
----
6660
99

query I rowsort
SELECT ALL 49 AS col0 FROM tab2 GROUP BY tab2.col2
----
49
49
49

query I rowsort
SELECT DISTINCT - 56 + + 83 AS col2 FROM tab2 GROUP BY tab2.col1
----
27

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT 26 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-1508
-2054
-2262

query I rowsort
SELECT ALL + - 80 - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-125
-151
-88

query I rowsort
SELECT + 73 FROM tab0 GROUP BY tab0.col0
----
73
73
73

query I rowsort
SELECT + 46 AS col1 FROM tab1 GROUP BY tab1.col0
----
46
46
46

query I rowsort
SELECT + 92 + 88 FROM tab2 GROUP BY col1
----
180
180
180

query I rowsort
SELECT 97 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT ALL + 34 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
34
34
34

query I rowsort
SELECT - 7 AS col2 FROM tab0 GROUP BY tab0.col1
----
-7
-7

query I rowsort
SELECT + col2 FROM tab1 WHERE NOT tab1.col0 IS NULL GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + - 89 FROM tab1 GROUP BY col1
----
-89
-89
-89

query I rowsort
SELECT DISTINCT cor0.col0 + 58 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
149
150
73

query I rowsort
SELECT 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT DISTINCT cor0.col0 + 24 FROM tab0 cor0 GROUP BY cor0.col0
----
107
50
67

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + 99 FROM tab0 GROUP BY col1
----
99
99

query I rowsort
SELECT + + 36 FROM tab0 GROUP BY col2
----
36
36
36

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 * tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
-3330
-5254
-592

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL tab1.col1 * 59 AS col1 FROM tab1 GROUP BY tab1.col1
----
2596
3363
354

query I rowsort
SELECT DISTINCT - col1 + + 8 AS col0 FROM tab1 GROUP BY tab1.col1
----
-36
-49
2

onlyif mysql # DIV for integer division: 
query I rowsort label-7204
SELECT + 67 DIV - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7204
SELECT + 67 / - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - + 4 - + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-26
-32
-86

query I rowsort
SELECT DISTINCT + - 6 FROM tab2 GROUP BY col2
----
-6

query I rowsort
SELECT ALL + 57 FROM tab1 GROUP BY tab1.col2
----
57
57
57

query I rowsort
SELECT ( 25 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - tab2.col0 ) col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 91 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
149
170
178

query I rowsort
SELECT ALL - 32 AS col2 FROM tab2 GROUP BY tab2.col2
----
-32
-32
-32

query I rowsort
SELECT ( - tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + NULLIF ( cor0.col2, - cor0.col1 + cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
NULL
NULL

query I rowsort
SELECT + + 39 FROM tab1 GROUP BY tab1.col2
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col2 + 20 col0 FROM tab2 GROUP BY tab2.col2
----
107
78
99

query I rowsort
SELECT + 52 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
52
52
52

query I rowsort
SELECT DISTINCT - CASE - 23 WHEN cor0.col0 * 11 THEN - 89 ELSE NULL END + - cor0.col1 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT - ( 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 - - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT + tab2.col2 * - 39 FROM tab2 GROUP BY tab2.col2
----
-2262
-3081
-3393

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + tab0.col1 * 26 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
2106

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + 25 * COALESCE ( tab0.col1, - col1 + tab0.col1 * - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
-2025
0

query I rowsort
SELECT + 72 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT cor0.col0 - - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT tab2.col0 * 63 AS col2 FROM tab2 GROUP BY tab2.col0
----
5733
5796
945

query I rowsort
SELECT DISTINCT + - tab1.col2 + - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 72 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT DISTINCT + - 58 * - tab0.col0 FROM tab0 GROUP BY col0
----
1508
2494
4814

query I rowsort
SELECT - 79 FROM tab1 GROUP BY col2
----
-79
-79
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
55
55
55

query I rowsort
SELECT - cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - tab1.col2 * tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT + 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT 45 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL 86 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1892
-2408
-7052

query I rowsort
SELECT ALL 45 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT + ( + 91 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor0.col2
----
91
91
91

query I rowsort
SELECT ALL + + 60 FROM tab1 GROUP BY tab1.col2
----
60
60
60

query I rowsort
SELECT ALL - tab2.col2 * 69 FROM tab2 GROUP BY tab2.col2
----
-4002
-5451
-6003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col1 col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0, cor1.col1
----
0
81

query I rowsort
SELECT - col1 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
102
150
170

query I rowsort
SELECT ALL - + 27 FROM tab1 GROUP BY tab1.col1
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + 78 + + 75 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
153

query I rowsort
SELECT + ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL + 64 FROM tab2 GROUP BY tab2.col0
----
64
64
64

query I rowsort
SELECT - 34 * + 83 FROM tab0 GROUP BY tab0.col0
----
-2822
-2822
-2822

query I rowsort
SELECT - 31 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-31
-31
-31

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL - - col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT COALESCE ( - tab2.col2, 43 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + 5 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5
5

query I rowsort
SELECT + 81 * cor0.col1 - 54 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3267
4725
4887

query I rowsort
SELECT col0 * + 13 FROM tab2 GROUP BY col0
----
1183
1196
195

query I rowsort
SELECT + col2 * - cor0.col2 + 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1965
-4
-4981

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
----
114
12
88

query I rowsort
SELECT NULLIF ( 56, + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
56
56
56

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 13, tab2.col0 * 65, - tab2.col1 * tab2.col0 + tab2.col2 ) FROM tab2 GROUP BY tab2.col0
----
13
13
13

query I rowsort
SELECT ALL + cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1444
576
6241

query I rowsort
SELECT ALL 89 FROM tab1 GROUP BY tab1.col0
----
89
89
89

query I rowsort
SELECT + 51 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT - 73 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-73
-73
-73

query I rowsort
SELECT DISTINCT - + 53 AS col1 FROM tab1 GROUP BY tab1.col0
----
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 86 col0 FROM tab1 GROUP BY tab1.col0
----
86
86
86

query I rowsort
SELECT ALL col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT + tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT - 14 - 81 AS col1 FROM tab2 GROUP BY tab2.col1
----
-95
-95
-95

query I rowsort
SELECT DISTINCT tab0.col1 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - 49 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
2842
3871
4263

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col2 FROM tab2 GROUP BY tab2.col1
----
-7
-7
-7

query I rowsort
SELECT DISTINCT + 79 FROM tab2 GROUP BY tab2.col2
----
79

query I rowsort
SELECT ALL - tab2.col1 * 29 - - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1148
-1652
-1708

query I rowsort
SELECT ALL + 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-7282
SELECT ALL - cor0.col0 DIV + cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7282
SELECT ALL - cor0.col0 / + cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col1 + - 73 * + 18 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1257
-1270
-1308

query I rowsort
SELECT ALL + cor0.col2 * NULLIF ( cor0.col1, cor0.col2 * cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - cor0.col1 + - 61 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-142
-61
-61

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7287
SELECT CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7287
SELECT CAST ( NULL AS REAL ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 + - 48 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1128
-1786
-3713

query I rowsort
SELECT col1 + ( 19 ) FROM tab2 GROUP BY col1
----
60
78
80

query I rowsort
SELECT - ( 17 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + - 87 AS col0 FROM tab0 GROUP BY tab0.col2
----
-87

query I rowsort
SELECT ALL 85 * + cor0.col0 - CASE - cor0.col0 WHEN + cor0.col1 + - cor0.col1 THEN - cor0.col0 ELSE NULL END * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 77 FROM tab1 AS cor0 GROUP BY col1
----
-77
-77
-77

query I rowsort
SELECT DISTINCT cor0.col0 - - cor0.col2 * + 87 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
5138
6964
7584

query I rowsort
SELECT 14 AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
14
14
14

query I rowsort
SELECT + 81 FROM tab1 GROUP BY tab1.col2
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( tab0.col2, tab0.col2 ) col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 97 AS col1 FROM tab2 GROUP BY tab2.col0
----
-97
-97
-97

query I rowsort
SELECT 41 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT 83 - - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
174
175
98

query I rowsort
SELECT - 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT - tab2.col1 + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT DISTINCT + tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col0 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
1305
5336
7189

onlyif mysql # DIV for integer division: 
query I rowsort label-7305
SELECT - - col2 DIV - 85 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7305
SELECT - - col2 / - 85 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 91 FROM tab0 GROUP BY tab0.col1
----
-91

query I rowsort
SELECT + ( 13 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 46 + 30 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - 66 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-66

query I rowsort
SELECT col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - tab0.col0 - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT - ( col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----
-24
-38
-79

query I rowsort
SELECT tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NOT NULL
----
1936
3249
36

query I rowsort
SELECT ALL - cor0.col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-132
-1596
-3608

query I rowsort
SELECT 54 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 40 AS col1 FROM tab0 GROUP BY tab0.col2
----
40
40
40

onlyif mysql # DIV for integer division: 
query I rowsort label-7319
SELECT 23 DIV col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7319
SELECT 23 / col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
1

query I rowsort
SELECT DISTINCT - 51 FROM tab2 AS cor0 GROUP BY col1
----
-51

query I rowsort
SELECT - 85 + - tab0.col1 FROM tab0 GROUP BY col1
----
-166
-85

query I rowsort
SELECT DISTINCT - 72 FROM tab1 GROUP BY tab1.col0
----
-72

query I rowsort
SELECT - + 41 AS col0 FROM tab1 GROUP BY tab1.col2
----
-41
-41
-41

query I rowsort
SELECT + 54 AS col2 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT 66 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
111
137
74

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL cor1.col2 - cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL tab1.col2 + COALESCE ( 48, - tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
119
56
93

query I rowsort
SELECT - tab2.col0 * + 2 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7330
SELECT - CAST( NULL AS SIGNED ) + 66 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7330
SELECT - CAST ( NULL AS INTEGER ) + 66 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT + cor0.col1 - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7333
SELECT CAST( - 46 AS SIGNED ) + + 77 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1201
-7053
-7130

skipif mysql # not compatible
query I rowsort label-7333
SELECT CAST ( - 46 AS INTEGER ) + + 77 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1201
-7053
-7130

query I rowsort
SELECT ALL 60 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
92

query I rowsort
SELECT - 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-70
-70
-70

query I rowsort
SELECT ( cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - 4 FROM tab0 GROUP BY tab0.col2
----
-4
-4
-4

query I rowsort
SELECT - + 41 AS col1 FROM tab0 GROUP BY tab0.col2
----
-41
-41
-41

query I rowsort
SELECT NULLIF ( 95, + cor0.col1 ) FROM tab0 AS cor0 GROUP BY col1
----
95
95

query I rowsort
SELECT - 51 AS col1 FROM tab0 GROUP BY tab0.col1
----
-51
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7345
SELECT ALL - cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7345
SELECT ALL - cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - 83 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-107
-121
-162

query I rowsort
SELECT + 69 FROM tab1 GROUP BY tab1.col0
----
69
69
69

query I rowsort
SELECT ALL + 8 FROM tab1 GROUP BY tab1.col1
----
8
8
8

query I rowsort
SELECT - 22 FROM tab1 GROUP BY tab1.col1
----
-22
-22
-22

query I rowsort
SELECT + 66 FROM tab2 GROUP BY tab2.col2
----
66
66
66

query I rowsort
SELECT DISTINCT + + 40 FROM tab0 GROUP BY tab0.col0
----
40

query I rowsort
SELECT DISTINCT 17 AS col1 FROM tab0 GROUP BY tab0.col0
----
17

query I rowsort
SELECT DISTINCT ( + 31 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
31

query I rowsort
SELECT ALL 94 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
94
94
94

query I rowsort
SELECT + cor0.col1 + - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL - 1 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT - 88 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-132
-145
-94

query I rowsort
SELECT - - 9 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
729

query I rowsort
SELECT DISTINCT + 32 AS col1 FROM tab2 GROUP BY tab2.col1
----
32

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ( 72 ) FROM tab1 GROUP BY tab1.col0
----
72
72
72

onlyif mysql # DIV for integer division: 
query I rowsort label-7363
SELECT COALESCE ( + 41, cor0.col2 DIV + cor0.col1, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
41
41

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7363
SELECT COALESCE ( + 41, cor0.col2 / + cor0.col1, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
41
41

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1, col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 * - 68 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-3944
-5372
-5916

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - - 49 AS col0 FROM tab1 GROUP BY tab1.col2
----
49
49
49

query I rowsort
SELECT ALL + 18 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT - 51 * tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-2295
-3621
-408

onlyif mysql # DIV for integer division: 
query I rowsort label-7370
SELECT - tab0.col2 DIV + 46 FROM tab0 GROUP BY tab0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7370
SELECT - tab0.col2 / + 46 FROM tab0 GROUP BY tab0.col2
----
-1
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7371
SELECT DISTINCT cor0.col0 + cor0.col0 DIV - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-7371
SELECT DISTINCT cor0.col0 + cor0.col0 / - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
14
90
91

query I rowsort
SELECT 84 FROM tab2 GROUP BY tab2.col0
----
84
84
84

query I rowsort
SELECT DISTINCT + 49 FROM tab2 GROUP BY tab2.col1
----
49

query I rowsort
SELECT - 79 AS col0 FROM tab1 GROUP BY tab1.col1
----
-79
-79
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-7375
SELECT DISTINCT 33 DIV 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-7375
SELECT DISTINCT 33 / 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT 7 + + 0 FROM tab1 cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT ALL col0 * - 77 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1694
-2156
-6314

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1936
3249
36

query I rowsort
SELECT ( 38 ) * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2204
3002
3306

query I rowsort
SELECT - 10 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT + + 52 * + 48 FROM tab2 GROUP BY tab2.col0
----
2496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 53 FROM tab2 GROUP BY tab2.col0
----
53
53
53

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + - tab2.col1 * tab2.col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - cor0.col0 * + 4 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-104
-172
-332

query I rowsort
SELECT - cor0.col1 + col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
0
0
0

query I rowsort
SELECT - 76 FROM tab1 AS cor0 GROUP BY col2
----
-76
-76
-76

query I rowsort
SELECT DISTINCT - + tab2.col1 * - 21 AS col0 FROM tab2 GROUP BY tab2.col1
----
1239
1281
861

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 * 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT cor0.col2 - - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
158
48
76

query I rowsort
SELECT cor0.col0 * - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
-1032
-2054
-3154

query I rowsort
SELECT DISTINCT + 20 AS col2 FROM tab0 GROUP BY tab0.col0
----
20

query I rowsort
SELECT + tab1.col0 * - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT + tab2.col2 + + tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

onlyif mysql # DIV for integer division: 
query I rowsort label-7399
SELECT DISTINCT cor0.col0 + + cor0.col2 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-7399
SELECT DISTINCT cor0.col0 + + cor0.col2 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
14
90
91

query I rowsort
SELECT + 40 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
119
127
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 76 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT DISTINCT + ( col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + + 23 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
102
110
81

query I rowsort
SELECT + 76 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
76
76
76

query I rowsort
SELECT + + 57 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
139
79
85

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT ALL - 23 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-23
-23

query I rowsort
SELECT cor0.col1 + 48 * - cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to f2c01e85b301bed0225b5fb719c70cbb

query I rowsort
SELECT ALL - 38 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-38
-38
-38

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT - 83 AS col2 FROM tab1 GROUP BY tab1.col1
----
-83
-83
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-7413
SELECT ALL tab2.col2 + - col2 DIV + 78 col0 FROM tab2 GROUP BY tab2.col2
----
58
78
86

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7413
SELECT ALL tab2.col2 + - col2 / + 78 col0 FROM tab2 GROUP BY tab2.col2
----
58
78
86

query I rowsort
SELECT ALL + - 82 FROM tab0 GROUP BY col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - 60 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-60

query I rowsort
SELECT - cor0.col2 * 2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1 HAVING + tab1.col1 > ( NULL )
----

query I rowsort
SELECT - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - col0 - + tab1.col0 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY tab1.col0
----
-164
-44
-56

onlyif mysql # DIV for integer division: 
query I rowsort label-7422
SELECT cor0.col2 DIV + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7422
SELECT cor0.col2 / + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col1 FROM tab1 GROUP BY tab1.col0
----
68
68
68

query I rowsort
SELECT cor0.col0 * cor0.col0 + + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
506
6806
812

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-142
-16
-90

query I rowsort
SELECT + 80 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
80
80
80

query I rowsort
SELECT + - 60 FROM tab1 GROUP BY tab1.col0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT - - 48 AS col0 FROM tab0 GROUP BY col0
----
48

query I rowsort
SELECT ALL + + 36 FROM tab1 GROUP BY tab1.col1
----
36
36
36

query I rowsort
SELECT 99 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT DISTINCT 34 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1292
2686
816

query I rowsort
SELECT DISTINCT + 70 AS col0 FROM tab2 GROUP BY tab2.col2
----
70

query I rowsort
SELECT 94 * - 38 FROM tab0 AS cor0 GROUP BY col1
----
-3572
-3572

query I rowsort
SELECT ALL - 20 AS col2 FROM tab2 GROUP BY tab2.col2
----
-20
-20
-20

query I rowsort
SELECT 34 * 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
136
136
136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 55 * cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1320
2090
4345

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 35 FROM tab1 cor0 GROUP BY col1
----
35
35
35

query I rowsort
SELECT DISTINCT + 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86

query I rowsort
SELECT - + col2 AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 64 AS col1 FROM tab2 GROUP BY col1
----
-64

query I rowsort
SELECT - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 col0 FROM tab1 GROUP BY tab1.col1
----
-27
-27
-27

query I rowsort
SELECT 26 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
26
26
26

onlyif mysql # DIV for integer division: 
query I rowsort label-7446
SELECT tab1.col0 DIV + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7446
SELECT tab1.col0 / + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT ALL + + 75 AS col2 FROM tab0 GROUP BY col1
----
75
75

query I rowsort
SELECT DISTINCT + - 23 AS col0 FROM tab1 GROUP BY tab1.col1
----
-23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7449
SELECT DISTINCT - - CAST( - tab0.col2 AS SIGNED ) AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

skipif mysql # not compatible
query I rowsort label-7449
SELECT DISTINCT - - CAST ( - tab0.col2 AS INTEGER ) AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 86 FROM tab1 AS cor0 GROUP BY cor0.col0
----
86

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
82
82

query I rowsort
SELECT + tab1.col2 + 45 AS col1 FROM tab1 GROUP BY tab1.col2
----
116
53
90

query I rowsort
SELECT tab2.col0 * - 86 FROM tab2, tab2 cor0 GROUP BY tab2.col0
----
-1290
-7826
-7912

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
158
48
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7458
SELECT - CAST( NULL AS SIGNED ) + + cor0.col0 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7458
SELECT - CAST ( NULL AS INTEGER ) + + cor0.col0 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( 36 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
36
36
36

query I rowsort
SELECT ALL + 62 AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
62
62
62

query I rowsort
SELECT ALL + 47 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
47
47
47

onlyif mysql # DIV for integer division: 
query I rowsort label-7462
SELECT ALL cor0.col1 DIV 76 col2 FROM tab0 AS cor0 GROUP BY col1
----
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7462
SELECT ALL cor0.col1 / 76 col2 FROM tab0 AS cor0 GROUP BY col1
----
0
1

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( tab2.col0 ) col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + 88 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
88
88

query I rowsort
SELECT 99 - 25 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT DISTINCT + 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
95

query I rowsort
SELECT + + tab2.col2 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - 35 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
24
26
6

query I rowsort
SELECT ALL 4 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT ALL - cor0.col1 * + 41 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-1681
-2419
-2501

query I rowsort
SELECT + 18 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT DISTINCT - + col2 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT + 96 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + 33 col2 FROM tab1 AS cor0 GROUP BY col0
----
-2706
-726
-924

query I rowsort
SELECT + 1 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT col2 * + cor0.col2 FROM tab2 cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL + ( + tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + 42 FROM tab0 cor0 GROUP BY cor0.col2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 col1 FROM tab1 WHERE ( NULL ) IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT ALL + col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT cor0.col2 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT - cor0.col0 + - cor0.col1 * - 66 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
2614
3803
4011

query I rowsort
SELECT + + 24 AS col0 FROM tab0, tab1 cor0 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT ALL + 43 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
43
43
43

query I rowsort
SELECT ALL + 71 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1704
-2698
-5609

onlyif mysql # DIV for integer division: 
query I rowsort label-7488
SELECT - tab1.col2 DIV tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7488
SELECT - tab1.col2 / tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT - 83 * - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2158
3569
6889

query I rowsort
SELECT col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT 45 FROM tab2 GROUP BY tab2.col1
----
45
45
45

query I rowsort
SELECT 28 FROM tab0 GROUP BY tab0.col1
----
28
28

query I rowsort
SELECT DISTINCT + 56 - + cor0.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-169
-8225
-8408

query I rowsort
SELECT ALL col2 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT + 55 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-5005
-5060
-825

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6561
0

query I rowsort
SELECT ALL - - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col1 + + col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT tab2.col2 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT - tab2.col1 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 col0 FROM tab0 WHERE NULL NOT BETWEEN NULL AND NULL GROUP BY col0
----

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7505
SELECT cor0.col0 DIV 86 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7505
SELECT cor0.col0 / 86 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT 57 AS col1 FROM tab1 GROUP BY tab1.col1
----
57
57
57

query I rowsort
SELECT DISTINCT + - 3 FROM tab0 GROUP BY tab0.col1
----
-3

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-7510
SELECT DISTINCT - 96 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-12
-2

skipif mysql # not compatible
query I rowsort label-7510
SELECT DISTINCT - 96 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-12
-2

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
94
94
94

query I rowsort
SELECT - 38 FROM tab0 cor0 GROUP BY col1
----
-38
-38

query I rowsort
SELECT ALL + 78 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
169
170
93

query I rowsort
SELECT - 17 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
66
9

query I rowsort
SELECT - cor0.col2 + 77 FROM tab2 cor0 GROUP BY cor0.col2
----
-10
-2
19

query I rowsort
SELECT ALL + COALESCE ( col0, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 20 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col2
----
20
20
20

query I rowsort
SELECT DISTINCT 98 AS col1 FROM tab0 GROUP BY tab0.col0
----
98

query I rowsort
SELECT - 33 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-33
-33

query I rowsort
SELECT ALL 24 FROM tab0 cor0 GROUP BY col1
----
24
24

query I rowsort
SELECT ALL ( - 37 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1036
-3034
-814

query I rowsort
SELECT + 65 AS col2 FROM tab0 GROUP BY tab0.col1
----
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - 21 col0 FROM tab2 GROUP BY tab2.col1
----
62
80
82

query I rowsort
SELECT + 87 AS col1 FROM tab1 GROUP BY tab1.col1
----
87
87
87

query I rowsort
SELECT DISTINCT ( + 98 ) * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1470
8918
9016

query I rowsort
SELECT DISTINCT + + 10 - 56 AS col2 FROM tab1 GROUP BY tab1.col0
----
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-2
-2
-2

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT 37 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2997
0

query I rowsort
SELECT ALL - 87 - 43 AS col1 FROM tab1 GROUP BY tab1.col2
----
-130
-130
-130

query I rowsort
SELECT + 64 AS col1 FROM tab1 GROUP BY tab1.col2
----
64
64
64

query I rowsort
SELECT ALL + 70 FROM tab1 GROUP BY tab1.col0
----
70
70
70

onlyif mysql # DIV for integer division: 
query I rowsort label-7535
SELECT DISTINCT - tab2.col1 DIV + 73 + + col1 * + 15 FROM tab2 GROUP BY tab2.col1
----
615
885
915

skipif mysql # not compatible
query I rowsort label-7535
SELECT DISTINCT - tab2.col1 / + 73 + + col1 * + 15 FROM tab2 GROUP BY tab2.col1
----
615
885
915

query I rowsort
SELECT 56 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
137
56

query I rowsort
SELECT DISTINCT - 82 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 85 * cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3485
5015
5185

query I rowsort
SELECT ALL - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7540
SELECT DISTINCT CAST( ( + 86 ) AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
86

skipif mysql # not compatible
query I rowsort label-7540
SELECT DISTINCT CAST ( ( + 86 ) AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 col0 FROM tab1 GROUP BY tab1.col0
----
76
76
76

query I rowsort
SELECT ALL + 53 AS col0 FROM tab2 GROUP BY tab2.col0
----
53
53
53

query I rowsort
SELECT ALL cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL + 87 AS col2 FROM tab2 GROUP BY tab2.col1
----
87
87
87

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab0 cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + cor0.col2 * - 39 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2262
-3081
-3393

query I rowsort
SELECT DISTINCT - 79 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-79

query I rowsort
SELECT DISTINCT + 97 FROM tab0 GROUP BY tab0.col0
----
97

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 45, + tab2.col2, ( + tab2.col0 ) + tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-45

query I rowsort
SELECT - + 84 FROM tab1 GROUP BY tab1.col1
----
-84
-84
-84

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col0
----
58
79
87

query I rowsort
SELECT + + tab1.col2 + - 78 * - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
3555
5609
632

query I rowsort
SELECT ALL + - tab0.col0 * 92 FROM tab0 GROUP BY tab0.col0
----
-2392
-3956
-7636

query I rowsort
SELECT col1 * + 31 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1364
1767
186

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 44 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 + - 64 col0 FROM tab2 GROUP BY col0
----
-155
-156
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-7558
SELECT ALL - tab0.col1 DIV + 66 FROM tab0 GROUP BY tab0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-7558
SELECT ALL - tab0.col1 / + 66 FROM tab0 GROUP BY tab0.col1
----
-1
0

query I rowsort
SELECT DISTINCT - + 71 FROM tab1 GROUP BY tab1.col1
----
-71

query I rowsort
SELECT ALL - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 42 AS col1 FROM tab2 GROUP BY tab2.col2
----
42
42
42

query I rowsort
SELECT - - 17 AS col1 FROM tab1 GROUP BY tab1.col2
----
17
17
17

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT DISTINCT tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT col2 * + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - 24 FROM tab0 cor0 GROUP BY col0
----
-24
-24
-24

query I rowsort
SELECT - 54 + - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-133
-78
-92

query I rowsort
SELECT ALL 71 * + 51 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3621
3621
3621

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-7570
SELECT DISTINCT tab2.col1 DIV - tab2.col1 FROM tab2 GROUP BY col1
----
-1

skipif mysql # not compatible
query I rowsort label-7570
SELECT DISTINCT tab2.col1 / - tab2.col1 FROM tab2 GROUP BY col1
----
-1

query I rowsort
SELECT 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT DISTINCT - - 78 FROM tab0 GROUP BY tab0.col0
----
78

query I rowsort
SELECT 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
10
10
10

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + + 68 FROM tab1 GROUP BY tab1.col2
----
68
68
68

onlyif mysql # DIV for integer division: 
query I rowsort label-7576
SELECT COALESCE ( - 78, cor0.col2 * - 51, + cor0.col0 DIV cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY col2
----
-78
-78
-78

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7576
SELECT COALESCE ( - 78, cor0.col2 * - 51, + cor0.col0 / cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY col2
----
-78
-78
-78

query I rowsort
SELECT ALL 64 AS col0 FROM tab0 GROUP BY tab0.col2
----
64
64
64

query I rowsort
SELECT ALL 37 FROM tab0 GROUP BY tab0.col2
----
37
37
37

query I rowsort
SELECT - - 26 AS col1 FROM tab0 GROUP BY tab0.col2
----
26
26
26

query I rowsort
SELECT cor0.col1 + - col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5
5
5

onlyif mysql # DIV for integer division: 
query I rowsort label-7582
SELECT + tab1.col1 DIV - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7582
SELECT + tab1.col1 / - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT + 44 FROM tab0 GROUP BY tab0.col1
----
44
44

onlyif mysql # DIV for integer division: 
query I rowsort label-7584
SELECT COALESCE ( 70, tab1.col1 + tab1.col2 DIV col0 ) FROM tab1 GROUP BY col1
----
70
70
70

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7584
SELECT COALESCE ( 70, tab1.col1 + tab1.col2 / col0 ) FROM tab1 GROUP BY col1
----
70
70
70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7585
SELECT DISTINCT tab0.col2 + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7585
SELECT DISTINCT tab0.col2 + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT + - 98 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
-98
-98

query I rowsort
SELECT DISTINCT 38 FROM tab0 GROUP BY tab0.col2
----
38

query I rowsort
SELECT - 99 AS col0 FROM tab1 GROUP BY tab1.col1
----
-99
-99
-99

query I rowsort
SELECT DISTINCT + 18 FROM tab1 AS cor0 GROUP BY cor0.col0
----
18

query I rowsort
SELECT DISTINCT - 19 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-19

query I rowsort
SELECT DISTINCT + 20 AS col2 FROM tab0 GROUP BY tab0.col1
----
20

query I rowsort
SELECT + 30 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT col0 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT - + ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 26 * tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
2132
572
728

query I rowsort
SELECT + cor0.col0 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-53
19
45

query I rowsort
SELECT DISTINCT - 0 FROM tab1 GROUP BY tab1.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7598
SELECT + COALESCE ( + 1, + cor0.col1, - col0, cor0.col1 * cor0.col0 + cor0.col2 ) + 24 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7598
SELECT + COALESCE ( + 1, + cor0.col1, - col0, cor0.col1 * cor0.col0 + cor0.col2 ) + 24 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
2

query I rowsort
SELECT ALL - 28 AS col0 FROM tab2 GROUP BY tab2.col0
----
-28
-28
-28

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + 82 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT 49 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-8
43
5

query I rowsort
SELECT 48 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT + 64 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
64
64
64

onlyif mysql # DIV for integer division: 
query I rowsort label-7605
SELECT 11 * + cor0.col0 + cor0.col0 DIV 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
286
473
914

skipif mysql # not compatible
query I rowsort label-7605
SELECT 11 * + cor0.col0 + cor0.col0 / 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
286
473
914

query I rowsort
SELECT + + 38 FROM tab2 GROUP BY tab2.col1
----
38
38
38

query I rowsort
SELECT DISTINCT tab2.col1 * - 20 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1180
-1220
-820

query I rowsort
SELECT DISTINCT - cor0.col2 * + 81 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4698
-6399
-7047

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-24

query I rowsort
SELECT ALL + tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-7611
SELECT DISTINCT - 52 DIV 22 col0 FROM tab0 GROUP BY tab0.col2
----
-2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7611
SELECT DISTINCT - 52 / 22 col0 FROM tab0 GROUP BY tab0.col2
----
-2

query I rowsort
SELECT 32 + + 94 AS col1 FROM tab1 AS cor0 GROUP BY col0, col0
----
126
126
126

query I rowsort
SELECT - tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( - 12, tab1.col1 + tab1.col1, - 63 ) FROM tab1 GROUP BY tab1.col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 + + 69 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
6630
69

query I rowsort
SELECT ALL - 33 * cor0.col2 FROM tab1 cor0 GROUP BY col2
----
-1485
-2343
-264

query I rowsort
SELECT - 12 FROM tab1 AS cor0 GROUP BY col1
----
-12
-12
-12

query I rowsort
SELECT + 32 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
32
32
32

query I rowsort
SELECT + 96 FROM tab2 GROUP BY tab2.col1
----
96
96
96

query I rowsort
SELECT + 74 FROM tab0 GROUP BY tab0.col1
----
74
74

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - cor0.col0 + COALESCE ( - 90, cor0.col0 + - cor0.col0 ) * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-4042
-5158
-562

query I rowsort
SELECT col0 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL - + tab2.col2 * ( 22 ) FROM tab2 GROUP BY tab2.col2
----
-1276
-1738
-1914

query I rowsort
SELECT - tab0.col2 + 87 FROM tab0 GROUP BY tab0.col2
----
49
63
8

query I rowsort
SELECT 41 + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
47
85
98

onlyif mysql # DIV for integer division: 
query I rowsort label-7627
SELECT ALL + col0 DIV + 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7627
SELECT ALL + col0 / + 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7628
SELECT 44 DIV + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7628
SELECT 44 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
98
98
98

onlyif mysql # DIV for integer division: 
query I rowsort label-7630
SELECT DISTINCT cor0.col0 DIV + cor0.col1 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
92
94

skipif mysql # not compatible
query I rowsort label-7630
SELECT DISTINCT cor0.col0 / + cor0.col1 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
92
94

query I rowsort
SELECT COALESCE ( - cor0.col1, cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 66 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3828
5214
5742

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7634
SELECT - - tab0.col2 * + CAST( NULL AS DECIMAL ) col2 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-7634
SELECT - - tab0.col2 * + CAST ( NULL AS REAL ) col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - - 91 AS col1 FROM tab2 GROUP BY tab2.col2
----
91
91
91

query I rowsort
SELECT + - tab1.col2 * - 98 FROM tab1 GROUP BY tab1.col2
----
4410
6958
784

onlyif mysql # DIV for integer division: 
query I rowsort label-7637
SELECT + 86 DIV - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-14

skipif mysql # not compatible
query I rowsort label-7637
SELECT + 86 / - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-14

query I rowsort
SELECT DISTINCT + 20 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1180
1220
820

query I rowsort
SELECT + 38 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-43
38

query I rowsort
SELECT - 67 + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-10
-23
-61

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, col0
----
-24
-38
-79

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT - + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT + col0 < NULL
----

query I rowsort
SELECT tab0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + tab1.col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0 HAVING NOT col0 = NULL
----

query I rowsort
SELECT + tab2.col1 AS col1 FROM tab2 WHERE NOT + tab2.col2 NOT BETWEEN NULL AND + tab2.col2 GROUP BY tab2.col1
----

query I rowsort
SELECT ALL - - col0 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 58 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58

query I rowsort
SELECT DISTINCT - - tab0.col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL 52 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT DISTINCT ( 92 ) * col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
2208
3496
7268

query I rowsort
SELECT + + col2 + 55 FROM tab0 GROUP BY tab0.col2
----
134
79
93

query I rowsort
SELECT - cor0.col0 * 24 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1032
-1992
-624

query I rowsort
SELECT DISTINCT - col0 * cor0.col0 + 50 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-175
-8231
-8414

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, col0
----
24
38
79

query I rowsort
SELECT - - col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT - 14 * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1106
-336
-532

query I rowsort
SELECT 52 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT - CASE 92 WHEN - cor0.col0 THEN NULL WHEN - 30 THEN 86 + + cor0.col0 ELSE col0 END AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 / - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT 48 * CASE - cor0.col0 WHEN cor0.col0 THEN ( - 40 ) END + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 51 + 23 FROM tab2 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT DISTINCT + 5 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT - 98 FROM tab2 GROUP BY tab2.col0
----
-98
-98
-98

query I rowsort
SELECT - - 32 FROM tab2 GROUP BY tab2.col0
----
32
32
32

query I rowsort
SELECT ALL 93 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT ALL 79 * - 35 FROM tab0 GROUP BY tab0.col2
----
-2765
-2765
-2765

query I rowsort
SELECT + 76 FROM tab1 AS cor0 GROUP BY col2
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 * + 68 col0 FROM tab1 AS cor0 GROUP BY col2
----
3536
3536
3536

query I rowsort
SELECT DISTINCT - col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT cor0.col0 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1032
-2054
-3154

onlyif mysql # DIV for integer division: 
query I rowsort label-7675
SELECT cor0.col1 + + cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-7675
SELECT cor0.col1 + + cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
42
60
62

query I rowsort
SELECT cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0, cor1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 86 col1 FROM tab2 GROUP BY tab2.col0
----
86
86
86

query I rowsort
SELECT 75 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3375
5325
600

onlyif mysql # DIV for integer division: 
query I rowsort label-7679
SELECT ALL - + col2 DIV 46 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7679
SELECT ALL - + col2 / 46 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-1056
-2133
-3192

onlyif mysql # DIV for integer division: 
query I rowsort label-7682
SELECT DISTINCT + - tab2.col0 DIV - col0 + 11 FROM tab2 GROUP BY tab2.col0
----
12

skipif mysql # not compatible
query I rowsort label-7682
SELECT DISTINCT + - tab2.col0 / - col0 + 11 FROM tab2 GROUP BY tab2.col0
----
12

query I rowsort
SELECT ALL cor0.col0 + - 8 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-182
-301
-581

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 67 col2 FROM tab0 GROUP BY tab0.col0
----
67
67
67

query I rowsort
SELECT + 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
73

query I rowsort
SELECT DISTINCT tab1.col2 - - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT - cor0.col1 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-133
-150
-76

query I rowsort
SELECT DISTINCT - 47 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-47

onlyif mysql # DIV for integer division: 
query I rowsort label-7689
SELECT + - 16 DIV 77 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7689
SELECT + - 16 / 77 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + 78 AS col2 FROM tab1 GROUP BY tab1.col0
----
78
78
78

query I rowsort
SELECT - 65 * - 64 AS col1 FROM tab1 GROUP BY tab1.col1
----
4160
4160
4160

query I rowsort
SELECT - - tab2.col2 * tab2.col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - cor0.col0 + + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - cor0.col0 - + 70 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-113
-153
-96

query I rowsort
SELECT ALL - - col0 * + 76 FROM tab0 GROUP BY tab0.col0
----
1976
3268
6308

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7700
SELECT 99 DIV + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1
16
2

skipif mysql # not compatible
query I rowsort label-7700
SELECT 99 / + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1
16
2

query I rowsort
SELECT DISTINCT + tab2.col2 * - 59 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3422
-4661
-5133

query I rowsort
SELECT 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT ALL + cor0.col0 + + 71 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
114
154
97

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT - + 48 FROM tab2 GROUP BY tab2.col2
----
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 68 + + 49 col0 FROM tab1 GROUP BY tab1.col1
----
-19
-19
-19

query I rowsort
SELECT - + 60 AS col0 FROM tab0 GROUP BY col1
----
-60
-60

query I rowsort
SELECT + + tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT + col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT ALL cor1.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT - + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
0
0
0

query I rowsort
SELECT - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-26
-43
-83

query I rowsort
SELECT ALL - col2 * 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2054
-624
-988

query I rowsort
SELECT - + 27 FROM tab1 GROUP BY col2
----
-27
-27
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-7718
SELECT DISTINCT cor0.col2 DIV - cor0.col2 + 81 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
80

skipif mysql # not compatible
query I rowsort label-7718
SELECT DISTINCT cor0.col2 / - cor0.col2 + 81 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7719
SELECT + CAST( + 18 AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
18
18
18

skipif mysql # not compatible
query I rowsort label-7719
SELECT + CAST ( + 18 AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT - 60 * + 17 FROM tab0 GROUP BY col2
----
-1020
-1020
-1020

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7721
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7721
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 37 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37
37
37

query I rowsort
SELECT - 53 FROM tab1 GROUP BY col1
----
-53
-53
-53

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT tab1.col1 * - 48 AS col1 FROM tab1 GROUP BY tab1.col1
----
-2112
-2736
-288

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
48

query I rowsort
SELECT 37 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
37
37
37

query I rowsort
SELECT - col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-132
-1596
-3608

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7732
SELECT ALL 67 DIV - 68 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7732
SELECT ALL 67 / - 68 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 96 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-96
-96
-96

query I rowsort
SELECT - 6 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6
-6

query I rowsort
SELECT 98 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT - 11 AS col2 FROM tab1 GROUP BY tab1.col1
----
-11
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + tab1.col0 * 44 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 ( 43, - cor0.col2 * cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 7 + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-1
37
50

query I rowsort
SELECT - col0 + cor0.col0 * + 25 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
2184
2208
360

query I rowsort
SELECT - 79 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-79
-79
-79

query I rowsort
SELECT ALL + 7 FROM tab0 GROUP BY tab0.col2
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 61 col1 FROM tab2 GROUP BY col2
----
61
61
61

query I rowsort
SELECT + 10 + + cor0.col2 * 31 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1808
2459
2707

query I rowsort
SELECT cor0.col1 * - col2 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
-2565
-3124
-48

query I rowsort
SELECT ALL - 51 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-51
-51
-51

onlyif mysql # DIV for integer division: 
query I rowsort label-7748
SELECT + cor0.col1 + - cor0.col1 DIV + cor0.col1 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
40
58
60

skipif mysql # not compatible
query I rowsort label-7748
SELECT + cor0.col1 + - cor0.col1 / + cor0.col1 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
40
58
60

query I rowsort
SELECT ALL - - 99 + 15 FROM tab0, tab0 cor0 GROUP BY tab0.col2
----
114
114
114

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 + + 19 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
-6542
19

query I rowsort
SELECT 15 + 61 AS col1 FROM tab2 GROUP BY col0
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-7752
SELECT ALL cor0.col0 DIV 61 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7752
SELECT ALL cor0.col0 / 61 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT - - 78 + 0 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1 HAVING ( NULL ) IS NULL
----
41
59
61

query I rowsort
SELECT DISTINCT + - 67 FROM tab2 GROUP BY tab2.col2
----
-67

query I rowsort
SELECT - + 47 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-2726
-3713
-4089

onlyif mysql # DIV for integer division: 
query I rowsort label-7757
SELECT DISTINCT - + 97 DIV + 87 FROM tab2 GROUP BY tab2.col2
----
-1

skipif mysql # not compatible
query I rowsort label-7757
SELECT DISTINCT - + 97 / + 87 FROM tab2 GROUP BY tab2.col2
----
-1

query I rowsort
SELECT ALL NULLIF ( cor0.col1, + 50 * ( - cor0.col0 ) + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT - col2 * - tab2.col2 - + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3306
6162
7482

query I rowsort
SELECT tab1.col1 FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND + col0 + - tab1.col2 GROUP BY tab1.col1
----

query I rowsort
SELECT cor0.col1 * 62 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
5022

query I rowsort
SELECT DISTINCT col2 + + ( - col2 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
0

query I rowsort
SELECT ALL col1 - + cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1980
3306
42

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7765
SELECT + CAST( NULL AS DECIMAL ) / - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7765
SELECT + CAST ( NULL AS REAL ) / - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 39 FROM tab1 GROUP BY tab1.col1
----
-39
-39
-39

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 DISTINCT 89 + col1 FROM tab2 GROUP BY tab2.col1
----
130
148
150

query I rowsort
SELECT DISTINCT - 37 FROM tab2 GROUP BY tab2.col0
----
-37

query I rowsort
SELECT - - 41 FROM tab1 GROUP BY tab1.col0
----
41
41
41

query I rowsort
SELECT DISTINCT + 96 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT ALL tab0.col2 + + 27 FROM tab0 GROUP BY tab0.col2
----
106
51
65

query I rowsort
SELECT - - 70 FROM tab1 GROUP BY tab1.col2
----
70
70
70

query I rowsort
SELECT DISTINCT 61 - + tab1.col1 * 35 FROM tab1 GROUP BY tab1.col1
----
-1479
-149
-1934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 99 * 57 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-5643
-5643
-5643

query I rowsort
SELECT DISTINCT - 16 + + 88 FROM tab1 AS cor0 GROUP BY cor0.col0
----
72

query I rowsort
SELECT ALL 51 FROM tab0 GROUP BY tab0.col1
----
51
51

query I rowsort
SELECT DISTINCT - - 13 FROM tab2 GROUP BY tab2.col0
----
13

query I rowsort
SELECT cor0.col2 + + col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1739
3560
3808

query I rowsort
SELECT 82 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 33 * tab1.col1 col2 FROM tab1 GROUP BY col1
----
1452
1881
198

query I rowsort
SELECT DISTINCT CASE - cor0.col2 WHEN cor0.col1 THEN cor0.col2 END / - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT - ( 55 ) * + tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1404
-2322
-4482

query I rowsort
SELECT DISTINCT - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - 8 FROM tab0 GROUP BY col0
----
-8
-8
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + tab2.col1 - - ( - 6 - col1 ) FROM tab2 GROUP BY tab2.col1
----
-6
-6
-6

query I rowsort
SELECT col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
162

query I rowsort
SELECT DISTINCT + 6 * cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
0
486

query I rowsort
SELECT - 42 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-42
-42

query I rowsort
SELECT + cor0.col0 + 37 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
120
63
80

query I rowsort
SELECT ALL 59 AS col2 FROM tab1 GROUP BY tab1.col2
----
59
59
59

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab0 GROUP BY col0
----
93

query I rowsort
SELECT ALL 84 * 46 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3864
3864
3864

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 + 50 FROM tab0 AS cor0 GROUP BY col0
----
133
76
93

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col1, + cor0.col1 + + cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
81
NULL

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 * + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY col1
----
0
972

query I rowsort
SELECT DISTINCT col1 - ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL + 8 FROM tab1 GROUP BY tab1.col2
----
8
8
8

query I rowsort
SELECT ALL 57 * tab2.col1 + 87 FROM tab2 GROUP BY col1
----
2424
3450
3564

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
96
96
96

onlyif mysql # DIV for integer division: 
query I rowsort label-7805
SELECT ALL - cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7805
SELECT ALL - cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT 37 * 41 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1517
1517
1517

query I rowsort
SELECT ALL - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab0.col2 col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7812
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7812
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col1 * + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT tab2.col1 * - col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

onlyif mysql # DIV for integer division: 
query I rowsort label-7815
SELECT col1 DIV + 74 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7815
SELECT col1 / + 74 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + - tab2.col0 + 12 AS col2 FROM tab2 GROUP BY col0
----
-3
-79
-80

query I rowsort
SELECT col2 * - 36 FROM tab1 GROUP BY tab1.col2
----
-1620
-2556
-288

query I rowsort
SELECT ALL + ( 47 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col2
----
47
47
47

query I rowsort
SELECT + 97 FROM tab1 GROUP BY tab1.col0
----
97
97
97

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col1 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-3440
26
83

query I rowsort
SELECT ALL + 32 FROM tab1 GROUP BY tab1.col1
----
32
32
32

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 * + 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5427

onlyif mysql # DIV for integer division: 
query I rowsort label-7824
SELECT DISTINCT - 94 DIV - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
1
6

skipif mysql # not compatible
query I rowsort label-7824
SELECT DISTINCT - 94 / - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
1
6

query I rowsort
SELECT 92 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
92
92
92

query I rowsort
SELECT + - 1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT ALL 37 AS col0 FROM tab0 cor0 GROUP BY col1, col1
----
37
37

query I rowsort
SELECT DISTINCT + 31 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
110
118
89

query I rowsort
SELECT ALL + ( tab2.col2 ) FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 55 col0 FROM tab1 GROUP BY tab1.col1
----
-55

query I rowsort
SELECT + ( col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-2
-27
12

query I rowsort
SELECT cor0.col0 * - 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2090
-2660
-7790

query I rowsort
SELECT - ( cor0.col2 ) * + cor0.col2 + ( 18 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3346
-6223
-7551

query I rowsort
SELECT ALL - 32 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-32
-32
-32

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
0

query I rowsort
SELECT + 75 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1125
6825
6900

query I rowsort
SELECT DISTINCT - 80 AS col1 FROM tab2 GROUP BY tab2.col2
----
-80

query I rowsort
SELECT DISTINCT 70 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
70

query I rowsort
SELECT ALL col1 * + 87 FROM tab0 GROUP BY tab0.col1
----
0
7047

query I rowsort
SELECT ALL + 43 * + 71 AS col2 FROM tab0 GROUP BY tab0.col1
----
3053
3053

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
462
6642
756

query I rowsort
SELECT DISTINCT + 49 * + 30 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
1470

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
64

query I rowsort
SELECT ALL - - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 21 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
29
66
92

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 ALL 75 FROM tab0 GROUP BY col2
----
75
75
75

query I rowsort
SELECT col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab1 GROUP BY tab1.col1
----
59

query I rowsort
SELECT DISTINCT - 25 FROM tab0 GROUP BY tab0.col1
----
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - tab0.col1 + - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 5 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
5

query I rowsort
SELECT ALL - 15 * + 43 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-645
-645
-645

query I rowsort
SELECT + 24 * cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
1056
1368
144

query I rowsort
SELECT 54 * 71 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
3834
3834
3834

onlyif mysql # DIV for integer division: 
query I rowsort label-7861
SELECT COALESCE ( + 48, + cor1.col1 DIV cor1.col1 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
48
48
48

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7861
SELECT COALESCE ( + 48, + cor1.col1 / cor1.col1 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT DISTINCT - 28 * 91 AS col0 FROM tab0 GROUP BY tab0.col2
----
-2548

query I rowsort
SELECT ALL - col2 * - col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT 70 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3080
3990
420

query I rowsort
SELECT DISTINCT + 32 FROM tab0 AS cor0 GROUP BY cor0.col0
----
32

query I rowsort
SELECT DISTINCT + ( 35 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
35

query I rowsort
SELECT DISTINCT + 78 FROM tab1 AS cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT ALL 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT - + 49 AS col1 FROM tab0 GROUP BY tab0.col0
----
-49
-49
-49

query I rowsort
SELECT ALL 77 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT ALL CASE + cor0.col2 WHEN 88 * cor0.col2 THEN NULL WHEN 40 THEN cor0.col2 END FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab2.col2 * - 11 AS col0 FROM tab2 GROUP BY col2
----
-638
-869
-957

query I rowsort
SELECT + cor0.col2 + - 65 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-7
14
22

query I rowsort
SELECT DISTINCT - 11 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-5
33
46

query I rowsort
SELECT - ( 98 ) FROM tab1 GROUP BY tab1.col0
----
-98
-98
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-7876
SELECT DISTINCT col2 DIV + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7876
SELECT DISTINCT col2 / + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT - COALESCE ( tab1.col2, tab1.col2 ) FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + - 16 FROM tab1 GROUP BY tab1.col2
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - + 9 FROM tab2 GROUP BY tab2.col0
----
-9

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 61, - 18 + - cor0.col2 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col2 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
3405
6300
7630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL = col2
----

query I rowsort
SELECT DISTINCT + tab0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - tab1.col0 + tab1.col0 FROM tab1 WHERE + col2 / - tab1.col0 IS NULL GROUP BY tab1.col0
----

query I rowsort
SELECT ALL + col0 * 3 AS col1 FROM tab0 GROUP BY tab0.col0
----
129
249
78

query I rowsort
SELECT ALL cor0.col2 * - 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4060
-5530
-6090

query I rowsort
SELECT - cor0.col1 * - col1 FROM tab1 cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT 93 + 45 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3738
93

query I rowsort
SELECT + - col2 * - col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + 1 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
1
1
1

query I rowsort
SELECT + col0 + + 3 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
25
31
85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7894
SELECT DISTINCT - CAST( - 8 AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8

skipif mysql # not compatible
query I rowsort label-7894
SELECT DISTINCT - CAST ( - 8 AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT col0 + 30 FROM tab0 AS cor0 GROUP BY cor0.col0
----
113
56
73

onlyif mysql # DIV for integer division: 
query I rowsort label-7896
SELECT ALL - 68 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-7896
SELECT ALL - 68 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
4

query I rowsort
SELECT - 75 * + tab1.col0 FROM tab1 GROUP BY col0
----
-1650
-2100
-6150

query I rowsort
SELECT ALL + - 35 AS col2 FROM tab2 GROUP BY tab2.col2
----
-35
-35
-35

query I rowsort
SELECT ALL 54 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
113
115
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 23 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
23
23
23

query I rowsort
SELECT - 8 AS col0 FROM tab1 GROUP BY tab1.col2
----
-8
-8
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-7902
SELECT + cor0.col0 DIV + 88 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7902
SELECT + cor0.col0 / + 88 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - - 37 FROM tab1 GROUP BY col0
----
37
37
37

query I rowsort
SELECT + tab1.col0 + - tab1.col0 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + tab2.col0 + 47 AS col0 FROM tab2 GROUP BY col0
----
138
139
62

query I rowsort
SELECT + 72 FROM tab2 AS cor0 GROUP BY col0
----
72
72
72

query I rowsort
SELECT - 97 FROM tab0 cor0 GROUP BY cor0.col2
----
-97
-97
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-7908
SELECT ALL col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7908
SELECT ALL col2 / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1
1
1

query I rowsort
SELECT 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT DISTINCT cor0.col1 * + 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1353
1947
2013

query I rowsort
SELECT - 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-45
-45

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-7912
SELECT - CAST( 32 AS SIGNED ) DIV cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7912
SELECT - CAST ( 32 AS INTEGER ) / cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - + 45 FROM tab0 GROUP BY tab0.col0
----
-45
-45
-45

query I rowsort
SELECT + cor0.col2 * - 4 FROM tab2 AS cor0 GROUP BY col2
----
-232
-316
-348

onlyif mysql # DIV for integer division: 
query I rowsort label-7915
SELECT ALL - tab2.col1 DIV - 91 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7915
SELECT ALL - tab2.col1 / - 91 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + tab0.col2 - 57 FROM tab0 GROUP BY tab0.col2
----
-19
-33
22

query I rowsort
SELECT DISTINCT ( - ( 57 ) ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-57

query I rowsort
SELECT DISTINCT 78 AS col2 FROM tab0 GROUP BY tab0.col0
----
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 93 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
93
93

query I rowsort
SELECT cor0.col1 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL - + 48 + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-10
-24
31

query I rowsort
SELECT ALL 93 FROM tab0 GROUP BY tab0.col2
----
93
93
93

query I rowsort
SELECT ALL + cor0.col1 * + 32 FROM tab2 cor0 GROUP BY cor0.col1
----
1312
1888
1952

query I rowsort
SELECT cor0.col0 * 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2460
660
840

query I rowsort
SELECT + tab0.col0 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT 97 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
97
97
97

query I rowsort
SELECT cor0.col2 + cor0.col0 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1056
2133
3192

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - 68 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + - 62 FROM tab2 GROUP BY tab2.col1
----
-62

query I rowsort
SELECT CASE + 79 WHEN + cor0.col2 THEN + cor0.col0 ELSE NULL END FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
NULL
NULL

query I rowsort
SELECT ALL + 41 FROM tab2 GROUP BY tab2.col1
----
41
41
41

query I rowsort
SELECT + CASE cor0.col1 WHEN + 10 THEN cor0.col1 ELSE NULL END AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 60 + + 54 AS col0 FROM tab2 GROUP BY tab2.col1
----
114
114
114

query I rowsort
SELECT ALL 76 FROM tab1 GROUP BY tab1.col2
----
76
76
76

query I rowsort
SELECT - cor0.col0 + cor0.col0 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
110
1568
3526

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-9
-9
-9

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - NULLIF ( col2, tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT cor0.col1 + 62 FROM tab1 AS cor0 GROUP BY col1
----
106
119
68

query I rowsort
SELECT + + 78 FROM tab0 GROUP BY tab0.col0
----
78
78
78

query I rowsort
SELECT 9 + + 84 FROM tab1 AS cor0 GROUP BY col0
----
93
93
93

query I rowsort
SELECT DISTINCT + 95 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
38
51
89

query I rowsort
SELECT ALL 73 FROM tab0 GROUP BY tab0.col1
----
73
73

query I rowsort
SELECT - 66 AS col2 FROM tab1 GROUP BY tab1.col0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 37, + tab2.col0 ) * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
2146
2923
3219

onlyif mysql # DIV for integer division: 
query I rowsort label-7949
SELECT ALL cor0.col0 + - col0 * + ( - 21 DIV + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

skipif mysql # not compatible
query I rowsort label-7949
SELECT ALL cor0.col0 + - col0 * + ( - 21 / + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 44 + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-38
16
22

query I rowsort
SELECT + 83 FROM tab0 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
83
83
83

query I rowsort
SELECT + cor0.col2 - + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - - tab0.col0 * 31 FROM tab0 GROUP BY tab0.col0
----
1333
2573
806

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL col1 - + 84 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-23
-25
-43

query I rowsort
SELECT - 36 + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-28
35
9

onlyif mysql # DIV for integer division: 
query I rowsort label-7957
SELECT - + tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7957
SELECT - + tab0.col2 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT tab0.col2 + 88 AS col1 FROM tab0 GROUP BY tab0.col2
----
112
126
167

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 61 + 87 FROM tab2 AS cor0 GROUP BY col0
----
148

query I rowsort
SELECT DISTINCT + + 31 + - 16 AS col0 FROM tab2 GROUP BY tab2.col1
----
15

query I rowsort
SELECT - 28 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
13
31
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 col0 FROM tab1 GROUP BY tab1.col1
----
-42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7966
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7966
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT tab2.col1 * tab2.col1 FROM tab2 WHERE NULL IS NOT NULL GROUP BY tab2.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT - 69 + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-10
-28
-8

query I rowsort
SELECT 3 FROM tab1 GROUP BY col2
----
3
3
3

query I rowsort
SELECT DISTINCT 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT - COALESCE ( + col1, 1 * + 25 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - 48 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-48
-48
-48

query I rowsort
SELECT ALL + 21 FROM tab1 GROUP BY tab1.col0
----
21
21
21

query I rowsort
SELECT + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT tab1.col1 + - tab1.col1 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT 95 FROM tab2 GROUP BY tab2.col1
----
95

query I rowsort
SELECT DISTINCT - - 36 FROM tab2 GROUP BY tab2.col0
----
36

query I rowsort
SELECT + 84 + + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
110
127
167

query I rowsort
SELECT DISTINCT 43 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43

query I rowsort
SELECT 95 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
95
95
95

query I rowsort
SELECT ALL + 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
52
52
52

query I rowsort
SELECT ALL 67 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
67
67
67

query I rowsort
SELECT DISTINCT + 16 FROM tab1 GROUP BY tab1.col2
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 40 col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
40
40
40

query I rowsort
SELECT DISTINCT - 89 AS col1 FROM tab1 GROUP BY tab1.col2
----
-89

query I rowsort
SELECT ALL - 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

query I rowsort
SELECT 2 AS col0 FROM tab0 GROUP BY tab0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
58

query I rowsort
SELECT + cor1.col2 + + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
116
158
174

query I rowsort
SELECT ALL + 45 FROM tab2 GROUP BY tab2.col0
----
45
45
45

query I rowsort
SELECT ALL - - 63 AS col0 FROM tab0 GROUP BY tab0.col0
----
63
63
63

query I rowsort
SELECT ALL - 34 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-34
-34
-34

query I rowsort
SELECT ALL + cor0.col2 + 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
110
47
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 26 col2 FROM tab0 GROUP BY tab0.col0
----
-26

onlyif mysql # DIV for integer division: 
query I rowsort label-7996
SELECT - tab1.col1 DIV 32 FROM tab1 GROUP BY tab1.col1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7996
SELECT - tab1.col1 / 32 FROM tab1 GROUP BY tab1.col1
----
-1
-1
0

query I rowsort
SELECT 43 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
43
43
43

query I rowsort
SELECT 20 FROM tab1 GROUP BY col1
----
20
20
20

query I rowsort
SELECT ( 40 ) - 58 FROM tab2 GROUP BY tab2.col2
----
-18
-18
-18

query I rowsort
SELECT ALL 72 FROM tab0 GROUP BY tab0.col1
----
72
72

query I rowsort
SELECT DISTINCT ( - tab0.col0 ) AS col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - ( - 74 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
74

query I rowsort
SELECT ALL - 60 FROM tab2 GROUP BY tab2.col2
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + 11 FROM tab2 AS cor0 GROUP BY col1
----
11

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT 72 - COALESCE ( - 87, - col1 + cor0.col2 * cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
159
159
159

query I rowsort
SELECT DISTINCT 26 - 32 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-2566
26

query I rowsort
SELECT 42 FROM tab2 GROUP BY tab2.col0
----
42
42
42

query I rowsort
SELECT NULLIF ( + cor0.col2, + cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 97 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
4268
5529
582

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col0, - col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT ALL + 75 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 + - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
32
6
69

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
-1444
-576
-6241

query I rowsort
SELECT + + tab2.col2 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT - + 1 + 22 AS col2 FROM tab1 GROUP BY tab1.col0
----
21
21
21

query I rowsort
SELECT + 94 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT - NULLIF ( + cor0.col0, col2 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT ALL 23 AS col0 FROM tab2 GROUP BY col1
----
23
23
23

query I rowsort
SELECT ALL - + 57 AS col2 FROM tab2 GROUP BY tab2.col1
----
-57
-57
-57

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 19 * cor0.col0 + - NULLIF ( + NULLIF ( + 29, - col0 ) + + cor0.col0, - cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1689
-549
-889

onlyif mysql # DIV for integer division: 
query I rowsort label-8023
SELECT DISTINCT + ( + 28 ) DIV 68 FROM tab2 AS cor0 GROUP BY col0
----
0

skipif mysql # not compatible
query I rowsort label-8023
SELECT DISTINCT + ( + 28 ) / 68 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT 4 FROM tab2 GROUP BY tab2.col0
----
4
4
4

query I rowsort
SELECT - 57 FROM tab2 GROUP BY tab2.col0
----
-57
-57
-57

query I rowsort
SELECT - 30 AS col2 FROM tab0 GROUP BY tab0.col0
----
-30
-30
-30

query I rowsort
SELECT + 52 AS col2 FROM tab1 GROUP BY tab1.col0
----
52
52
52

query I rowsort
SELECT ALL + 78 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
78
78
78

query I rowsort
SELECT - 55 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT DISTINCT + col2 * + 70 FROM tab1 GROUP BY tab1.col2
----
3150
4970
560

query I rowsort
SELECT ALL + 84 AS col2 FROM tab0 GROUP BY tab0.col2
----
84
84
84

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 col1 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NOT NULL
----
-6561
0

query I rowsort
SELECT 77 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT + - tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL 60 FROM tab2 GROUP BY col2
----
60
60
60

query I rowsort
SELECT DISTINCT + - col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL 54 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT col2 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2025
5041
64

query I rowsort
SELECT ALL 85 + + 57 FROM tab1 GROUP BY tab1.col0
----
142
142
142

query I rowsort
SELECT ALL 95 FROM tab0 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8047
SELECT cor0.col1 - - CAST( + 72 AS SIGNED ) * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5913

skipif mysql # not compatible
query I rowsort label-8047
SELECT cor0.col1 - - CAST ( + 72 AS INTEGER ) * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5913

query I rowsort
SELECT - 51 AS col0 FROM tab1 GROUP BY col1
----
-51
-51
-51

query I rowsort
SELECT - 0 - 8 * tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-648
0

query I rowsort
SELECT DISTINCT - + 31 AS col1 FROM tab0 GROUP BY tab0.col2
----
-31

query I rowsort
SELECT DISTINCT + cor0.col0 + 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
100
176
177

query I rowsort
SELECT - 85 AS col0 FROM tab2 GROUP BY tab2.col0
----
-85
-85
-85

query I rowsort
SELECT ALL + 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT ALL - cor1.col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 98 FROM tab2 GROUP BY tab2.col2
----
98
98
98

query I rowsort
SELECT cor0.col0 * cor0.col0 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
492
6795
829

onlyif mysql # DIV for integer division: 
query I rowsort label-8058
SELECT DISTINCT - - tab2.col2 DIV 95 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

skipif mysql # not compatible
query I rowsort label-8058
SELECT DISTINCT - - tab2.col2 / 95 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT - cor0.col0 + - 68 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-111
-151
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-8060
SELECT col0 DIV - 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3
-3
0

skipif mysql # not compatible
query I rowsort label-8060
SELECT col0 / - 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3
-3
0

query I rowsort
SELECT - cor0.col1 - cor0.col2 * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2082
-5085
-70

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

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 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-8065
SELECT DISTINCT + tab2.col1 DIV col1 col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NOT NULL
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8065
SELECT DISTINCT + tab2.col1 / col1 col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NOT NULL
----
1

query I rowsort
SELECT + + tab0.col1 - - 25 FROM tab0 GROUP BY col1
----
106
25

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
164
44
56

query I rowsort
SELECT DISTINCT + 9 FROM tab0 GROUP BY tab0.col0
----
9

query I rowsort
SELECT ALL - 27 AS col1 FROM tab1 GROUP BY tab1.col1
----
-27
-27
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 + 44 * + 59 col0 FROM tab0 AS cor0 GROUP BY col1
----
-3965
2596

query I rowsort
SELECT DISTINCT + - 50 * 88 AS col2 FROM tab1 GROUP BY tab1.col0
----
-4400

onlyif mysql # DIV for integer division: 
query I rowsort label-8074
SELECT col1 DIV - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8074
SELECT col1 / - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 91 + col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
172
91

query I rowsort
SELECT + 84 FROM tab1 cor0 GROUP BY col1, col1, cor0.col0
----
84
84
84

query I rowsort
SELECT DISTINCT + 19 + - 5 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
14

query I rowsort
SELECT + 68 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
68
68

onlyif mysql # DIV for integer division: 
query I rowsort label-8079
SELECT DISTINCT 84 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0
5

skipif mysql # not compatible
query I rowsort label-8079
SELECT DISTINCT 84 / + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0
5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8080
SELECT DISTINCT + CAST( NULL AS SIGNED ) + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8080
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL - - tab1.col2 - + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL + + 4 FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT ALL - 70 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-70
-70
-70

query I rowsort
SELECT ALL NULLIF ( + 1, cor0.col0 ) * + cor0.col2 + + cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
3422
6320
7656

query I rowsort
SELECT ALL - 40 AS col0 FROM tab2 GROUP BY tab2.col1
----
-40
-40
-40

query I rowsort
SELECT ( 8 ) FROM tab0 cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT + ( + 24 ) AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
24

query I rowsort
SELECT 42 FROM tab0 GROUP BY tab0.col2
----
42
42
42

query I rowsort
SELECT ALL cor1.col0 - - cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 2f49aa82790d4660f2c6cb2321a8c73b

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + + tab2.col1 + - 56 * 63 FROM tab2 GROUP BY col1
----
-3467
-3469
-3487

query I rowsort
SELECT + tab2.col1 + - ( 57 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-16
2
4

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL 21 AS col2 FROM tab2 GROUP BY tab2.col2
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - - 56 AS col1 FROM tab1 GROUP BY tab1.col1
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * NULLIF ( 63, + col1 ) col0 FROM tab2 GROUP BY col1
----
2583
3717
3843

query I rowsort
SELECT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT + col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 * cor0.col1 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1739
3560
3808

query I rowsort
SELECT DISTINCT 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
61

query I rowsort
SELECT cor0.col2 * 86 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2064
3268
6794

query I rowsort
SELECT ALL + 35 * tab0.col2 FROM tab0 GROUP BY col2
----
1330
2765
840

query I rowsort
SELECT - 43 FROM tab1 GROUP BY tab1.col1
----
-43
-43
-43

query I rowsort
SELECT - - 59 FROM tab0 GROUP BY tab0.col1
----
59
59

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-58
-79
-87

query I rowsort
SELECT 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
8
8
8

query I rowsort
SELECT ALL + 28 AS col2 FROM tab1 GROUP BY tab1.col0
----
28
28
28

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT tab1.col2 + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col2 HAVING NULL IS NULL
----
-45
-71
-8

query I rowsort
SELECT tab0.col2 * + tab0.col2 + + tab0.col2 FROM tab0 GROUP BY col2
----
1482
600
6320

query I rowsort
SELECT DISTINCT tab2.col2 + - tab2.col2 FROM tab2 WHERE NOT NULL IS NOT NULL GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL col2 - + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT - 53 AS col2 FROM tab0 GROUP BY tab0.col2
----
-53
-53
-53

query I rowsort
SELECT - cor0.col0 - 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-128
-68
-74

query I rowsort
SELECT DISTINCT + cor0.col0 * 16 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1456
1472
240

query I rowsort
SELECT DISTINCT - cor0.col2 * 21 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-1218
-1659
-1827

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8122
SELECT CAST( NULL AS SIGNED ) + 93 AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8122
SELECT CAST ( NULL AS INTEGER ) + 93 AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 71 AS col1 FROM tab1 GROUP BY tab1.col2
----
71
71
71

query I rowsort
SELECT - 61 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT + - 61 AS col1 FROM tab2 GROUP BY col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT + - 93 AS col0 FROM tab0 GROUP BY tab0.col2
----
-93

onlyif mysql # DIV for integer division: 
query I rowsort label-8127
SELECT ALL col2 DIV + 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
11
17
2

skipif mysql # not compatible
query I rowsort label-8127
SELECT ALL col2 / + 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
11
17
2

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ( - 53 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-53
-53

query I rowsort
SELECT DISTINCT 0 FROM tab0 GROUP BY col0
----
0

query I rowsort
SELECT DISTINCT 47 AS col1 FROM tab1 GROUP BY col1
----
47

query I rowsort
SELECT + + tab2.col1 * - 21 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1239
-1281
-861

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 * + 25 col2 FROM tab1 GROUP BY tab1.col2
----
1125
1775
200

query I rowsort
SELECT 57 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
5187
5244
855

query I rowsort
SELECT - 98 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-98
-98
-98

query I rowsort
SELECT 18 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
18
18

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + cor1.col0 * 24 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
2184
2208
360

query I rowsort
SELECT - 76 AS col0 FROM tab0 GROUP BY col2
----
-76
-76
-76

query I rowsort
SELECT - + 72 AS col1 FROM tab1 GROUP BY col2
----
-72
-72
-72

query I rowsort
SELECT ALL + tab2.col1 + 41 FROM tab2 GROUP BY tab2.col1
----
100
102
82

query I rowsort
SELECT ALL 42 AS col0 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
42
42
42

query I rowsort
SELECT cor1.col2 + 63 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
101
142
87

query I rowsort
SELECT ALL 68 FROM tab0 cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT tab0.col2 * 80 FROM tab0 GROUP BY tab0.col2
----
1920
3040
6320

query I rowsort
SELECT ALL - 98 * cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-7938
0

query I rowsort
SELECT + - 85 AS col0 FROM tab2 GROUP BY tab2.col2
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - - 53 FROM tab1 GROUP BY tab1.col2
----
53

query I rowsort
SELECT cor0.col0 - - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT - - 68 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
150
90
96

query I rowsort
SELECT DISTINCT + + 60 AS col2 FROM tab1 GROUP BY tab1.col0
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT - ( - cor0.col2 ) * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 82 col0 FROM tab2 GROUP BY tab2.col1
----
-82
-82
-82

query I rowsort
SELECT ALL + + 33 AS col0 FROM tab0 GROUP BY tab0.col2
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 5 col0 FROM tab2 AS cor0 GROUP BY col1
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 16 + tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
103
74
95

query I rowsort
SELECT ALL + - 51 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2295
-3621
-408

query I rowsort
SELECT - ( - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46
46
46

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8162
SELECT - CAST( NULL AS DECIMAL ) col1 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8162
SELECT - CAST ( NULL AS REAL ) col1 FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 15 FROM tab1 GROUP BY tab1.col0
----
15
15
15

query I rowsort
SELECT - 9 * tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-198
-252
-738

query I rowsort
SELECT ALL cor0.col1 * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
1936
3249
36

query I rowsort
SELECT 94 FROM tab2 cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT ALL 45 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
45
45
45

query I rowsort
SELECT ALL + - 63 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-20
-37
20

query I rowsort
SELECT + tab0.col2 * - col2 + 72 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1372
-504
-6169

query I rowsort
SELECT + 63 AS col1 FROM tab0 GROUP BY tab0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT + 28 AS col1 FROM tab1 GROUP BY tab1.col2
----
28

query I rowsort
SELECT - 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2
-2

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 15, - cor0.col1 * cor0.col1 + - col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT DISTINCT - 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
10
10
10

query I rowsort
SELECT - 35 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT - 26 AS col2 FROM tab2 GROUP BY tab2.col0
----
-26

query I rowsort
SELECT DISTINCT + 89 - col0 * + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-136
-8192
-8375

query I rowsort
SELECT + + 20 FROM tab1 GROUP BY tab1.col0
----
20
20
20

query I rowsort
SELECT ALL + 80 FROM tab0 GROUP BY tab0.col0
----
80
80
80

query I rowsort
SELECT 63 - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-16
25
39

query I rowsort
SELECT ALL ( cor0.col0 ) + cor0.col2 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-2028
-3071
-989

query I rowsort
SELECT 44 AS col0 FROM tab2 GROUP BY tab2.col2
----
44
44
44

query I rowsort
SELECT DISTINCT ( 63 ) FROM tab1 GROUP BY tab1.col1
----
63

query I rowsort
SELECT ALL 45 * 1 FROM tab1 cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT DISTINCT cor0.col0 + - 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-50
-56
4

query I rowsort
SELECT DISTINCT cor0.col2 - + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 WHERE ( NULL ) NOT IN ( cor0.col1 ) GROUP BY cor0.col0
----

query I rowsort
SELECT ALL - tab0.col2 AS col0 FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND NULL GROUP BY tab0.col2
----

query I rowsort
SELECT 67 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 58 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
58

query I rowsort
SELECT DISTINCT 78 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT DISTINCT cor0.col0 - 49 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
-21
-27
33

query I rowsort
SELECT + 62 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
62
62
62

query I rowsort
SELECT ALL ( cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-8197
SELECT DISTINCT col2 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
0
5

skipif mysql # not compatible
query I rowsort label-8197
SELECT DISTINCT col2 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
0
5

query I rowsort
SELECT - tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 43 FROM tab1 GROUP BY tab1.col2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 56 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-56
-56
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 65 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT ALL 41 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41
41
41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8203
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8203
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 * - 65 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1560
-2470
-5135

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8206
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8206
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - NULLIF ( + 9, + 32 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT ( col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT NULLIF ( + tab0.col1, + col1 ) col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL + 81 + - tab2.col1 FROM tab2 GROUP BY col1
----
20
22
40

query I rowsort
SELECT DISTINCT - ( 66 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-66

query I rowsort
SELECT - cor0.col2 * 68 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-1632
-2584
-5372

query I rowsort
SELECT + CASE - 18 WHEN col1 THEN 95 END FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + tab1.col2 * 29 AS col0 FROM tab1 GROUP BY tab1.col2
----
1305
2059
232

query I rowsort
SELECT + 48 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT tab1.col1 + + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-8217
SELECT tab2.col1 DIV col1 + tab2.col1 FROM tab2 GROUP BY col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-8217
SELECT tab2.col1 / col1 + tab2.col1 FROM tab2 GROUP BY col1
----
42
60
62

query I rowsort
SELECT + 59 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-20
-28
1

query I rowsort
SELECT cor0.col2 - ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-12
-34
72

query I rowsort
SELECT ALL - 55 + 42 * - 55 FROM tab0 AS cor0 GROUP BY col1
----
-2365
-2365

query I rowsort
SELECT + 54 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-29
11
28

query I rowsort
SELECT DISTINCT + 72 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
116
129
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT tab2.col1 + 77 FROM tab2 GROUP BY tab2.col1
----
118
136
138

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 41 FROM tab2 GROUP BY tab2.col1
----
-41
-41
-41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8227
SELECT + cor0.col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8227
SELECT + cor0.col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 47 + + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-19
-25
35

query I rowsort
SELECT + 21 AS col0 FROM tab1 GROUP BY tab1.col0
----
21
21
21

query I rowsort
SELECT ( NULLIF ( cor0.col2, cor0.col1 + 44 ) ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT 2 FROM tab1 cor0 GROUP BY col1
----
2
2
2

query I rowsort
SELECT ALL + cor0.col1 * 47 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
1927
2773
2867

query I rowsort
SELECT tab0.col1 * + col1 AS col2 FROM tab0 GROUP BY col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 * - 66 col1 FROM tab0 GROUP BY tab0.col2
----
-1584
-2508
-5214

query I rowsort
SELECT - ( cor0.col1 ) - cor0.col0 * + col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-286
-8340
-8505

query I rowsort
SELECT - 16 FROM tab1 AS cor0 GROUP BY col1
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 10 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-10

query I rowsort
SELECT ALL - 70 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col1
----
-70
-70
-70
-70
-70
-70

query I rowsort
SELECT ALL - tab2.col1 * + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + 5 FROM tab0 GROUP BY tab0.col1
----
5
5

query I rowsort
SELECT DISTINCT 88 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
88

query I rowsort
SELECT + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL = ( NULL )
----

query I rowsort
SELECT ALL - tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

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 + 66 FROM tab2 GROUP BY tab2.col1
----
66
66
66

query I rowsort
SELECT DISTINCT + 0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0

query I rowsort
SELECT + 9 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
9
9
9

query I rowsort
SELECT - 64 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-64
-64
-64

query I rowsort
SELECT 26 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT + + 28 FROM tab0 GROUP BY col2
----
28
28
28

query I rowsort
SELECT - cor0.col2 - + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT - 37 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-37
-37
-37

query I rowsort
SELECT - 58 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-58
-58
-58

query I rowsort
SELECT DISTINCT 63 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
63

query I rowsort
SELECT + 9 FROM tab0 GROUP BY tab0.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-86
-86
-86

onlyif mysql # DIV for integer division: 
query I rowsort label-8258
SELECT ALL - tab0.col2 + 38 DIV 23 FROM tab0 GROUP BY col2
----
-23
-37
-78

skipif mysql # not compatible
query I rowsort label-8258
SELECT ALL - tab0.col2 + 38 / 23 FROM tab0 GROUP BY col2
----
-23
-37
-78

query I rowsort
SELECT - ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - - 7 AS col0 FROM tab0 GROUP BY tab0.col0
----
7
7
7

query I rowsort
SELECT - 32 FROM tab1 GROUP BY tab1.col2
----
-32
-32
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 86 col1 FROM tab0 GROUP BY tab0.col2
----
-86
-86
-86

query I rowsort
SELECT ALL + + tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - cor0.col0 - 48 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-139
-140
-63

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
37

query I rowsort
SELECT col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT - tab1.col2 * - tab1.col2 - 5 FROM tab1 GROUP BY tab1.col2
----
2020
5036
59

query I rowsort
SELECT - 17 * col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1394
-374
-476

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 * - ( - tab0.col1 - + tab0.col1 ) col1 FROM tab0 GROUP BY tab0.col1
----
0
13122

query I rowsort
SELECT 30 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT - 99 + - 9 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-108
-108
-108

onlyif mysql # DIV for integer division: 
query I rowsort label-8273
SELECT DISTINCT + + col0 DIV + tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8273
SELECT DISTINCT + + col0 / + tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT 70 + - col0 FROM tab1 GROUP BY tab1.col0
----
-12
42
48

query I rowsort
SELECT + 91 AS col0 FROM tab0 GROUP BY tab0.col2
----
91
91
91

onlyif mysql # DIV for integer division: 
query I rowsort label-8276
SELECT tab0.col2 DIV + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8276
SELECT tab0.col2 / + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT + 95 AS col0 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT ALL 60 + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
103
143
86

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT - 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-4
-4
-4

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT + - tab0.col2 * + COALESCE ( + 67, tab0.col2 * + 74 ) FROM tab0 GROUP BY tab0.col2
----
-1608
-2546
-5293

query I rowsort
SELECT + tab0.col1 + - 84 FROM tab0 GROUP BY tab0.col1
----
-3
-84

query I rowsort
SELECT + 28 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2296
-616
-784

query I rowsort
SELECT - 40 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-40
-40
-40

query I rowsort
SELECT tab0.col0 * 35 AS col0 FROM tab0 GROUP BY col0
----
1505
2905
910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 87 ) col1 FROM tab0 GROUP BY tab0.col0
----
87
87
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 62, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
62
62

query I rowsort
SELECT DISTINCT + cor0.col1 - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-17
-20
-26

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8290
SELECT + CAST( 55 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
55
55
55

skipif mysql # not compatible
query I rowsort label-8290
SELECT + CAST ( 55 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT NULLIF ( + cor0.col1, - 5 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT - tab1.col0 - 47 AS col0 FROM tab1 GROUP BY tab1.col0
----
-129
-69
-75

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8293
SELECT + cor0.col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8293
SELECT + cor0.col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + tab1.col0 * 68 FROM tab1 GROUP BY tab1.col0
----
1496
1904
5576

query I rowsort
SELECT ( 44 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
44
44
44

query I rowsort
SELECT - - 96 FROM tab2 GROUP BY tab2.col1
----
96
96
96

query I rowsort
SELECT ALL + col0 + + col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
133
150
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 col2 FROM tab1 AS cor0 GROUP BY col0
----
17

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8299
SELECT ALL - CAST( - col1 AS SIGNED ) + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

skipif mysql # not compatible
query I rowsort label-8299
SELECT ALL - CAST ( - col1 AS INTEGER ) + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 95 AS col0 FROM tab1 GROUP BY tab1.col2
----
95
95
95

query I rowsort
SELECT DISTINCT + - 91 FROM tab0 GROUP BY col0
----
-91

query I rowsort
SELECT + 64 AS col0 FROM tab1 GROUP BY tab1.col2
----
64
64
64

query I rowsort
SELECT col2 + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
142
16
90

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col0 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-1232
-154
-5740

query I rowsort
SELECT cor0.col2 * - 79 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3555
-5609
-632

query I rowsort
SELECT DISTINCT tab1.col1 * COALESCE ( - tab1.col1, - tab1.col1 ) FROM tab1 GROUP BY col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 + - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
0
29
8

query I rowsort
SELECT DISTINCT tab2.col1 + - col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT DISTINCT + 5 FROM tab2 GROUP BY tab2.col1
----
5

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + + tab2.col0 + 23 AS col1 FROM tab2 GROUP BY tab2.col0
----
114
115
38

query I rowsort
SELECT ALL - + 33 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-39
-77
-90

query I rowsort
SELECT DISTINCT 96 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT ALL col0 + ( - cor0.col0 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 23 * - tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
-1357
-1403
-943

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT ALL 56 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT ALL 76 * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1140
6916
6992

query I rowsort
SELECT + 53 AS col2 FROM tab0 GROUP BY tab0.col2
----
53
53
53

query I rowsort
SELECT ALL col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
182
184
30

query I rowsort
SELECT ALL - 22 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-22
-22

query I rowsort
SELECT + tab1.col2 FROM tab1 WHERE NOT NULL NOT IN ( tab1.col1 ) GROUP BY tab1.col2 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT + 39 * + 28 - cor0.col0 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2680
-4277
177

query I rowsort
SELECT 67 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
67
67
67

query I rowsort
SELECT cor0.col2 - 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
11
3

query I rowsort
SELECT NULLIF ( - 62, + tab0.col2 * tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-62
-62
-62

query I rowsort
SELECT - 53 FROM tab1 GROUP BY tab1.col2
----
-53
-53
-53

query I rowsort
SELECT DISTINCT - 26 FROM tab1 GROUP BY tab1.col2
----
-26

query I rowsort
SELECT - + 94 FROM tab2 GROUP BY tab2.col2
----
-94
-94
-94

query I rowsort
SELECT + cor0.col2 * 96 FROM tab1 AS cor0 GROUP BY col2
----
4320
6816
768

query I rowsort
SELECT - + 63 AS col1 FROM tab1 GROUP BY tab1.col0
----
-63
-63
-63

query I rowsort
SELECT + 16 FROM tab1 GROUP BY col1
----
16
16
16

query I rowsort
SELECT ALL 34 AS col1 FROM tab2 GROUP BY tab2.col0
----
34
34
34

query I rowsort
SELECT 5 + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-17
-23
-77

query I rowsort
SELECT - 79 AS col2 FROM tab0 GROUP BY tab0.col0
----
-79
-79
-79

query I rowsort
SELECT ALL - cor0.col1 * cor0.col0 + - ( 32 ) FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-32
-32
-3515

query I rowsort
SELECT ALL + + col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 27 FROM tab0 GROUP BY tab0.col0
----
27

query I rowsort
SELECT + 66 AS col0 FROM tab2 GROUP BY tab2.col0
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 * - COALESCE ( + 38, col1 ) col1 FROM tab1 GROUP BY tab1.col2
----
1710
2698
304

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT CASE - cor0.col2 WHEN cor0.col0 THEN - cor0.col2 ELSE NULL END AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT + 81 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
81
81
81

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

query I rowsort
SELECT DISTINCT + 41 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT DISTINCT + - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - 10 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
440
570
60

query I rowsort
SELECT ALL ( 7 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT + - tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT + cor0.col0 + 92 * 13 FROM tab2 AS cor0 GROUP BY col0
----
1211
1287
1288

query I rowsort
SELECT DISTINCT tab2.col1 + + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT - + 56 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-4536
0

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 * + 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT + 98 AS col0 FROM tab2 GROUP BY tab2.col2
----
98

query I rowsort
SELECT DISTINCT - 5 * 83 FROM tab1 GROUP BY tab1.col2
----
-415

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab1 GROUP BY tab1.col1
----
73

query I rowsort
SELECT ( 47 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8362
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8362
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - 73 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
73
73
73

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT COALESCE ( - cor0.col1, - cor0.col0 * + col1 ) FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT tab2.col1 * - 84 FROM tab2 GROUP BY tab2.col1
----
-3444
-4956
-5124

query I rowsort
SELECT DISTINCT - cor0.col2 + 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-41
0
14

query I rowsort
SELECT - 11 AS col1 FROM tab2 GROUP BY tab2.col0
----
-11
-11
-11

query I rowsort
SELECT 67 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT ALL + 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT cor0.col1 * 27 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2187

query I rowsort
SELECT DISTINCT - 64 * + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-2816
-3648
-384

query I rowsort
SELECT ALL 63 AS col0 FROM tab2 GROUP BY tab2.col2
----
63
63
63

query I rowsort
SELECT + ( - cor0.col0 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT DISTINCT - tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT ALL + 2 AS col2 FROM tab2 GROUP BY col1
----
2
2
2

query I rowsort
SELECT 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT ALL tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-8380
SELECT cor0.col1 DIV - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8380
SELECT cor0.col1 / - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 87 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 76 ) * cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
3344
4332
456

query I rowsort
SELECT DISTINCT 96 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT - 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab2 GROUP BY tab2.col2
----
71

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col2, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 4 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4

query I rowsort
SELECT ALL + 86 FROM tab0 GROUP BY col0
----
86
86
86

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL 50 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
50
50
50

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL 97 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
97
97
97

query I rowsort
SELECT ALL - + 17 FROM tab1 GROUP BY tab1.col1
----
-17
-17
-17

query I rowsort
SELECT + + 58 AS col0 FROM tab0 GROUP BY tab0.col0
----
58
58
58

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING NULL < ( NULL )
----

query I rowsort
SELECT ALL + tab0.col1 * col1 FROM tab0 GROUP BY tab0.col1 HAVING ( col1 ) IS NULL
----

query I rowsort
SELECT cor0.col0 + col0 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

onlyif mysql # DIV for integer division: 
query I rowsort label-8401
SELECT DISTINCT + cor0.col0 DIV - 7 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
-3
-6

skipif mysql # not compatible
query I rowsort label-8401
SELECT DISTINCT + cor0.col0 / - 7 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
-3
-6

query I rowsort
SELECT - 62 * - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1364
1736
5084

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
41
59
61

query I rowsort
SELECT + 48 AS col0 FROM tab0 GROUP BY tab0.col2
----
48
48
48

query I rowsort
SELECT DISTINCT 4 * - 95 FROM tab2 GROUP BY tab2.col2
----
-380

query I rowsort
SELECT + 39 FROM tab0 AS cor0 GROUP BY col0
----
39
39
39

query I rowsort
SELECT DISTINCT - - 76 AS col1 FROM tab2 GROUP BY tab2.col0
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 63 * 37 col0 FROM tab0 GROUP BY tab0.col0
----
2331

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col2 + + COALESCE ( 64, cor0.col0, cor0.col0 * ( + 18 ) ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
109
135
72

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 51 FROM tab1 GROUP BY tab1.col0
----
51
51
51

query I rowsort
SELECT DISTINCT - 75 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-75

query I rowsort
SELECT - 57 FROM tab0 GROUP BY tab0.col2
----
-57
-57
-57

onlyif mysql # DIV for integer division: 
query I rowsort label-8415
SELECT ALL COALESCE ( 0, - tab2.col0 DIV + 24 - - tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8415
SELECT ALL COALESCE ( 0, - tab2.col0 / + 24 - - tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT - - 78 + + col2 FROM tab1 GROUP BY tab1.col2
----
123
149
86

query I rowsort
SELECT ALL - + col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT 37 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1517
2183
2257

query I rowsort
SELECT cor0.col2 - 63 * 98 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-6103
-6129
-6166

query I rowsort
SELECT DISTINCT + 32 AS col2 FROM tab0 GROUP BY tab0.col2
----
32

query I rowsort
SELECT ALL 39 AS col2 FROM tab0 GROUP BY col1
----
39
39

query I rowsort
SELECT DISTINCT 30 * + cor0.col1 FROM tab0 cor0 GROUP BY col1
----
0
2430

query I rowsort
SELECT + cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
225
8281
8464

query I rowsort
SELECT + 6 FROM tab1 GROUP BY tab1.col1
----
6
6
6

query I rowsort
SELECT DISTINCT - 9 AS col0 FROM tab0 GROUP BY col0
----
-9

query I rowsort
SELECT - 24 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-24
-24
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + 53 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-26
15
29

query I rowsort
SELECT ALL - 47 FROM tab1 GROUP BY tab1.col2
----
-47
-47
-47

query I rowsort
SELECT tab2.col2 * - 35 FROM tab2 GROUP BY tab2.col2
----
-2030
-2765
-3045

query I rowsort
SELECT DISTINCT - 9 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
13
19
73

query I rowsort
SELECT ALL + 47 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
4277
4324
705

query I rowsort
SELECT - 88 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-88
-88
-88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8433
SELECT + cor0.col2 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8433
SELECT + cor0.col2 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 35 + + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
114
59
73

query I rowsort
SELECT DISTINCT + 27 * + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1566
2133
2349

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 98, + col0, tab0.col2 + 35 ) AS col1 FROM tab0 GROUP BY col0
----
-98
-98
-98

query I rowsort
SELECT ALL + cor0.col1 - + cor0.col0 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 ALL + tab0.col1 * ( 73 ) col1 FROM tab0 GROUP BY tab0.col1
----
0
5913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 39 + - tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
-45
-83
-96

onlyif mysql # DIV for integer division: 
query I rowsort label-8440
SELECT DISTINCT 5 DIV + tab1.col1 FROM tab1 GROUP BY col1
----
0

skipif mysql # not compatible
query I rowsort label-8440
SELECT DISTINCT 5 / + tab1.col1 FROM tab1 GROUP BY col1
----
0

query I rowsort
SELECT DISTINCT + 11 * - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-286
-473
-913

query I rowsort
SELECT DISTINCT - - tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT + 17 * col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1343
408
646

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8444
SELECT CAST( NULL AS SIGNED ) * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8444
SELECT CAST ( NULL AS INTEGER ) * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

query I rowsort
SELECT 33 + - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-49
11
5

query I rowsort
SELECT ALL + 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT + 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
20

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
17
17
17

query I rowsort
SELECT DISTINCT 66 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
66

query I rowsort
SELECT ALL + - 56 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
4536

onlyif mysql # DIV for integer division: 
query I rowsort label-8452
SELECT DISTINCT cor0.col1 * - 12 + + 89 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-494
-709
-733

skipif mysql # not compatible
query I rowsort label-8452
SELECT DISTINCT cor0.col1 * - 12 + + 89 / - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-494
-709
-733

query I rowsort
SELECT + 85 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT 3 + col0 FROM tab1 cor0 GROUP BY col0
----
25
31
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT 15 FROM tab2 AS cor0 GROUP BY col1
----
15
15
15

query I rowsort
SELECT ALL 2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT - + 5 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-220
-285
-30

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL - tab1.col2 * - tab1.col2 + - 72 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1215
-512
-71

onlyif mysql # DIV for integer division: 
query I rowsort label-8461
SELECT ALL tab2.col2 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8461
SELECT ALL tab2.col2 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8462
SELECT + CAST( - col1 AS SIGNED ) FROM tab0 GROUP BY col1
----
-81
0

skipif mysql # not compatible
query I rowsort label-8462
SELECT + CAST ( - col1 AS INTEGER ) FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + ( - 54 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-54

query I rowsort
SELECT 75 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
101
118
158

query I rowsort
SELECT + tab0.col0 * - 90 AS col2 FROM tab0 GROUP BY tab0.col0
----
-2340
-3870
-7470

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL + ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + - 52 - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-24
-30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-8469
SELECT DISTINCT - tab2.col1 DIV 10 FROM tab2 GROUP BY tab2.col1
----
-4
-5
-6

skipif mysql # not compatible
query I rowsort label-8469
SELECT DISTINCT - tab2.col1 / 10 FROM tab2 GROUP BY tab2.col1
----
-4
-5
-6

query I rowsort
SELECT - + 48 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-48
-48
-48

query I rowsort
SELECT - 22 AS col0 FROM tab2 GROUP BY tab2.col0
----
-22
-22
-22

query I rowsort
SELECT 51 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
51
51
51

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + + 25 FROM tab1 GROUP BY tab1.col2
----
25

query I rowsort
SELECT ALL + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 24 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1416
1464
984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 * tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT - 31 - + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-113
-53
-59

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8481
SELECT - CAST( NULL AS DECIMAL ) FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8481
SELECT - CAST ( NULL AS REAL ) FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * + 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1892
2451
258

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 47 * - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1886
-2714
-2806

query I rowsort
SELECT - 77 AS col2 FROM tab2 GROUP BY tab2.col2
----
-77
-77
-77

query I rowsort
SELECT ( cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT - 54 FROM tab0 GROUP BY tab0.col0
----
-54
-54
-54

query I rowsort
SELECT 68 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
106
147
92

onlyif mysql # DIV for integer division: 
query I rowsort label-8488
SELECT + 34 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-8488
SELECT + 34 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
4

query I rowsort
SELECT ALL + ( - 81 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-81
-81
-81

query I rowsort
SELECT col1 + + ( cor0.col1 ) FROM tab0 cor0 GROUP BY col1, cor0.col2
----
0
0
162

query I rowsort
SELECT + 97 FROM tab1 AS cor0 GROUP BY col2
----
97
97
97

query I rowsort
SELECT DISTINCT + ( tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 43 * col1 + tab1.col1 * 70 FROM tab1 GROUP BY tab1.col1
----
4972
6441
678

query I rowsort
SELECT ALL ( + 76 ) FROM tab0 GROUP BY tab0.col1
----
76
76

query I rowsort
SELECT + 49 AS col2 FROM tab1 GROUP BY tab1.col1
----
49
49
49

query I rowsort
SELECT 90 AS col0 FROM tab0 GROUP BY tab0.col1
----
90
90

query I rowsort
SELECT - + tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 41 ) * cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1148
-3362
-902

query I rowsort
SELECT - 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 DISTINCT + + 52 col0 FROM tab1 GROUP BY tab1.col1
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 5 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5
-5
-5

query I rowsort
SELECT 70 * + cor0.col0 + 58 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1598
2018
5798

query I rowsort
SELECT ALL + - col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL NULLIF ( cor0.col2, + cor0.col2 ) * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 24 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24

query I rowsort
SELECT DISTINCT 10 + + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
36
53
93

query I rowsort
SELECT DISTINCT + ( 22 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT + tab2.col1 + + 24 FROM tab2 GROUP BY tab2.col1
----
65
83
85

query I rowsort
SELECT ALL 61 * + cor0.col1 + - 95 * 59 FROM tab0 AS cor0 GROUP BY col1
----
-5605
-664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 - - 24 col1 FROM tab1 GROUP BY tab1.col1
----
-20
-33
18

query I rowsort
SELECT ALL + + 91 AS col0 FROM tab0 GROUP BY tab0.col1
----
91
91

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col0 * 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1980
2520
7380

query I rowsort
SELECT DISTINCT - + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + tab2.col2 * 89 AS col1 FROM tab2 GROUP BY tab2.col2
----
5162
7031
7743

query I rowsort
SELECT DISTINCT 56 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
56

query I rowsort
SELECT + cor0.col1 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
126
28
85

onlyif mysql # DIV for integer division: 
query I rowsort label-8520
SELECT DISTINCT - tab1.col1 DIV - 7 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
6
8

skipif mysql # not compatible
query I rowsort label-8520
SELECT DISTINCT - tab1.col1 / - 7 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
6
8

query I rowsort
SELECT ALL + 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT DISTINCT - cor0.col2 * 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1254
-2607
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 * - cor0.col1 + 84 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-12
-620
-828

query I rowsort
SELECT cor0.col2 * - ( - 43 ) + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2552
3476
3828

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8526
SELECT DISTINCT - CAST( NULL AS SIGNED ) * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8526
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL 82 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT ALL - 59 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-59
-59
-59

query I rowsort
SELECT - + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-8530
SELECT cor0.col1 DIV ( 60 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8530
SELECT cor0.col1 / ( 60 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col1 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT + tab0.col1 * + 92 FROM tab0 GROUP BY tab0.col1
----
0
7452

query I rowsort
SELECT ALL + 25 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT DISTINCT - + tab0.col2 AS col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + col0 * + cor0.col0 + - 99 FROM tab2 AS cor0 GROUP BY cor0.col0
----
126
8182
8365

query I rowsort
SELECT 53 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT + 62 AS col1 FROM tab0 GROUP BY tab0.col0
----
62
62
62

query I rowsort
SELECT ALL + 75 * - tab1.col1 + + col1 FROM tab1 GROUP BY tab1.col1
----
-3256
-4218
-444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 47 AS col2 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
-47
-47
-47

query I rowsort
SELECT col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

onlyif mysql # DIV for integer division: 
query I rowsort label-8543
SELECT ALL + tab2.col2 DIV tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8543
SELECT ALL + tab2.col2 / tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 32 * col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1440
2272
256

query I rowsort
SELECT + 73 AS col1 FROM tab2 GROUP BY tab2.col1
----
73
73
73

onlyif mysql # DIV for integer division: 
query I rowsort label-8547
SELECT ALL + 0 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8547
SELECT ALL + 0 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT - 90 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-90
-90
-90

query I rowsort
SELECT ALL 80 FROM tab1 GROUP BY tab1.col0
----
80
80
80

query I rowsort
SELECT tab1.col0 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT + cor0.col1 - - cor0.col1 * - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6480
0

query I rowsort
SELECT + 70 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
70
70
70

query I rowsort
SELECT - 35 * 24 AS col1 FROM tab1 GROUP BY col0
----
-840
-840
-840

query I rowsort
SELECT + 59 * 81 AS col1 FROM tab1 GROUP BY col0
----
4779
4779
4779

query I rowsort
SELECT ALL cor0.col2 * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2025
5041
64

query I rowsort
SELECT - ( col1 ) FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 96 FROM tab1 GROUP BY tab1.col0
----
96

query I rowsort
SELECT col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + 13 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
13
13
13

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 + col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
158
48
76

query I rowsort
SELECT ALL 42 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
48
86
99

query I rowsort
SELECT tab1.col2 * 96 AS col2 FROM tab1 GROUP BY col2
----
4320
6816
768

query I rowsort
SELECT ALL - tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 * 24 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
0
1944

query I rowsort
SELECT cor1.col0 + + 76 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
167
168
91

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT - 28 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-28
-28
-28

query I rowsort
SELECT + - 62 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4
17
25

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
59

query I rowsort
SELECT DISTINCT + 32 AS col0 FROM tab1 GROUP BY col0
----
32

onlyif mysql # DIV for integer division: 
query I rowsort label-8573
SELECT + 70 * NULLIF ( 66 DIV - cor0.col2, 18 + 2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-70
0
0

skipif mysql # not compatible
query I rowsort label-8573
SELECT + 70 * NULLIF ( 66 / - cor0.col2, 18 + 2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-70
0
0

query I rowsort
SELECT ALL + 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
39
39
39

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - 51 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1224
1938
4029

query I rowsort
SELECT DISTINCT + 89 AS col1 FROM tab0 GROUP BY tab0.col1
----
89

onlyif mysql # DIV for integer division: 
query I rowsort label-8578
SELECT 36 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8578
SELECT 36 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT 28 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
107
115
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 53 col1 FROM tab1 GROUP BY tab1.col0
----
-53

query I rowsort
SELECT DISTINCT ( + 82 ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-10
-9
67

query I rowsort
SELECT - 37 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-37
-37
-37

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-8584
SELECT DISTINCT cor0.col1 DIV cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-8584
SELECT DISTINCT cor0.col1 / cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1

query I rowsort
SELECT DISTINCT - 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-75

query I rowsort
SELECT DISTINCT 51 FROM tab2 cor0 GROUP BY cor0.col1
----
51

query I rowsort
SELECT + col2 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
26
26
26

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 cor1.col0 * - 44 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1144
-1892
-3652

onlyif mysql # DIV for integer division: 
query I rowsort label-8592
SELECT DISTINCT - 67 + tab0.col2 DIV + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-66

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8592
SELECT DISTINCT - 67 + tab0.col2 / + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-66

onlyif mysql # DIV for integer division: 
query I rowsort label-8593
SELECT - - COALESCE ( 39, + tab2.col2 DIV + tab2.col1 + - tab2.col0, - tab2.col0 ) FROM tab2 GROUP BY tab2.col1
----
39
39
39

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8593
SELECT - - COALESCE ( 39, + tab2.col2 / + tab2.col1 + - tab2.col0, - tab2.col0 ) FROM tab2 GROUP BY tab2.col1
----
39
39
39

query I rowsort
SELECT - 13 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1027
1131
754

query I rowsort
SELECT ALL + 2 + 0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8596
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8596
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 18 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
18
18
18

query I rowsort
SELECT DISTINCT + 46 AS col2 FROM tab0 GROUP BY col1
----
46

onlyif mysql # DIV for integer division: 
query I rowsort label-8599
SELECT cor0.col1 + - cor0.col0 DIV + 63 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-1
0
81

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8599
SELECT cor0.col1 + - cor0.col0 / + 63 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-1
0
81

query I rowsort
SELECT DISTINCT + - tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - - 98 AS col2 FROM tab1 GROUP BY tab1.col2
----
98

query I rowsort
SELECT 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT ALL 97 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT ( 90 ) FROM tab0 cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT ALL ( cor0.col2 ) + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 + + 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
284
8340
8523

query I rowsort
SELECT - + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 23 AS col1 FROM tab0 GROUP BY tab0.col1
----
23

query I rowsort
SELECT 43 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1032
1634
3397

query I rowsort
SELECT 85 AS col2 FROM tab0 GROUP BY tab0.col2
----
85
85
85

query I rowsort
SELECT - 17 FROM tab0 AS cor0 GROUP BY col0
----
-17
-17
-17

query I rowsort
SELECT ALL + 46 * 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3772
3772
3772

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT DISTINCT 79 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79

query I rowsort
SELECT ALL - 97 + 92 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT ALL 34 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
34
34
34

query I rowsort
SELECT - COALESCE ( + cor0.col1, - cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + 38 FROM tab1 GROUP BY tab1.col1
----
38
38
38

query I rowsort
SELECT - 92 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-92
-92

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + COALESCE ( + cor0.col2, col2 ) + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
116
158
174

query I rowsort
SELECT - - tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT 52 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
52
52
52

query I rowsort
SELECT ALL 52 AS col1 FROM tab2 GROUP BY tab2.col2
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-8626
SELECT ALL + COALESCE ( cor0.col2, - cor0.col2 DIV cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-8626
SELECT ALL + COALESCE ( cor0.col2, - cor0.col2 / cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8627
SELECT - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8627
SELECT - CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 23 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 + tab0.col0 col0 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT - 33 + + tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1969
-3282
-69

query I rowsort
SELECT - 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-20
-20
-20

query I rowsort
SELECT - cor0.col2 + - 21 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-100
-108
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - cor0.col2 + cor0.col2 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1305
-184
-5893

query I rowsort
SELECT ALL - + 4 FROM tab2 GROUP BY tab2.col2
----
-4
-4
-4

onlyif mysql # DIV for integer division: 
query I rowsort label-8638
SELECT DISTINCT + + 16 DIV - NULLIF ( - tab0.col0, tab0.col0 ) + 17 * + 36 AS col1 FROM tab0 GROUP BY tab0.col0
----
612

skipif mysql # not compatible
query I rowsort label-8638
SELECT DISTINCT + + 16 / - NULLIF ( - tab0.col0, tab0.col0 ) + 17 * + 36 AS col1 FROM tab0 GROUP BY tab0.col0
----
612

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
2070
5112
72

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 93 AS col1 FROM tab2 GROUP BY col0
----
93
93
93

query I rowsort
SELECT - NULLIF ( - tab1.col1, + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL 39 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1716
2223
234

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 21, - tab0.col1 * - tab0.col0, - 74 * col1 + - col0 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
21
21

query I rowsort
SELECT ( col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + col2 * - ( + tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8648
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8648
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT tab0.col2 * 4 AS col0 FROM tab0 GROUP BY tab0.col2
----
152
316
96

onlyif mysql # DIV for integer division: 
query I rowsort label-8650
SELECT - 9 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8650
SELECT - 9 / cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8651
SELECT ALL 34 DIV 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8651
SELECT ALL 34 / 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 33 + - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1816
-643
-6856

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8653
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8653
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 5 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT DISTINCT 8 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
464
632
696

query I rowsort
SELECT ALL 54 AS col2 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT + - 56 * tab2.col1 FROM tab2 GROUP BY col1
----
-2296
-3304
-3416

query I rowsort
SELECT ALL + + 1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT col0 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - 60 * + col0 + ( + 80 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1480
-2500
-4900

query I rowsort
SELECT + 66 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT cor0.col2 - ( 59 ) * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3480
4740
5220

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-15
-91
-92

query I rowsort
SELECT 99 AS col1 FROM tab2 GROUP BY tab2.col0
----
99
99
99

query I rowsort
SELECT + 8 AS col0 FROM tab0 GROUP BY tab0.col2
----
8
8
8

query I rowsort
SELECT ALL 11 FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT col2 * tab2.col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3422
6320
7656

query I rowsort
SELECT DISTINCT 88 * col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2288
3784
7304

query I rowsort
SELECT DISTINCT - 60 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-60

query I rowsort
SELECT col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1444
576
6241

query I rowsort
SELECT DISTINCT - 93 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-32
-34
-52

query I rowsort
SELECT ALL 49 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + 64 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT + tab2.col1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - - 93 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
93
93
93

query I rowsort
SELECT - col0 * cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col2, cor0.col0
----
-3483
0
0

query I rowsort
SELECT + - 74 FROM tab1 GROUP BY tab1.col0
----
-74
-74
-74

onlyif mysql # DIV for integer division: 
query I rowsort label-8681
SELECT tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8681
SELECT tab0.col2 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col0 + - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-166
-52
-86

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 DISTINCT + col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT col1 FROM tab2 GROUP BY tab2.col1 HAVING col1 IS NOT NULL
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
484
6724
784

query I rowsort
SELECT - 41 * + 74 FROM tab0 AS cor0 GROUP BY col2
----
-3034
-3034
-3034

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8688
SELECT DISTINCT CAST( 81 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
81

skipif mysql # not compatible
query I rowsort label-8688
SELECT DISTINCT CAST ( 81 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
81

query I rowsort
SELECT 2 + - 18 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - 26 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2106
0
0

query I rowsort
SELECT 76 AS col0 FROM tab2 GROUP BY tab2.col0
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 0 col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL - 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT + 27 - 37 * + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-1009
-3007
-787

query I rowsort
SELECT 87 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
5
59
65

query I rowsort
SELECT 9 FROM tab1 cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT DISTINCT - + 56 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-56

query I rowsort
SELECT DISTINCT - 82 FROM tab1 GROUP BY tab1.col0
----
-82

query I rowsort
SELECT 81 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
81
81
81

query I rowsort
SELECT - col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 23 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23

query I rowsort
SELECT ALL ( - 76 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-76
-76
-76

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab1 cor0 GROUP BY col0, cor0.col0
----
484
6724
784

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-8704
SELECT CAST( + 22 AS SIGNED ) - col0 DIV + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
20
21
22

skipif mysql # not compatible
query I rowsort label-8704
SELECT CAST ( + 22 AS INTEGER ) - col0 / + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
20
21
22

query I rowsort
SELECT cor0.col0 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-132
-1596
-3608

query I rowsort
SELECT + + 38 - + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-41
0
14

query I rowsort
SELECT - + 9 * + tab2.col2 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-464
-632
-696

query I rowsort
SELECT DISTINCT NULLIF ( + cor0.col1, col1 ) / cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 20 col2 FROM tab0 GROUP BY col2
----
20

onlyif mysql # DIV for integer division: 
query I rowsort label-8710
SELECT + 21 DIV + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8710
SELECT + 21 / + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - tab2.col0 + 15 AS col0 FROM tab2 GROUP BY tab2.col0
----
-76
-77
0

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT + 63 AS col0 FROM tab1 GROUP BY tab1.col0
----
63

query I rowsort
SELECT - - tab2.col1 - col1 FROM tab2 GROUP BY col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
15
15
15

query I rowsort
SELECT DISTINCT + 23 AS col0 FROM tab0 GROUP BY tab0.col2
----
23

query I rowsort
SELECT ALL - COALESCE ( tab2.col1, - tab2.col1 * - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - ( 47 ) FROM tab2 GROUP BY tab2.col2
----
-47
-47
-47

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab1 GROUP BY tab1.col2
----
71

query I rowsort
SELECT 26 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - + 67 FROM tab1 GROUP BY tab1.col0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT - tab2.col2 AS col2 FROM tab2 WHERE NOT NULL IS NULL GROUP BY col2
----

query I rowsort
SELECT DISTINCT - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( NULL ) <> NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + tab1.col0 col1 FROM tab1 WHERE NOT NULL <= NULL GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + tab1.col1 * + col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL + cor0.col1 * 20 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1083
114
836

query I rowsort
SELECT 27 + 44 FROM tab2 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT ALL - 10 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-10
-10

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + tab0.col1 * tab0.col1 + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col2 FROM tab0 GROUP BY tab0.col2
----
18
18
18

query I rowsort
SELECT ALL 76 + tab1.col0 * ( tab1.col0 ) FROM tab1 GROUP BY col0
----
560
6800
860

query I rowsort
SELECT - 41 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab0 cor0 GROUP BY col1, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 15 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col1
----
15
15
15
15

query I rowsort
SELECT - 54 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-54
-54
-54

query I rowsort
SELECT ALL - 3 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-114
-237
-72

query I rowsort
SELECT ALL 96 FROM tab2 GROUP BY tab2.col0
----
96
96
96

query I rowsort
SELECT DISTINCT + tab1.col2 * 7 AS col1 FROM tab1 GROUP BY col2
----
315
497
56

query I rowsort
SELECT ALL - col0 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT + - col1 + - 50 AS col0 FROM tab2 GROUP BY tab2.col1
----
-109
-111
-91

query I rowsort
SELECT + 15 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1230
330
420

query I rowsort
SELECT col0 FROM tab1 WHERE NOT tab1.col0 IS NOT NULL GROUP BY tab1.col0
----

query I rowsort
SELECT - tab1.col1 * - tab1.col1 FROM tab1 GROUP BY col1 HAVING NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-8747
SELECT - cor0.col1 - - cor0.col1 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-44
-55
-6

skipif mysql # not compatible
query I rowsort label-8747
SELECT - cor0.col1 - - cor0.col1 / + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-44
-55
-6

query I rowsort
SELECT 5 AS col1 FROM tab1 GROUP BY tab1.col0
----
5
5
5

query I rowsort
SELECT DISTINCT 98 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
98

query I rowsort
SELECT ALL - 93 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-93
-93
-93

query I rowsort
SELECT ALL + 24 AS col0 FROM tab2 GROUP BY tab2.col0
----
24
24
24

query I rowsort
SELECT + NULLIF ( 95, - col1 ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
95
95
95

query I rowsort
SELECT 71 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3195
5041
568

query I rowsort
SELECT ALL 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT ALL 64 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1536
-2432
-5056

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-90

query I rowsort
SELECT 77 AS col1 FROM tab2 GROUP BY tab2.col0
----
77
77
77

query I rowsort
SELECT 43 - cor0.col1 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-6518
43
43

query I rowsort
SELECT - 19 AS col0 FROM tab1 GROUP BY tab1.col0
----
-19
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 * tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 + + tab1.col1 col0 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL - - 95 AS col0 FROM tab2 GROUP BY tab2.col1
----
95
95
95

query I rowsort
SELECT ALL + 90 AS col2 FROM tab0 GROUP BY tab0.col0
----
90
90
90

query I rowsort
SELECT ALL 30 - tab0.col2 FROM tab0 GROUP BY col2
----
-49
-8
6

query I rowsort
SELECT ALL 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
51
51
51

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 - - 54 AS col2 FROM tab0 GROUP BY tab0.col1
----
54
54

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, col2
----
24
38
79

query I rowsort
SELECT ALL - cor1.col2 + 11 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-47
-68
-76

query I rowsort
SELECT DISTINCT CASE + cor0.col2 WHEN - 92 THEN - cor0.col2 + + 86 WHEN + cor0.col2 * - cor0.col2 THEN 18 END + 99 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
NULL

query I rowsort
SELECT + 89 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
89
89
89

query I rowsort
SELECT ALL - + 2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2
-2
-2

query I rowsort
SELECT DISTINCT 75 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
101
118
158

query I rowsort
SELECT ALL 67 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
67
67
67

query I rowsort
SELECT ALL - col0 * 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4277
-4324
-705

query I rowsort
SELECT + 38 AS col1 FROM tab1 GROUP BY tab1.col1
----
38
38
38

query I rowsort
SELECT + 65 FROM tab0 GROUP BY tab0.col1
----
65
65

query I rowsort
SELECT DISTINCT + tab2.col2 + - 87 FROM tab2 GROUP BY tab2.col2
----
-29
-8
0

query I rowsort
SELECT DISTINCT + - 68 AS col0 FROM tab1 GROUP BY tab1.col2
----
-68

query I rowsort
SELECT ALL + 54 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
54
54
54

query I rowsort
SELECT ALL cor0.col2 + 50 FROM tab1 AS cor0 GROUP BY cor0.col2
----
121
58
95

query I rowsort
SELECT - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-8784
SELECT - cor0.col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8784
SELECT - cor0.col2 / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-8785
SELECT ALL - cor0.col0 DIV 32 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
42
81

skipif mysql # not compatible
query I rowsort label-8785
SELECT ALL - cor0.col0 / 32 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
42
81

query I rowsort
SELECT DISTINCT - - tab1.col1 - 31 FROM tab1 GROUP BY tab1.col1
----
-25
13
26

query I rowsort
SELECT DISTINCT - 69 AS col1 FROM tab0 GROUP BY col1
----
-69

onlyif mysql # DIV for integer division: 
query I rowsort label-8788
SELECT ALL tab1.col2 DIV - 27 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8788
SELECT ALL tab1.col2 / - 27 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1
-2
0

query I rowsort
SELECT DISTINCT - 95 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-95

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT 85 * 25 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
2125
2125
2125

query I rowsort
SELECT DISTINCT COALESCE ( tab0.col2, - tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 20 FROM tab1 GROUP BY tab1.col2
----
20

query I rowsort
SELECT 7 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
7

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT 67 + 47 FROM tab0 GROUP BY tab0.col2
----
114

query I rowsort
SELECT 41 AS col2 FROM tab0 GROUP BY tab0.col1
----
41
41

query I rowsort
SELECT - 4 FROM tab1 GROUP BY tab1.col2
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + 88 FROM tab0 AS cor0 GROUP BY col2
----
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 30 * + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY col2
----
1350
2130
240

query I rowsort
SELECT DISTINCT + 70 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
70

query I rowsort
SELECT DISTINCT - 65 AS col2 FROM tab0 GROUP BY tab0.col1
----
-65

query I rowsort
SELECT ALL + 23 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT - cor0.col1 - - 30 * - col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-1407
-2174
-246

query I rowsort
SELECT ALL - 63 AS col0 FROM tab2 GROUP BY tab2.col2
----
-63
-63
-63

query I rowsort
SELECT DISTINCT tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - 43 FROM tab2 GROUP BY tab2.col0
----
-43

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - tab0.col2 + - COALESCE ( 57, tab0.col0, + tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-136
-81
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 21 + - 49 col2 FROM tab0 GROUP BY tab0.col2
----
-28

query I rowsort
SELECT DISTINCT NULLIF ( - cor0.col1, col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 98 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
98

query I rowsort
SELECT DISTINCT col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - - tab0.col2 * col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IN ( tab0.col0 )
----

query I rowsort
SELECT col0 * + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + + 63 FROM tab1 GROUP BY tab1.col0
----
63
63
63

query I rowsort
SELECT DISTINCT + + tab1.col2 * - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8819
SELECT - cor0.col0 - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8819
SELECT - cor0.col0 - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-8820
SELECT + + 29 - - tab1.col1 DIV 77 AS col1 FROM tab1 GROUP BY tab1.col1
----
29
29
29

skipif mysql # not compatible
query I rowsort label-8820
SELECT + + 29 - - tab1.col1 / 77 AS col1 FROM tab1 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT + 11 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
52
70
72

query I rowsort
SELECT - - tab0.col1 + + ( + 75 ) FROM tab0 GROUP BY tab0.col1
----
156
75

query I rowsort
SELECT ALL 69 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT - cor0.col2 * 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-135
-213
-24

query I rowsort
SELECT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col1, cor0.col2
----
9 values hashing to ad2e5fa6d094292bda21bf46c78171b8

query I rowsort
SELECT 18 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT - 92 AS col0 FROM tab2 GROUP BY tab2.col2
----
-92
-92
-92

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 52 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT DISTINCT + 2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2

query I rowsort
SELECT - col1 AS col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL tab0.col0 + 41 AS col1 FROM tab0 GROUP BY tab0.col0
----
124
67
84

query I rowsort
SELECT ALL cor0.col2 * - 25 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1975
-600
-950

query I rowsort
SELECT ALL + 68 * - 3 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-204
-204
-204

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT - 5 AS col1 FROM tab2 GROUP BY col2
----
-5
-5
-5

query I rowsort
SELECT ALL cor0.col0 * - 30 FROM tab1 AS cor0 GROUP BY col0
----
-2460
-660
-840

query I rowsort
SELECT + 47 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT - tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT + tab1.col0 IS NULL
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 21 col0 FROM tab0 GROUP BY tab0.col2
----
21

query I rowsort
SELECT + NULLIF ( 29, tab1.col0 + ( tab1.col0 ) ) FROM tab1 GROUP BY tab1.col0
----
29
29
29

query I rowsort
SELECT ALL - 64 FROM tab2 GROUP BY tab2.col0
----
-64
-64
-64

query I rowsort
SELECT + - cor0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col1 * tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT + + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + 46 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
46
46

query I rowsort
SELECT + 24 + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
106
46
52

query I rowsort
SELECT DISTINCT - 95 FROM tab2 AS cor0 GROUP BY col0
----
-95

query I rowsort
SELECT DISTINCT 0 FROM tab0 AS cor0 GROUP BY col1
----
0

query I rowsort
SELECT ALL - col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL - 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col1 - - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
3813
5428
976

query I rowsort
SELECT - 81 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-1215
-7371
-7452

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8856
SELECT DISTINCT - CAST( NULL AS SIGNED ) + 62 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8856
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + 62 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT 70 FROM tab0 AS cor0 GROUP BY cor0.col0
----
70
70
70

onlyif mysql # DIV for integer division: 
query I rowsort label-8858
SELECT DISTINCT cor0.col2 DIV + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-8858
SELECT DISTINCT cor0.col2 / + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1

query I rowsort
SELECT ALL 69 FROM tab1 GROUP BY tab1.col0
----
69
69
69

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 35 - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-47
13
7

query I rowsort
SELECT + 68 AS col0 FROM tab1 GROUP BY col2
----
68
68
68

query I rowsort
SELECT ALL + 36 FROM tab1 GROUP BY tab1.col1
----
36
36
36

query I rowsort
SELECT ALL + 78 AS col1 FROM tab0 GROUP BY tab0.col2
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * - 3 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-273
-276
-45

query I rowsort
SELECT - 30 FROM tab2 AS cor0 GROUP BY col2
----
-30
-30
-30

query I rowsort
SELECT - 83 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4
-45
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-63
-63

query I rowsort
SELECT ALL 50 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
50
50

query I rowsort
SELECT + 41 FROM tab2 GROUP BY tab2.col2
----
41
41
41

onlyif mysql # DIV for integer division: 
query I rowsort label-8871
SELECT DISTINCT 31 DIV + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

skipif mysql # not compatible
query I rowsort label-8871
SELECT DISTINCT 31 / + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL ( - NULLIF ( - col0, + cor0.col0 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT COALESCE ( + cor0.col2, + 45 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 28 col1 FROM tab2 GROUP BY tab2.col1
----
28

query I rowsort
SELECT DISTINCT - + 76 AS col1 FROM tab2 GROUP BY tab2.col1
----
-76

query I rowsort
SELECT 36 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT 96 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
96
96
96

query I rowsort
SELECT NULLIF ( - 90, cor0.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 DISTINCT - - tab2.col1 * tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
506
6806
812

query I rowsort
SELECT ALL 48 + + 15 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
63
63
63

query I rowsort
SELECT + - 12 FROM tab2 GROUP BY tab2.col1
----
-12
-12
-12

query I rowsort
SELECT + - 78 FROM tab1 GROUP BY tab1.col1
----
-78
-78
-78

query I rowsort
SELECT ALL + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT - COALESCE ( col2, + cor0.col2 ) + + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-17
-20
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + col1 * 34 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2673

query I rowsort
SELECT DISTINCT 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
36

query I rowsort
SELECT tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT tab0.col2 * - tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1482
-600
-6320

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 + + 86 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1935
6975
762

onlyif mysql # DIV for integer division: 
query I rowsort label-8891
SELECT DISTINCT 10 DIV - cor0.col1 + - 62 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-62
-63

skipif mysql # not compatible
query I rowsort label-8891
SELECT DISTINCT 10 / - cor0.col1 + - 62 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-62
-63

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8892
SELECT ALL - CAST( NULL AS SIGNED ) * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8892
SELECT ALL - CAST ( NULL AS INTEGER ) * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 55 * tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
1430
2365
4565

onlyif mysql # DIV for integer division: 
query I rowsort label-8894
SELECT DISTINCT ( 26 ) DIV - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8894
SELECT DISTINCT ( 26 ) / - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
-1
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8895
SELECT DISTINCT 44 DIV - 77 FROM tab2 AS cor0 GROUP BY col0
----
0

skipif mysql # not compatible
query I rowsort label-8895
SELECT DISTINCT 44 / - 77 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT ALL - - 2 AS col1 FROM tab0 GROUP BY tab0.col0
----
2
2
2

query I rowsort
SELECT ALL + ( 24 ) + - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-57
24

query I rowsort
SELECT ( - cor0.col1 ) - - 6 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-35
-53
-55

query I rowsort
SELECT ALL 66 FROM tab0 GROUP BY col2
----
66
66
66

query I rowsort
SELECT 74 + 67 AS col1 FROM tab0 GROUP BY tab0.col1
----
141
141

query I rowsort
SELECT cor0.col2 * 47 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2784
3792
4176

query I rowsort
SELECT DISTINCT 11 * + 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
660

query I rowsort
SELECT DISTINCT - 31 FROM tab0 cor0 GROUP BY cor0.col0
----
-31

query I rowsort
SELECT - 16 FROM tab1 GROUP BY col0
----
-16
-16
-16

query I rowsort
SELECT 48 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
131
74
91

query I rowsort
SELECT ALL + col0 * ( - tab1.col0 + - 35 ) + tab1.col0 FROM tab1 GROUP BY col0
----
-1232
-1736
-9512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 31 col2 FROM tab1 GROUP BY tab1.col1
----
-31

query I rowsort
SELECT 77 - + 79 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-2
-2
-2

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 58, + col2 * cor0.col0 + cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col2
----
-58
-58
-58

query I rowsort
SELECT tab1.col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 71 * + 39 FROM tab0 GROUP BY col2
----
2769
2769
2769

query I rowsort
SELECT 81 FROM tab2 GROUP BY col2
----
81
81
81

query I rowsort
SELECT - tab1.col1 + - 46 FROM tab1 GROUP BY tab1.col1
----
-103
-52
-90

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + + ( + col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8917
SELECT DISTINCT - - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8917
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT + 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT 33 AS col1 FROM tab2 GROUP BY tab2.col2
----
33
33
33

query I rowsort
SELECT 16 AS col2 FROM tab0 GROUP BY tab0.col2
----
16
16
16

query I rowsort
SELECT - + 21 AS col0 FROM tab0 GROUP BY tab0.col2
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 53 col0 FROM tab2 GROUP BY tab2.col0
----
53

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + tab1.col2 * tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + 37 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
37

query I rowsort
SELECT DISTINCT + 76 AS col2 FROM tab1 GROUP BY tab1.col1
----
76

query I rowsort
SELECT ALL cor0.col0 - - 27 FROM tab2 AS cor0 GROUP BY cor0.col0
----
118
119
42

query I rowsort
SELECT ALL + cor0.col0 * col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + cor0.col1 * 94 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
7614

query I rowsort
SELECT DISTINCT 71 FROM tab2 GROUP BY tab2.col0
----
71

query I rowsort
SELECT + - 78 AS col1 FROM tab2 GROUP BY tab2.col0
----
-78
-78
-78

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 49 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
49

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8935
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8935
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 51, cor0.col2, - cor0.col0 * cor0.col1 + cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT DISTINCT + tab0.col2 + - col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT tab0.col0 * + col0 AS col1 FROM tab0 GROUP BY col0
----
1849
676
6889

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 ALL 7 AS col0 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT - 82 AS col0 FROM tab2 GROUP BY tab2.col1
----
-82
-82
-82

query I rowsort
SELECT ALL + 43 - + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-38
43

query I rowsort
SELECT DISTINCT 34 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT ALL ( 93 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
93
93

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 95, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
95
95

query I rowsort
SELECT + + 32 FROM tab0 GROUP BY tab0.col2
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + 46 col2 FROM tab0 AS cor0 GROUP BY col0
----
129
72
89

query I rowsort
SELECT - cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor0.col1 + + ( + cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 * col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
240
8372
8556

query I rowsort
SELECT DISTINCT CASE cor0.col1 WHEN + 55 THEN + cor0.col1 END * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, col2
----
24
38
79

query I rowsort
SELECT DISTINCT - ( tab2.col2 ) * tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3422
-6320
-7656

query I rowsort
SELECT NULLIF ( + 12, + cor0.col1 * + cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
12
12
12

query I rowsort
SELECT - - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col2 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab1.col0 ) col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT 0 * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + tab1.col0 + - 25 FROM tab1 GROUP BY tab1.col0
----
-3
3
57

query I rowsort
SELECT + - 42 FROM tab0 GROUP BY tab0.col2
----
-42
-42
-42

query I rowsort
SELECT + + 1 FROM tab0 GROUP BY tab0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 73 + + 88 * col2 col2 FROM tab1 GROUP BY tab1.col2
----
4033
6321
777

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 col1 FROM tab2 GROUP BY col1
----
76

query I rowsort
SELECT DISTINCT - 57 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-19
-33
22

query I rowsort
SELECT ALL 9 * + cor0.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
405
639
72

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab2 GROUP BY tab2.col0
----
99

query I rowsort
SELECT ALL - cor0.col1 + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-38
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 19 col1 FROM tab1 GROUP BY tab1.col2
----
19
19
19

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( COALESCE ( 80, + cor0.col1 - + cor0.col2, cor0.col1 + cor0.col0 * COALESCE ( + cor0.col1 + col1, cor0.col0, COALESCE ( 6, cor0.col2 * + 53 ) + 67 ) ), + cor0.col1 * + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT ALL - cor0.col0 + - 5 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-27
-33
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-8977
SELECT - NULLIF ( cor0.col0, - 72 ) DIV col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8977
SELECT - NULLIF ( cor0.col0, - 72 ) / col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT 49 FROM tab0 GROUP BY tab0.col2
----
49
49
49

query I rowsort
SELECT col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NOT NULL
----
1936
3249
36

query I rowsort
SELECT 57 * tab2.col1 + + 54 FROM tab2 GROUP BY col1
----
2391
3417
3531

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 49 + - 75 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-124
-124
-124

query I rowsort
SELECT DISTINCT + cor0.col0 + + 21 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2002
2024
330

query I rowsort
SELECT 5 * cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
120
190
395

query I rowsort
SELECT + 93 FROM tab1 AS cor0 GROUP BY cor0.col0
----
93
93
93

onlyif mysql # DIV for integer division: 
query I rowsort label-8987
SELECT ALL - 11 DIV - 61 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8987
SELECT ALL - 11 / - 61 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 61 * + col1 AS col0 FROM tab1 GROUP BY col1
----
2684
3477
366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 63 * 48 col1 FROM tab1 GROUP BY tab1.col0
----
3024
3024
3024

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * + col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL - - ( - 58 ) FROM tab1 GROUP BY tab1.col2
----
-58
-58
-58

query I rowsort
SELECT ALL + - 99 AS col0 FROM tab2 GROUP BY tab2.col1
----
-99
-99
-99

query I rowsort
SELECT ALL + 42 * - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-3822
-3864
-630

query I rowsort
SELECT DISTINCT + 60 FROM tab1 GROUP BY col2
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 19 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 45, + cor0.col0 + ( + cor0.col2 ) ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-9000
SELECT ALL 78 DIV + cor0.col2 + - 59 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-59
-59

skipif mysql # not compatible
query I rowsort label-9000
SELECT ALL 78 / + cor0.col2 + - 59 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-59
-59

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-12
2
27

query I rowsort
SELECT - cor0.col1 + + 37 FROM tab0 AS cor0 GROUP BY col1
----
-44
37

query I rowsort
SELECT ALL + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
22
28
82

query I rowsort
SELECT + tab1.col1 * - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + tab1.col1 - tab1.col1 * col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT + col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + 58 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
58
58
58

query I rowsort
SELECT - 21 AS col0 FROM tab0 GROUP BY tab0.col0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - 8 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-8
-8
-8

query I rowsort
SELECT ALL - 85 AS col2 FROM tab2 GROUP BY tab2.col2
----
-85
-85
-85

query I rowsort
SELECT + 11 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1001
1012
165

query I rowsort
SELECT DISTINCT ( 35 ) AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
35

query I rowsort
SELECT + 77 * + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
1155
7007
7084

query I rowsort
SELECT - 66 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-66
-66
-66

query I rowsort
SELECT ALL + 20 FROM tab1 GROUP BY tab1.col1
----
20
20
20

query I rowsort
SELECT + + 9 AS col2 FROM tab0 GROUP BY tab0.col1
----
9
9

query I rowsort
SELECT DISTINCT - + 6 FROM tab2 GROUP BY tab2.col2
----
-6

query I rowsort
SELECT 38 FROM tab0 cor0 GROUP BY cor0.col0, col0
----
38
38
38

query I rowsort
SELECT DISTINCT - - tab0.col1 + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT ALL - 76 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-76
-76

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
93

query I rowsort
SELECT DISTINCT + 54 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
54

query I rowsort
SELECT DISTINCT - + 10 + + tab1.col0 FROM tab1 GROUP BY col0
----
12
18
72

query I rowsort
SELECT - + 6 FROM tab0 GROUP BY tab0.col2
----
-6
-6
-6

query I rowsort
SELECT ALL - - 74 + - tab2.col0 FROM tab2 GROUP BY col0
----
-17
-18
59

query I rowsort
SELECT + ( - 90 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1
----
-90
-90
-90

query I rowsort
SELECT DISTINCT 68 * + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
1020
6188
6256

query I rowsort
SELECT - - 29 FROM tab2 GROUP BY tab2.col1
----
29
29
29

query I rowsort
SELECT ALL - col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT - ( 20 ) FROM tab2 AS cor0 GROUP BY col0
----
-20
-20
-20

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 67 FROM tab1 GROUP BY tab1.col2
----
67

query I rowsort
SELECT ALL - 6 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6
-6
-6

query I rowsort
SELECT DISTINCT + 16 AS col2 FROM tab0 GROUP BY tab0.col2
----
16

query I rowsort
SELECT DISTINCT + 46 FROM tab0 GROUP BY tab0.col2
----
46

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 55 col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1, cor1.col2
----
-55

query I rowsort
SELECT - 23 AS col0 FROM tab1 GROUP BY tab1.col1
----
-23
-23
-23

query I rowsort
SELECT + cor0.col0 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT DISTINCT + + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 52 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-52
-52
-52

query I rowsort
SELECT ALL + 94 * ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7614

query I rowsort
SELECT ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT - tab0.col2 + + 49 FROM tab0 GROUP BY col2
----
-30
11
25

query I rowsort
SELECT DISTINCT 78 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
78

query I rowsort
SELECT DISTINCT cor0.col1 + - 90 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-9
-90

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 38 col2 FROM tab1 GROUP BY tab1.col2
----
-38
-38
-38

query I rowsort
SELECT tab2.col2 + ( + 23 ) FROM tab2 GROUP BY tab2.col2
----
102
110
81

query I rowsort
SELECT cor0.col0 + - ( - 62 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
153
154
77

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1320
5428
7280

query I rowsort
SELECT + 37 FROM tab2 GROUP BY tab2.col0
----
37
37
37

query I rowsort
SELECT DISTINCT + tab1.col0 + ( 22 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
104
44
50

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - col1 + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9060
SELECT cor0.col1 + - CAST( 79 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-18
-20
-38

skipif mysql # not compatible
query I rowsort label-9060
SELECT cor0.col1 + - CAST ( 79 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-18
-20
-38

query I rowsort
SELECT DISTINCT - - 8 FROM tab0 GROUP BY col1
----
8

query I rowsort
SELECT + - ( - tab0.col1 ) * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + cor0.col0 - + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - ( 35 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-9065
SELECT DISTINCT tab2.col1 DIV tab2.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-9065
SELECT DISTINCT tab2.col1 / tab2.col1 col1 FROM tab2 GROUP BY col1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 * tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT 41 AS col1 FROM tab1 GROUP BY tab1.col0
----
41

query I rowsort
SELECT cor0.col2 + - 49 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4
-41
22

query I rowsort
SELECT ALL + + tab1.col2 - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL + tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-9072
SELECT DISTINCT col2 DIV 91 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-9072
SELECT DISTINCT col2 / 91 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT + col1 * + ( tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - cor0.col0 * 86 AS col2 FROM tab1 AS cor0 GROUP BY col1, col0
----
-1892
-2408
-7052

query I rowsort
SELECT ALL cor0.col1 + 84 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
128
141
90

query I rowsort
SELECT + ( 34 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + 96 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT DISTINCT + tab1.col1 + 62 AS col1 FROM tab1 GROUP BY tab1.col1
----
106
119
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + - 27 col1 FROM tab1 AS cor0 GROUP BY col1
----
-21
17
30

query I rowsort
SELECT ALL + 46 FROM tab1 GROUP BY tab1.col1
----
46
46
46

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 36 FROM tab0 GROUP BY tab0.col0
----
36
36
36

query I rowsort
SELECT DISTINCT + 60 AS col2 FROM tab2 GROUP BY tab2.col1
----
60

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9088
SELECT - COALESCE ( + 48, + cor0.col2 DIV cor0.col0, + 84 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9088
SELECT - COALESCE ( + 48, + cor0.col2 / cor0.col0, + 84 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL NULLIF ( + cor0.col0, + col0 + - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 30 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-30
-30
-30

query I rowsort
SELECT DISTINCT + 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76

query I rowsort
SELECT + ( - 25 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 87 col1 FROM tab2 GROUP BY tab2.col0
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 + - cor0.col0 * - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1856
683
6896

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3422
6320
7656

query I rowsort
SELECT DISTINCT + 76 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
76

query I rowsort
SELECT ALL + 23 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1817
552
874

query I rowsort
SELECT ALL - - 10 + tab1.col2 FROM tab1 GROUP BY col2
----
18
55
81

query I rowsort
SELECT + 60 + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
103
143
86

query I rowsort
SELECT 93 AS col0 FROM tab1 GROUP BY tab1.col1
----
93
93
93

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1482
600
6320

query I rowsort
SELECT 0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT - - tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT + 64 FROM tab1 GROUP BY col1
----
64
64
64

query I rowsort
SELECT - 41 + + tab2.col2 FROM tab2 GROUP BY col2
----
17
38
46

query I rowsort
SELECT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col1 + 17 * 48 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
857
875
877

query I rowsort
SELECT ALL + + tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT + + 67 AS col0 FROM tab0 GROUP BY tab0.col1
----
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 89 * cor0.col0 + - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY col0
----
1320
8008
8096

query I rowsort
SELECT DISTINCT 82 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
82

query I rowsort
SELECT DISTINCT - 35 - 31 AS col0 FROM tab2 GROUP BY tab2.col0
----
-66

query I rowsort
SELECT DISTINCT - - col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 66 FROM tab2 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-9119
SELECT 89 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14
2

skipif mysql # not compatible
query I rowsort label-9119
SELECT 89 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14
2

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9121
SELECT + 69 DIV + 40 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9121
SELECT + 69 / + 40 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
1
1
1

query I rowsort
SELECT ALL + 69 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
69
69
69

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 tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NULL
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-9125
SELECT col0 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9125
SELECT col0 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab0 WHERE ( + tab0.col2 ) IN ( + tab0.col2 + tab0.col0 * + tab0.col2 ) GROUP BY tab0.col1
----

query I rowsort
SELECT + tab2.col1 FROM tab2 WHERE - col2 IS NULL GROUP BY tab2.col1
----

query I rowsort
SELECT DISTINCT ( cor0.col0 ) + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT ALL - 54 AS col0 FROM tab2 GROUP BY tab2.col0
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 * 62 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2790

query I rowsort
SELECT - cor0.col0 + + 67 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1565
2463
5267

query I rowsort
SELECT + ( + cor0.col1 ) + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
114
12
88

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 2 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
2

query I rowsort
SELECT DISTINCT 8 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
352
456
48

query I rowsort
SELECT DISTINCT 94 * cor0.col0 + - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2418
3999
7719

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - - 40 AS col1 FROM tab2 GROUP BY tab2.col0
----
40

query I rowsort
SELECT DISTINCT - + 18 * col0 FROM tab2 GROUP BY tab2.col0
----
-1638
-1656
-270

query I rowsort
SELECT ( 87 ) AS col2 FROM tab1 AS cor0 GROUP BY col0
----
87
87
87

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT 50 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT + col2 * 38 + col2 AS col2 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
1482
3081
936

onlyif mysql # DIV for integer division: 
query I rowsort label-9144
SELECT DISTINCT + 11 DIV - COALESCE ( - 57, cor0.col0, + NULLIF ( - cor0.col0, cor0.col1 DIV cor0.col0 + cor0.col2 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9144
SELECT DISTINCT + 11 / - COALESCE ( - 57, cor0.col0, + NULLIF ( - cor0.col0, cor0.col1 / cor0.col0 + cor0.col2 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

query I rowsort
SELECT DISTINCT + CASE + tab1.col2 WHEN tab1.col2 THEN + tab1.col2 ELSE NULL END FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + + 44 AS col1 FROM tab2 GROUP BY tab2.col2
----
44
44
44

query I rowsort
SELECT ALL cor0.col2 * - 84 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-4872
-6636
-7308

query I rowsort
SELECT 46 AS col0 FROM tab0 GROUP BY tab0.col1
----
46
46

query I rowsort
SELECT DISTINCT - 30 FROM tab2 AS cor0 GROUP BY col0
----
-30

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1806
650
6806

query I rowsort
SELECT + cor0.col2 + - cor0.col2 * col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3306
-6162
-7482

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 - - 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
111
129
131

query I rowsort
SELECT ALL + col0 * cor0.col0 - 87 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
138
8194
8377

query I rowsort
SELECT 82 AS col1 FROM tab2 GROUP BY tab2.col2
----
82
82
82

query I rowsort
SELECT DISTINCT + - 42 AS col2 FROM tab1 GROUP BY tab1.col1
----
-42

query I rowsort
SELECT - 92 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2208
-3496
-7268

query I rowsort
SELECT DISTINCT 40 + + cor0.col0 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
3523
40

query I rowsort
SELECT ALL + tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT col0 * + ( ( 50 ) * + cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11250
414050
423200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - - cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT DISTINCT + tab2.col1 * - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL cor0.col0 * - col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
-1849
-676
-6889

query I rowsort
SELECT - cor0.col1 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-46
32
51

query I rowsort
SELECT DISTINCT - cor0.col1 - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT 6 FROM tab2 AS cor0 GROUP BY col2
----
6

query I rowsort
SELECT - cor0.col1 + + 92 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
31
33
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - col0 * + 83 FROM tab0 GROUP BY tab0.col0
----
-2158
-3569
-6889

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) * tab0.col0 + + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
-1806
-650
-6806

onlyif mysql # DIV for integer division: 
query I rowsort label-9174
SELECT ALL - 99 DIV 74 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9174
SELECT ALL - 99 / 74 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL col2 * 11 AS col1 FROM tab2 GROUP BY tab2.col2
----
638
869
957

query I rowsort
SELECT ALL + + tab1.col2 * - 70 AS col1 FROM tab1 GROUP BY tab1.col2
----
-3150
-4970
-560

query I rowsort
SELECT cor0.col1 * + 94 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
7614

query I rowsort
SELECT ALL cor0.col0 + + 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
112
52
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 72 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT DISTINCT 29 FROM tab1 GROUP BY col1
----
29

query I rowsort
SELECT 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60
60
60

onlyif mysql # DIV for integer division: 
query I rowsort label-9182
SELECT + col2 DIV cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9182
SELECT + col2 / cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 24 FROM tab1 cor0 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT + 90 FROM tab2 cor0 GROUP BY col0
----
90
90
90

query I rowsort
SELECT 94 FROM tab0 AS cor0 GROUP BY col1
----
94
94

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 54 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-2214
-3186
-3294

query I rowsort
SELECT 40 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
40
40
40

query I rowsort
SELECT - 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-95
-95
-95

query I rowsort
SELECT 39 * 37 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1443
1443
1443

query I rowsort
SELECT DISTINCT - tab0.col1 * tab0.col1 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT - + 26 * - tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
1118
2158
676

query I rowsort
SELECT DISTINCT - ( + 67 ) * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5427
0

query I rowsort
SELECT - 19 AS col2 FROM tab0 GROUP BY tab0.col2
----
-19
-19
-19

query I rowsort
SELECT DISTINCT - tab2.col2 - + 94 FROM tab2 GROUP BY tab2.col2
----
-152
-173
-181

query I rowsort
SELECT ALL - cor0.col0 * 23 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2093
-2116
-345

query I rowsort
SELECT ALL - 21 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-21
-21
-21

query I rowsort
SELECT ALL 80 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT - 47 AS col0 FROM tab1 GROUP BY tab1.col0
----
-47
-47
-47

query I rowsort
SELECT - + 79 AS col0 FROM tab1 GROUP BY tab1.col2
----
-79
-79
-79

query I rowsort
SELECT DISTINCT - 21 AS col0 FROM tab0 GROUP BY tab0.col0
----
-21

query I rowsort
SELECT ALL + 13 FROM tab2 GROUP BY tab2.col0
----
13
13
13

query I rowsort
SELECT ALL - tab1.col0 + + 17 AS col2 FROM tab1 GROUP BY tab1.col0
----
-11
-5
-65

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
59

query I rowsort
SELECT + + 11 AS col0 FROM tab2 GROUP BY tab2.col1
----
11
11
11

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT + 8 AS col0 FROM tab0 GROUP BY tab0.col0
----
8
8
8

query I rowsort
SELECT ALL - 82 AS col2 FROM tab2 GROUP BY tab2.col2
----
-82
-82
-82

query I rowsort
SELECT 63 FROM tab0 GROUP BY tab0.col0
----
63
63
63

query I rowsort
SELECT ALL + tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT - + 34 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1394
2006
2074

query I rowsort
SELECT ALL + ( 44 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
44
44
44

query I rowsort
SELECT ALL + 94 FROM tab1 GROUP BY tab1.col1
----
94
94
94

query I rowsort
SELECT ALL + 79 * 80 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6320
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 89 col1 FROM tab2 AS cor0 GROUP BY col1
----
89

query I rowsort
SELECT ALL - 0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 81 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - 6 AS col0 FROM tab2 GROUP BY tab2.col2
----
-6
-6
-6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 11, - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
11
11
11

query I rowsort
SELECT ALL - ( COALESCE ( - 15, + cor0.col2, ( 85 ) ) ) * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1185
360
570

query I rowsort
SELECT + col2 * cor0.col2 + 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1473
605
6270

query I rowsort
SELECT ALL + + 95 AS col0 FROM tab0 GROUP BY tab0.col1
----
95
95

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9224
SELECT ALL - CAST( NULL AS SIGNED ) * 87 col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9224
SELECT ALL - CAST ( NULL AS INTEGER ) * 87 col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 31, col0 + cor0.col2, + 66 * - col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-31
-31
-31

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
52

onlyif mysql # DIV for integer division: 
query I rowsort label-9227
SELECT ALL cor0.col2 DIV + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9227
SELECT ALL cor0.col2 / + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
1
1
1

query I rowsort
SELECT ALL tab0.col0 + col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-9229
SELECT DISTINCT - col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-9229
SELECT DISTINCT - col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT - tab2.col2 + 53 FROM tab2 GROUP BY tab2.col2
----
-26
-34
-5

query I rowsort
SELECT + 36 - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2
-43
12

query I rowsort
SELECT 13 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1053

query I rowsort
SELECT ALL cor1.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT + + 84 AS col1 FROM tab2 GROUP BY tab2.col2
----
84
84
84

query I rowsort
SELECT DISTINCT - 81 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81

query I rowsort
SELECT - 83 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-83
-83
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-9237
SELECT + NULLIF ( cor0.col1, + cor0.col2 ) DIV 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
13
19
20

skipif mysql # not compatible
query I rowsort label-9237
SELECT + NULLIF ( cor0.col1, + cor0.col2 ) / 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
13
19
20

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT - ( 53 ) * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3074
4187
4611

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 93 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-93

query I rowsort
SELECT - tab0.col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 col2 FROM tab1 GROUP BY tab1.col0
----
15
15
15

query I rowsort
SELECT DISTINCT ( tab0.col0 ) AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT ( cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + - tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - ( tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + tab0.col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - 41 FROM tab1 GROUP BY col0
----
-41
-41
-41

query I rowsort
SELECT + - 93 FROM tab2 GROUP BY tab2.col0
----
-93
-93
-93

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 - tab1.col1 * - 80 AS col0 FROM tab1 GROUP BY tab1.col1
----
3520
4560
480

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9253
SELECT DISTINCT cor0.col1 + + CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9253
SELECT DISTINCT cor0.col1 + + CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL

query I rowsort
SELECT 83 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83
83
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - + tab0.col0 * COALESCE ( - 78 * + 66, tab0.col1, tab0.col2 ) FROM tab0 GROUP BY tab0.col0
----
133848
221364
427284

query I rowsort
SELECT 95 AS col2 FROM tab0 GROUP BY tab0.col0
----
95
95
95

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 * - 16 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-1456
-1472
-240

query I rowsort
SELECT col1 * + ( 96 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
4224
5472
576

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( + 9, cor0.col2 * cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
9
9
9

onlyif mysql # DIV for integer division: 
query I rowsort label-9261
SELECT ALL + 43 DIV cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9261
SELECT ALL + 43 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT ( - CASE 35 WHEN + col1 THEN - 90 * - 4 ELSE NULL END ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 83 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-9264
SELECT - 4 + - cor0.col1 DIV - 52 FROM tab1 AS cor0 GROUP BY col1
----
-3
-4
-4

skipif mysql # not compatible
query I rowsort label-9264
SELECT - 4 + - cor0.col1 / - 52 FROM tab1 AS cor0 GROUP BY col1
----
-3
-4
-4

query I rowsort
SELECT DISTINCT cor0.col0 - + cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
0

query I rowsort
SELECT ALL - - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 + 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
167
86

query I rowsort
SELECT DISTINCT + 58 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5278
-5336
-870

query I rowsort
SELECT + + 75 AS col2 FROM tab0 GROUP BY tab0.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 3 col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
-3

query I rowsort
SELECT tab1.col1 + 37 AS col1 FROM tab1 GROUP BY tab1.col1
----
43
81
94

query I rowsort
SELECT - 11 FROM tab2 GROUP BY tab2.col1
----
-11
-11
-11

query I rowsort
SELECT - 72 FROM tab0 cor0 GROUP BY cor0.col1
----
-72
-72

query I rowsort
SELECT + + 55 AS col2 FROM tab1 GROUP BY tab1.col0
----
55
55
55

query I rowsort
SELECT + - 40 AS col2 FROM tab2 GROUP BY tab2.col0
----
-40
-40
-40

query I rowsort
SELECT ALL 37 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
37
37
37

query I rowsort
SELECT ALL 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT ALL 69 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1518
1932
5658

query I rowsort
SELECT ALL - 16 FROM tab0 GROUP BY tab0.col1
----
-16
-16

query I rowsort
SELECT + - col1 - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT ALL + 50 FROM tab1 GROUP BY tab1.col2
----
50
50
50

query I rowsort
SELECT ALL - 97 AS col2 FROM tab0 GROUP BY tab0.col2
----
-97
-97
-97

query I rowsort
SELECT ALL + + cor0.col2 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT tab1.col1 + - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT - tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab2 GROUP BY tab2.col1
----
77

query I rowsort
SELECT 26 FROM tab2 GROUP BY tab2.col2
----
26
26
26

onlyif mysql # DIV for integer division: 
query I rowsort label-9288
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-9288
SELECT - ( tab2.col2 ) / + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT 9 FROM tab0 GROUP BY tab0.col2
----
9
9
9

query I rowsort
SELECT ALL + 73 * + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
4234
5767
6351

query I rowsort
SELECT + + ( 77 ) FROM tab1 GROUP BY tab1.col0
----
77
77
77

query I rowsort
SELECT DISTINCT 11 AS col2 FROM tab2 GROUP BY tab2.col1
----
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 + cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-69
7
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 69 * + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
1794
2967
5727

query I rowsort
SELECT ALL 46 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
46
46
46

query I rowsort
SELECT ALL 83 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
83
83
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9297
SELECT ALL + CAST( 33 AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col2
----
33
33
33

skipif mysql # not compatible
query I rowsort label-9297
SELECT ALL + CAST ( 33 AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col2
----
33
33
33

query I rowsort
SELECT + - 70 AS col0 FROM tab1 GROUP BY col1
----
-70
-70
-70

query I rowsort
SELECT - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 77 FROM tab1 GROUP BY tab1.col0
----
77

query I rowsort
SELECT DISTINCT 57 FROM tab0 AS cor0 GROUP BY col2
----
57

query I rowsort
SELECT DISTINCT - 92 AS col2 FROM tab1 GROUP BY tab1.col0
----
-92

query I rowsort
SELECT ( - 46 ) + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-20
-3
37

query I rowsort
SELECT - - tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + col2 - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL - 67 FROM tab0 GROUP BY tab0.col2
----
-67
-67
-67

query I rowsort
SELECT ALL cor0.col1 + - col1 FROM tab1 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 52 * + 26 FROM tab1 GROUP BY tab1.col0
----
1352

query I rowsort
SELECT DISTINCT + 94 AS col0 FROM tab0 GROUP BY tab0.col2
----
94

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9311
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-9311
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT - ( 6 ) * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-546
-552
-90

query I rowsort
SELECT 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT ALL - col2 * + 61 FROM tab0 GROUP BY tab0.col2
----
-1464
-2318
-4819

query I rowsort
SELECT - - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - - tab2.col0 - 8 AS col0 FROM tab2 GROUP BY tab2.col0
----
7
83
84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9317
SELECT CAST( 10 AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
10
10
10

skipif mysql # not compatible
query I rowsort label-9317
SELECT CAST ( 10 AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
10
10
10

query I rowsort
SELECT DISTINCT col0 - 22 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
6
60

query I rowsort
SELECT cor0.col2 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

onlyif mysql # DIV for integer division: 
query I rowsort label-9320
SELECT ALL - cor0.col2 DIV 89 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9320
SELECT ALL - cor0.col2 / 89 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 65 AS col1 FROM tab0 GROUP BY tab0.col0
----
65
65
65

query I rowsort
SELECT ALL + NULLIF ( + tab1.col0, - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - 0 FROM tab2 GROUP BY col0
----
0
0
0

query I rowsort
SELECT NULLIF ( col1, - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 * - NULLIF ( col0, - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - + 55 FROM tab2 GROUP BY tab2.col1
----
-55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9327
SELECT ALL CAST( NULL AS SIGNED ) / col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9327
SELECT ALL CAST ( NULL AS INTEGER ) / col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 + + cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL <= + col2
----

query I rowsort
SELECT DISTINCT tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + 83 * col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1826
2324
6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 21 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT ALL + cor0.col2 * 24 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1392
1896
2088

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 25 col2 FROM tab0 GROUP BY tab0.col1
----
-25

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 90 FROM tab1 GROUP BY col2
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9340
SELECT DISTINCT + tab1.col1 - - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9340
SELECT DISTINCT + tab1.col1 - - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT + cor0.col1 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL 90 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
11
52
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 * - 9 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-198
-198
-198

query I rowsort
SELECT DISTINCT + 24 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
24

query I rowsort
SELECT DISTINCT cor0.col2 * - 95 + - 58 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2338
-3668
-7563

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ( 19 ) AS col0 FROM tab1 GROUP BY col2
----
19
19
19

query I rowsort
SELECT DISTINCT + 83 AS col2 FROM tab1 GROUP BY tab1.col0
----
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 col0 FROM tab1 GROUP BY tab1.col1
----
97
97
97

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - tab2.col1 + - tab2.col1 * + 67 FROM tab2 GROUP BY col1
----
-2788
-4012
-4148

query I rowsort
SELECT + cor0.col1 + 34 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1353
-1947
-2013

query I rowsort
SELECT ALL 17 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1343
1479
986

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9354
SELECT DISTINCT + - tab1.col2 * - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-9354
SELECT DISTINCT + - tab1.col2 * - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT - 86 + col1 FROM tab1 GROUP BY col1
----
-29
-42
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-9356
SELECT DISTINCT col2 DIV + 89 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9356
SELECT DISTINCT col2 / + 89 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT - 86 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-108
-114
-168

query I rowsort
SELECT + + 65 AS col1 FROM tab1 GROUP BY tab1.col2
----
65
65
65

query I rowsort
SELECT - + 82 * + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-4756
-6478
-7134

query I rowsort
SELECT 93 FROM tab1 GROUP BY tab1.col2
----
93
93
93

query I rowsort
SELECT DISTINCT + col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9362
SELECT DISTINCT - CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9362
SELECT DISTINCT - CAST ( NULL AS REAL ) FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT - 93 FROM tab0 GROUP BY tab0.col1
----
-93
-93

query I rowsort
SELECT ALL - col1 - + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-162
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * + 58 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2378
-3422
-3538

query I rowsort
SELECT ALL 16 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
16
16
16

query I rowsort
SELECT - 3 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-18
-94
-95

query I rowsort
SELECT 43 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT - 15 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + 17 AS col1 FROM tab1 GROUP BY col2
----
17
17
17

query I rowsort
SELECT ALL 59 FROM tab0 AS cor0 GROUP BY col0
----
59
59
59

query I rowsort
SELECT ALL - - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 86 FROM tab2 GROUP BY tab2.col2
----
-86
-86
-86

query I rowsort
SELECT DISTINCT cor0.col0 + - 16 * col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-564
-853
-961

query I rowsort
SELECT ALL + 89 AS col1 FROM tab2 GROUP BY tab2.col1
----
89
89
89

query I rowsort
SELECT DISTINCT - 41 AS col0 FROM tab0 GROUP BY tab0.col2
----
-41

query I rowsort
SELECT tab0.col1 + 23 FROM tab0 GROUP BY tab0.col1
----
104
23

query I rowsort
SELECT ALL - 62 AS col1 FROM tab0 GROUP BY tab0.col1
----
-62
-62

query I rowsort
SELECT - 14 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-14
-14
-14

query I rowsort
SELECT ALL 47 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT ALL + 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT 88 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
112
126
167

query I rowsort
SELECT - col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT cor0.col0 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9386
SELECT ALL + - CAST( NULL AS SIGNED ) + - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9386
SELECT ALL + - CAST ( NULL AS INTEGER ) + - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 65 FROM tab1 GROUP BY tab1.col2
----
65
65
65

query I rowsort
SELECT - 63 AS col1 FROM tab0 GROUP BY tab0.col1
----
-63
-63

query I rowsort
SELECT 10 AS col1 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 DISTINCT + 95 + + COALESCE ( 56, - tab1.col1, + tab1.col1, - 28 + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
151

query I rowsort
SELECT + tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 cor0 GROUP BY col2 HAVING NULL <> NULL
----

query I rowsort
SELECT DISTINCT 24 FROM tab0 cor0 GROUP BY cor0.col2
----
24

query I rowsort
SELECT ALL + - tab0.col1 * 86 FROM tab0 GROUP BY tab0.col1
----
-6966
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-4
-45
-59

query I rowsort
SELECT - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 976cc931872319f6c60dc588d08fa95d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 39 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col2
----
1755
2769
312

query I rowsort
SELECT DISTINCT - - 40 * tab0.col2 + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1558
3239
984

query I rowsort
SELECT - 20 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-20
-20
-20

query I rowsort
SELECT ALL + 3 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT DISTINCT + + tab1.col1 + 34 FROM tab1 GROUP BY tab1.col1
----
40
78
91

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - ( 26 ) FROM tab0 GROUP BY tab0.col0
----
-26
-26
-26

query I rowsort
SELECT - 78 FROM tab1 GROUP BY tab1.col0
----
-78
-78
-78

query I rowsort
SELECT ALL 77 FROM tab0 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT 27 * 66 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1782
1782
1782

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT ( - cor0.col1 ) + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-12
2
27

query I rowsort
SELECT 58 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
4698

onlyif mysql # DIV for integer division: 
query I rowsort label-9412
SELECT + + tab2.col1 DIV + tab2.col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9412
SELECT + + tab2.col1 / + tab2.col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col1 + + 47 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
2112
2736
288

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9415
SELECT + CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9415
SELECT + CAST ( NULL AS REAL ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab0 GROUP BY tab0.col2
----
-90

query I rowsort
SELECT ALL - 0 + 12 AS col2 FROM tab1 GROUP BY tab1.col1
----
12
12
12

query I rowsort
SELECT - cor0.col0 * cor0.col0 + - 31 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-11102
-11316
-690

query I rowsort
SELECT + 48 FROM tab2 GROUP BY tab2.col1
----
48
48
48

query I rowsort
SELECT 3 AS col0 FROM tab0 GROUP BY tab0.col1
----
3
3

query I rowsort
SELECT - 35 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-35
-35
-35

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
2025
5041
64

query I rowsort
SELECT ALL tab0.col0 * 42 AS col1 FROM tab0 GROUP BY tab0.col0
----
1092
1806
3486

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9424
SELECT ALL CAST( NULL AS SIGNED ) * 74 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9424
SELECT ALL CAST ( NULL AS INTEGER ) * 74 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + tab0.col0 * 19 FROM tab0 GROUP BY col0
----
1577
494
817

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-72
12
34

onlyif mysql # DIV for integer division: 
query I rowsort label-9427
SELECT DISTINCT - cor0.col1 DIV cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9427
SELECT DISTINCT - cor0.col1 / cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1936
3249
36

query I rowsort
SELECT 85 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
85
85
85

query I rowsort
SELECT ALL 0 AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 73 AS col0 FROM tab1 GROUP BY col1
----
73
73
73

onlyif mysql # DIV for integer division: 
query I rowsort label-9432
SELECT + tab0.col2 DIV col2 col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9432
SELECT + tab0.col2 / col2 col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL NOT IN ( + cor0.col0 )
----

query I rowsort
SELECT + cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT + cor0.col0 * 21 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1826
572
946

query I rowsort
SELECT DISTINCT + 43 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
43

query I rowsort
SELECT - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 7 + 22 FROM tab2 GROUP BY tab2.col0
----
15

query I rowsort
SELECT 64 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor0.col1
----
64
64
64

query I rowsort
SELECT - cor0.col1 * - 28 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
1148
1652
1708

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-9442
SELECT col1 DIV col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9442
SELECT col1 / col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6561

query I rowsort
SELECT ALL 84 FROM tab1 GROUP BY col0
----
84
84
84

query I rowsort
SELECT tab0.col0 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT tab0.col1 + - tab0.col1 FROM tab0 GROUP BY col1
----
0
0

query I rowsort
SELECT - tab0.col2 * tab0.col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT - - tab2.col2 * + tab2.col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL - - 32 FROM tab1 GROUP BY tab1.col1
----
32
32
32

query I rowsort
SELECT ALL + - 77 FROM tab0 GROUP BY tab0.col1
----
-77
-77

query I rowsort
SELECT 11 AS col2 FROM tab0 AS cor0 GROUP BY col0, col2
----
11
11
11

query I rowsort
SELECT - - 42 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-2436
-3318
-3654

query I rowsort
SELECT ALL + - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 58 AS col1 FROM tab1 GROUP BY tab1.col2
----
-58
-58
-58

query I rowsort
SELECT 10 * 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
430
430
430

query I rowsort
SELECT 67 * - col2 FROM tab0 GROUP BY tab0.col2
----
-1608
-2546
-5293

query I rowsort
SELECT DISTINCT 61 * 98 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
5978

query I rowsort
SELECT ALL - tab0.col2 * + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 52 FROM tab2 cor0 GROUP BY cor0.col2
----
-52
-52
-52

query I rowsort
SELECT ALL - + 71 FROM tab1 GROUP BY tab1.col0
----
-71
-71
-71

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab2 cor0 GROUP BY col0, cor0.col1, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT + 27 AS col1 FROM tab0 GROUP BY tab0.col2
----
27

query I rowsort
SELECT 40 FROM tab1 GROUP BY tab1.col1
----
40
40
40

query I rowsort
SELECT DISTINCT - tab1.col2 - 74 AS col0 FROM tab1 GROUP BY col2
----
-119
-145
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 39 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
39

query I rowsort
SELECT DISTINCT + 8 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
352
456
48

query I rowsort
SELECT cor0.col2 - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 10 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
5
81
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 * - tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + 0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT ALL ( cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 42 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2436
-3318
-3654

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9477
SELECT ALL + COALESCE ( + 8, tab0.col2 * tab0.col0, CAST( - 43 AS SIGNED ) + + tab0.col1 ) FROM tab0 GROUP BY col0
----
8
8
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9477
SELECT ALL + COALESCE ( + 8, tab0.col2 * tab0.col0, CAST ( - 43 AS INTEGER ) + + tab0.col1 ) FROM tab0 GROUP BY col0
----
8
8
8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9478
SELECT ALL + + CAST( NULL AS DECIMAL ) + + 39 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9478
SELECT ALL + + CAST ( NULL AS REAL ) + + 39 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL + 79 * 20 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1580
1580
1580

query I rowsort
SELECT ALL col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9481
SELECT tab2.col1 DIV + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9481
SELECT tab2.col1 / + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT cor0.col0 * + 94 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2068
2632
7708

query I rowsort
SELECT - 40 AS col1 FROM tab0 GROUP BY tab0.col2
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - - 11 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-13
-27
-68

query I rowsort
SELECT DISTINCT + + 38 FROM tab1 GROUP BY tab1.col2
----
38

query I rowsort
SELECT ALL - 97 AS col2 FROM tab0 GROUP BY col1
----
-97
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-9487
SELECT DISTINCT tab2.col1 DIV tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9487
SELECT DISTINCT tab2.col1 / tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
1

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 ALL cor0.col1 col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + cor0.col0 * - cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-240
-8372
-8556

query I rowsort
SELECT ALL - cor0.col0 + - 17 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1638
-1656
-270

query I rowsort
SELECT DISTINCT + + 99 AS col2 FROM tab1 GROUP BY tab1.col0
----
99

query I rowsort
SELECT DISTINCT + 98 FROM tab2 GROUP BY tab2.col1
----
98

query I rowsort
SELECT 26 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
26
26

query I rowsort
SELECT DISTINCT 7 FROM tab1 GROUP BY tab1.col0
----
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 col1 FROM tab2 AS cor0 GROUP BY col0
----
-12
-12
-12

query I rowsort
SELECT - + 30 AS col0 FROM tab0 GROUP BY tab0.col1
----
-30
-30

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9499
SELECT DISTINCT - CAST( 4 AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
-4

skipif mysql # not compatible
query I rowsort label-9499
SELECT DISTINCT - CAST ( 4 AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
-4

query I rowsort
SELECT ALL + - ( + col2 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 87 AS col1 FROM tab1 GROUP BY col0
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-9502
SELECT DISTINCT + + tab1.col2 DIV + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1

skipif mysql # not compatible
query I rowsort label-9502
SELECT DISTINCT + + tab1.col2 / + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1

query I rowsort
SELECT DISTINCT cor0.col0 * + NULLIF ( cor0.col0, + cor0.col0 ) - cor0.col0 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT - 92 * 25 FROM tab1 GROUP BY tab1.col1
----
-2300
-2300
-2300

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + col0 + 41 FROM tab2 GROUP BY tab2.col0
----
132
133
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 61 ) * tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
3538
4819
5307

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 + cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-3
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 61 col1 FROM tab2 GROUP BY tab2.col2
----
-61
-61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 60 FROM tab1 GROUP BY tab1.col1
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 83 col2 FROM tab2 GROUP BY tab2.col1
----
83
83
83

query I rowsort
SELECT ALL + + 57 + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
139
79
85

query I rowsort
SELECT ( 73 ) * tab0.col2 + 1 * + 74 FROM tab0 GROUP BY tab0.col2
----
1826
2848
5841

query I rowsort
SELECT + + 88 FROM tab1 GROUP BY tab1.col2
----
88
88
88

query I rowsort
SELECT 65 AS col2 FROM tab1 GROUP BY tab1.col2
----
65
65
65

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-9518
SELECT - tab2.col2 DIV 53 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9518
SELECT - tab2.col2 / 53 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT ALL tab0.col0 + + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 + - 53 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1796
623
6836

query I rowsort
SELECT - ( + cor0.col1 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - - tab1.col2 - - col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL 70 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5670
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col0 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - tab2.col2 * - 47 FROM tab2 GROUP BY tab2.col2
----
2726
3713
4089

query I rowsort
SELECT DISTINCT + 30 * - 44 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1320

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9527
SELECT DISTINCT CAST( - col0 AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-9527
SELECT DISTINCT CAST ( - col0 AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-9529
SELECT ALL - 1 DIV + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9529
SELECT ALL - 1 / + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL + col2 * + 66 AS col2 FROM tab2 GROUP BY tab2.col2
----
3828
5214
5742

query I rowsort
SELECT - - 0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab1 cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT - 26 FROM tab1 cor0 GROUP BY col0
----
-26
-26
-26

query I rowsort
SELECT - col0 * + 38 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-3458
-3496
-570

query I rowsort
SELECT DISTINCT + ( - 13 ) FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
-13

query I rowsort
SELECT + 9 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
9
9
9

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 1 + - 1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - ( + tab1.col1 ) AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT + cor0.col1 * cor0.col0 - - ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
3526
83

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) - 17 FROM tab2 AS cor0 GROUP BY cor0.col1
----
24
42
44

query I rowsort
SELECT DISTINCT + col0 * + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT cor0.col2 + + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
102
150
170

query I rowsort
SELECT ALL + 53 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col1, cor1.col2
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT + 65 FROM tab0 GROUP BY tab0.col0
----
65

query I rowsort
SELECT DISTINCT + 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
94

onlyif mysql # DIV for integer division: 
query I rowsort label-9547
SELECT DISTINCT + 29 DIV - 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-9547
SELECT DISTINCT + 29 / - 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT + 3 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
243

query I rowsort
SELECT ALL - 86 FROM tab0 GROUP BY tab0.col2
----
-86
-86
-86

query I rowsort
SELECT + - 14 * tab2.col2 + 13 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1093
-1205
-799

query I rowsort
SELECT 24 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT ALL + 59 AS col2 FROM tab2 GROUP BY tab2.col1
----
59
59
59

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT ALL - 43 FROM tab1 GROUP BY tab1.col0
----
-43
-43
-43

query I rowsort
SELECT ALL 16 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
24
38
79

query I rowsort
SELECT - 65 AS col0 FROM tab1 GROUP BY tab1.col1
----
-65
-65
-65

query I rowsort
SELECT - 38 FROM tab2 GROUP BY tab2.col0
----
-38
-38
-38

query I rowsort
SELECT ALL tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT - 49 + tab2.col1 FROM tab2 GROUP BY col1
----
-8
10
12

query I rowsort
SELECT 91 AS col1 FROM tab2 GROUP BY tab2.col0
----
91
91
91

query I rowsort
SELECT DISTINCT + cor0.col2 - 77 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-32
-6
-69

query I rowsort
SELECT tab0.col0 FROM tab0 WHERE NULL > NULL GROUP BY tab0.col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-9566
SELECT ALL + cor0.col2 DIV - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9566
SELECT ALL + cor0.col2 / - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL 26 + cor0.col1 * + col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
26
6587

query I rowsort
SELECT ALL - NULLIF ( tab2.col0, tab2.col0 ) - - tab2.col0 FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 88 FROM tab0 GROUP BY tab0.col2
----
88
88
88

query I rowsort
SELECT ALL + 60 AS col1 FROM tab0 GROUP BY tab0.col0
----
60
60
60

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 - + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1892
30
3192

query I rowsort
SELECT - tab2.col2 FROM tab2 WHERE NOT ( NULL ) = tab2.col2 / tab2.col2 GROUP BY col2
----

query I rowsort
SELECT ALL - 36 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + 42 FROM tab2 GROUP BY tab2.col0
----
42

query I rowsort
SELECT DISTINCT + - ( 42 ) + + 17 AS col0 FROM tab0 GROUP BY tab0.col0
----
-25

query I rowsort
SELECT DISTINCT 2 AS col0 FROM tab2 GROUP BY tab2.col0
----
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9577
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-9577
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT ALL - - NULLIF ( - tab0.col2, 2 ) + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 9, tab2.col0, + tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
9

query I rowsort
SELECT ALL NULLIF ( - 27, cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + - 86 AS col0 FROM tab2 GROUP BY tab2.col2
----
-86

onlyif mysql # DIV for integer division: 
query I rowsort label-9582
SELECT ALL - 50 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-9582
SELECT ALL - 50 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
3

query I rowsort
SELECT + 55 FROM tab1 GROUP BY col2
----
55
55
55

query I rowsort
SELECT 49 FROM tab1 cor0 GROUP BY cor0.col1
----
49
49
49

onlyif mysql # DIV for integer division: 
query I rowsort label-9585
SELECT - tab1.col1 DIV - tab1.col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
-43
-5
-56

skipif mysql # not compatible
query I rowsort label-9585
SELECT - tab1.col1 / - tab1.col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
-43
-5
-56

query I rowsort
SELECT DISTINCT 33 AS col2 FROM tab0 GROUP BY tab0.col1
----
33

query I rowsort
SELECT DISTINCT + 94 FROM tab2 GROUP BY tab2.col1
----
94

query I rowsort
SELECT ALL + 44 FROM tab0 GROUP BY tab0.col1
----
44
44

query I rowsort
SELECT ALL ( 58 ) + + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
116
137
145

query I rowsort
SELECT 16 + cor0.col0 * + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
500
6740
800

query I rowsort
SELECT - col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT cor0.col2 + cor0.col2 * - 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-495
-781
-88

query I rowsort
SELECT - 82 FROM tab0 GROUP BY tab0.col1
----
-82
-82

query I rowsort
SELECT - 53 * - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
4823
4876
795

query I rowsort
SELECT + 37 FROM tab2 cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT DISTINCT 41 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3321
0

query I rowsort
SELECT + + 19 - - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
43
57
98

query I rowsort
SELECT ( 11 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
11
11
11

query I rowsort
SELECT ALL 89 AS col0 FROM tab1 GROUP BY tab1.col1
----
89
89
89

query I rowsort
SELECT - cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2025
-5041
-64

query I rowsort
SELECT 83 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT ALL - tab2.col2 * - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col1 + + ( cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-9605
SELECT col2 DIV - cor0.col2 col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9605
SELECT col2 / - cor0.col2 col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - 20 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-20
-20
-20

query I rowsort
SELECT ALL 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
33
33
33

query I rowsort
SELECT 43 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-39
15
21

query I rowsort
SELECT DISTINCT ( 61 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9610
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9610
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 15 * tab0.col0 col0 FROM tab0 GROUP BY col0
----
-1245
-390
-645

query I rowsort
SELECT DISTINCT - 31 FROM tab0 GROUP BY tab0.col0
----
-31

query I rowsort
SELECT - cor0.col2 * - 54 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1296
2052
4266

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT + tab0.col1 * 38 FROM tab0 GROUP BY tab0.col1
----
0
3078

query I rowsort
SELECT DISTINCT + 76 FROM tab1 GROUP BY tab1.col1
----
76

query I rowsort
SELECT ALL - col0 + + 16 AS col2 FROM tab2 GROUP BY tab2.col0
----
-75
-76
1

query I rowsort
SELECT DISTINCT tab0.col0 * + 37 AS col1 FROM tab0 GROUP BY tab0.col0
----
1591
3071
962

query I rowsort
SELECT ALL + 16 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
103
74
95

query I rowsort
SELECT 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT ALL - 59 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-59
-59
-59

query I rowsort
SELECT DISTINCT + cor0.col2 * 64 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2880
4544
512

query I rowsort
SELECT ALL 32 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col2, cor1.col1
----
9 values hashing to d30a2acbf33c88274474306936d3227b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + COALESCE ( + 69, cor0.col1 - COALESCE ( + cor0.col0 + - cor0.col0, + cor0.col0, cor0.col2 - cor0.col1, + col1 ), - cor0.col0, - cor0.col0 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
127
148
156

query I rowsort
SELECT ALL - 12 * col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-492
-708
-732

query I rowsort
SELECT - 9 * - 89 FROM tab0 AS cor0 GROUP BY cor0.col0
----
801
801
801

query I rowsort
SELECT + 27 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
27
27

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 ALL 27 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
68
86
88

query I rowsort
SELECT + 63 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT - + 45 * - tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
2508
264

query I rowsort
SELECT DISTINCT 58 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1392
2204
4582

query I rowsort
SELECT ALL + tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL < col2
----

query I rowsort
SELECT ALL - cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT col1 + + 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
45
63
65

query I rowsort
SELECT ALL - cor0.col1 * - 78 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
3198
4602
4758

onlyif mysql # DIV for integer division: 
query I rowsort label-9638
SELECT - cor0.col1 * - COALESCE ( + 56, cor0.col2 DIV + NULLIF ( + 89, - cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4536

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9638
SELECT - cor0.col1 * - COALESCE ( + 56, cor0.col2 / + NULLIF ( + 89, - cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-44
-44

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 87 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT - + tab1.col1 * + tab1.col1 + + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT - + COALESCE ( tab2.col2, tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 98 FROM tab2 GROUP BY tab2.col2
----
98

query I rowsort
SELECT - - 52 + - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-27
-35
-6

query I rowsort
SELECT DISTINCT + 33 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
33

onlyif mysql # DIV for integer division: 
query I rowsort label-9647
SELECT 11 DIV 67 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-9647
SELECT 11 / 67 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-9648
SELECT DISTINCT - + tab1.col1 DIV + 6 FROM tab1 GROUP BY tab1.col1
----
-1
-7
-9

skipif mysql # not compatible
query I rowsort label-9648
SELECT DISTINCT - + tab1.col1 / + 6 FROM tab1 GROUP BY tab1.col1
----
-1
-7
-9

query I rowsort
SELECT DISTINCT - - 45 AS col2 FROM tab1 GROUP BY tab1.col1
----
45

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT + 84 AS col1 FROM tab2 GROUP BY tab2.col1
----
84
84
84

query I rowsort
SELECT col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 col0 FROM tab0 GROUP BY tab0.col0
----
-29
-29
-29

query I rowsort
SELECT + 82 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
82
82
82

query I rowsort
SELECT 23 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
1886
506
644

query I rowsort
SELECT + 61 AS col2 FROM tab2 GROUP BY col0
----
61
61
61

query I rowsort
SELECT ALL - 5 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
-5
-5

query I rowsort
SELECT + + 17 FROM tab2 GROUP BY tab2.col2
----
17
17
17

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9660
SELECT cor0.col0 + CAST( 35 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
126
127
50

skipif mysql # not compatible
query I rowsort label-9660
SELECT cor0.col0 + CAST ( 35 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
126
127
50

onlyif mysql # DIV for integer division: 
query I rowsort label-9661
SELECT DISTINCT + 60 DIV + 92 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-9661
SELECT DISTINCT + 60 / + 92 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL + 95 AS col2 FROM tab2 GROUP BY tab2.col0
----
95
95
95

query I rowsort
SELECT DISTINCT - tab2.col2 AS col2 FROM tab2 GROUP BY col2 HAVING NULL IS NOT NULL
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9664
SELECT DISTINCT + cor0.col2 + CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-9664
SELECT DISTINCT + cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT + + 37 + 50 * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
2937
3987
4387

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9667
SELECT - CAST( NULL AS SIGNED ) + + COALESCE ( tab1.col2, + 55 + 53, + tab1.col1, - tab1.col1 + 44 ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9667
SELECT - CAST ( NULL AS INTEGER ) + + COALESCE ( tab1.col2, + 55 + 53, + tab1.col1, - tab1.col1 + 44 ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab2 GROUP BY tab2.col1
----
-15

query I rowsort
SELECT 51 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT DISTINCT tab2.col1 - - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT - - 39 AS col0 FROM tab2 GROUP BY tab2.col1
----
39
39
39

query I rowsort
SELECT 77 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3465
5467
616

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - col2 * + 41 - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1008
-1596
-3318

query I rowsort
SELECT ALL + - 18 AS col0 FROM tab2 GROUP BY tab2.col2
----
-18
-18
-18

query I rowsort
SELECT 28 FROM tab1 GROUP BY tab1.col2
----
28
28
28

query I rowsort
SELECT DISTINCT 2 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
2

query I rowsort
SELECT 89 + - tab0.col2 FROM tab0 GROUP BY col2
----
10
51
65

query I rowsort
SELECT ALL + tab0.col1 - - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT DISTINCT - 42 AS col1 FROM tab2 GROUP BY tab2.col1
----
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - + cor0.col2 col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-17
11
14

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9682
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9682
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT ALL 21 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-22
-5
-62

query I rowsort
SELECT - 3 FROM tab0 GROUP BY tab0.col1
----
-3
-3

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 4, + cor0.col0, + cor0.col2 + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-9686
SELECT + 75 DIV tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
12

skipif mysql # not compatible
query I rowsort label-9686
SELECT + 75 / tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1
1
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1
----
21
21
21

query I rowsort
SELECT 87 AS col2 FROM tab2 GROUP BY tab2.col2
----
87
87
87

query I rowsort
SELECT DISTINCT 84 FROM tab0 GROUP BY col2
----
84

query I rowsort
SELECT 70 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
70
70
70

query I rowsort
SELECT ALL + 84 AS col0 FROM tab1 GROUP BY tab1.col0
----
84
84
84

query I rowsort
SELECT ALL 81 + 49 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
2090
2972
3070

query I rowsort
SELECT 39 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
39
39
39

onlyif mysql # DIV for integer division: 
query I rowsort label-9694
SELECT ALL col0 + + cor0.col0 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-9694
SELECT ALL col0 + + cor0.col0 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

query I rowsort
SELECT ALL 93 * tab0.col2 FROM tab0 GROUP BY col2
----
2232
3534
7347

query I rowsort
SELECT tab2.col1 * 64 FROM tab2 GROUP BY tab2.col1
----
2624
3776
3904

query I rowsort
SELECT + 52 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-2288
-2964
-312

query I rowsort
SELECT DISTINCT + tab1.col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT DISTINCT 65 FROM tab1 GROUP BY tab1.col1
----
65

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 15, col2 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-15

query I rowsort
SELECT - NULLIF ( - tab0.col2, - col2 ) + - 64 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 47, cor0.col0 + + cor0.col1 ) AS col1 FROM tab1 cor0 GROUP BY col2
----
47
47
47

query I rowsort
SELECT ALL 52 FROM tab0 AS cor0 GROUP BY col2
----
52
52
52

query I rowsort
SELECT DISTINCT 18 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18

query I rowsort
SELECT + 19 AS col1 FROM tab2 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT 35 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
35
35
35

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 72, cor0.col1 * col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT ALL - 29 * 29 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-841
-841
-841

query I rowsort
SELECT - 23 + + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1
5
59

query I rowsort
SELECT DISTINCT + tab1.col2 * 26 FROM tab1 GROUP BY tab1.col2
----
1170
1846
208

onlyif mysql # DIV for integer division: 
query I rowsort label-9711
SELECT + cor0.col0 DIV - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, col1, cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-9711
SELECT + cor0.col0 / - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, col1, cor0.col0
----
-1
-2
0

query I rowsort
SELECT 67 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
10
23
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * cor0.col2 - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1406
552
6162

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 87 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
87
87
87

query I rowsort
SELECT - 8 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-8
-8
-8

query I rowsort
SELECT ALL + 33 AS col2 FROM tab1 GROUP BY col0
----
33
33
33

query I rowsort
SELECT DISTINCT - 37 AS col2 FROM tab0 GROUP BY tab0.col2
----
-37

query I rowsort
SELECT ( ( + 58 ) ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT + 77 FROM tab0 cor0 GROUP BY cor0.col1
----
77

query I rowsort
SELECT DISTINCT + - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + - 98 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-4018
-5782
-5978

query I rowsort
SELECT ALL 36 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
36
36
36

query I rowsort
SELECT 5 AS col1 FROM tab0 GROUP BY col0
----
5
5
5

query I rowsort
SELECT 70 FROM tab0 GROUP BY col1
----
70
70

query I rowsort
SELECT - 82 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-82
-82
-82

query I rowsort
SELECT + 34 + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
113
58
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
68
68
68

query I rowsort
SELECT ALL - 5 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-63
-84
-92

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9730
SELECT CAST( NULL AS DECIMAL ) + 45 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9730
SELECT CAST ( NULL AS REAL ) + 45 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 96 AS col2 FROM tab0 GROUP BY tab0.col2
----
-96
-96
-96

query I rowsort
SELECT DISTINCT + 70 FROM tab1 GROUP BY tab1.col2
----
70

query I rowsort
SELECT DISTINCT 12 FROM tab2 GROUP BY tab2.col0
----
12

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - + tab1.col2 + col2 AS col0 FROM tab1 GROUP BY col2
----
0

query I rowsort
SELECT + tab2.col2 * col2 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - tab2.col1 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9738
SELECT + 43 DIV - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-9738
SELECT + 43 / - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-2
0
0

query I rowsort
SELECT ALL + - 20 AS col0 FROM tab1 GROUP BY tab1.col0
----
-20
-20
-20

query I rowsort
SELECT - tab2.col1 * + 83 + + tab2.col1 * + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1342
-1416
-1722

query I rowsort
SELECT + col0 + - 95 AS col0 FROM tab2 GROUP BY tab2.col0
----
-3
-4
-80

query I rowsort
SELECT cor0.col1 + + 91 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
135
148
97

query I rowsort
SELECT ALL + 22 FROM tab0 AS cor0 GROUP BY cor0.col2
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 24 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT ALL 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT ALL tab1.col2 + + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT + + 89 AS col2 FROM tab1 GROUP BY tab1.col1
----
89

query I rowsort
SELECT ALL + + col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL + 41 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
124
67
84

query I rowsort
SELECT - 76 FROM tab0 AS cor0 GROUP BY col2
----
-76
-76
-76

query I rowsort
SELECT ALL + 95 + - 71 FROM tab2 GROUP BY tab2.col1
----
24
24
24

query I rowsort
SELECT ALL - - tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 41 col0 FROM tab0 GROUP BY tab0.col0
----
41
41
41

query I rowsort
SELECT DISTINCT + 61 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2745
4331
488

query I rowsort
SELECT DISTINCT NULLIF ( col1, + tab2.col1 ) FROM tab2 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT 54 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
54

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
142
16
90

query I rowsort
SELECT DISTINCT - + tab2.col1 - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT 56 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
56
56
56

query I rowsort
SELECT ( + 0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

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.col0
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 53 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
2173
3127
3233

query I rowsort
SELECT + 16 FROM tab2 cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT DISTINCT + 84 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
13
39
76

query I rowsort
SELECT DISTINCT - - 72 * col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1728
2736
5688

query I rowsort
SELECT DISTINCT + tab2.col2 + + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT - + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + tab2.col2 ) col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 52 col1 FROM tab2 GROUP BY col0
----
-52
-52
-52

query I rowsort
SELECT + 60 * 23 FROM tab0 GROUP BY tab0.col1
----
1380
1380

query I rowsort
SELECT ALL - tab0.col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 10 AS col1 FROM tab2 GROUP BY tab2.col0
----
10
10
10

query I rowsort
SELECT + 47 * + 7 FROM tab0 AS cor0 GROUP BY cor0.col1
----
329
329

query I rowsort
SELECT ALL + NULLIF ( col1, 71 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9778
SELECT ALL - + CAST( NULL AS SIGNED ) / + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9778
SELECT ALL - + CAST ( NULL AS INTEGER ) / + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 32 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col1 FROM tab2 AS cor0 GROUP BY col2
----
97
97
97

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + 59 AS col1 FROM tab2 GROUP BY tab2.col1
----
59
59
59

query I rowsort
SELECT DISTINCT - + 43 FROM tab2 GROUP BY tab2.col1
----
-43

query I rowsort
SELECT DISTINCT cor0.col0 + 80 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
106
123
163

query I rowsort
SELECT - tab1.col1 * - 14 AS col1 FROM tab1 GROUP BY tab1.col1
----
616
798
84

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT ALL 62 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
62
62
62

query I rowsort
SELECT + 3 AS col0 FROM tab0 GROUP BY tab0.col1
----
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 - 81 col0 FROM tab1 GROUP BY tab1.col0
----
-53
-59
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 73 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT - tab2.col0 * tab2.col0 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT 68 + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
149
68
68

query I rowsort
SELECT + + 22 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
30
67
93

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - col1 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT + 57 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
57

query I rowsort
SELECT 32 AS col2 FROM tab2 GROUP BY tab2.col0
----
32
32
32

query I rowsort
SELECT ALL + 50 AS col1 FROM tab0 GROUP BY tab0.col1
----
50
50

query I rowsort
SELECT ALL 99 FROM tab1 GROUP BY tab1.col1
----
99
99
99

query I rowsort
SELECT ALL col1 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT CASE col2 WHEN - cor0.col2 THEN NULL ELSE col0 END * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
225
8281
8464

query I rowsort
SELECT - cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL + tab0.col2 * + 70 AS col1 FROM tab0 GROUP BY tab0.col2
----
1680
2660
5530

query I rowsort
SELECT + 52 AS col2 FROM tab2 GROUP BY tab2.col2
----
52
52
52

query I rowsort
SELECT ALL + 40 - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-31
-5
32

query I rowsort
SELECT ALL + 5 AS col1 FROM tab1 GROUP BY col0
----
5
5
5

query I rowsort
SELECT col0 * 30 FROM tab0 GROUP BY col0
----
1290
2490
780

query I rowsort
SELECT 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT ALL - - 42 AS col2 FROM tab2 GROUP BY tab2.col0
----
42
42
42

query I rowsort
SELECT DISTINCT + 21 AS col2 FROM tab0 GROUP BY tab0.col0
----
21

query I rowsort
SELECT 39 FROM tab0 GROUP BY col2
----
39
39
39

query I rowsort
SELECT ALL - 79 AS col0 FROM tab1 GROUP BY tab1.col2
----
-79
-79
-79

query I rowsort
SELECT 60 AS col1 FROM tab2 GROUP BY tab2.col2
----
60
60
60

query I rowsort
SELECT - 45 FROM tab0 GROUP BY tab0.col2
----
-45
-45
-45

query I rowsort
SELECT + 71 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
71
71
71

query I rowsort
SELECT DISTINCT 88 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
88

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
51

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT - tab1.col0 + ( tab1.col0 + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + - ( 30 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-30
-30
-30

query I rowsort
SELECT ALL - 83 FROM tab1 GROUP BY tab1.col1
----
-83
-83
-83

query I rowsort
SELECT ALL 39 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
1599
2301
2379

query I rowsort
SELECT + tab1.col2 * 7 AS col0 FROM tab1 GROUP BY tab1.col2
----
315
497
56

query I rowsort
SELECT - col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT tab0.col0 * - 22 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1826
-572
-946

onlyif mysql # DIV for integer division: 
query I rowsort label-9827
SELECT col1 DIV cor0.col2 + - 37 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-36
-37
-37

skipif mysql # not compatible
query I rowsort label-9827
SELECT col1 / cor0.col2 + - 37 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-36
-37
-37

query I rowsort
SELECT cor0.col1 * + 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
132
171
18

query I rowsort
SELECT ALL - ( + col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT 40 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

query I rowsort
SELECT + 22 FROM tab1 cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT 31 AS col0 FROM tab0 GROUP BY tab0.col1
----
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-9834
SELECT 38 + + tab2.col0 DIV - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
37
37
37

skipif mysql # not compatible
query I rowsort label-9834
SELECT 38 + + tab2.col0 / - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
37
37
37

query I rowsort
SELECT DISTINCT + tab0.col2 + 13 FROM tab0 GROUP BY tab0.col2
----
37
51
92

query I rowsort
SELECT DISTINCT - tab2.col2 + + ( - ( + tab2.col2 ) ) FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT - cor0.col2 - 51 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-109
-130
-138

query I rowsort
SELECT + - 25 AS col1 FROM tab2 GROUP BY tab2.col2
----
-25
-25
-25

query I rowsort
SELECT 35 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1575
2485
280

onlyif mysql # DIV for integer division: 
query I rowsort label-9840
SELECT ALL cor0.col1 DIV + col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9840
SELECT ALL cor0.col1 / + col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
132
1596
3608

onlyif mysql # DIV for integer division: 
query I rowsort label-9843
SELECT - tab1.col0 + + tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-21
-27
-81

skipif mysql # not compatible
query I rowsort label-9843
SELECT - tab1.col0 + + tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-21
-27
-81

query I rowsort
SELECT - cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col1
----
-81
0
0

query I rowsort
SELECT + + 48 FROM tab0 GROUP BY col0
----
48
48
48

query I rowsort
SELECT + tab0.col2 * + col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - 49 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-49
-49

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + NULLIF ( + 57, 55 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 76 col0 FROM tab2 GROUP BY tab2.col1
----
-76
-76
-76

query I rowsort
SELECT + + 52 AS col1 FROM tab2 GROUP BY col0
----
52
52
52

query I rowsort
SELECT ALL + - 81 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1782
2268
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( tab2.col0 ) col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 81 FROM tab2 GROUP BY tab2.col2
----
81

query I rowsort
SELECT DISTINCT + 16 AS col0 FROM tab0 GROUP BY tab0.col0
----
16

query I rowsort
SELECT + ( - col1 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + + 43 AS col2 FROM tab0 GROUP BY tab0.col0
----
43
43
43

query I rowsort
SELECT - tab2.col0 + + 36 AS col2 FROM tab2 GROUP BY col0
----
-55
-56
21

query I rowsort
SELECT + + 20 FROM tab2 GROUP BY tab2.col1
----
20
20
20

query I rowsort
SELECT ALL 81 FROM tab2 AS cor0 GROUP BY cor0.col2
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 50 col0 FROM tab0 GROUP BY tab0.col2
----
-50
-50
-50

query I rowsort
SELECT + ( - 88 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-88
-88
-88

query I rowsort
SELECT 83 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT + 5 * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
225
355
40

query I rowsort
SELECT + tab1.col2 - + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 93 * 94 AS col0 FROM tab2 GROUP BY tab2.col1
----
8742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + ( tab0.col1 ) + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT - 13 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1027
312
494

query I rowsort
SELECT cor0.col2 * + cor0.col2 + - col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3306
6162
7482

query I rowsort
SELECT 81 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL - + 25 * 29 AS col0 FROM tab2 GROUP BY tab2.col0
----
-725
-725
-725

query I rowsort
SELECT ( 79 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT tab0.col1 - 97 AS col0 FROM tab0 GROUP BY tab0.col1
----
-16
-97

query I rowsort
SELECT DISTINCT 66 * - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-1584
-2508
-5214

query I rowsort
SELECT ALL cor0.col0 + - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2, cor0.col0
----
-72
12
34

query I rowsort
SELECT + 80 FROM tab2 GROUP BY tab2.col2
----
80
80
80

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 47, tab0.col2, + COALESCE ( - ( + tab0.col2 ), tab0.col2, + CASE col1 WHEN tab0.col0 THEN + col0 + + tab0.col1 * tab0.col1 WHEN + tab0.col0 THEN NULL WHEN + col0 THEN NULL END ), - col2 ) FROM tab0 GROUP BY tab0.col2
----
47
47
47

query I rowsort
SELECT - 77 + - 30 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-107
-107
-107

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9881
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9881
SELECT DISTINCT + CAST ( NULL AS REAL ) * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT 32 FROM tab0 cor0 GROUP BY cor0.col1
----
32
32

query I rowsort
SELECT + NULLIF ( + col2, - 44 ) + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT + cor0.col1 + 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
79
97
99

query I rowsort
SELECT ALL 8 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2025
5041
64

query I rowsort
SELECT DISTINCT 74 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
74

query I rowsort
SELECT + 2 - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-39
-57
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) IS NOT NULL
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING - col1 IS NOT NULL
----
44
57
6

query I rowsort
SELECT DISTINCT 79 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
79

query I rowsort
SELECT ALL - tab0.col2 * - 37 FROM tab0 GROUP BY tab0.col2
----
1406
2923
888

query I rowsort
SELECT + 14 FROM tab2 GROUP BY col0
----
14
14
14

query I rowsort
SELECT tab2.col0 + 41 AS col1 FROM tab2 GROUP BY col0
----
132
133
56

query I rowsort
SELECT ALL 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT + + col1 * 14 AS col0 FROM tab1 GROUP BY tab1.col1
----
616
798
84

query I rowsort
SELECT ALL - 5 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT DISTINCT + 6 FROM tab1 AS cor0 GROUP BY cor0.col2
----
6

query I rowsort
SELECT + 58 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
137
145

query I rowsort
SELECT + 97 AS col2 FROM tab0 GROUP BY tab0.col2
----
97
97
97

query I rowsort
SELECT DISTINCT cor0.col1 - - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL + + 61 AS col2 FROM tab2 GROUP BY col1
----
61
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-9905
SELECT ALL - 80 * - tab2.col1 - + 73 DIV - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
3281
4721
4881

skipif mysql # not compatible
query I rowsort label-9905
SELECT ALL - 80 * - tab2.col1 - + 73 / - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
3281
4721
4881

query I rowsort
SELECT ALL - 17 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-17
-17
-17

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2, col0
----
166
52
86

query I rowsort
SELECT + - 98 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
4018
5782
5978

query I rowsort
SELECT 93 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 * 64 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1792
1792
1792

query I rowsort
SELECT DISTINCT + tab1.col1 * - 49 AS col1 FROM tab1 GROUP BY tab1.col1
----
-2156
-2793
-294

query I rowsort
SELECT 24 AS col2 FROM tab2 GROUP BY tab2.col2
----
24
24
24

query I rowsort
SELECT - tab1.col0 * + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT ALL + 27 AS col2 FROM tab2 GROUP BY col0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT NULLIF ( tab0.col2, + tab0.col2 ) col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab0.col2 * + 23 FROM tab0 GROUP BY tab0.col2
----
1817
552
874

query I rowsort
SELECT DISTINCT - tab0.col1 * col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT 95 FROM tab1 cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT ALL - - 11 AS col1 FROM tab0 GROUP BY tab0.col0
----
11
11
11

query I rowsort
SELECT col2 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT 13 * + tab1.col1 FROM tab1 GROUP BY col1
----
572
741
78

query I rowsort
SELECT 42 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-2436
-3318
-3654

query I rowsort
SELECT + 55 AS col0 FROM tab1 GROUP BY tab1.col2
----
55
55
55

query I rowsort
SELECT DISTINCT + 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
48

query I rowsort
SELECT 89 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ALL + 48 * + 2 FROM tab2 GROUP BY tab2.col1
----
96
96
96

query I rowsort
SELECT ALL + 78 * 63 FROM tab2 GROUP BY tab2.col1
----
4914
4914
4914

query I rowsort
SELECT ALL 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 25 col1 FROM tab1 GROUP BY col0
----
-25
-25
-25

query I rowsort
SELECT ALL - 82 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3362
-4838
-5002

query I rowsort
SELECT - CASE cor0.col2 WHEN cor0.col1 * cor0.col2 THEN cor0.col1 END FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 53 AS col0 FROM tab2 GROUP BY tab2.col0
----
-53
-53
-53

query I rowsort
SELECT 93 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
2046
2604
7626

onlyif mysql # DIV for integer division: 
query I rowsort label-9936
SELECT 25 - - cor0.col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
26
26
26

skipif mysql # not compatible
query I rowsort label-9936
SELECT 25 - - cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT ALL + 34 - + 14 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-596
-78
-960

query I rowsort
SELECT - 70 + - 71 FROM tab1 GROUP BY tab1.col2
----
-141
-141
-141

query I rowsort
SELECT DISTINCT + + 35 - 47 AS col0 FROM tab0 GROUP BY tab0.col1
----
-12

query I rowsort
SELECT - 46 FROM tab2 GROUP BY tab2.col0
----
-46
-46
-46

onlyif mysql # DIV for integer division: 
query I rowsort label-9941
SELECT DISTINCT - cor0.col0 DIV 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-5
-8

skipif mysql # not compatible
query I rowsort label-9941
SELECT DISTINCT - cor0.col0 / 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-5
-8

query I rowsort
SELECT ALL - cor1.col2 * 18 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col2
----
-1044
-1422
-1566

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 24 - 87 col0 FROM tab1 GROUP BY tab1.col0
----
-63
-63
-63

query I rowsort
SELECT ALL - ( 17 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-17
-17
-17

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

query I rowsort
SELECT DISTINCT - 37 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-37

query I rowsort
SELECT DISTINCT + 61 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2684
-3477
-366

query I rowsort
SELECT ALL + 14 + - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-67
14

query I rowsort
SELECT ( - 6 ) FROM tab0 GROUP BY tab0.col2
----
-6
-6
-6

query I rowsort
SELECT DISTINCT + 45 AS col1 FROM tab2 GROUP BY col1
----
45

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - col2 AS col2 FROM tab2 GROUP BY col2 HAVING ( NULL ) >= NULL
----

query I rowsort
SELECT - tab0.col1 * tab0.col1 FROM tab0 WHERE NOT + tab0.col1 IS NULL GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT - tab1.col2 IS NOT NULL
----

query I rowsort
SELECT col0 + + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT 73 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9960
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9960
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL

query I rowsort
SELECT - + tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + COALESCE ( 44, - 50 ) FROM tab2 GROUP BY tab2.col1
----
44
44
44

query I rowsort
SELECT ALL + 79 AS col0 FROM tab0 GROUP BY tab0.col1
----
79
79

query I rowsort
SELECT 34 * - cor0.col2 + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-1914
-2607
-2871

query I rowsort
SELECT - tab2.col0 * - 87 AS col0 FROM tab2 GROUP BY tab2.col0
----
1305
7917
8004

onlyif mysql # DIV for integer division: 
query I rowsort label-9966
SELECT DISTINCT cor0.col2 * cor0.col2 + - 88 DIV 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif mysql # not compatible
query I rowsort label-9966
SELECT DISTINCT cor0.col2 * cor0.col2 + - 88 / 90 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 - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + 8 FROM tab1 GROUP BY tab1.col2
----
8
8
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9969
SELECT DISTINCT - CAST( NULL AS SIGNED ) col2 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9969
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col2 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT DISTINCT + col2 * + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 98 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT ( + 0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9973
SELECT - CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9973
SELECT - CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-9974
SELECT cor0.col0 + col0 DIV + 35 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
84

skipif mysql # not compatible
query I rowsort label-9974
SELECT cor0.col0 + col0 / + 35 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT tab2.col0 * - 74 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1110
-6734
-6808

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 18 FROM tab1 GROUP BY tab1.col1
----
18

query I rowsort
SELECT ALL 4 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-9981
SELECT DISTINCT 20 DIV - 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-9981
SELECT DISTINCT 20 / - 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL + 76 FROM tab2 cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT DISTINCT - tab2.col2 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT ALL + col0 * 45 AS col2 FROM tab2 GROUP BY col0
----
4095
4140
675

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT cor0.col1 + - 50 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-6
7

query I rowsort
SELECT tab1.col1 - - 61 FROM tab1 GROUP BY tab1.col1
----
105
118
67

query I rowsort
SELECT ALL - cor0.col0 * 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1430
-1820
-5330

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT + 50 FROM tab1 GROUP BY tab1.col1
----
50
50
50

query I rowsort
SELECT ALL - 43 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
-43
-43
-43

query I rowsort
SELECT ALL col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + col2 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2565
-3124
-48

query I rowsort
SELECT cor0.col0 + 86 FROM tab2 AS cor0 GROUP BY cor0.col0
----
101
177
178

query I rowsort
SELECT ( 75 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
75
75
75

query I rowsort
SELECT NULLIF ( col2, tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 97 FROM tab1 GROUP BY tab1.col0
----
97

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, col0, cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-9999
SELECT DISTINCT + cor0.col2 * cor0.col2 - + cor0.col0 DIV + 71 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
2025
5040
64

skipif mysql # not compatible
query I rowsort label-9999
SELECT DISTINCT + cor0.col2 * cor0.col2 - + cor0.col0 / + 71 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
2025
5040
64

