hash-threshold 8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 36 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
1584
2052
216

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

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

query I rowsort
SELECT ALL 9 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
35
52
92

onlyif mysql # DIV for integer division: 
query I rowsort label-13
SELECT cor0.col2 DIV ( + 96 ) FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-13
SELECT cor0.col2 / ( + 96 ) FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

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

query I rowsort
SELECT ALL - 50 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2900
-3950
-4350

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

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

query I rowsort
SELECT - - 5 * tab1.col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
10125
25205
320

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

query I rowsort
SELECT - - 18 * 56 AS col0 FROM tab2, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col2
----
1008
1008
1008

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

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

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

query I rowsort
SELECT DISTINCT 23 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
102
110
81

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

query I rowsort
SELECT ALL 97 * + 3 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
210
291

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

query I rowsort
SELECT DISTINCT - 41 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-17
-3
38

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 95 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
103
140
166

query I rowsort
SELECT + 86 FROM tab1 cor0 GROUP BY col2
----
86
86
86

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

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col1 * + 82 FROM tab2 AS cor0 GROUP BY col1
----
3362
4838
5002

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) + - cor0.col0 * cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1892
-6972
-702

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 21 FROM tab1, tab2 cor0 GROUP BY tab1.col1
----
-21

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * NULLIF ( + cor0.col1, + cor0.col1 ) + 82 - + 12 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

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

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

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

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

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

query I rowsort
SELECT + 82 * + 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4428
4428
4428

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 44 * - 28 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1232
-1232
-1232

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

onlyif mysql # DIV for integer division: 
query I rowsort label-95
SELECT - 23 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-95
SELECT - 23 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3
0
0

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

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

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

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

query I rowsort
SELECT + 54 + + 95 FROM tab0 AS cor0 GROUP BY col0
----
149
149
149

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - + 53 + + 10 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY tab0.col2
----
-43
-43
-43

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + cor0.col2 * 33 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1972
2686
2958

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 * - 22 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1738
-528
-836

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

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

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

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

query I rowsort
SELECT cor0.col2 * + cor0.col2 + + 98 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1542
6339
674

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

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

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

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

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

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

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

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

query I rowsort
SELECT 77 + - cor0.col0 - 97 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-103
-46
-63

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 65 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2925
4615
520

query I rowsort
SELECT ALL - + 33 * 80 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
-2640
-2640
-2640

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

query I rowsort
SELECT DISTINCT 10 * cor0.col2 * - cor0.col2 + 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-14355
-5675
-62325

query I rowsort
SELECT - cor0.col1 + 92 FROM tab2 AS cor0 GROUP BY cor0.col1
----
31
33
51

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 + - 50 - - 79 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-16
-42
21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-164
SELECT ALL - CAST( 29 AS SIGNED ) + + 78 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

skipif mysql # not compatible
query I rowsort label-164
SELECT ALL - CAST ( 29 AS INTEGER ) + + 78 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 20 * - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1660
-520
-860

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

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

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

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

query I rowsort
SELECT ALL - 22 * - 81 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
1782
1782
1782

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

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

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

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

query I rowsort
SELECT - + 56 * cor0.col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-2296
-3304
-3416

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col1 * 46 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2024
2622
276

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * 37 + - cor0.col2 * 16 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1491
168
945

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

query I rowsort
SELECT DISTINCT - ( + 13 ) * + 3 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-39

query I rowsort
SELECT ALL col1 + - ( - 51 ) * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
4212

query I rowsort
SELECT - 82 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1804
-2296
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 + - 80 * col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1854
-2974
-6254

query I rowsort
SELECT - cor0.col0 * - NULLIF ( - cor0.col0, - cor0.col1 * cor0.col0 ) + 45 + + 38 * + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-3563
325
397

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

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

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

query I rowsort
SELECT 57 * + 35 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1995
1995
1995

onlyif mysql # DIV for integer division: 
query I rowsort label-206
SELECT - cor0.col0 DIV ( - cor0.col0 ) + + cor0.col0 + - 59 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-43
33
34

skipif mysql # not compatible
query I rowsort label-206
SELECT - cor0.col0 / ( - cor0.col0 ) + + cor0.col0 + - 59 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-43
33
34

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - COALESCE ( 78, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-78
-78
-78

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + + 58 * cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2596
3363
354

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT col1 + 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
126
144
146

query I rowsort
SELECT ALL COALESCE ( cor0.col1, cor0.col2 * 59 ) + 30 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
71
89
91

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 42 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
2478
2562

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

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

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

query I rowsort
SELECT - cor0.col2 + NULLIF ( 85, - 68 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
47
6
61

query I rowsort
SELECT col0 + + 14 * + 98 FROM tab0 AS cor0 GROUP BY col0
----
1398
1415
1455

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

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

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

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

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

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

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

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

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

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 ALL + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT - 50 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-6
7

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-268
SELECT + 99 DIV + col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
22
46
58

skipif mysql # not compatible
query I rowsort label-268
SELECT + 99 / + col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
22
46
58

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

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

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

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

query I rowsort
SELECT DISTINCT - 51 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-13
-27
28

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 91 * + cor0.col2 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
4038
6417
722

query I rowsort
SELECT DISTINCT cor0.col1 * 92 + - 15 FROM tab2 cor0 GROUP BY col1
----
3757
5413
5597

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

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

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

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

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

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

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

query I rowsort
SELECT ALL ( 48 ) FROM tab2 AS cor0 GROUP BY col2
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 54 * + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2475
3905
440

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-291
SELECT DISTINCT 91 DIV - NULLIF ( cor0.col2, cor0.col1 * col2 ) + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-19
-47
-72

skipif mysql # not compatible
query I rowsort label-291
SELECT DISTINCT 91 / - NULLIF ( cor0.col2, cor0.col1 * col2 ) + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-19
-47
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-292
SELECT ALL + 67 + 36 - col1 DIV - 75 FROM tab1 AS cor0 GROUP BY cor0.col1
----
103
103
103

skipif mysql # not compatible
query I rowsort label-292
SELECT ALL + 67 + 36 - col1 / - 75 FROM tab1 AS cor0 GROUP BY cor0.col1
----
103
103
103

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

query I rowsort
SELECT DISTINCT + 51 + - cor0.col2 * cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1393
-525
-6190

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

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 + - 74 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-558
-6798
-858

query I rowsort
SELECT 34 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1462
2822
884

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

query I rowsort
SELECT ALL NULLIF ( + 71 * 22, cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1562
1562
1562

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

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

query I rowsort
SELECT - 24 + + cor0.col1 + 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
65
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * + 45 + 14 col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
4109
4154
689

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

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

query I rowsort
SELECT - col1 * - ( + 21 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
1197
126
924

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

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 * 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
2542
682
868

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

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col0 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-158752
-792
-90972

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + COALESCE ( 46 + + cor0.col1, NULLIF ( 22, cor0.col1 ) ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
103
52
90

query I rowsort
SELECT DISTINCT 62 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2728
3534
372

query I rowsort
SELECT DISTINCT 35 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
126
127
50

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

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

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

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 * - 41 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1103
-3291
-894

query I rowsort
SELECT ALL cor0.col2 + col2 * ( - cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1215
-168
-5751

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

onlyif mysql # DIV for integer division: 
query I rowsort label-327
SELECT ALL 27 DIV + cor0.col2 - 75 FROM tab0 AS cor0 GROUP BY col2, col1
----
-74
-75
-75

skipif mysql # not compatible
query I rowsort label-327
SELECT ALL 27 / + cor0.col2 - 75 FROM tab0 AS cor0 GROUP BY col2, col1
----
-74
-75
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-328
SELECT - + tab2.col0 + tab2.col0 DIV + tab2.col0 + 30 FROM tab2 GROUP BY tab2.col0
----
-60
-61
16

skipif mysql # not compatible
query I rowsort label-328
SELECT - + tab2.col0 + tab2.col0 / + tab2.col0 + 30 FROM tab2 GROUP BY tab2.col0
----
-60
-61
16

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

query I rowsort
SELECT DISTINCT + 83 * 19 FROM tab0 cor0 GROUP BY cor0.col2
----
1577

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 + + 18 + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
142
143
66

query I rowsort
SELECT + cor0.col2 + + 42 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2494
3397
3741

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 * cor0.col2 * - 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30276
56169
68121

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

query I rowsort
SELECT - 23 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1012
-1311
-138

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 79, - cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-79

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 + + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
17
55
68

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

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

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

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

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

query I rowsort
SELECT 84 * 98 FROM tab2, tab2 cor0 GROUP BY tab2.col2
----
8232
8232
8232

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

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

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

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

query I rowsort
SELECT - 49 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-8
10
12

query I rowsort
SELECT NULLIF ( col2, + 5 ) + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
105
121
67

query I rowsort
SELECT ALL + cor0.col2 * + 53 FROM tab2 cor0 GROUP BY cor0.col2
----
3074
4187
4611

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

onlyif mysql # DIV for integer division: 
query I rowsort label-369
SELECT DISTINCT + 71 * cor0.col2 DIV + cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
71

skipif mysql # not compatible
query I rowsort label-369
SELECT DISTINCT + 71 * cor0.col2 / + cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
71

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 80 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
4640
6320
6960

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 + + 96 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
141
167

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

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

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

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

query I rowsort
SELECT cor0.col2 + - 22 * - cor0.col2 * 91 - + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
116116
158158
174174

query I rowsort
SELECT + cor0.col0 + 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
153
93
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 34 * cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3094
3128
510

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

query I rowsort
SELECT + 42 * - 10 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-420
-420
-420

query I rowsort
SELECT ALL cor0.col2 - - cor0.col2 * - 52 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1224
-1938
-4029

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

query I rowsort
SELECT ( - cor0.col1 + - cor0.col1 ) * - 71 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
5822
8378
8662

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

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

query I rowsort
SELECT ALL 47 + - 28 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
19
19
19

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( + 29, - cor0.col0 ) + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
111
51
57

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

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

query I rowsort
SELECT 37 * + 24 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
888
888
888

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

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

query I rowsort
SELECT 25 * - 7 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-175
-175
-175

query I rowsort
SELECT + - 70 - 26 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
-96
-96

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

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

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

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

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

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

query I rowsort
SELECT ALL NULLIF ( cor0.col2, + 0 ) * 23 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
1334
1817
2001

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 2 * ( - cor0.col0 + cor0.col0 * cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
16380
16744
420

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

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

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

query I rowsort
SELECT ALL cor0.col1 - + ( - 55 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
114
116
96

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

query I rowsort
SELECT col0 + 97 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
123
140
180

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

query I rowsort
SELECT DISTINCT NULLIF ( - 14 * cor0.col1 + cor0.col1 * 68, - cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2376
3078
324

query I rowsort
SELECT + 62 + cor0.col1 * - 52 + - cor0.col1 * - 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2182
-244
-2845

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

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

query I rowsort
SELECT 74 - - 30 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1424
2204
314

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 * + 78 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1872
2964
6162

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

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

query I rowsort
SELECT DISTINCT col0 * 90 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1980
2520
7380

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

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

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

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

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

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

query I rowsort
SELECT 7 + cor0.col2 * col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
3371
6248
7576

query I rowsort
SELECT - cor0.col0 - + ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-45
53

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

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

query I rowsort
SELECT DISTINCT + ( + 29 ) FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
29

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

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

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

query I rowsort
SELECT col2 * - 23 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1035
-1633
-184

query I rowsort
SELECT DISTINCT + cor0.col2 * 16 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41040
49984
768

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

onlyif mysql # DIV for integer division: 
query I rowsort label-480
SELECT ALL cor0.col0 - - cor0.col0 DIV - 79 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
90
91

skipif mysql # not compatible
query I rowsort label-480
SELECT ALL cor0.col0 - - cor0.col0 / - 79 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
90
91

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

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

query I rowsort
SELECT DISTINCT - ( 76 ) FROM tab2 GROUP BY col0
----
-76

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 - col1 * - 24 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
1056
1368
144

query I rowsort
SELECT cor0.col1 + - cor0.col2 + cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
1909
3261
34

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col0 * - 38 + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3549
3588
585

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

query I rowsort
SELECT 63 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1512
2394
4977

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

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

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

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

query I rowsort
SELECT DISTINCT + - 16 * 13 AS col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
-208

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

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

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

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

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

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

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

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

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-512
SELECT ALL tab1.col0 DIV - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

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

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

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

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

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

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

query I rowsort
SELECT ALL + COALESCE ( 93, - cor0.col0 ) + + 91 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
184
184
184

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

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

query I rowsort
SELECT + ( - col0 ) + - 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-149
-89
-95

query I rowsort
SELECT ALL cor0.col0 * - 7 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-182
-301
-581

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-524
SELECT DISTINCT - CAST( col1 AS SIGNED ) + - col1 FROM tab1 AS cor0 GROUP BY col1
----
-114
-12
-88

skipif mysql # not compatible
query I rowsort label-524
SELECT DISTINCT - CAST ( col1 AS INTEGER ) + - col1 FROM tab1 AS cor0 GROUP BY col1
----
-114
-12
-88

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-527
SELECT - 75 * cor0.col2 + 77 DIV - cor0.col2 - - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4293
-5846
-6438

skipif mysql # not compatible
query I rowsort label-527
SELECT - 75 * cor0.col2 + 77 / - cor0.col2 - - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4293
-5846
-6438

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-528
SELECT ALL 87 * cor0.col0 * CAST( 10 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
19140
24360
71340

skipif mysql # not compatible
query I rowsort label-528
SELECT ALL 87 * cor0.col0 * CAST ( 10 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
19140
24360
71340

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

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

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

query I rowsort
SELECT + 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 DISTINCT ( + 68 ) col1 FROM tab1 cor0 GROUP BY cor0.col1
----
68

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 66 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2970
4686
528

query I rowsort
SELECT DISTINCT + 57 + 73 FROM tab0 AS cor0 GROUP BY cor0.col0
----
130

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-567
SELECT DISTINCT - cor0.col1 + + 1 DIV + 36 + cor0.col1 DIV + 31 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-40
-58
-60

skipif mysql # not compatible
query I rowsort label-567
SELECT DISTINCT - cor0.col1 + + 1 / + 36 + cor0.col1 / + 31 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-40
-58
-60

query I rowsort
SELECT DISTINCT - 49 + 54 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + - 89 col2 FROM tab1 GROUP BY tab1.col2
----
-18
-44
-81

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

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

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

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

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

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

query I rowsort
SELECT ALL - 59 + - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-140
-59

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

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

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

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

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

query I rowsort
SELECT + 10 + + 9 AS col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
19
19
19

query I rowsort
SELECT - cor0.col1 * - 12 FROM tab2 AS cor0 GROUP BY cor0.col1
----
492
708
732

onlyif mysql # DIV for integer division: 
query I rowsort label-587
SELECT DISTINCT 70 DIV 9 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7

skipif mysql # not compatible
query I rowsort label-587
SELECT DISTINCT 70 / 9 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-592
SELECT - 30 DIV 32 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-592
SELECT - 30 / 32 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
0
0

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 1 * - 58 * + col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
1276
1624
4756

query I rowsort
SELECT - col0 - 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-129
-72
-89

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

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col0 + 55 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
137
77
83

query I rowsort
SELECT ALL cor0.col1 + 67 FROM tab2 AS cor0 GROUP BY cor0.col1
----
108
126
128

query I rowsort
SELECT + 38 * - cor0.col1 + cor0.col1 + ( 76 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2921
76

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

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

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

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

query I rowsort
SELECT DISTINCT col2 + 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
101
127
64

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-620
SELECT ALL - cor0.col2 * cor0.col2 + 46 DIV 82 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

skipif mysql # not compatible
query I rowsort label-620
SELECT ALL - cor0.col2 * cor0.col2 + 46 / 82 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

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

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

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

query I rowsort
SELECT - cor0.col2 * - 5 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
144
228
474

query I rowsort
SELECT col2 * 90 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
4050
6390
720

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-632
SELECT 33 DIV + 5 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
6
6
6

skipif mysql # not compatible
query I rowsort label-632
SELECT 33 / + 5 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
6
6
6

query I rowsort
SELECT ( - cor0.col1 + 14 * + cor0.col1 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
533
767
793

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

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

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

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

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

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

query I rowsort
SELECT ALL - cor0.col0 * 10 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-220
-280
-820

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-651
SELECT COALESCE ( cor0.col2, - cor0.col0 ) DIV 10 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5
7
8

skipif mysql # not compatible
query I rowsort label-651
SELECT COALESCE ( cor0.col2, - cor0.col0 ) / 10 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5
7
8

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

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

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

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.col1
----
44
57
6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + - 55 * cor1.col0 FROM tab1, tab1 cor0, tab1 cor1 GROUP BY cor1.col0
----
-1210
-1540
-4510

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

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

query I rowsort
SELECT ALL col2 + + 44 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
115
52
89

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - tab2.col0 * 17 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1547
-1564
-255

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

query I rowsort
SELECT DISTINCT 77 * 76 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5852

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

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

query I rowsort
SELECT DISTINCT + tab0.col0 * + 51 FROM tab0 GROUP BY tab0.col0
----
1326
2193
4233

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

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

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

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

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

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

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

query I rowsort
SELECT + 81 - 7 FROM tab1 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT DISTINCT cor0.col0 * 16 + - cor0.col0 - - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
1456
1472
240

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

query I rowsort
SELECT DISTINCT - cor0.col1 + 83 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
22
24
42

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

query I rowsort
SELECT cor0.col0 * cor0.col0 + 68 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
552
6792
852

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col1 * 44 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1804
2596
2684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 * - cor0.col1 col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-2992
-3876
-408

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - ( 20 * + cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1180
-1220
-820

query I rowsort
SELECT cor0.col1 + cor0.col1 + + 16 FROM tab1 AS cor0 GROUP BY cor0.col1
----
104
130
28

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

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

query I rowsort
SELECT ALL + 64 + 74 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
138
138
138

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

query I rowsort
SELECT ALL + 38 + cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
129
130
53

query I rowsort
SELECT + + col2 * + 40 AS col0 FROM tab2 GROUP BY col2
----
2320
3160
3480

onlyif mysql # DIV for integer division: 
query I rowsort label-724
SELECT DISTINCT 23 + 61 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
23
24
30

skipif mysql # not compatible
query I rowsort label-724
SELECT DISTINCT 23 + 61 / cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
23
24
30

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

query I rowsort
SELECT DISTINCT + col0 + - ( + 83 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-68
8
9

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

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

query I rowsort
SELECT ( - 28 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-28
-28

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

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 DISTINCT - 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-46

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

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

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

query I rowsort
SELECT + cor0.col0 + + 35 FROM tab2 AS cor0 GROUP BY cor0.col0
----
126
127
50

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

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

query I rowsort
SELECT DISTINCT + 70 + + 83 FROM tab1 cor0 GROUP BY cor0.col2
----
153

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

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

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

query I rowsort
SELECT + col0 * 65 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1690
2795
5395

query I rowsort
SELECT 42 FROM tab1 cor0 GROUP BY col0
----
42
42
42

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

query I rowsort
SELECT - cor0.col0 * - col0 * ( cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
17576
571787
79507

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

query I rowsort
SELECT DISTINCT cor0.col2 + - 19 * - 52 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1012
1026
1067

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-749
SELECT ALL - tab0.col1 + CAST( - 97 AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-178
-97

skipif mysql # not compatible
query I rowsort label-749
SELECT ALL - tab0.col1 + CAST ( - 97 AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-178
-97

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

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 * - 36 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1476
2124
2196

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

query I rowsort
SELECT - cor0.col1 * 10 + cor0.col1 - + 40 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-409
-571
-589

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 16 + - 61 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

query I rowsort
SELECT 54 * cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1296
2052
4266

query I rowsort
SELECT ALL + 79 + 50 AS col1 FROM tab0 GROUP BY tab0.col0
----
129
129
129

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

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

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

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

query I rowsort
SELECT ALL 66 * 39 FROM tab1 cor0 GROUP BY cor0.col0
----
2574
2574
2574

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-775
SELECT cor0.col1 DIV + 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
3
4

skipif mysql # not compatible
query I rowsort label-775
SELECT cor0.col1 / + 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
3
4

query I rowsort
SELECT + - cor0.col0 * cor0.col0 + + cor0.col0 * + 96 + + 91 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
1170
1911
2370

query I rowsort
SELECT DISTINCT - cor0.col1 * + col1 * + 16 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-26855
-55637
-59475

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 + + 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1684
3484
3724

query I rowsort
SELECT cor0.col1 - 39 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-33
18
5

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

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

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

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

query I rowsort
SELECT DISTINCT 54 * + cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1320
2090
4345

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

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

query I rowsort
SELECT ALL + col1 * - NULLIF ( 85 + + cor0.col0, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-642
-6441
-7348

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

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

query I rowsort
SELECT DISTINCT - tab0.col0 * + tab0.col0 + 7 AS col0 FROM tab0 GROUP BY col0
----
-1842
-669
-6882

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

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

query I rowsort
SELECT - 21 + 73 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
52
52
52

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

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

query I rowsort
SELECT 38 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
2204
3002
3306

query I rowsort
SELECT + 27 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
106
51
65

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

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

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

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

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

query I rowsort
SELECT 33 * + 39 FROM tab2 GROUP BY tab2.col2
----
1287
1287
1287

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

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

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

query I rowsort
SELECT ALL - cor0.col1 + 77 FROM tab2 AS cor0 GROUP BY cor0.col1
----
16
18
36

query I rowsort
SELECT ALL - ( 52 ) * 38 AS col0 FROM tab1, tab0 cor0 GROUP BY tab1.col1
----
-1976
-1976
-1976

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

query I rowsort
SELECT ALL 83 + + cor0.col2 + + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
395
8443
8605

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

query I rowsort
SELECT + 11 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
451
649
671

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

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

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

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

query I rowsort
SELECT ALL ( 70 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
70
70
70

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - tab1.col1 + - 90 * - 72 FROM tab1 GROUP BY col1
----
6423
6436
6474

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 63 + + cor0.col0 * 26 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2429
2455
453

onlyif mysql # DIV for integer division: 
query I rowsort label-836
SELECT ALL 34 DIV - 82 AS col2 FROM tab0 AS cor0 GROUP BY col0, col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-836
SELECT ALL 34 / - 82 AS col2 FROM tab0 AS cor0 GROUP BY col0, col1
----
0
0
0

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

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

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

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

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

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

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

query I rowsort
SELECT 90 - - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
112
118
172

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

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

query I rowsort
SELECT cor0.col2 * 78 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1872
2964
6162

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

query I rowsort
SELECT NULLIF ( cor0.col2, + cor0.col2 ) * 11 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col2 * 99 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
2376
3762
7821

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

query I rowsort
SELECT ALL 35 * 17 FROM tab1 AS cor0 GROUP BY cor0.col1
----
595
595
595

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

query I rowsort
SELECT ALL - 20 * + 60 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-1200
-1200
-1200

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 99 + + 40 FROM tab1 GROUP BY tab1.col1
----
139
139
139

query I rowsort
SELECT 94 * ( - cor0.col1 * - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
327402

query I rowsort
SELECT 8 * 31 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
274
291
331

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

query I rowsort
SELECT - 50 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-24
-7
33

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

onlyif mysql # DIV for integer division: 
query I rowsort label-879
SELECT cor0.col2 + cor0.col2 DIV + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
46
71
8

skipif mysql # not compatible
query I rowsort label-879
SELECT cor0.col2 + cor0.col2 / + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
46
71
8

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

query I rowsort
SELECT ALL 82 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
140
161
169

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 - cor0.col2 * 87 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2064
-3268
-6794

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 57 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-116
-118
-98

query I rowsort
SELECT DISTINCT + 8 * + 31 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
248

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

query I rowsort
SELECT ALL 77 * 60 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4620
4620
4620

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

query I rowsort
SELECT ALL + cor0.col2 + - 17 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1136
-128
-720

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

query I rowsort
SELECT - 47 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-21
-4
36

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-903
SELECT DISTINCT + cor0.col0 DIV + 51 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-81

skipif mysql # not compatible
query I rowsort label-903
SELECT DISTINCT + cor0.col0 / + 51 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-81

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + + 29 col1 FROM tab0 GROUP BY tab0.col0
----
112
55
72

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

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

query I rowsort
SELECT + tab2.col0 + + 28 AS col0 FROM tab2 GROUP BY col0
----
119
120
43

query I rowsort
SELECT ALL 9 * + 23 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-18837
-19044
-3105

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 75 * 18 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1350
-1350
-1350

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

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

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

query I rowsort
SELECT - 61 + - 6 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-67
-67
-67

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

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

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

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

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

query I rowsort
SELECT - col1 * ( 55 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-2420
-3135
-330

query I rowsort
SELECT + + 80 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
80
80
80

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

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

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

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

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

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

query I rowsort
SELECT + ( + 42 ) FROM tab0 AS cor0 GROUP BY col2
----
42
42
42

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 0 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 - 66 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-66
-66
-66

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

query I rowsort
SELECT ALL cor0.col1 + - 71 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-10
-12
-30

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

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

query I rowsort
SELECT ALL - 72 FROM tab1, tab1 cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-72
-72
-72

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 71 * 30 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-2130
-2130
-2130

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 20 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT ALL - + tab1.col0 + ( - 11 ) * - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
220
280
820

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-974
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-974
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 99 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT - 73 AS col1 FROM tab1 GROUP BY tab1.col1
----
-73
-73
-73

query I rowsort
SELECT + col1 + 68 * col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
3036
3933
414

query I rowsort
SELECT ALL + 8 FROM tab2 GROUP BY tab2.col1
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( 40 ) * cor0.col2 col0 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
2320
3160
3480

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-980
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-980
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT DISTINCT cor0.col2 * 32 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-18432
-199712
-46208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 25 col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
-25
-25
-25

query I rowsort
SELECT 95 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT - 16 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
-16
-16

query I rowsort
SELECT 37 * + 44 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1628
1628
1628

query I rowsort
SELECT ALL - 40 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-40
-40
-40

query I rowsort
SELECT + 48 FROM tab1 GROUP BY tab1.col0
----
48
48
48

query I rowsort
SELECT 37 + + col0 + 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
143
83
89

query I rowsort
SELECT 70 AS col1 FROM tab0 GROUP BY tab0.col2
----
70
70
70

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col2 + cor0.col1 * NULLIF ( 69, cor0.col2 + + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2812
4051
4183

query I rowsort
SELECT ALL 32 FROM tab2 cor0 GROUP BY col1
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 17 col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-17

query I rowsort
SELECT DISTINCT + 26 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1170
1846
208

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, cor0.col1 ) * cor0.col2 * - 93 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-134292
-53568
-580413

query I rowsort
SELECT - 91 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-91
-91
-91

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT - 48 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-48
-48
-48

query I rowsort
SELECT 0 * - 17 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 79 - 42 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-173
-1769
-2315

query I rowsort
SELECT DISTINCT - 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-6

query I rowsort
SELECT 84 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1848
2352
6888

query I rowsort
SELECT ALL cor0.col0 * - 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1474
-1876
-5494

query I rowsort
SELECT 42 FROM tab0 cor0 GROUP BY cor0.col1
----
42
42

query I rowsort
SELECT cor0.col0 - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 47 * - 3 FROM tab2 AS cor0 GROUP BY col2
----
-141
-141
-141

query I rowsort
SELECT 65 FROM tab0 AS cor0 GROUP BY cor0.col1
----
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
132
150
152

query I rowsort
SELECT 8 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14
52
65

query I rowsort
SELECT 93 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
93
93
93

query I rowsort
SELECT DISTINCT 36 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
36

query I rowsort
SELECT 6 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
87

query I rowsort
SELECT cor0.col0 * + cor0.col0 * cor0.col0 - - 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
17670
571881
79601

query I rowsort
SELECT 40 FROM tab2 GROUP BY tab2.col2
----
40
40
40

query I rowsort
SELECT - 80 FROM tab1 GROUP BY tab1.col2
----
-80
-80
-80

query I rowsort
SELECT DISTINCT + 81 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
81

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT ALL - 0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + ( - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 + + 60 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
141
60

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT 54 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT + 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT 19 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
43
57
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
47
47
47

query I rowsort
SELECT + 28 + - cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-13
-31
-33

query I rowsort
SELECT + COALESCE ( cor0.col1, + cor0.col1 * + 55 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-1028
SELECT ALL 11 DIV cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1028
SELECT ALL 11 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - 47 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
32
40

onlyif mysql # DIV for integer division: 
query I rowsort label-1030
SELECT - 91 DIV - 40 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2
2
2

skipif mysql # not compatible
query I rowsort label-1030
SELECT - 91 / - 40 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1031
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1031
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
NULL

query I rowsort
SELECT ALL 7 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT - + tab0.col1 - 55 AS col2 FROM tab0, tab0 cor0 GROUP BY tab0.col1
----
-136
-55

query I rowsort
SELECT DISTINCT + 60 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60

query I rowsort
SELECT - 48 * 68 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3264
-3264
-3264

query I rowsort
SELECT - 4 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
364
368
60

query I rowsort
SELECT - 60 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + cor0.col0 + + 22 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
44
50

query I rowsort
SELECT DISTINCT - 55 FROM tab0 GROUP BY tab0.col2
----
-55

query I rowsort
SELECT ALL ( + 72 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
72
72
72

query I rowsort
SELECT + col0 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT ( - 51 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
76

query I rowsort
SELECT - 14 AS col2 FROM tab2, tab0 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
-14
-14

query I rowsort
SELECT DISTINCT - 9 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 75 col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
75
75
75

query I rowsort
SELECT - 37 FROM tab1 cor0 GROUP BY cor0.col1
----
-37
-37
-37

query I rowsort
SELECT - 71 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

query I rowsort
SELECT + 84 * + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3444
4956
5124

query I rowsort
SELECT DISTINCT col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - col0 + - cor0.col2 + 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-27
-75
-95

query I rowsort
SELECT cor0.col2 - - 33 FROM tab2 AS cor0 GROUP BY cor0.col2
----
112
120
91

query I rowsort
SELECT ALL cor0.col2 * + 32 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1856
2528
2784

query I rowsort
SELECT COALESCE ( - cor0.col0, cor0.col0 ) + - 3 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-25
-31
-85

query I rowsort
SELECT + 86 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT DISTINCT NULLIF ( + 2 * + cor0.col1, - cor0.col1 ) + - 95 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-13
23
27

query I rowsort
SELECT - 4 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-4
-4
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13
13
13

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1059
SELECT ALL CAST( + 77 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY col0
----
77
77
77

skipif mysql # not compatible
query I rowsort label-1059
SELECT ALL CAST ( + 77 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY col0
----
77
77
77

query I rowsort
SELECT DISTINCT - 44 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-44

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL ( - cor0.col1 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-1063
SELECT ALL 55 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1063
SELECT ALL 55 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
1

query I rowsort
SELECT ALL + cor0.col2 * - 5 * - 48 + + 83 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
10883
17123
2003

query I rowsort
SELECT 57 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
2508
3249
342

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1066
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1066
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT - cor1.col0 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - ( cor0.col2 ) + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 17 FROM tab1 cor0 GROUP BY cor0.col0
----
17

query I rowsort
SELECT - 6 FROM tab2 AS cor0 GROUP BY col2
----
-6
-6
-6

query I rowsort
SELECT + 79 FROM tab1 GROUP BY tab1.col1
----
79
79
79

query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col2, cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL - cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
68
68
68

query I rowsort
SELECT ALL - 8 + - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-34
-51
-91

query I rowsort
SELECT DISTINCT - - 25 AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
25

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
158
48
76

query I rowsort
SELECT - cor0.col1 * 87 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-3784
-4902
-516

query I rowsort
SELECT ( col2 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
2565
3124
48

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 27, cor0.col0 + - col2 ) * + 32 FROM tab0 AS cor0 GROUP BY col1
----
-864
-864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 83 FROM tab0 AS cor0 GROUP BY col2
----
83
83
83

query I rowsort
SELECT DISTINCT - 91 FROM tab2 GROUP BY tab2.col2
----
-91

query I rowsort
SELECT + 45 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
45
45

query I rowsort
SELECT ALL + 67 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 - - 24 col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
103
48
62

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 34 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-34

query I rowsort
SELECT - cor0.col1 + cor0.col1 + - 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-24
-24
-24

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1091
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * + col0 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1091
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * + col0 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT DISTINCT 69 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
69

query I rowsort
SELECT + 23 FROM tab0 AS cor0 GROUP BY cor0.col1
----
23
23

query I rowsort
SELECT ALL 5 * 4 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-23
-6
-63

query I rowsort
SELECT - - cor0.col2 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1096
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1096
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 26 * 47 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
1222

query I rowsort
SELECT - 60 * col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2460
-3540
-3660

query I rowsort
SELECT 4 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-1100
SELECT ALL 44 DIV col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1100
SELECT ALL 44 / col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 93 FROM tab0 GROUP BY col2
----
-93

query I rowsort
SELECT - cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
35

query I rowsort
SELECT DISTINCT cor0.col2 * + 85 FROM tab1 cor0 GROUP BY cor0.col2
----
3825
6035
680

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
142
16
90

query I rowsort
SELECT ALL - 14 + - 87 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2102
-3320
-6887

query I rowsort
SELECT - 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-39
-39
-39

query I rowsort
SELECT DISTINCT - 78 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-78

query I rowsort
SELECT ALL cor0.col0 * 15 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
1245
390
645

query I rowsort
SELECT + 89 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
89
89
89

query I rowsort
SELECT 62 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col2 FROM tab0 cor0 GROUP BY col0
----
91
91
91

query I rowsort
SELECT DISTINCT + - 95 AS col1 FROM tab0, tab0 AS cor0, tab2 cor1 GROUP BY cor1.col0
----
-95

query I rowsort
SELECT - 8 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-8
-8
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 * + 38 + + 21 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2719
2719
2719

query I rowsort
SELECT ( cor0.col0 ) - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT + - 70 * + 86 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
-6020
-6020
-6020

query I rowsort
SELECT ( 38 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
38
38

query I rowsort
SELECT DISTINCT 53 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2173
3127
3233

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-1122
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-1122
SELECT ( cor0.col1 ) / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 18 col1 FROM tab2 GROUP BY tab2.col0
----
18

onlyif mysql # DIV for integer division: 
query I rowsort label-1124
SELECT DISTINCT cor0.col1 DIV cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-1124
SELECT DISTINCT cor0.col1 / cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
1

query I rowsort
SELECT 76 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
158
98

query I rowsort
SELECT + 96 FROM tab0 AS cor0 GROUP BY col0
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 19 * - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1083
-114
-836

query I rowsort
SELECT - 30 FROM tab1 AS cor0 GROUP BY col2
----
-30
-30
-30

query I rowsort
SELECT ALL 63 * 49 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3087
3087

query I rowsort
SELECT DISTINCT 92 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
92

query I rowsort
SELECT + 72 * + 60 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4342
4348
4402

query I rowsort
SELECT 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28
28
28

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1133
SELECT ALL cor0.col0 * + CAST( - 94 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1410
-8554
-8648

skipif mysql # not compatible
query I rowsort label-1133
SELECT ALL cor0.col0 * + CAST ( - 94 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1410
-8554
-8648

query I rowsort
SELECT 23 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
23
23
23

query I rowsort
SELECT DISTINCT 22 FROM tab0 cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT DISTINCT + 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
75

query I rowsort
SELECT DISTINCT - 24 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-24

query I rowsort
SELECT DISTINCT 6 + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
14
51
77

query I rowsort
SELECT - 1 FROM tab1 AS cor0 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 52 FROM tab1 AS cor0 GROUP BY cor0.col2
----
52

query I rowsort
SELECT 44 FROM tab1 GROUP BY tab1.col0
----
44
44
44

onlyif mysql # DIV for integer division: 
query I rowsort label-1142
SELECT DISTINCT - 82 DIV - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-1142
SELECT DISTINCT - 82 / - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 67 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1608
2546
5293

query I rowsort
SELECT DISTINCT col2 * cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
19575
490912
654199

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 82 col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT + ( - 32 ) AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-32
-32
-32

query I rowsort
SELECT cor0.col0 * + NULLIF ( cor0.col0 * + cor0.col2, cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
19575
490912
654199

query I rowsort
SELECT + 26 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT cor0.col0 + + cor0.col0 * 49 + - 80 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1220
2070
4070

query I rowsort
SELECT ALL + 50 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
4050

query I rowsort
SELECT 17 * cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
1343
408
646

query I rowsort
SELECT ALL + 82 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT ALL - 92 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-92
-92
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + 18 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-40
-61
-69

query I rowsort
SELECT DISTINCT 90 FROM tab1 cor0 GROUP BY cor0.col0
----
90

query I rowsort
SELECT DISTINCT 36 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
36

query I rowsort
SELECT DISTINCT 6 + 65 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71

query I rowsort
SELECT - ( cor0.col1 ) AS col1 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT + ( + 33 ) FROM tab2 GROUP BY col2
----
33
33
33

query I rowsort
SELECT cor0.col2 * 81 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3645
5751
648

query I rowsort
SELECT DISTINCT - 66 FROM tab2 GROUP BY tab2.col1
----
-66

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1162
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 93 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1162
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 93 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 + 81 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
126
152
89

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 23 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
7
7
7

query I rowsort
SELECT 4 + + col0 + - 65 * - 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
810
827
867

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 * cor0.col0 - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
2080
3440
6640

query I rowsort
SELECT 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT NULLIF ( 98 + - cor0.col2, - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
27
53
90

query I rowsort
SELECT 96 AS col2 FROM tab2 GROUP BY tab2.col1
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 * 29 col0 FROM tab2 AS cor0 GROUP BY col1
----
377
377
377

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 58 - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14
52

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1176
SELECT + col2 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1176
SELECT + col2 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 40 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
40
40
40

query I rowsort
SELECT ALL - NULLIF ( 37, col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT + 55 * + 88 * + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
280720
382360
421080

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1180
SELECT DISTINCT - CAST( 68 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-68

skipif mysql # not compatible
query I rowsort label-1180
SELECT DISTINCT - CAST ( 68 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-68

query I rowsort
SELECT cor0.col0 * - 13 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1079
-338
-559

query I rowsort
SELECT ( 13 ) AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
13
13
13

query I rowsort
SELECT - ( 14 ) FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 35 FROM tab1 AS cor0 GROUP BY cor0.col1
----
35

query I rowsort
SELECT 23 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
23
23
23

query I rowsort
SELECT ALL - 7 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

query I rowsort
SELECT cor0.col2 + 84 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
142
163
171

query I rowsort
SELECT + 53 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
53
53

query I rowsort
SELECT cor0.col2 - - 78 FROM tab0 AS cor0 GROUP BY cor0.col2
----
102
116
157

query I rowsort
SELECT ALL - 66 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1 GROUP BY tab0.col0
----
-66
-66
-66

query I rowsort
SELECT - cor0.col0 * 21 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1722
-462
-588

query I rowsort
SELECT ALL 55 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL + 5 FROM tab0 AS cor0 GROUP BY col0
----
5
5
5

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 97, cor0.col2 ) + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
178
97

query I rowsort
SELECT - 66 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, 49 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-1198
SELECT ALL + cor0.col1 * 2 DIV + 16 + + cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1676
-3474
-3714

skipif mysql # not compatible
query I rowsort label-1198
SELECT ALL + cor0.col1 * 2 / + 16 + + cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1676
-3474
-3714

query I rowsort
SELECT ALL + 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
98
98
98

query I rowsort
SELECT + col2 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col2
----
9 values hashing to ad2e5fa6d094292bda21bf46c78171b8

query I rowsort
SELECT DISTINCT - 31 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-31

query I rowsort
SELECT 37 FROM tab2 AS cor0 GROUP BY cor0.col1
----
37
37
37

query I rowsort
SELECT ALL - 1 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1205
SELECT CAST( NULL AS SIGNED ) + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1205
SELECT CAST ( NULL AS INTEGER ) + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1206
SELECT cor0.col1 DIV - 60 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-1206
SELECT cor0.col1 / - 60 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1
0

query I rowsort
SELECT ALL 3 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
3
3
3

query I rowsort
SELECT ALL + 77 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT ALL + 97 * cor0.col2 + 37 * + 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
11178
5843
7201

query I rowsort
SELECT ALL + ( 75 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT 2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2

query I rowsort
SELECT ALL NULLIF ( + 28, col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT + 93 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
11
65
71

onlyif mysql # DIV for integer division: 
query I rowsort label-1214
SELECT DISTINCT cor0.col2 + cor0.col0 DIV col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-1214
SELECT DISTINCT cor0.col2 + cor0.col0 / col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
59
80
88

query I rowsort
SELECT 82 + 88 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
170
170
170

query I rowsort
SELECT - 70 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-70
-70
-70

query I rowsort
SELECT ALL - 20 FROM tab1 AS cor0 GROUP BY col0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + - cor0.col1 - 66 * - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1452
1848
5412

query I rowsort
SELECT - 84 * + 87 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-7308
-7308
-7308

query I rowsort
SELECT - 29 FROM tab0 cor0 GROUP BY cor0.col0
----
-29
-29
-29

query I rowsort
SELECT - 19 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-19
-19
-19

query I rowsort
SELECT ALL + col1 + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT DISTINCT - 17 * 95 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1615

query I rowsort
SELECT DISTINCT 30 + 43 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col1 - - 10 col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
1691
3491
3731

query I rowsort
SELECT ALL - cor1.col0 * cor1.col1 * - 76 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0, cor1.col1
----
286672
408044
69540

query I rowsort
SELECT - 27 + - 94 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-121
-121
-121

query I rowsort
SELECT ALL 71 * - 76 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-5396
-5396
-5396

query I rowsort
SELECT ALL + 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT 95 FROM tab2 AS cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT 39 AS col2 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT 70 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT + cor0.col0 + + col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 98 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT + 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT + 37 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2997

query I rowsort
SELECT NULLIF ( 38, cor0.col0 ) + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-45
-5
12

query I rowsort
SELECT ALL NULLIF ( - cor0.col1, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 64 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
64
64
64

query I rowsort
SELECT ( - cor0.col1 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 78 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
78

query I rowsort
SELECT DISTINCT 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45

query I rowsort
SELECT DISTINCT 30 FROM tab1 cor0 GROUP BY col1
----
30

query I rowsort
SELECT + 84 FROM tab0 GROUP BY col1
----
84
84

query I rowsort
SELECT - 33 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-33
-33
-33

query I rowsort
SELECT DISTINCT + 81 * - col2 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1968
-3116
-6478

query I rowsort
SELECT - 73 * - cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
478953

query I rowsort
SELECT - 17 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT ALL - - 32 AS col2 FROM tab0, tab2 cor0 GROUP BY tab0.col2
----
32
32
32

query I rowsort
SELECT ( - col1 * - col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 99 FROM tab2 AS cor0 GROUP BY cor0.col0
----
99
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT DISTINCT - NULLIF ( + tab0.col0, tab0.col0 ) FROM tab0 GROUP BY col0
----
NULL

query I rowsort
SELECT + cor0.col1 * NULLIF ( 35, cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2835

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 68 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
68
68
68

query I rowsort
SELECT - 11 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-11
-11
-11

query I rowsort
SELECT DISTINCT + ( col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT - 78 + 2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-76
-76
-76

query I rowsort
SELECT ALL + 52 FROM tab0 GROUP BY col2
----
52
52
52

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT + 76 FROM tab2 AS cor0 GROUP BY cor0.col1
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 61 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - NULLIF ( 31, cor0.col0 ) col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT ALL - 3 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT ALL + 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT col1 + 30 FROM tab0 AS cor0 GROUP BY cor0.col1
----
111
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 54 + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
25
33
4

query I rowsort
SELECT DISTINCT ( + 15 ) * cor0.col2 * 54 FROM tab1 AS cor0 GROUP BY cor0.col2
----
36450
57510
6480

query I rowsort
SELECT + 11 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1001
1012
165

query I rowsort
SELECT - cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT - 44 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-44
-44
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 12 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT cor0.col0 * 44 FROM tab1 cor0 GROUP BY cor0.col0
----
1232
3608
968

query I rowsort
SELECT + 81 AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
81
81
81

query I rowsort
SELECT ALL - 25 FROM tab0 GROUP BY tab0.col2
----
-25
-25
-25

query I rowsort
SELECT + 79 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
79
79
79

query I rowsort
SELECT 90 FROM tab1 cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT ALL - 61 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT 18 + + col1 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
150
1614
3626

query I rowsort
SELECT DISTINCT + 84 * - 27 + - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2294
-2311
-2351

query I rowsort
SELECT ( - 43 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-43
-43
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 0 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 49 col2 FROM tab0 AS cor0 GROUP BY col1
----
49

query I rowsort
SELECT + COALESCE ( cor0.col2, - 31 * + 46 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT NULLIF ( - cor0.col2, - cor0.col2 ) * 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1289
SELECT - CAST( NULL AS DECIMAL ) - + cor0.col1 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1289
SELECT - CAST ( NULL AS REAL ) - + cor0.col1 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - 23 + + col1 * - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1959
-3272
-59

query I rowsort
SELECT - 73 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-73
-73
-73

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - 35 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-35

query I rowsort
SELECT DISTINCT 89 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 * cor0.col0 - + cor0.col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 37 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + 39 AS col0 FROM tab1 GROUP BY col2
----
39

query I rowsort
SELECT 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT ALL 59 + cor0.col2 + + 18 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1408
211
914

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
-16

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1303
SELECT DISTINCT CAST( NULL AS DECIMAL ) + - col2 AS col2 FROM tab2 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1303
SELECT DISTINCT CAST ( NULL AS REAL ) + - col2 AS col2 FROM tab2 GROUP BY col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col1 * + 47 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2112
-2736
-288

query I rowsort
SELECT + 80 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT DISTINCT + ( 61 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1308
SELECT + col1 - cor0.col1 DIV + 2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
29
3

skipif mysql # not compatible
query I rowsort label-1308
SELECT + col1 - cor0.col1 / + 2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
29
3

query I rowsort
SELECT - 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT ALL 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT ALL 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
70
70
70

query I rowsort
SELECT cor0.col2 + 1 FROM tab0 cor0 GROUP BY cor0.col2
----
25
39
80

query I rowsort
SELECT + col0 - cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-72
12
34

query I rowsort
SELECT 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT + ( + 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-1316
SELECT 1 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1316
SELECT 1 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + - 14 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-14

query I rowsort
SELECT cor0.col2 * - 76 FROM tab2 AS cor0 GROUP BY col2
----
-4408
-6004
-6612

query I rowsort
SELECT ALL - 0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
0
0
0

query I rowsort
SELECT 22 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
22
22

query I rowsort
SELECT ALL 49 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 - + cor0.col2 * - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3416
6293
7621

query I rowsort
SELECT + + 48 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1056
-1344
-3936

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1324
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1324
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1325
SELECT DISTINCT + + CAST( NULL AS SIGNED ) col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1325
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT DISTINCT + ( 57 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57

query I rowsort
SELECT 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
38
38

query I rowsort
SELECT + 22 + + 64 AS col1 FROM tab0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT 10 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-450
-710
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 + col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
115
136
144

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1331
SELECT - CAST( NULL AS DECIMAL ) * + cor0.col1 * + 81 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1331
SELECT - CAST ( NULL AS REAL ) * + cor0.col1 * + 81 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 47 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
128
47

query I rowsort
SELECT DISTINCT - + 75 * cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-3375
-5325
-600

query I rowsort
SELECT DISTINCT 74 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
74

query I rowsort
SELECT ALL cor0.col0 + + 76 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
102
119
159

query I rowsort
SELECT + 20 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 55 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 91 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT ALL + 80 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
80
80

query I rowsort
SELECT - 13 * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-572
-741
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 55 col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 * 52 FROM tab1 AS cor0 GROUP BY cor0.col1
----
100672
168948
1872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 54 col1 FROM tab1 GROUP BY tab1.col2
----
-54
-54
-54

query I rowsort
SELECT 58 * 66 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3747
3828

onlyif mysql # DIV for integer division: 
query I rowsort label-1347
SELECT 83 DIV + 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1347
SELECT 83 / + 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL 92 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT - 66 FROM tab2 AS cor0 GROUP BY col2
----
-66
-66
-66

query I rowsort
SELECT 78 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT ALL cor0.col1 + 4 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
45
63
65

query I rowsort
SELECT DISTINCT cor0.col1 + 28 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
69
87
89

query I rowsort
SELECT + ( cor0.col0 ) * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + 67 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
149
89
95

query I rowsort
SELECT 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
9
9
9

query I rowsort
SELECT - NULLIF ( 25, 24 ) FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT - cor0.col0 + 13 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-2
-78
-79

query I rowsort
SELECT DISTINCT 58 FROM tab0 AS cor0 GROUP BY cor0.col1
----
58

query I rowsort
SELECT DISTINCT + 71 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
71

query I rowsort
SELECT DISTINCT 1 FROM tab1 cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT DISTINCT cor0.col2 + 97 FROM tab1 AS cor0 GROUP BY cor0.col2
----
105
142
168

query I rowsort
SELECT + 81 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT + 81 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
81
81
81

query I rowsort
SELECT + 70 FROM tab1 cor0 GROUP BY cor0.col0
----
70
70
70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1365
SELECT - cor0.col0 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1365
SELECT - cor0.col0 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT + 63 * + cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
5103

query I rowsort
SELECT - 76 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-76
-76
-76

query I rowsort
SELECT - 76 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT DISTINCT + 35 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT DISTINCT - 94 - 68 FROM tab1 AS cor0 GROUP BY col2
----
-162

onlyif mysql # DIV for integer division: 
query I rowsort label-1372
SELECT DISTINCT + 96 DIV cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1372
SELECT DISTINCT + 96 / cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1
2
3

query I rowsort
SELECT DISTINCT - 84 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-1374
SELECT ALL 37 * cor0.col0 DIV 93 FROM tab2 AS cor0 GROUP BY col0
----
36
36
5

skipif mysql # not compatible
query I rowsort label-1374
SELECT ALL 37 * cor0.col0 / 93 FROM tab2 AS cor0 GROUP BY col0
----
36
36
5

query I rowsort
SELECT ALL 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT 4 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4

query I rowsort
SELECT cor0.col0 * + cor0.col0 * 93 + + cor0.col0 + + 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
45080
625460
72986

query I rowsort
SELECT DISTINCT - 96 * - 53 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
5088

query I rowsort
SELECT - cor0.col2 * + 74 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-3330
-5254
-592

query I rowsort
SELECT DISTINCT 85 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
85

query I rowsort
SELECT cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 43 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-43

query I rowsort
SELECT DISTINCT 9 FROM tab2 GROUP BY tab2.col2
----
9

query I rowsort
SELECT ALL + col1 * ( 58 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4698

query I rowsort
SELECT - 57 * - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4617

query I rowsort
SELECT + cor0.col2 + - cor0.col0 * + 13 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-108
-1104
-1138

onlyif mysql # DIV for integer division: 
query I rowsort label-1388
SELECT DISTINCT cor0.col2 DIV + 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1388
SELECT DISTINCT cor0.col2 / + 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
2

query I rowsort
SELECT DISTINCT 94 FROM tab1 AS cor0 GROUP BY col1
----
94

query I rowsort
SELECT - 3 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
3
3

query I rowsort
SELECT 11 * + 39 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
429
429

query I rowsort
SELECT ALL COALESCE ( cor0.col0, cor0.col0 ) - + cor0.col0 * + 64 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-1386
-1764
-5166

query I rowsort
SELECT DISTINCT NULLIF ( 44, + cor0.col0 ) * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
3564

query I rowsort
SELECT 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT 30 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 47, - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
95
95
95

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1401
SELECT ALL + - CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1401
SELECT ALL + - CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1402
SELECT + 28 DIV - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1402
SELECT + 28 / - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

query I rowsort
SELECT ALL 70 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
70
70
70

query I rowsort
SELECT ALL + 56 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-2464
-3192
-336

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
102
115
14

query I rowsort
SELECT DISTINCT 75 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
75

query I rowsort
SELECT DISTINCT - 96 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
-96

query I rowsort
SELECT ALL - 50 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-50
-50

query I rowsort
SELECT 31 AS col1 FROM tab1 GROUP BY tab1.col0
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-1410
SELECT cor0.col1 DIV 85 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-1410
SELECT cor0.col1 / 85 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT + - 76 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-76
-76
-76

query I rowsort
SELECT ALL - 75 FROM tab2 GROUP BY tab2.col2
----
-75
-75
-75

query I rowsort
SELECT DISTINCT + - 19 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-19

query I rowsort
SELECT DISTINCT cor0.col1 + 55 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
112
61
99

query I rowsort
SELECT ALL 90 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
90
90
90

onlyif mysql # DIV for integer division: 
query I rowsort label-1416
SELECT ALL - 51 DIV 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-1416
SELECT ALL - 51 / 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT - 98 * + 46 + - 60 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-4568

query I rowsort
SELECT - 57 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-57
-57
-57

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - cor0.col2 * 61 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1464
-2318
-4819

query I rowsort
SELECT + 79 FROM tab0 AS cor0 GROUP BY cor0.col1
----
79
79

query I rowsort
SELECT - ( - 10 ) * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
580
790
870

query I rowsort
SELECT DISTINCT 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1424
SELECT + CAST( - cor0.col2 AS SIGNED ) - 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-117
-54
-91

skipif mysql # not compatible
query I rowsort label-1424
SELECT + CAST ( - cor0.col2 AS INTEGER ) - 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-117
-54
-91

query I rowsort
SELECT DISTINCT + - 82 + + 91 AS col0 FROM tab1 GROUP BY col2
----
9

query I rowsort
SELECT ALL 54 FROM tab1 AS cor0 GROUP BY col0
----
54
54
54

query I rowsort
SELECT + 56 + - 22 + - cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-191
-8247
-8430

query I rowsort
SELECT ALL + col0 * + 94 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1410
8554
8648

query I rowsort
SELECT DISTINCT 45 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1170
1935
3735

query I rowsort
SELECT DISTINCT - ( + 21 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-21

query I rowsort
SELECT ALL - 91 FROM tab1 AS cor0 GROUP BY col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 49 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT - ( + cor1.col0 ) FROM tab0, tab0 cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col2 * + 39 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1755
2769
312

query I rowsort
SELECT 89 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
89
89
89

query I rowsort
SELECT ALL 21 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
21
21
21

query I rowsort
SELECT cor0.col1 * + cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
531441

query I rowsort
SELECT 14 FROM tab0 GROUP BY tab0.col1
----
14
14

onlyif mysql # DIV for integer division: 
query I rowsort label-1439
SELECT - 86 + - 7 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-86
-86
-86

skipif mysql # not compatible
query I rowsort label-1439
SELECT - 86 + - 7 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-86
-86
-86

query I rowsort
SELECT DISTINCT + 44 * 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1892

query I rowsort
SELECT - 69 + + 49 + + 25 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT + cor0.col2 + - 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
11
3

onlyif mysql # DIV for integer division: 
query I rowsort label-1443
SELECT DISTINCT 93 DIV - 47 FROM tab0, tab0 cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-1

skipif mysql # not compatible
query I rowsort label-1443
SELECT DISTINCT 93 / - 47 FROM tab0, tab0 cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-1

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 5 + 81 AS col2 FROM tab1 GROUP BY tab1.col2
----
86
86
86

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col2 * COALESCE ( cor0.col2 * - cor0.col0, - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-119852
-162266
-24768

query I rowsort
SELECT + 46 FROM tab0 AS cor0 GROUP BY cor0.col1
----
46
46

query I rowsort
SELECT DISTINCT 80 FROM tab2 AS cor0 GROUP BY cor0.col2
----
80

query I rowsort
SELECT DISTINCT - 85 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-85

onlyif mysql # DIV for integer division: 
query I rowsort label-1451
SELECT DISTINCT + cor0.col0 DIV - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
-1

skipif mysql # not compatible
query I rowsort label-1451
SELECT DISTINCT + cor0.col0 / - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
-1

query I rowsort
SELECT 73 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
73

query I rowsort
SELECT 29 FROM tab2 AS cor0 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT ALL 6 + cor0.col0 + - 45 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
-13
4
44

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT cor0.col2 - 34 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-10
4
45

query I rowsort
SELECT 5 * cor0.col2 + 64 FROM tab0 AS cor0 GROUP BY col2
----
184
254
459

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 78 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-78
-78
-78

query I rowsort
SELECT ALL + 22 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT 66 FROM tab0 AS cor0 GROUP BY cor0.col0
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 90 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
90

query I rowsort
SELECT - - 72 AS col1 FROM tab2 GROUP BY tab2.col1
----
72
72
72

query I rowsort
SELECT ALL 42 - col0 FROM tab1 AS cor0 GROUP BY col0
----
-40
14
20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1468
SELECT CAST( 96 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
96
96
96

skipif mysql # not compatible
query I rowsort label-1468
SELECT CAST ( 96 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
96
96
96

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 cor0.col0 + 55 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
146
147
70

query I rowsort
SELECT + - 26 FROM tab2 GROUP BY tab2.col1
----
-26
-26
-26

query I rowsort
SELECT DISTINCT + NULLIF ( - 91, - cor0.col2 ) * + cor0.col2 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
131404
52416
567931

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 + - 5 col1 FROM tab2 GROUP BY tab2.col2
----
-26
-26
-26

query I rowsort
SELECT - 31 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
-31
-31

query I rowsort
SELECT - 96 + - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-120
-134
-175

query I rowsort
SELECT 86 FROM tab0, tab0 AS cor0, tab1 AS cor1 GROUP BY tab0.col1
----
86
86

query I rowsort
SELECT - 83 FROM tab1 GROUP BY tab1.col2
----
-83
-83
-83

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 * + 12 FROM tab2 AS cor0 GROUP BY col1
----
20172
41772
44652

query I rowsort
SELECT ALL cor0.col1 - + col0 * + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-1539
-3564

query I rowsort
SELECT 51 FROM tab2 AS cor0 GROUP BY cor0.col0
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * - 17 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1411
-442
-731

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + 9 FROM tab0 AS cor0 GROUP BY cor0.col1
----
9

query I rowsort
SELECT DISTINCT 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
25

query I rowsort
SELECT DISTINCT - 59 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
-59

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col1 + + ( + 25 ) * - cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-282
-3021
-4708

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT 53 FROM tab2 AS cor0 GROUP BY cor0.col1
----
53
53
53

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1489
SELECT ALL - CAST( NULL AS DECIMAL ) + cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1489
SELECT ALL - CAST ( NULL AS REAL ) + cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 94 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
94

query I rowsort
SELECT DISTINCT 92 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2024
-2576
-7544

query I rowsort
SELECT 38 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT 48 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 * - 68 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3808

query I rowsort
SELECT ALL 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT ALL - 84 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2184
-3612
-6972

query I rowsort
SELECT 40 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
40
40
40

query I rowsort
SELECT DISTINCT + 75 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
75

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT DISTINCT - 18 AS col0 FROM tab2 GROUP BY tab2.col0
----
-18

query I rowsort
SELECT + 57 FROM tab1 cor0 GROUP BY cor0.col1
----
57
57
57

query I rowsort
SELECT + 20 * - 41 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-820
-820
-820

query I rowsort
SELECT - 45 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-45
-45
-45

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT + tab0.col2 * 63 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
1512
2394
4977

query I rowsort
SELECT 10 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT DISTINCT 98 * 4 FROM tab0 AS cor0 GROUP BY cor0.col0
----
392

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - 96 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-96
-96
-96

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1510
SELECT CAST( NULL AS SIGNED ) - 86 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1510
SELECT CAST ( NULL AS INTEGER ) - 86 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1512
SELECT + cor0.col1 + CAST( + 15 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY col1, col1
----
21
59
72

skipif mysql # not compatible
query I rowsort label-1512
SELECT + cor0.col1 + CAST ( + 15 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY col1, col1
----
21
59
72

query I rowsort
SELECT + 36 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1368
2844
864

query I rowsort
SELECT ALL - 83 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1826
2324
6806

query I rowsort
SELECT + ( cor0.col2 * 88 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, col2
----
3960
6248
704

query I rowsort
SELECT ALL - ( - 2 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
2

query I rowsort
SELECT ALL cor0.col1 * 13 FROM tab2 AS cor0 GROUP BY cor0.col1
----
533
767
793

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1519
SELECT - tab0.col2 DIV - 14 FROM tab0 GROUP BY tab0.col2
----
1
2
5

skipif mysql # not compatible
query I rowsort label-1519
SELECT - tab0.col2 / - 14 FROM tab0 GROUP BY tab0.col2
----
1
2
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 26 col0 FROM tab0 AS cor0 GROUP BY col1
----
26

query I rowsort
SELECT ALL 89 FROM tab1 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-1523
SELECT DISTINCT - cor0.col0 DIV - 9 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
3
9

skipif mysql # not compatible
query I rowsort label-1523
SELECT DISTINCT - cor0.col0 / - 9 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
3
9

query I rowsort
SELECT + 70 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
70
70
70

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
----
26
43
83

query I rowsort
SELECT 60 FROM tab1 AS cor0 GROUP BY col0
----
60
60
60

query I rowsort
SELECT - ( cor0.col2 * 92 ) AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col1
----
-5336
-7268
-8004

query I rowsort
SELECT DISTINCT + 11 FROM tab0 GROUP BY col0
----
11

query I rowsort
SELECT DISTINCT 27 FROM tab2 cor0 GROUP BY cor0.col0
----
27

onlyif mysql # DIV for integer division: 
query I rowsort label-1530
SELECT DISTINCT - cor0.col2 DIV 98 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-1530
SELECT DISTINCT - cor0.col2 / 98 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT ALL - - 80 + cor0.col2 + cor0.col2 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
128
156
238

query I rowsort
SELECT + 55 FROM tab1 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT - 1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT DISTINCT - 60 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 74 col2 FROM tab1 GROUP BY col1
----
-74

query I rowsort
SELECT ALL 14 FROM tab2, tab0 cor0 GROUP BY cor0.col1
----
14
14

query I rowsort
SELECT ALL + 88 AS col1 FROM tab1 GROUP BY tab1.col0
----
88
88
88

query I rowsort
SELECT + 33 FROM tab0 AS cor0 GROUP BY cor0.col1
----
33
33

query I rowsort
SELECT DISTINCT cor0.col1 + 18 FROM tab0 AS cor0 GROUP BY col1, col1
----
18
99

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 79 + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-41
-55
0

query I rowsort
SELECT DISTINCT - 77 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-77

query I rowsort
SELECT ALL 99 + + 10 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
109
109
109

query I rowsort
SELECT - 77 FROM tab0 AS cor0 GROUP BY col2
----
-77
-77
-77

query I rowsort
SELECT ALL ( ( col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ( + 88 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT ALL + 18 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
101
44
61

query I rowsort
SELECT DISTINCT 33 FROM tab0 AS cor0 GROUP BY col0
----
33

query I rowsort
SELECT 1 * - cor0.col0 + + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 39 * - 21 FROM tab1 GROUP BY col1
----
819
819
819

query I rowsort
SELECT DISTINCT - 27 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-1552
SELECT DISTINCT + 55 DIV 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-1552
SELECT DISTINCT + 55 / 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT + + 22 + 25 FROM tab2 GROUP BY tab2.col1
----
47

query I rowsort
SELECT DISTINCT + 85 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
85

query I rowsort
SELECT 14 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
14
14
14

query I rowsort
SELECT 25 * + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2025

query I rowsort
SELECT 71 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
71
71

query I rowsort
SELECT cor0.col1 * - 16 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1296
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1559
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1559
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT + 47 + cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
104
53
91

query I rowsort
SELECT DISTINCT 21 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
21

query I rowsort
SELECT + 29 AS col2 FROM tab2, tab2 AS cor0, tab0 cor1 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT + 13 - - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35
41
95

query I rowsort
SELECT - + 82 FROM tab1 GROUP BY tab1.col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - 61 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1566
SELECT ALL - ( - NULLIF ( cor0.col2, CAST( - cor0.col2 AS SIGNED ) ) ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-1566
SELECT ALL - ( - NULLIF ( cor0.col2, CAST ( - cor0.col2 AS INTEGER ) ) ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 76 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
76
76
76

query I rowsort
SELECT 45 * + 2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 48 col2 FROM tab1 GROUP BY col0
----
-48
-48
-48

query I rowsort
SELECT ALL - cor0.col1 * 29 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-1276
-1653
-174

query I rowsort
SELECT - 98 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-98
-98
-98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1572
SELECT CAST( - cor0.col1 AS SIGNED ) * - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

skipif mysql # not compatible
query I rowsort label-1572
SELECT CAST ( - cor0.col1 AS INTEGER ) * - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + 6 AS col1 FROM tab0 GROUP BY tab0.col2
----
6
6
6

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT ALL - 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-89
-89
-89

query I rowsort
SELECT DISTINCT 74 FROM tab1 AS cor0 GROUP BY cor0.col1
----
74

query I rowsort
SELECT 55 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
55
55

query I rowsort
SELECT + 38 * 34 AS col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
1292
1292
1292

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT 10 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
54
67

query I rowsort
SELECT - NULLIF ( cor0.col0, - cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 42 FROM tab2 AS cor0 GROUP BY cor0.col0
----
42

query I rowsort
SELECT 78 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
78
78
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1584
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1584
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1585
SELECT ( 35 + + cor0.col0 ) DIV + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
3
4

skipif mysql # not compatible
query I rowsort label-1585
SELECT ( 35 + + cor0.col0 ) / + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
3
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 55 col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
55

query I rowsort
SELECT - 68 - + 29 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-97
-97
-97

query I rowsort
SELECT ALL 42 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
42
42

query I rowsort
SELECT 37 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT - 99 * + cor1.col2 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
-5742
-7821
-8613

query I rowsort
SELECT + 11 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT + cor0.col2 + 82 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
140
161
169

query I rowsort
SELECT + - cor1.col1 * 10 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
-810
0

query I rowsort
SELECT col1 FROM tab0 cor0 GROUP BY cor0.col1, col2
----
0
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1596
SELECT - CAST( NULL AS SIGNED ) * 48 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1596
SELECT - CAST ( NULL AS INTEGER ) * 48 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col1 * NULLIF ( - 36, col1 + + 30 ) * - 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
155232
201096
21168

query I rowsort
SELECT - 8 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
37
63

query I rowsort
SELECT 37 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT - - 15 AS col1 FROM tab2 GROUP BY tab2.col2
----
15
15
15

query I rowsort
SELECT 96 + cor0.col2 * ( - 49 ) - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1104
-1804
-3854

query I rowsort
SELECT DISTINCT 37 FROM tab1 cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
69
69

query I rowsort
SELECT ALL ( - col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
47
47
47

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1607
SELECT ALL - cor0.col1 + - CAST( NULL AS SIGNED ) * 89 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1607
SELECT ALL - cor0.col1 + - CAST ( NULL AS INTEGER ) * 89 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-32

query I rowsort
SELECT - 13 + - 38 FROM tab2 cor0 GROUP BY cor0.col1
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-12

query I rowsort
SELECT + 16 + + 70 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
86
86
86

query I rowsort
SELECT ALL NULLIF ( cor0.col0, cor0.col0 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) * - col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL + col2 + 1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
72
9

query I rowsort
SELECT + - 36 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-36
-36
-36

query I rowsort
SELECT ALL - ( cor0.col0 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
72

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 + 83 - 45 FROM tab2 cor0 GROUP BY cor0.col2
----
3402
6279
7607

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col2 * - 49 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2842
-3871
-4263

onlyif mysql # DIV for integer division: 
query I rowsort label-1622
SELECT ALL cor0.col2 DIV 83 - - 50 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2250
3550
400

skipif mysql # not compatible
query I rowsort label-1622
SELECT ALL cor0.col2 / 83 - - 50 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2250
3550
400

query I rowsort
SELECT - col2 + + 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-12
-53
2

query I rowsort
SELECT 55 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 34 + cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-28
10
23

query I rowsort
SELECT ALL - 92 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-7452
0

query I rowsort
SELECT - 4 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
-4
-4
-4

query I rowsort
SELECT 70 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
70
70
70

query I rowsort
SELECT DISTINCT 25 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
25

query I rowsort
SELECT - + 38 * + 89 + cor0.col2 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
-3303
-3344
-3358

query I rowsort
SELECT ALL - 36 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + 52 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
52

query I rowsort
SELECT + 92 FROM tab0 AS cor0 GROUP BY cor0.col1
----
92
92

query I rowsort
SELECT DISTINCT 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT DISTINCT ( 83 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 60, tab0.col0 ) FROM tab0 GROUP BY tab0.col1
----
60

query I rowsort
SELECT + 72 * 16 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1152
1152
1152

query I rowsort
SELECT DISTINCT 22 FROM tab0 AS cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT - 61 FROM tab0 AS cor0 GROUP BY col1
----
-61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - cor0.col0 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col1 - 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-40
-46
-49

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 57 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
57
57
57

query I rowsort
SELECT + cor0.col0 + cor0.col0 * cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
240
8372
8556

query I rowsort
SELECT DISTINCT - 1 * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - + 9 + 62 AS col2 FROM tab1 GROUP BY tab1.col1
----
53
53
53

query I rowsort
SELECT ALL - 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-30
-30
-30

query I rowsort
SELECT ALL 75 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
75
75
75

query I rowsort
SELECT ALL 13 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT ALL + 30 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
30
30

query I rowsort
SELECT DISTINCT + cor0.col2 + 65 FROM tab0 AS cor0 GROUP BY cor0.col2
----
103
144
89

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT + 39 FROM tab0 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT + 54 * - cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-3132
-4266
-4698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 48 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
48
48
48

query I rowsort
SELECT + 9 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
9
9

query I rowsort
SELECT 79 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6399
0

query I rowsort
SELECT + 68 * 57 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
3876
3876
3876

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1659
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1659
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT - COALESCE ( 25, 22 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-25
-25

query I rowsort
SELECT 26 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT + 35 FROM tab1 AS cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT DISTINCT - 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-26

query I rowsort
SELECT + ( - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT 7 + 98 FROM tab2 AS cor0 GROUP BY col2
----
105
105
105

query I rowsort
SELECT 87 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
87
87
87

query I rowsort
SELECT ALL 94 * + cor0.col1 + col0 * + col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
10915
6649
7626

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

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 cor0.col2 * 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3600
5680
640

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1671
SELECT CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1671
SELECT CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 33 + - 78 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1839
-2931
-6129

query I rowsort
SELECT + 23 AS col2 FROM tab1, tab1 cor0, tab1 AS cor1 GROUP BY cor1.col2
----
23
23
23

query I rowsort
SELECT cor0.col0 + + ( + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
153
30
73

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
51

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT cor0.col2 - col2 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

query I rowsort
SELECT ALL - 93 * 51 FROM tab2 GROUP BY col0
----
-4743
-4743
-4743

query I rowsort
SELECT DISTINCT 86 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
86

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 + + ( + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
2070
5112
72

query I rowsort
SELECT DISTINCT + 41 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
41

query I rowsort
SELECT ALL + 48 FROM tab2 cor0 GROUP BY col1
----
48
48
48

query I rowsort
SELECT ALL - 18 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-18
-18
-18

query I rowsort
SELECT ALL + - tab2.col1 * - 67 AS col2 FROM tab2 GROUP BY tab2.col1
----
2747
3953
4087

query I rowsort
SELECT 44 AS col0 FROM tab1 GROUP BY tab1.col2
----
44
44
44

query I rowsort
SELECT ALL NULLIF ( + cor0.col2, cor0.col2 ) * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 85 FROM tab0 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT 87 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5046
-6873
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-1689
SELECT col1 DIV cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1689
SELECT col1 / cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 79 * 90 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-291510
-419490
-433710

query I rowsort
SELECT DISTINCT - + 9 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-9

query I rowsort
SELECT cor0.col1 * + col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - 5 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-205
-295
-305

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 25 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT + 23 FROM tab2 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT - 82 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-82
-82
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-1700
SELECT ALL + 69 DIV cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-44
-71
0

skipif mysql # not compatible
query I rowsort label-1700
SELECT ALL + 69 / cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-44
-71
0

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
38
38
38

query I rowsort
SELECT 47 FROM tab2 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT ALL cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 67 FROM tab2 cor0 GROUP BY cor0.col2
----
67

query I rowsort
SELECT DISTINCT 40 FROM tab0 cor0 GROUP BY cor0.col1
----
40

query I rowsort
SELECT 4 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT + - 67 AS col0 FROM tab0 GROUP BY tab0.col1
----
-67
-67

query I rowsort
SELECT DISTINCT + 33 FROM tab1 AS cor0 GROUP BY cor0.col2
----
33

query I rowsort
SELECT DISTINCT 68 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
68

query I rowsort
SELECT 54 AS col0 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT - + 85 + 76 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-9
-9
-9

query I rowsort
SELECT 20 FROM tab2 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT 41 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT ALL - 54 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-125
-62
-99

query I rowsort
SELECT + 53 FROM tab0 AS cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT ALL 54 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 32 - col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6529
32

query I rowsort
SELECT 30 FROM tab0 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL 14 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
14
14
14

query I rowsort
SELECT DISTINCT 24 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24

query I rowsort
SELECT 21 FROM tab2 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT DISTINCT 20 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20

query I rowsort
SELECT DISTINCT - 63 FROM tab1 GROUP BY col0
----
-63

query I rowsort
SELECT 54 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
54
54
54

query I rowsort
SELECT DISTINCT + 87 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
87

query I rowsort
SELECT 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 21 + 88 FROM tab1 GROUP BY tab1.col0
----
109
109
109

query I rowsort
SELECT + cor0.col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - NULLIF ( cor0.col2, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 96 FROM tab1 cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT DISTINCT + 69 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69

query I rowsort
SELECT - 3 + cor0.col1 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
38
56
58

query I rowsort
SELECT col2 + - 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
33
74

query I rowsort
SELECT 26 FROM tab1 AS cor0 GROUP BY cor0.col0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col0 * col0 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT - cor0.col1 + - 84 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT DISTINCT 13 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13

query I rowsort
SELECT - 94 + 63 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT + 29 FROM tab2 GROUP BY tab2.col1
----
29
29
29

query I rowsort
SELECT + cor0.col1 * cor0.col1 + col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
3872
6498
72

query I rowsort
SELECT DISTINCT + 38 + + col0 + 0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
121
64
81

query I rowsort
SELECT 14 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
38
52
93

query I rowsort
SELECT - 4 + NULLIF ( + col0, - cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col0
----
11
87
88

query I rowsort
SELECT ALL 92 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT DISTINCT + tab2.col0 + 80 FROM tab2 GROUP BY tab2.col0
----
171
172
95

query I rowsort
SELECT cor0.col2 * - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 19 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1083
114
836

query I rowsort
SELECT ALL 19 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT - 90 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-90
-90
-90

query I rowsort
SELECT ALL + 17 FROM tab0 AS cor0 GROUP BY cor0.col2
----
17
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-1754
SELECT DISTINCT col0 DIV cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-1754
SELECT DISTINCT col0 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 81, cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
81

query I rowsort
SELECT 29 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT ALL - 45 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-45
-45
-45

onlyif mysql # DIV for integer division: 
query I rowsort label-1758
SELECT DISTINCT - ( 14 ) * cor0.col1 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-14

skipif mysql # not compatible
query I rowsort label-1758
SELECT DISTINCT - ( 14 ) * cor0.col1 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-14

query I rowsort
SELECT DISTINCT + 80 FROM tab2 AS cor0 GROUP BY cor0.col2
----
80

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 40 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY tab0.col0
----
40
40
40

query I rowsort
SELECT ALL 6 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
246
354
366

query I rowsort
SELECT ALL + col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 6 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-6
-6
-6

query I rowsort
SELECT + 55 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT - + 72 + - 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
-168

onlyif mysql # DIV for integer division: 
query I rowsort label-1767
SELECT - cor0.col0 DIV - 1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

skipif mysql # not compatible
query I rowsort label-1767
SELECT - cor0.col0 / - 1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - cor0.col1 * 95 AS col0 FROM tab2, tab0 cor0 GROUP BY cor0.col1
----
-7695
0

query I rowsort
SELECT - 25 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-25
-25
-25

query I rowsort
SELECT + 78 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT - cor0.col2 * - ( cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT + 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT + 71 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT cor0.col2 * - 27 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1026
-2133
-648

query I rowsort
SELECT ALL + 61 FROM tab0 AS cor0 GROUP BY cor0.col1
----
61
61

query I rowsort
SELECT DISTINCT 16 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 15 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT DISTINCT col1 - 41 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-41
40

query I rowsort
SELECT 94 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 70 + tab0.col2 col1 FROM tab0 GROUP BY col2
----
-32
-46
9

query I rowsort
SELECT ALL - - 55 FROM tab0 GROUP BY tab0.col2
----
55
55
55

query I rowsort
SELECT ( 78 + + 47 * cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3885
78

query I rowsort
SELECT ALL 11 FROM tab0 AS cor0 GROUP BY col2
----
11
11
11

query I rowsort
SELECT DISTINCT + 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT - 40 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT 5 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5
5
5

onlyif mysql # DIV for integer division: 
query I rowsort label-1788
SELECT DISTINCT + 25 DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-1788
SELECT DISTINCT + 25 / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 73 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
80
80
80

query I rowsort
SELECT + col1 + 99 * + 60 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
243581
350519
362401

onlyif mysql # DIV for integer division: 
query I rowsort label-1793
SELECT cor0.col1 DIV ( - 27 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-1793
SELECT cor0.col1 / ( - 27 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-1
-2
-2

query I rowsort
SELECT DISTINCT - + ( 1 ) + 81 AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
80

query I rowsort
SELECT ALL cor0.col0 * 28 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2296
616
784

query I rowsort
SELECT + 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
90
90
90

query I rowsort
SELECT ALL - - 34 FROM tab1 GROUP BY col1
----
34
34
34

query I rowsort
SELECT + ( + col1 ) * - 29 FROM tab1 GROUP BY col1
----
-1276
-1653
-174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 col0 FROM tab2 AS cor0 GROUP BY col2
----
99
99
99

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1800
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1800
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT 52 * cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
4732
4784
780

query I rowsort
SELECT 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT ALL 37 AS col0 FROM tab2 GROUP BY tab2.col0
----
37
37
37

query I rowsort
SELECT DISTINCT cor0.col1 * + ( 81 ) FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
3
3
3

query I rowsort
SELECT DISTINCT - cor0.col1 + 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-33
48

query I rowsort
SELECT cor1.col0 * - 73 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to dd51750db295f96674bd6cbe9fed6aec

query I rowsort
SELECT 83 FROM tab1 cor0 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT DISTINCT + ( 63 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
63

query I rowsort
SELECT ALL cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 + + 84 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6645
84

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6561

query I rowsort
SELECT ALL 5 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
27
33
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 32 col1 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1816
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1816
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 85 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT ALL - 59 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-59
-59
-59

query I rowsort
SELECT col2 + 90 FROM tab0 GROUP BY tab0.col2
----
114
128
169

query I rowsort
SELECT ALL + col2 - - 63 AS col2 FROM tab2 GROUP BY tab2.col2
----
121
142
150

query I rowsort
SELECT 52 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT 18 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
1044
1422
1566

query I rowsort
SELECT ALL - ( + 58 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-58
-58

query I rowsort
SELECT DISTINCT 12 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
12

query I rowsort
SELECT ALL 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT 70 * + 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2730
2730
2730

onlyif mysql # DIV for integer division: 
query I rowsort label-1827
SELECT - 60 DIV - 79 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1827
SELECT - 60 / - 79 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 53 + + col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-53
28

query I rowsort
SELECT 50 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
50
50
50

query I rowsort
SELECT DISTINCT + 3 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
3

query I rowsort
SELECT - 22 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-22
-22
-22

query I rowsort
SELECT DISTINCT + 13 - - 7 * 50 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
363

onlyif mysql # DIV for integer division: 
query I rowsort label-1833
SELECT DISTINCT cor0.col1 DIV + 82 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-1833
SELECT DISTINCT cor0.col1 / + 82 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + 95 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
95
95
95

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 51 AS col0 FROM tab2 GROUP BY tab2.col2
----
51
51
51

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT DISTINCT + - 59 * + 20 FROM tab0 GROUP BY tab0.col1
----
-1180

query I rowsort
SELECT NULLIF ( cor0.col1, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 32 - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-59
-60
17

query I rowsort
SELECT 39 * - 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1092
-1092
-1092

query I rowsort
SELECT + 0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1847
SELECT ALL cor0.col1 DIV 40 FROM tab2 cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1847
SELECT ALL cor0.col1 / 40 FROM tab2 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + 40 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT + 13 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT DISTINCT 19 FROM tab0 AS cor0 GROUP BY col1
----
19

query I rowsort
SELECT col0 * 91 * 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
331240
334880
54600

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1853
SELECT + - CAST( NULL AS SIGNED ) * 51 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1853
SELECT + - CAST ( NULL AS INTEGER ) * 51 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 1 col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
1

query I rowsort
SELECT ALL + 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-1856
SELECT ALL - cor0.col2 DIV cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1856
SELECT ALL - cor0.col2 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT 21 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
1701

query I rowsort
SELECT + 19 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT DISTINCT + 31 * - cor0.col2 AS col2 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
-1798
-2449
-2697

query I rowsort
SELECT DISTINCT + + tab2.col1 + 13 AS col0 FROM tab2 GROUP BY tab2.col1
----
54
72
74

query I rowsort
SELECT 83 FROM tab2, tab0 cor0, tab1 AS cor1 GROUP BY tab2.col1
----
83
83
83

query I rowsort
SELECT cor0.col1 + 27 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
68
86
88

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT - cor0.col0 * ( + 90 ) * - col0 FROM tab2 AS cor0 GROUP BY col0
----
20250
745290
761760

query I rowsort
SELECT + ( - cor0.col0 ) * cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col0 + - cor0.col0 * 19 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1638
-1656
-270

query I rowsort
SELECT 32 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT + ( - 38 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-38
-38

query I rowsort
SELECT 73 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT 76 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
76
76
76

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47

query I rowsort
SELECT - + cor0.col0 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * ( - cor0.col1 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-6561
0
0

query I rowsort
SELECT + 46 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT ALL - NULLIF ( 40, cor0.col0 ) * - NULLIF ( cor0.col0 + cor0.col0, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
1760
2240
6560

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT + + cor0.col2 * - 9 + 88 * + 22 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
1225
1594
1720

query I rowsort
SELECT ALL + 10 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT cor0.col1 * - 82 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3403
-4897
-5063

query I rowsort
SELECT ALL - 20 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

query I rowsort
SELECT 70 FROM tab1 AS cor0 GROUP BY cor0.col1
----
70
70
70

query I rowsort
SELECT ALL - 43 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-43
-43
-43

query I rowsort
SELECT ALL 80 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
80
80
80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1885
SELECT DISTINCT - CAST( + col0 AS SIGNED ) - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-164
-44
-56

skipif mysql # not compatible
query I rowsort label-1885
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 94 col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
94
94
94

query I rowsort
SELECT + 35 AS col2 FROM tab0 GROUP BY tab0.col2
----
35
35
35

query I rowsort
SELECT + 16 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
16
16
16

query I rowsort
SELECT ALL + cor0.col0 + - 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
12
29
69

query I rowsort
SELECT cor0.col0 + - 44 * - 87 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3850
3856
3910

query I rowsort
SELECT ALL 77 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
77
77
77

query I rowsort
SELECT DISTINCT 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT - 62 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT + cor0.col2 * 0 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 * 36 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
144
144
144

query I rowsort
SELECT ALL 36 + + tab1.col1 FROM tab1 GROUP BY col1
----
42
80
93

query I rowsort
SELECT - 17 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1343
408
646

query I rowsort
SELECT DISTINCT - 30 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
-30

query I rowsort
SELECT DISTINCT - 98 FROM tab2 AS cor0 GROUP BY col1
----
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-1901
SELECT ALL cor0.col1 DIV - cor0.col1 + 54 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
53
53
53

skipif mysql # not compatible
query I rowsort label-1901
SELECT ALL cor0.col1 / - cor0.col1 + 54 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
53
53
53

query I rowsort
SELECT - ( - cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + ( + 8 ) AS col2 FROM tab1 AS cor0 GROUP BY col0
----
8
8
8

query I rowsort
SELECT 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT + 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT - tab1.col2 * + ( + 34 ) FROM tab1 GROUP BY col2
----
-1530
-2414
-272

query I rowsort
SELECT + col2 * 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
2610
4118
464

query I rowsort
SELECT ALL cor0.col0 + - 10 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
5
81
82

query I rowsort
SELECT - + 23 * - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1886
506
644

query I rowsort
SELECT DISTINCT + 70 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + col0 * - cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1008
-1975
-3116

query I rowsort
SELECT 94 + - cor0.col2 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1538
6335
670

query I rowsort
SELECT DISTINCT + NULLIF ( 34, cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
34

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 + - cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-255
-8463
-8648

query I rowsort
SELECT 94 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
94
94
94

query I rowsort
SELECT DISTINCT - 43 + - 84 FROM tab2 GROUP BY tab2.col2
----
-127

query I rowsort
SELECT 19 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
10
10
10

query I rowsort
SELECT 40 FROM tab0 AS cor0 GROUP BY cor0.col2
----
40
40
40

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 21 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1
----
0
1701

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 11 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-11

query I rowsort
SELECT tab2.col0 + - col0 + col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - - 3 FROM tab1, tab1 cor0, tab2 AS cor1 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT ALL - 94 FROM tab2, tab1 cor0 GROUP BY tab2.col0
----
-94
-94
-94

query I rowsort
SELECT - cor0.col0 * 28 * + 62 - 2 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-144090
-45138
-74650

query I rowsort
SELECT + 54 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT + cor0.col0 - - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
164
44
56

query I rowsort
SELECT ALL - 66 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-66
-66
-66

query I rowsort
SELECT + ( col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col0 + - 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-65
11
12

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1936
SELECT ALL + 60 DIV cor0.col2 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
0
1
7

skipif mysql # not compatible
query I rowsort label-1936
SELECT ALL + 60 / cor0.col2 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
0
1
7

query I rowsort
SELECT DISTINCT 41 + + 45 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
86

query I rowsort
SELECT ALL - 96 AS col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 75 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-75
-75
-75

query I rowsort
SELECT DISTINCT 81 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
105
119
160

query I rowsort
SELECT ALL 8 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT + - 96 AS col2 FROM tab2, tab1 cor0 GROUP BY tab2.col1
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT ( + 93 ) AS col0 FROM tab0, tab1 cor0 GROUP BY tab0.col1
----
93
93

query I rowsort
SELECT DISTINCT + 86 FROM tab0 AS cor0 GROUP BY cor0.col2
----
86

query I rowsort
SELECT DISTINCT + ( 2 ) + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
17
93
94

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT 92 + + 66 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2798
3986
4118

query I rowsort
SELECT ALL cor0.col2 + ( - 55 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-31
24

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab0, tab2 AS cor0, tab1 cor1 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT tab2.col0 + + 20 FROM tab2 GROUP BY tab2.col0
----
111
112
35

query I rowsort
SELECT - 58 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-13
-50
13

query I rowsort
SELECT DISTINCT cor0.col2 * 46 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
1104
1748
3634

query I rowsort
SELECT + - ( 64 ) AS col1 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-64
-64
-64

query I rowsort
SELECT - 3 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT ALL + ( + 15 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT ALL 15 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT ALL 90 FROM tab0 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT ALL - 74 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT ALL 71 + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
153
93
99

query I rowsort
SELECT - 91 * 10 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-910
-910
-910

query I rowsort
SELECT DISTINCT - + 2 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1 GROUP BY tab0.col0
----
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-1963
SELECT ALL + ( + 84 ) DIV + cor0.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
1
1
10

skipif mysql # not compatible
query I rowsort label-1963
SELECT ALL + ( + 84 ) / + cor0.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
1
1
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
240
380
790

query I rowsort
SELECT DISTINCT col2 + 35 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
114
59
73

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1966
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1966
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + tab1.col0 + + 22 FROM tab1 GROUP BY col0
----
-6
-60
0

query I rowsort
SELECT - col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 74 FROM tab2 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT + col1 + - cor0.col1 * - ( cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1722
3540
3782

query I rowsort
SELECT cor0.col2 + - 75 FROM tab2 cor0 GROUP BY cor0.col2
----
-17
12
4

query I rowsort
SELECT 63 FROM tab2 cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT ALL 9 FROM tab1 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT 88 + - cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 86 col2 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
-86
-86
-86

query I rowsort
SELECT DISTINCT - 74 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3256
-4218
-444

query I rowsort
SELECT + - 58 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
-58
-58
-58

query I rowsort
SELECT DISTINCT - 69 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-69

query I rowsort
SELECT ALL + 42 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2436
3318
3654

query I rowsort
SELECT 63 * cor0.col1 * 62 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
160146
230454
238266

query I rowsort
SELECT DISTINCT - 8 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-8

query I rowsort
SELECT - 95 * - 77 FROM tab0 AS cor0 GROUP BY col0
----
7315
7315
7315

query I rowsort
SELECT 53 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT - cor0.col0 * - 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2706
726
924

query I rowsort
SELECT - + 69 FROM tab0 GROUP BY tab0.col1
----
-69
-69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1986
SELECT + CAST( + cor0.col1 AS SIGNED ) FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-1986
SELECT + CAST ( + cor0.col1 AS INTEGER ) FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 11 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
11

query I rowsort
SELECT DISTINCT - 67 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-67

query I rowsort
SELECT DISTINCT - cor0.col0 * + 48 * 75 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-100800
-295200
-79200

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1990
SELECT CAST( - 20 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-1990
SELECT CAST ( - 20 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1991
SELECT ALL + CAST( 38 AS SIGNED ) * - cor0.col0 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-1121
-3160
-842

skipif mysql # not compatible
query I rowsort label-1991
SELECT ALL + CAST ( 38 AS INTEGER ) * - cor0.col0 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-1121
-3160
-842

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT ( + NULLIF ( cor0.col2, cor0.col2 ) ) * - 35 + - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT ALL - + cor0.col0 * 76 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1976
-3268
-6308

onlyif mysql # DIV for integer division: 
query I rowsort label-1996
SELECT + 55 DIV - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-9
0

skipif mysql # not compatible
query I rowsort label-1996
SELECT + 55 / - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-9
0

query I rowsort
SELECT ALL NULLIF ( cor0.col0, cor0.col2 ) * 60 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
1320
1680
4920

query I rowsort
SELECT - col1 + ( col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - col0 * 1 + - 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-18
-94
-95

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + + 60 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT ALL 69 FROM tab0 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT + NULLIF ( cor0.col1, - 40 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col1 + ( 35 ) * 54 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
1829
1831
1849

query I rowsort
SELECT - 68 - - cor0.col0 FROM tab2 cor0 GROUP BY col0
----
-53
23
24

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col0
----
-11
-14
17

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
27
27
27

query I rowsort
SELECT 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT - 87 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-87
-87
-87

query I rowsort
SELECT + 0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 28 FROM tab0 AS cor0 GROUP BY cor0.col1
----
28
28

query I rowsort
SELECT + 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT DISTINCT - 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-71

query I rowsort
SELECT ALL cor0.col0 * ( 37 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
3367
3404
555

query I rowsort
SELECT 44 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT 80 * - 68 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-5440
-5440
-5440

query I rowsort
SELECT DISTINCT + 35 FROM tab2 cor0 GROUP BY cor0.col1
----
35

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 6, cor0.col2 ) + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-85
-86
-9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2020
SELECT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2020
SELECT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 86 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-86
-86
-86

query I rowsort
SELECT ALL - NULLIF ( - cor0.col0, cor0.col0 * col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + 15 * COALESCE ( + 58, tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
870
870
870

query I rowsort
SELECT 16 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT DISTINCT 37 FROM tab2 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT DISTINCT - + cor0.col0 * + 31 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-2542
-682
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 39 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
39

query I rowsort
SELECT 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 46 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT ALL + 28 FROM tab0 AS cor0 GROUP BY col2
----
28
28
28

query I rowsort
SELECT + cor0.col2 * 95 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2280
3610
7505

query I rowsort
SELECT + 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col0 + 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
146
86
92

query I rowsort
SELECT cor0.col1 * 60 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
4860

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + + 35 FROM tab0, tab1 AS cor0, tab2 cor1 GROUP BY cor1.col2
----
35
35
35

query I rowsort
SELECT 5 * - col2 FROM tab2 GROUP BY tab2.col2
----
-290
-395
-435

onlyif mysql # DIV for integer division: 
query I rowsort label-2039
SELECT DISTINCT + 8 * - tab1.col2 * tab1.col2 - + 39 DIV 10 FROM tab1 GROUP BY tab1.col2
----
-16203
-40331
-515

skipif mysql # not compatible
query I rowsort label-2039
SELECT DISTINCT + 8 * - tab1.col2 * tab1.col2 - + 39 / 10 FROM tab1 GROUP BY tab1.col2
----
-16203
-40331
-515

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 5, + tab1.col1 ) AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT 94 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
152
173
181

query I rowsort
SELECT + 51 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2295
3621
408

query I rowsort
SELECT 71 FROM tab0 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT NULLIF ( - 27, cor0.col1 + cor0.col1 ) * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-1188
-1539
-162

query I rowsort
SELECT cor1.col1 * 27 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
1188
1539
162

query I rowsort
SELECT ( - 29 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-29
-29
-29

query I rowsort
SELECT 53 FROM tab2 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT ALL 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
85
85
85

query I rowsort
SELECT + 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
38
38
38

query I rowsort
SELECT - 76 * cor0.col0 + 66 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-1606
-2062
-6166

query I rowsort
SELECT 36 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT + 40 + - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3
-43
14

onlyif mysql # DIV for integer division: 
query I rowsort label-2054
SELECT + tab2.col2 + 88 DIV - 36 FROM tab2 GROUP BY tab2.col2
----
56
77
85

skipif mysql # not compatible
query I rowsort label-2054
SELECT + tab2.col2 + 88 / - 36 FROM tab2 GROUP BY tab2.col2
----
56
77
85

query I rowsort
SELECT cor0.col2 + + ( + 30 ) AS col1 FROM tab0 AS cor0 GROUP BY col2
----
109
54
68

query I rowsort
SELECT DISTINCT + 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2057
SELECT DISTINCT + cor0.col2 + + cor0.col2 / + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2057
SELECT DISTINCT + cor0.col2 + + cor0.col2 / + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2058
SELECT + 15 DIV - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2058
SELECT + 15 / - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
0
0

query I rowsort
SELECT - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT + 98 * cor0.col2 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
2352
3724
7742

query I rowsort
SELECT DISTINCT 76 FROM tab0 cor0 GROUP BY col0
----
76

query I rowsort
SELECT + - 10 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-220
-280
-820

query I rowsort
SELECT DISTINCT 7 * 7 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
49

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.col2
----
24
38
79

query I rowsort
SELECT 23 FROM tab2 AS cor0 GROUP BY col2
----
23
23
23

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1444
-576
-6241

query I rowsort
SELECT + 29 * - 65 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-1885
-1885
-1885

query I rowsort
SELECT 49 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
49
49
49

query I rowsort
SELECT ( 65 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
65
65
65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2071
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2071
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - tab0.col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT 80 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 89 * - 70 col2 FROM tab0 GROUP BY tab0.col0
----
6230
6230
6230

query I rowsort
SELECT ALL + - 6 AS col1 FROM tab2 GROUP BY tab2.col2
----
-6
-6
-6

query I rowsort
SELECT - - 10 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT + - 31 * 63 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-1953
-1953

query I rowsort
SELECT ALL + ( - 95 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-95
-95
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-79
-79
-79

query I rowsort
SELECT 41 AS col2 FROM tab1 GROUP BY tab1.col0
----
41
41
41

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
19

query I rowsort
SELECT + 72 * cor0.col1 + - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
0
0
5751

query I rowsort
SELECT + - cor0.col2 + ( - NULLIF ( + cor0.col2, - cor0.col2 ) ) AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT ALL 78 FROM tab2 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT 50 FROM tab0 AS cor0 GROUP BY col2
----
50
50
50

query I rowsort
SELECT ( 48 ) * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2160
3408
384

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 50 * + col2 - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2205
3479
392

query I rowsort
SELECT ALL 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT 1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT - 74 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-74
-74
-74

onlyif mysql # DIV for integer division: 
query I rowsort label-2092
SELECT cor0.col0 + cor0.col2 DIV col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
29
82

skipif mysql # not compatible
query I rowsort label-2092
SELECT cor0.col0 + cor0.col2 / col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
29
82

query I rowsort
SELECT ALL col0 * + cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3375
753571
778688

query I rowsort
SELECT DISTINCT + - cor0.col1 * - 14 * 61 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
37576
48678
5124

query I rowsort
SELECT COALESCE ( cor0.col1, cor0.col1 ) * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 92 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
77

onlyif mysql # DIV for integer division: 
query I rowsort label-2100
SELECT - 21 DIV 47 + - 65 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

skipif mysql # not compatible
query I rowsort label-2100
SELECT - 21 / 47 + - 65 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

query I rowsort
SELECT + - 59 + 25 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-34
-34
-34

query I rowsort
SELECT 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT 10 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
68
89
97

query I rowsort
SELECT DISTINCT - 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-51

query I rowsort
SELECT - + 72 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT 32 FROM tab1 GROUP BY tab1.col0
----
32
32
32

query I rowsort
SELECT DISTINCT 85 FROM tab2 AS cor0 GROUP BY col0
----
85

query I rowsort
SELECT - + cor0.col1 + cor0.col1 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 88 + + 35 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-53

query I rowsort
SELECT DISTINCT ( 97 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
97

query I rowsort
SELECT ALL + 19 + 79 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
98
98
98

query I rowsort
SELECT ALL 73 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3212
4161
438

query I rowsort
SELECT DISTINCT 56 * - 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT - cor0.col2 - - ( - 99 + - 17 ) FROM tab1 cor0 GROUP BY cor0.col2
----
-124
-161
-187

query I rowsort
SELECT + ( - 93 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT + 93 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1395
-8463
-8556

onlyif mysql # DIV for integer division: 
query I rowsort label-2119
SELECT ALL - 55 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2119
SELECT ALL - 55 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-2
0

query I rowsort
SELECT ALL 13 FROM tab1 AS cor0 GROUP BY col1
----
13
13
13

query I rowsort
SELECT DISTINCT 45 AS col0 FROM tab1 GROUP BY tab1.col0
----
45

query I rowsort
SELECT - 7 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-7
-7
-7

query I rowsort
SELECT ALL + 70 * NULLIF ( col1, + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 81 + 77 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-4

query I rowsort
SELECT DISTINCT ( - 13 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13

query I rowsort
SELECT ALL 35 * - 61 FROM tab2 cor0 GROUP BY cor0.col2
----
-2135
-2135
-2135

query I rowsort
SELECT ALL cor0.col1 + 15 * + 12 FROM tab0 AS cor0 GROUP BY cor0.col1
----
180
261

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab0.col0 col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + 97 * + cor0.col1 * + 73 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
311564
403617
42486

query I rowsort
SELECT ALL + 14 AS col0 FROM tab2 GROUP BY tab2.col2
----
14
14
14

query I rowsort
SELECT DISTINCT - cor0.col0 + + 34 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-57
-58
19

query I rowsort
SELECT - 96 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-96
-96
-96

query I rowsort
SELECT DISTINCT 97 + + cor0.col1 * + ( col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
145
2662
3221

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2134
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2134
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 49 * - 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4557
4557
4557

onlyif mysql # DIV for integer division: 
query I rowsort label-2136
SELECT ALL - - 14 DIV 6 FROM tab0 GROUP BY tab0.col1
----
2
2

skipif mysql # not compatible
query I rowsort label-2136
SELECT ALL - - 14 / 6 FROM tab0 GROUP BY tab0.col1
----
2
2

query I rowsort
SELECT cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 - - 49 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
45
45

query I rowsort
SELECT - 72 FROM tab1 cor0 GROUP BY cor0.col2, col2, cor0.col2, cor0.col2
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - 11 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-11

query I rowsort
SELECT + - 42 AS col0 FROM tab0 GROUP BY tab0.col1
----
-42
-42

query I rowsort
SELECT ALL + 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT ALL + 19 FROM tab1 cor0 GROUP BY cor0.col0
----
19
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-2144
SELECT ALL - col0 DIV col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2144
SELECT ALL - col0 / col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 94 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
94

query I rowsort
SELECT - 49 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-49
-49
-49

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2147
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2147
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL - + 81 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY tab1.col1
----
-81
-81
-81

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL + 57 FROM tab2 AS cor0 GROUP BY col0
----
57
57
57

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2151
SELECT CAST( NULL AS SIGNED ) * - 26 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2151
SELECT CAST ( NULL AS INTEGER ) * - 26 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * + 86 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1290
7826
7912

query I rowsort
SELECT DISTINCT + 37 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
119
59
65

query I rowsort
SELECT + 37 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 25 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT cor0.col0 - + ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45

query I rowsort
SELECT 10 * 7 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
152
92
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2160
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2160
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
NULL

query I rowsort
SELECT ALL 20 + cor0.col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
111
112
35

query I rowsort
SELECT + cor0.col1 + 78 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
122
135
84

query I rowsort
SELECT 34 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
34
34
34

onlyif mysql # DIV for integer division: 
query I rowsort label-2164
SELECT 90 DIV + 4 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
22
22
22

skipif mysql # not compatible
query I rowsort label-2164
SELECT 90 / + 4 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
22
22
22

query I rowsort
SELECT 46 * - 69 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3174
-3174
-3174

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-2167
SELECT - + 43 DIV - cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2167
SELECT - + 43 / - cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT - 58 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-58
-58

query I rowsort
SELECT 71 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
71
71
71

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT ALL 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
84
84
84

query I rowsort
SELECT DISTINCT cor0.col1 * + 45 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
3645

query I rowsort
SELECT 30 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT 42 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
100
121
129

query I rowsort
SELECT ALL 33 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1914
2607
2871

query I rowsort
SELECT 57 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 * - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
324

query I rowsort
SELECT ALL 66 * 30 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1980
1980
1980

query I rowsort
SELECT ALL - 0 FROM tab1 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 + - 67 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-105
-146
-91

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + col2 * 85 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
2040
3230
6715

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 + - 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1383
515
6180

query I rowsort
SELECT DISTINCT + 2 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
2

query I rowsort
SELECT ALL + 70 FROM tab2 AS cor0 GROUP BY cor0.col1
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col1 ) col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 62 * 16 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
992
992
992

query I rowsort
SELECT cor0.col0 * + 34 * 59 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166498
52156
86258

query I rowsort
SELECT ALL 61 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT ALL + ( - 17 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT ALL ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1, col2, col1
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2193
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2193
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 col1 FROM tab0 GROUP BY tab0.col2
----
20
20
20

query I rowsort
SELECT 40 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40
40
40

query I rowsort
SELECT 9 FROM tab2 AS cor0 GROUP BY cor0.col1
----
9
9
9

query I rowsort
SELECT ALL + 9 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
9
9
9

query I rowsort
SELECT - 20 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
71
72

query I rowsort
SELECT ALL 72 FROM tab2 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT 11 AS col1 FROM tab2 GROUP BY tab2.col2
----
11
11
11

query I rowsort
SELECT ALL 46 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2070
3266
368

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + 35 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-47
13
7

query I rowsort
SELECT ALL + + cor1.col2 * 47 + 73 - cor1.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
2741
3707
4075

query I rowsort
SELECT cor0.col1 + + 2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
46
59
8

query I rowsort
SELECT ALL - tab2.col0 - tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
-240
-8372
-8556

query I rowsort
SELECT 26 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT + 52 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
52
52
52

query I rowsort
SELECT ALL - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-2210
SELECT 42 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2210
SELECT 42 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT DISTINCT - col0 - 31 FROM tab1 cor0 GROUP BY col0
----
-113
-53
-59

query I rowsort
SELECT cor0.col1 + 43 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
124
43
43

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
48
48
48

onlyif mysql # DIV for integer division: 
query I rowsort label-2215
SELECT DISTINCT - NULLIF ( cor0.col1, - cor0.col1 ) DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-2215
SELECT DISTINCT - NULLIF ( cor0.col1, - cor0.col1 ) / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

query I rowsort
SELECT DISTINCT - 13 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-13

query I rowsort
SELECT - 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-64
-64
-64

query I rowsort
SELECT DISTINCT - 92 FROM tab2 GROUP BY tab2.col1
----
-92

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL - 84 FROM tab1 GROUP BY tab1.col2
----
-84
-84
-84

query I rowsort
SELECT DISTINCT 60 + + 67 - col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
40
48
69

query I rowsort
SELECT ALL - cor0.col1 * - 9 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
369
531
549

query I rowsort
SELECT ALL 81 FROM tab0 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT DISTINCT 99 FROM tab1 AS cor0 GROUP BY col2
----
99

query I rowsort
SELECT DISTINCT + 39 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
39

query I rowsort
SELECT + 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
68
68

query I rowsort
SELECT 6 FROM tab1 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT + cor0.col1 + 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
85
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2229
SELECT DISTINCT - cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2229
SELECT DISTINCT - cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 67 * 35 col0 FROM tab2 AS cor0 GROUP BY col0
----
-2345

query I rowsort
SELECT DISTINCT - 59 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-59

query I rowsort
SELECT + 97 FROM tab2 AS cor0 GROUP BY cor0.col0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 25 col1 FROM tab1 AS cor0 GROUP BY col0
----
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT ALL + 56 * - 56 FROM tab0 GROUP BY tab0.col1
----
-3136
-3136

query I rowsort
SELECT - + 65 AS col1 FROM tab1 GROUP BY tab1.col2
----
-65
-65
-65

query I rowsort
SELECT DISTINCT - ( cor0.col1 * - cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT 65 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
65
65
65

query I rowsort
SELECT DISTINCT - + cor0.col1 * 92 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-7452
0

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 92 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
92
92
92

query I rowsort
SELECT DISTINCT - 95 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-2243
SELECT DISTINCT + cor0.col1 DIV cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
0
2

skipif mysql # not compatible
query I rowsort label-2243
SELECT DISTINCT + cor0.col1 / cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
0
2

query I rowsort
SELECT ALL cor0.col1 + 43 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
124
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 4 ) col0 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT 22 FROM tab1 GROUP BY col2
----
22
22
22

onlyif mysql # DIV for integer division: 
query I rowsort label-2247
SELECT DISTINCT + ( + 45 ) - + 92 * + cor0.col2 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
137

skipif mysql # not compatible
query I rowsort label-2247
SELECT DISTINCT + ( + 45 ) - + 92 * + cor0.col2 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
137

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2248
SELECT + CAST( - cor0.col2 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif mysql # not compatible
query I rowsort label-2248
SELECT + CAST ( - cor0.col2 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2249
SELECT CAST( NULL AS SIGNED ) col1 FROM tab0 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-2249
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ( - col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-2251
SELECT cor0.col2 DIV ( - col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2251
SELECT cor0.col2 / ( - col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + 21 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT - 53 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-53
-53
-53

query I rowsort
SELECT ALL cor0.col0 * 11 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
286
473
913

query I rowsort
SELECT ALL cor0.col1 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT ALL - 45 FROM tab0 cor0 GROUP BY cor0.col2
----
-45
-45
-45

query I rowsort
SELECT ALL - 20 FROM tab0 GROUP BY col2
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + 88 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
2

query I rowsort
SELECT ALL + 45 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

onlyif mysql # DIV for integer division: 
query I rowsort label-2261
SELECT ALL + cor0.col1 DIV 52 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2261
SELECT ALL + cor0.col1 / 52 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
0
0
1

query I rowsort
SELECT ALL 97 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97
97

query I rowsort
SELECT + col0 * - 87 FROM tab0 GROUP BY col0
----
-2262
-3741
-7221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col1 * 70 col1 FROM tab0 GROUP BY tab0.col1
----
-5670
0

query I rowsort
SELECT - 62 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-56
-56
-56

query I rowsort
SELECT ALL 89 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4005
-6319
-712

query I rowsort
SELECT DISTINCT - - 0 * 43 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
0

query I rowsort
SELECT DISTINCT + - cor1.col2 - 29 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
-108
-116
-87

query I rowsort
SELECT DISTINCT NULLIF ( NULLIF ( 7, cor0.col1 ), + 59 ) FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
7

query I rowsort
SELECT ALL - 85 * + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-4930
-6715
-7395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT + - cor0.col1 AS col1 FROM tab0, tab1 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 1 - - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
90
91

query I rowsort
SELECT - 75 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-75
-75
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 * 62 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-5208
-5208
-5208

query I rowsort
SELECT + 69 * 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2346
2346
2346

query I rowsort
SELECT + 35 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT 31 * + 74 FROM tab0 AS cor0 GROUP BY col2
----
2294
2294
2294

query I rowsort
SELECT DISTINCT + cor0.col2 * - 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-2552
-3476
-3828

onlyif mysql # DIV for integer division: 
query I rowsort label-2282
SELECT DISTINCT + + 70 DIV cor0.col1 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-2282
SELECT DISTINCT + + 70 / cor0.col1 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT - 91 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-91
-91
-91

query I rowsort
SELECT cor0.col0 * NULLIF ( - cor0.col1, col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-132
-1596
-3608

query I rowsort
SELECT 68 FROM tab0 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT ALL + 11 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
11
11
11

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2287
SELECT + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2287
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT cor1.col1 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - cor0.col2 - + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 30 * - col1 + + cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-144
1539
616

onlyif mysql # DIV for integer division: 
query I rowsort label-2294
SELECT ALL 24 DIV 74 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2294
SELECT ALL 24 / 74 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 28 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
28
28
28

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 75 FROM tab2 GROUP BY tab2.col0
----
75
75
75

query I rowsort
SELECT DISTINCT 79 - + col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
0
41
55

query I rowsort
SELECT - 59 * - 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
2360
2360
2360

query I rowsort
SELECT ALL - 88 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-88
-88
-88

query I rowsort
SELECT - 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-56
-56
-56

query I rowsort
SELECT 58 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT ALL 85 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
2040
3230
6715

query I rowsort
SELECT 53 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
53
53
53

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + ( 46 ) FROM tab1 cor0 GROUP BY col0
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 67 * cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1474
1876
5494

query I rowsort
SELECT 47 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
4277
4324
705

query I rowsort
SELECT + 24 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
24
24
24

query I rowsort
SELECT DISTINCT - 44 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-44

query I rowsort
SELECT - 13 + - 63 FROM tab0 cor0 GROUP BY cor0.col1
----
-76
-76

query I rowsort
SELECT ALL - 14 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT ALL + ( 66 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT 56 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT ALL + 94 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - ( 3 ) * + 32 col0 FROM tab2 AS cor0 GROUP BY col1
----
-35
-37
-55

query I rowsort
SELECT ( - 72 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col0 * - cor0.col0 * 15 + + 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-100818
-11718
-7218

query I rowsort
SELECT ALL + 46 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
51

query I rowsort
SELECT + 95 + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
101
139
152

query I rowsort
SELECT DISTINCT 27 FROM tab2 cor0 GROUP BY cor0.col2
----
27

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-13824
-493039
-54872

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT 4 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col0
----
4
4
4

query I rowsort
SELECT + 49 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
49
49
49

query I rowsort
SELECT DISTINCT 3 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + 41 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
41
41
41

onlyif mysql # DIV for integer division: 
query I rowsort label-2333
SELECT col1 DIV + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2333
SELECT col1 / + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT ALL + 62 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT + 37 FROM tab1 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT cor0.col2 + 25 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
104
49
63

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 - ( 86 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
1595
3395
3635

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2338
SELECT cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2338
SELECT cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 89 + cor0.col1 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
137
2654
3213

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 13 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-13
-13
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2342
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col2 FROM tab2, tab1 AS cor0, tab2 cor1 GROUP BY cor1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2342
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col2 FROM tab2, tab1 AS cor0, tab2 cor1 GROUP BY cor1.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * ( + cor0.col2 * + cor0.col2 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
357911
512
91125

query I rowsort
SELECT cor0.col2 * - 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5626
-7663
-8439

query I rowsort
SELECT + cor0.col2 + 6 FROM tab2 cor0 GROUP BY cor0.col2
----
64
85
93

query I rowsort
SELECT 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
94
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-2347
SELECT DISTINCT - col1 DIV col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-2347
SELECT DISTINCT - col1 / col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 67 AS col0 FROM tab1 GROUP BY col1
----
67
67
67

query I rowsort
SELECT ALL - 70 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + + cor0.col0 * - 64 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-1664
-2752
-5312

query I rowsort
SELECT DISTINCT + 25 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
25

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 70 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
70

query I rowsort
SELECT + cor0.col2 + 97 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
105
142
168

query I rowsort
SELECT 25 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
25
25

query I rowsort
SELECT - 94 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-175
-94

query I rowsort
SELECT DISTINCT + 75 + cor0.col2 * col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
139
2100
5116

query I rowsort
SELECT DISTINCT - 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-24

query I rowsort
SELECT - 10 * + 57 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-570
-570
-570

query I rowsort
SELECT ALL 73 FROM tab0 cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT DISTINCT + 40 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + cor0.col1 ) + - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-38
-79
57

query I rowsort
SELECT DISTINCT + ( - 68 ) FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-68

query I rowsort
SELECT ALL - + 49 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-49
-49
-49

onlyif mysql # DIV for integer division: 
query I rowsort label-2366
SELECT + cor0.col1 DIV 6 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
10
6
9

skipif mysql # not compatible
query I rowsort label-2366
SELECT + cor0.col1 / 6 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
10
6
9

query I rowsort
SELECT + tab2.col0 * - 80 AS col0 FROM tab2 GROUP BY col0
----
-1200
-7280
-7360

query I rowsort
SELECT 33 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
33
33
33

query I rowsort
SELECT 17 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT - 96 FROM tab0 AS cor0 GROUP BY col1
----
-96

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT + 4 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
30
47
87

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-41
-59
-61

query I rowsort
SELECT - 53 + tab2.col2 + - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-53
-53
-53

query I rowsort
SELECT 88 FROM tab1 AS cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT 37 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 96 + + cor0.col2 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
120
134
175

query I rowsort
SELECT + 95 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
95
95

query I rowsort
SELECT - ( 81 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-81
-81
-81

query I rowsort
SELECT DISTINCT - 49 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-49

query I rowsort
SELECT - 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-26
-26
-26

query I rowsort
SELECT + NULLIF ( cor0.col2 + col2, col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - 63 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-63

query I rowsort
SELECT NULLIF ( cor0.col0, + 70 ) FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + 36 FROM tab0 cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT col0 * - tab2.col0 + - 20 FROM tab2 GROUP BY tab2.col0
----
-245
-8301
-8484

query I rowsort
SELECT + 0 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2388
SELECT DISTINCT 86 DIV 38 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2

skipif mysql # not compatible
query I rowsort label-2388
SELECT DISTINCT 86 / 38 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2

query I rowsort
SELECT DISTINCT - cor0.col1 * 68 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2788
-4012
-4148

query I rowsort
SELECT DISTINCT - cor0.col0 * ( cor0.col0 ) + - 2 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-212
-8192
-8374

query I rowsort
SELECT ALL + 23 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-21
-34
17

query I rowsort
SELECT ALL - + cor0.col0 AS col0 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col0 * + 32 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1376
2656
832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 43 col2 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
43

query I rowsort
SELECT 3 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT - 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-43

query I rowsort
SELECT ALL 47 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
4277
4324
705

query I rowsort
SELECT DISTINCT + 3 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
273
276
45

query I rowsort
SELECT 56 * cor0.col0 * col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
202048
7392
89376

query I rowsort
SELECT - - 94 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT ALL 6 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
6
6
6

query I rowsort
SELECT 56 * 17 FROM tab2 AS cor0 GROUP BY col1
----
952
952
952

query I rowsort
SELECT ALL - 18 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1638
1656
270

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52

query I rowsort
SELECT + cor0.col1 * - 75 * 95 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-577125
0

query I rowsort
SELECT - cor0.col2 + + 18 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT - - cor0.col2 * + cor0.col2 * - cor0.col2 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-13824
-493039
-54872

query I rowsort
SELECT + 47 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
47
47
47

query I rowsort
SELECT ALL - 33 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-33
-33
-33

query I rowsort
SELECT + 9 FROM tab2 cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT cor0.col2 * - 57 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1368
-2166
-4503

query I rowsort
SELECT DISTINCT 80 FROM tab0 AS cor0 GROUP BY cor0.col2
----
80

query I rowsort
SELECT + COALESCE ( tab2.col1, 55 ) FROM tab2, tab2 cor0 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2415
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2415
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
NULL

query I rowsort
SELECT ALL col2 + - ( COALESCE ( cor0.col2, cor0.col2 ) ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - 32 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2912
-2944
-480

query I rowsort
SELECT - 23 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23
-23
-23

query I rowsort
SELECT - cor0.col1 * + 18 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1026
-108
-792

query I rowsort
SELECT - 14 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1106
-1218
-812

query I rowsort
SELECT ALL + + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 24 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
1392
1896
2088

query I rowsort
SELECT DISTINCT + 32 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT + NULLIF ( - tab0.col0, 35 ) FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 64 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
64
64
64

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2426
SELECT DISTINCT + 25 * cor0.col2 + CAST( NULL AS DECIMAL ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2426
SELECT DISTINCT + 25 * cor0.col2 + CAST ( NULL AS REAL ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT - 64 FROM tab1 GROUP BY tab1.col1
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 40 * + tab0.col2 col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
1520
3160
960

query I rowsort
SELECT ALL 92 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - + 97 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-4268
-5529
-582

query I rowsort
SELECT 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT - 26 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-26
-26
-26

query I rowsort
SELECT + ( + cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + - 30 - 40 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-70
-70
-70

query I rowsort
SELECT ALL cor0.col1 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT cor0.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 cor0.col0 + 33 + + 16 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
132
75
92

query I rowsort
SELECT DISTINCT cor0.col2 * + 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
135
213
24

query I rowsort
SELECT ALL 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT + 76 - 49 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT - 28 FROM tab0 cor0 GROUP BY cor0.col2
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 + 80 * cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
13284
2244
3024

query I rowsort
SELECT DISTINCT - 94 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-94

query I rowsort
SELECT 86 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT DISTINCT - 18 - - 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT 22 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
22
22

query I rowsort
SELECT DISTINCT NULLIF ( - cor0.col2 * cor0.col2, + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + 39 + 43 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
82
82
82

query I rowsort
SELECT col2 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT - - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6

query I rowsort
SELECT DISTINCT - 0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT - 97 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-97
-97
-97

query I rowsort
SELECT 84 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
125
143
145

query I rowsort
SELECT ALL + 83 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
83
83
83

query I rowsort
SELECT ALL 52 + 78 FROM tab0 GROUP BY tab0.col2
----
130
130
130

query I rowsort
SELECT DISTINCT - 17 FROM tab1 cor0 GROUP BY cor0.col0
----
-17

query I rowsort
SELECT + 36 AS col0 FROM tab1 GROUP BY col1
----
36
36
36

query I rowsort
SELECT ALL + 55 FROM tab1 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT 11 - - 62 FROM tab1 cor0 GROUP BY col1
----
73
73
73

query I rowsort
SELECT ALL + 88 FROM tab1 AS cor0 GROUP BY col0
----
88
88
88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2463
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2463
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 63 * + 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
5418
5418
5418

query I rowsort
SELECT - - col1 * + 71 FROM tab2 GROUP BY col1
----
2911
4189
4331

query I rowsort
SELECT ALL 91 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
91
91
91

query I rowsort
SELECT ALL col1 * ( 2 ) + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
205
26
83

query I rowsort
SELECT DISTINCT - 8 FROM tab1 GROUP BY col2
----
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2469
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2469
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * + 71 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1704
2698
5609

query I rowsort
SELECT DISTINCT 25 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
25

query I rowsort
SELECT - 21 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-21
-21
-21

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL - cor0.col0 + + col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 * 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-286
-473
-913

onlyif mysql # DIV for integer division: 
query I rowsort label-2476
SELECT col0 DIV 45 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2476
SELECT col0 / 45 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT - 22 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1298
1342
902

query I rowsort
SELECT + 95 * - 21 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1924
-1950
-1987

query I rowsort
SELECT ALL + ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL 78 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT - ( + cor0.col2 ) + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 0 AS col2 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT cor0.col0 + 60 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
103
143
86

query I rowsort
SELECT ALL cor0.col2 * 79 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3555
5609
632

query I rowsort
SELECT ALL 47 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, col1
----
2115
3337
376

query I rowsort
SELECT - 90 * + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4050
-6390
-720

query I rowsort
SELECT ALL 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT DISTINCT + 86 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
86

query I rowsort
SELECT DISTINCT + col0 - 26 AS col0 FROM tab0 cor0 GROUP BY col0
----
0
17
57

query I rowsort
SELECT DISTINCT 55 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
55

onlyif mysql # DIV for integer division: 
query I rowsort label-2491
SELECT + cor0.col2 DIV 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3
4
4

skipif mysql # not compatible
query I rowsort label-2491
SELECT + cor0.col2 / 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3
4
4

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 * 38 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
132278
141398
63878

query I rowsort
SELECT 86 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT ALL cor0.col0 * + col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3375
753571
778688

query I rowsort
SELECT ALL - 0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 91 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4004
5187
546

query I rowsort
SELECT + 23 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
23
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2498
SELECT ALL - - CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2498
SELECT ALL - - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 19 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-19
-19

query I rowsort
SELECT + 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT DISTINCT + 44 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44

query I rowsort
SELECT DISTINCT 90 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
90

query I rowsort
SELECT - 59 FROM tab2 GROUP BY tab2.col0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT - 51 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1224
-1938
-4029

query I rowsort
SELECT DISTINCT - 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-28

query I rowsort
SELECT DISTINCT + 87 FROM tab1 AS cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT 72 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2508
SELECT - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2508
SELECT - CAST ( NULL AS REAL ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 46 * cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-1196
-1978
-3818

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( - cor0.col1 + - col2 ) FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-102
-115
-14

query I rowsort
SELECT - 55 - - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-10
-47
16

query I rowsort
SELECT 43 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-15
-36
-44

query I rowsort
SELECT ALL + 47 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT DISTINCT + 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
18

query I rowsort
SELECT ALL - 81 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
-81

query I rowsort
SELECT ALL 12 FROM tab2 cor0 GROUP BY col2
----
12
12
12

query I rowsort
SELECT DISTINCT + COALESCE ( cor0.col2, - cor0.col2 * 96 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 18 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1422
432
684

query I rowsort
SELECT ( - cor0.col1 + 90 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33
46
84

query I rowsort
SELECT ALL cor0.col1 * 7 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
287
413
427

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 50 * - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2250
-3550
-400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
38
38
38

query I rowsort
SELECT ALL 11 FROM tab2 GROUP BY tab2.col1
----
11
11
11

query I rowsort
SELECT 98 * - 39 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3822
-3822
-3822

query I rowsort
SELECT 36 * + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1628
2109
222

query I rowsort
SELECT DISTINCT 36 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36

query I rowsort
SELECT DISTINCT - 54 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-54

query I rowsort
SELECT 41 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-17
-38
-46

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2531
SELECT DISTINCT + cor0.col2 * CAST( + cor0.col2 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

skipif mysql # not compatible
query I rowsort label-2531
SELECT DISTINCT + cor0.col2 * CAST ( + cor0.col2 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 38 + - cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT + 90 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
90
90
90

query I rowsort
SELECT DISTINCT - + 39 + + cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-11
-17
43

query I rowsort
SELECT - 7 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
-7
-7

query I rowsort
SELECT 71 FROM tab0 AS cor0 GROUP BY cor0.col1
----
71
71

query I rowsort
SELECT DISTINCT + NULLIF ( - 78 * cor0.col2, 87 ) + 68 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-11534
-12702
-8468

query I rowsort
SELECT 34 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
34
34

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT + ( 39 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
39
39
39

query I rowsort
SELECT - ( 78 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-78
-78
-78

query I rowsort
SELECT ALL 66 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
66
66
66

query I rowsort
SELECT - 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

query I rowsort
SELECT ALL + + 85 FROM tab0 GROUP BY col1
----
85
85

query I rowsort
SELECT ALL + + 24 FROM tab1, tab2 cor0, tab2 AS cor1 GROUP BY cor1.col0
----
24
24
24

query I rowsort
SELECT ALL 34 * + 0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL 58 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-25
15
32

query I rowsort
SELECT + cor0.col2 * 54 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1296
2052
4266

query I rowsort
SELECT ALL 43 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
43
43
43

query I rowsort
SELECT 61 FROM tab2 AS cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT + 46 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT ALL cor0.col0 + 67 FROM tab2 AS cor0 GROUP BY cor0.col0
----
158
159
82

query I rowsort
SELECT 92 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
92
92
92

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 60 * - cor0.col2 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-2700
-4260
-480

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2556
SELECT DISTINCT - cor0.col2 * + CAST( NULL AS SIGNED ) * cor0.col1 - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2556
SELECT DISTINCT - cor0.col2 * + CAST ( NULL AS INTEGER ) * cor0.col1 - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-79
-79
-79

query I rowsort
SELECT ( cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 80 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2080
-3440
-6640

query I rowsort
SELECT + 53 AS col2 FROM tab1 GROUP BY col0
----
53
53
53

query I rowsort
SELECT DISTINCT - 17 AS col0 FROM tab1 cor0 GROUP BY col1, col2, cor0.col2
----
-17

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2563
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2563
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT ALL 21 FROM tab2 AS cor0 GROUP BY col2
----
21
21
21

query I rowsort
SELECT 6 FROM tab2 GROUP BY tab2.col2
----
6
6
6

query I rowsort
SELECT - 43 AS col2 FROM tab0 GROUP BY tab0.col1
----
-43
-43

query I rowsort
SELECT + + 25 * - 61 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
67100
86925
9150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 40 * + 40 col1 FROM tab2 GROUP BY tab2.col0
----
-1600
-1600
-1600

query I rowsort
SELECT ALL - tab1.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 11 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT 89 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT DISTINCT 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
18

query I rowsort
SELECT 54 + cor0.col0 * cor0.col0 * 85 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
19179
703939
719494

query I rowsort
SELECT DISTINCT 12 FROM tab2 AS cor0 GROUP BY cor0.col2
----
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 6 col0 FROM tab0 GROUP BY tab0.col0
----
-6
-6
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-2577
SELECT 27 DIV + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2577
SELECT 27 / + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2578
SELECT DISTINCT + ( + cor0.col2 ) DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-2578
SELECT DISTINCT + ( + cor0.col2 ) / + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT + ( + 14 ) AS col1 FROM tab2 AS cor0 GROUP BY col2
----
14
14
14

query I rowsort
SELECT ALL 42 FROM tab0 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT ALL + 13 FROM tab2 cor0 GROUP BY col0
----
13
13
13

query I rowsort
SELECT DISTINCT 97 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
97

query I rowsort
SELECT - 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2
-2

query I rowsort
SELECT ALL + 79 + + tab2.col0 * 23 FROM tab2 GROUP BY tab2.col0
----
2172
2195
424

query I rowsort
SELECT ALL + 2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT cor0.col0 + + 81 FROM tab1 AS cor0 GROUP BY col0
----
103
109
163

query I rowsort
SELECT + 28 + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-30
-51
-59

query I rowsort
SELECT - ( - cor0.col1 ) + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
114
12
88

query I rowsort
SELECT DISTINCT + ( + cor0.col1 * cor0.col1 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + 30 + cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2055
5071
94

query I rowsort
SELECT ALL - + 51 * + 5 FROM tab0 GROUP BY col2
----
-255
-255
-255

onlyif mysql # DIV for integer division: 
query I rowsort label-2593
SELECT col1 DIV 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-2593
SELECT col1 / 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT DISTINCT - 64 FROM tab2 GROUP BY tab2.col2
----
-64

query I rowsort
SELECT 60 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
118
139
147

query I rowsort
SELECT cor0.col1 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-38
-79
57

onlyif mysql # DIV for integer division: 
query I rowsort label-2597
SELECT 41 DIV - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
-6
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2597
SELECT 41 / - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
-6
0
0

query I rowsort
SELECT ALL 92 FROM tab1 AS cor0 GROUP BY cor0.col2
----
92
92
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 11 * cor0.col2 col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
264
418
869

query I rowsort
SELECT 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT + 21 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
1218
1659
1827

query I rowsort
SELECT 3 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT 51 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1224
1938
4029

query I rowsort
SELECT + + 42 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT ALL + 38 AS col2 FROM tab1 GROUP BY tab1.col0
----
38
38
38

query I rowsort
SELECT ALL 95 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
95
95
95

query I rowsort
SELECT ALL + + tab2.col2 * 20 FROM tab2 GROUP BY tab2.col2
----
1160
1580
1740

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) * cor0.col1 + cor0.col1 * 54 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
891

query I rowsort
SELECT 36 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
2088
2844
3132

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT 44 FROM tab0 AS cor0 GROUP BY col1
----
44

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT 64 * 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1920
1920
1920

query I rowsort
SELECT NULLIF ( - cor0.col2 * 4, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-152
-316
-96

query I rowsort
SELECT ALL 84 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
84
84

query I rowsort
SELECT DISTINCT cor0.col1 * - 94 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-7614
0

query I rowsort
SELECT 31 AS col0 FROM tab2 cor0 GROUP BY col1
----
31
31
31

query I rowsort
SELECT - + tab0.col1 * + 0 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2621
SELECT 91 DIV 72 + - col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-21
-27
-81

skipif mysql # not compatible
query I rowsort label-2621
SELECT 91 / 72 + - col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-21
-27
-81

query I rowsort
SELECT DISTINCT 37 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2624
SELECT cor0.col1 DIV - 15 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2
-3
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2624
SELECT cor0.col1 / - 15 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 94 * + cor0.col0 * cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
21150
778414
795616

query I rowsort
SELECT + cor0.col1 + ( 31 ) AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
37
75
88

query I rowsort
SELECT 35 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT 15 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT cor0.col0 * 5 FROM tab2 AS cor0 GROUP BY cor0.col0
----
455
460
75

query I rowsort
SELECT ALL 61 FROM tab1 cor0 GROUP BY col2
----
61
61
61

query I rowsort
SELECT + 47 FROM tab2 GROUP BY tab2.col0
----
47
47
47

query I rowsort
SELECT ( + 99 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT DISTINCT cor0.col0 + - ( - cor0.col0 ) * 14 * cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
116025
118588
3165

query I rowsort
SELECT DISTINCT 7 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
7

query I rowsort
SELECT - 81 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-4698
-6399
-7047

query I rowsort
SELECT ALL - cor0.col0 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL 17 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
17
17

query I rowsort
SELECT - 58 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-58
-58
-58

query I rowsort
SELECT DISTINCT 44 FROM tab2 AS cor0 GROUP BY cor0.col0
----
44

query I rowsort
SELECT cor0.col0 + 74 FROM tab1 cor0 GROUP BY cor0.col0
----
102
156
96

onlyif mysql # DIV for integer division: 
query I rowsort label-2641
SELECT + ( 15 ) DIV cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2641
SELECT + ( 15 ) / cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
2

query I rowsort
SELECT 84 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
84
84
84

query I rowsort
SELECT DISTINCT - 22 FROM tab1 GROUP BY col1
----
-22

query I rowsort
SELECT ALL ( + ( - 53 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-53
-53
-53

query I rowsort
SELECT DISTINCT 35 * 94 FROM tab1 cor0 GROUP BY cor0.col0
----
3290

query I rowsort
SELECT 25 + - 28 FROM tab2 GROUP BY tab2.col2
----
-3
-3
-3

query I rowsort
SELECT DISTINCT 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5

query I rowsort
SELECT + + 78 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
78
78

query I rowsort
SELECT ALL - 52 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
4732
4784
780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
9

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-22
-28
-82

query I rowsort
SELECT cor0.col2 * 37 + + 74 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1480
2997
962

query I rowsort
SELECT DISTINCT + 35 * + cor0.col1 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1622
2023
232

query I rowsort
SELECT DISTINCT - - 21 AS col0 FROM tab1 GROUP BY col0
----
21

query I rowsort
SELECT col2 * + 44 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
2552
3476
3828

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT 10 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT DISTINCT - 95 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-95

query I rowsort
SELECT + cor0.col2 * - 83 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1968
-3116
-6478

query I rowsort
SELECT + 19 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT DISTINCT 4 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4

query I rowsort
SELECT ALL - 93 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT + 49 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL cor0.col2 * cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 19cd7195099b01c0ba4a11e95bb242f0

query I rowsort
SELECT + 89 - cor0.col2 FROM tab1 cor0 GROUP BY col2
----
18
44
81

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col1 * ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-14
-1854
-3221

query I rowsort
SELECT - cor0.col0 * + 14 AS col1 FROM tab0 cor0 GROUP BY col0
----
-1162
-364
-602

query I rowsort
SELECT ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2669
SELECT - - CAST( NULL AS SIGNED ) + - 90 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2669
SELECT - - CAST ( NULL AS INTEGER ) + - 90 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 * 81 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3321
4779
4941

query I rowsort
SELECT DISTINCT 99 + + 56 * col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2395
3403
3515

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - 9 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-9
-9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2674
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2674
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 + 28 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-29
22

query I rowsort
SELECT ALL NULLIF ( cor0.col0, - cor0.col0 ) * + ( cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-86

onlyif mysql # DIV for integer division: 
query I rowsort label-2679
SELECT + 52 DIV - 27 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2679
SELECT + 52 / - 27 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT + 91 + 38 FROM tab0 cor0 GROUP BY col0
----
129
129
129

query I rowsort
SELECT 82 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4756
6478
7134

query I rowsort
SELECT - 41 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-41
-41
-41

query I rowsort
SELECT DISTINCT 56 FROM tab0 AS cor0 GROUP BY cor0.col0
----
56

query I rowsort
SELECT DISTINCT 81 FROM tab0 GROUP BY tab0.col2
----
81

query I rowsort
SELECT - cor0.col2 + - 63 FROM tab2 cor0 GROUP BY cor0.col2
----
-121
-142
-150

query I rowsort
SELECT - 21 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-21
-21
-21

query I rowsort
SELECT + 32 FROM tab1 GROUP BY tab1.col2
----
32
32
32

query I rowsort
SELECT ALL + 30 AS col2 FROM tab0 cor0 GROUP BY col1
----
30
30

query I rowsort
SELECT ( 72 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
72
72
72

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2691
SELECT DISTINCT - CAST( - cor0.col0 AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2, cor0.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-2691
SELECT DISTINCT - CAST ( - cor0.col0 AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 + 1 * 89 FROM tab0 AS cor0 GROUP BY col0
----
115
132
172

query I rowsort
SELECT DISTINCT col2 + 99 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
107
144
170

query I rowsort
SELECT + 89 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 67 col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 37 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT ALL ( cor0.col2 ) * - 45 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2610
-3555
-3915

query I rowsort
SELECT ALL + 95 FROM tab1 AS cor0 GROUP BY col2
----
95
95
95

query I rowsort
SELECT + 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT - + 65 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
-65
-65
-65

query I rowsort
SELECT ALL - cor0.col2 * col0 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1008
-1975
-3116

query I rowsort
SELECT 93 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT - 22 - + 28 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-50
-50
-50

query I rowsort
SELECT - 98 * + cor0.col0 AS col1 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
-1470
-8918
-9016

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ( col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT ( cor0.col2 * + cor0.col2 ) - 60 * cor0.col2 FROM tab0 cor0 GROUP BY col2
----
-836
-864
1501

query I rowsort
SELECT 61 FROM tab2 AS cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT DISTINCT + 2 FROM tab0 GROUP BY tab0.col0
----
2

query I rowsort
SELECT - 94 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 col1 FROM tab1 GROUP BY tab1.col1
----
-70
-70
-70

query I rowsort
SELECT DISTINCT - NULLIF ( + 66, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-66

onlyif mysql # DIV for integer division: 
query I rowsort label-2714
SELECT - 68 DIV + 65 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2714
SELECT - 68 / + 65 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-1
-1
-1

query I rowsort
SELECT ALL - 35 FROM tab0 GROUP BY tab0.col1
----
-35
-35

query I rowsort
SELECT DISTINCT 88 FROM tab1 AS cor0 GROUP BY col2, col1
----
88

query I rowsort
SELECT + 98 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT - 3 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT ALL 99 FROM tab1 AS cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT DISTINCT 6 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2721
SELECT - tab0.col2 DIV 92 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2721
SELECT - tab0.col2 / 92 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT 45 FROM tab2 cor0 GROUP BY cor0.col1
----
45
45
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 73 col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-73
-73
-73

query I rowsort
SELECT 20 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
20
20
20

query I rowsort
SELECT DISTINCT - 30 * - 18 FROM tab2 GROUP BY tab2.col1
----
540

query I rowsort
SELECT cor0.col0 * COALESCE ( 17 + cor0.col0 * cor0.col0, cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
11022
22428
552762

query I rowsort
SELECT ALL 13 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
533
767
793

query I rowsort
SELECT - cor0.col1 * 85 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6885
0

query I rowsort
SELECT + 56 + + cor0.col1 * ( + cor0.col1 ) AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
56
56
6617

query I rowsort
SELECT DISTINCT - col2 - + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-116
-158
-174

query I rowsort
SELECT DISTINCT + 77 FROM tab2 AS cor0 GROUP BY cor0.col0
----
77

query I rowsort
SELECT + 41 FROM tab0 cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT 37 FROM tab1 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT 81 * ( - 52 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-4212

query I rowsort
SELECT - 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-33
-33
-33

query I rowsort
SELECT + - 93 FROM tab2, tab2 cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT 96 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 32 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1856
2528
2784

query I rowsort
SELECT DISTINCT + 28 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1204
2324
728

query I rowsort
SELECT ALL + 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2741
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2741
SELECT DISTINCT CAST ( NULL AS REAL ) AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + - 5 * tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-205
-295
-305

query I rowsort
SELECT - NULLIF ( + 26 + + cor0.col0, 96 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-108
-48
-54

query I rowsort
SELECT ALL - 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-97
-97
-97

query I rowsort
SELECT cor0.col2 * + 93 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
2232
3534
7347

query I rowsort
SELECT - 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 60 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
60

query I rowsort
SELECT + 84 FROM tab0 GROUP BY col0
----
84
84
84

query I rowsort
SELECT ALL + 12 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
12
12
12

query I rowsort
SELECT + 81 FROM tab0 AS cor0 GROUP BY cor0.col1
----
81
81

query I rowsort
SELECT - 85 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-85
-85
-85

query I rowsort
SELECT + 25 FROM tab1 cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT ALL - 20 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-20
-20
-20

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 * + 76 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
3208
4575
4651

onlyif mysql # DIV for integer division: 
query I rowsort label-2756
SELECT ALL + col2 DIV - 44 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2756
SELECT ALL + col2 / - 44 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2757
SELECT DISTINCT CAST( col2 AS SIGNED ) + - 10 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-405
-639
-72

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2757
SELECT DISTINCT CAST ( col2 AS INTEGER ) + - 10 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-405
-639
-72

query I rowsort
SELECT - 29 AS col1 FROM tab0 GROUP BY tab0.col1
----
-29
-29

query I rowsort
SELECT + 80 FROM tab1 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT DISTINCT cor0.col0 * 66 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1716
2838
5478

query I rowsort
SELECT 6 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
6
6
6

query I rowsort
SELECT ALL - 3 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT ALL 37 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT - cor0.col2 * 91 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-131404
-52416
-567931

query I rowsort
SELECT + 22 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1738
-528
-836

query I rowsort
SELECT DISTINCT + 86 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
86

query I rowsort
SELECT ALL 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
33
33
33

query I rowsort
SELECT + 74 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
74
74
74

query I rowsort
SELECT cor1.col0 * 76 + ( - 24 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
1648
2104
6208

query I rowsort
SELECT + + 53 * 64 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
3392
3392
3392

query I rowsort
SELECT ALL 0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT + NULLIF ( cor0.col2, - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 + 26 + cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6454
26
26

query I rowsort
SELECT DISTINCT 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 71 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-71
-71
-71

query I rowsort
SELECT DISTINCT - - 90 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
90

query I rowsort
SELECT DISTINCT + ( - cor0.col0 + - 90 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-112
-118
-172

query I rowsort
SELECT ALL 41 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT ( 94 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT ALL 68 FROM tab1 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT - 93 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT NULLIF ( - 52, + cor0.col0 ) + cor0.col0 * - 18 * - 64 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
104780
105932
17228

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
39
39
39

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2784
SELECT DISTINCT - CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0 GROUP BY col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2784
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT + 87 + 79 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
166

query I rowsort
SELECT - 30 + 67 FROM tab2 AS cor0 GROUP BY cor0.col0
----
37
37
37

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2787
SELECT DISTINCT - 66 + - cor0.col1 + + CAST( 43 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-29
-67
-80

skipif mysql # not compatible
query I rowsort label-2787
SELECT DISTINCT - 66 + - cor0.col1 + + CAST ( 43 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-29
-67
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-2788
SELECT + cor0.col2 DIV - 72 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2788
SELECT + cor0.col2 / - 72 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1
-1
0

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - 89 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-89
-89
-89

query I rowsort
SELECT + ( + 96 ) + + 27 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
123
123
123

query I rowsort
SELECT DISTINCT 16 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16

query I rowsort
SELECT DISTINCT ( + 67 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT DISTINCT + + 94 FROM tab0 GROUP BY tab0.col0
----
94

query I rowsort
SELECT cor0.col2 * col0 - - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
1366
5377
7248

query I rowsort
SELECT DISTINCT - - 43 FROM tab2 GROUP BY col1
----
43

query I rowsort
SELECT + 18 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
18
18

query I rowsort
SELECT ALL + ( + 44 ) FROM tab0 cor0 GROUP BY col0, cor0.col1
----
44
44
44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2799
SELECT ALL - + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2799
SELECT ALL - + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
162

query I rowsort
SELECT cor0.col1 * + 95 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4180
5415
570

query I rowsort
SELECT DISTINCT cor0.col2 * 58 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2610
4118
464

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT + 0 FROM tab0 cor0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + cor0.col1 * - ( - 40 ) * col2 + - cor0.col1 * + 28 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
100959
123657
1744

query I rowsort
SELECT - 11 AS col1 FROM tab0 GROUP BY tab0.col1
----
-11
-11

onlyif mysql # DIV for integer division: 
query I rowsort label-2807
SELECT + cor0.col0 + + 37 DIV - 60 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-2807
SELECT + cor0.col0 + + 37 / - 60 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 93 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-93
-93
-93

query I rowsort
SELECT DISTINCT + 52 - 89 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-37

query I rowsort
SELECT ALL + 85 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
126
144
146

onlyif mysql # DIV for integer division: 
query I rowsort label-2811
SELECT - col1 DIV - 46 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2811
SELECT - col1 / - 46 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
1

query I rowsort
SELECT DISTINCT - 2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2

query I rowsort
SELECT ALL 0 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - 84 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-84
-84
-84

query I rowsort
SELECT DISTINCT 92 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT ALL 97 AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT ALL - cor0.col2 * + 12 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-540
-852
-96

query I rowsort
SELECT + 32 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT DISTINCT 81 + cor0.col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
125
138
87

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
41

query I rowsort
SELECT DISTINCT 7 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
7

query I rowsort
SELECT 56 FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT + cor1.col1 * cor1.col1 + - 37 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
-37
6524

query I rowsort
SELECT ALL NULLIF ( cor0.col2, cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor1.col2 * 78 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
-1872
-2964
-6162

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2827
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2827
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT 73 FROM tab1 AS cor0 GROUP BY cor0.col2
----
73

query I rowsort
SELECT 88 * 97 - - col0 * 5 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8646
8676
8946

query I rowsort
SELECT DISTINCT cor0.col1 * 57 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
2508
3249
342

query I rowsort
SELECT + 7 * + 46 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
322
322
322

onlyif mysql # DIV for integer division: 
query I rowsort label-2832
SELECT ALL + ( + cor0.col0 ) DIV - 83 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2832
SELECT ALL + ( + cor0.col0 ) / - 83 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
0

query I rowsort
SELECT 80 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT + tab2.col2 - - 63 FROM tab2 GROUP BY tab2.col2
----
121
142
150

query I rowsort
SELECT + 7 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
7
7
7

query I rowsort
SELECT ALL - 27 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-27
-27
-27

query I rowsort
SELECT - 71 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-71
-71
-71

query I rowsort
SELECT DISTINCT cor0.col1 * 1 * cor0.col1 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
38
6585
79

query I rowsort
SELECT DISTINCT 51 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2295
3621
408

query I rowsort
SELECT + tab0.col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2841
SELECT ALL tab1.col1 + - CAST( NULL AS SIGNED ) col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2841
SELECT ALL tab1.col1 + - CAST ( NULL AS INTEGER ) col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 52 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 58 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT + 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT + 83 * col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2158
3569
6889

query I rowsort
SELECT ALL - col1 - - 56 FROM tab0 GROUP BY tab0.col1
----
-25
56

query I rowsort
SELECT ALL 58 * col0 - + 94 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1414
2400
4720

query I rowsort
SELECT ALL COALESCE ( - tab2.col2, 64 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT - ( COALESCE ( cor0.col1, cor0.col1 ) ) * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT - 6 AS col0 FROM tab0 GROUP BY col1
----
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 36 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
36
36
36

query I rowsort
SELECT 77 AS col0 FROM tab2 cor0 GROUP BY col2
----
77
77
77

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2853
SELECT CAST( NULL AS SIGNED ) + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2853
SELECT CAST ( NULL AS INTEGER ) + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL 10 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
10
10

query I rowsort
SELECT ALL 25 + - 82 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-57
-57
-57

query I rowsort
SELECT ALL - ( cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - NULLIF ( 92, - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

query I rowsort
SELECT ALL + 99 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99
99
99

onlyif mysql # DIV for integer division: 
query I rowsort label-2860
SELECT ( cor0.col0 ) DIV + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2860
SELECT ( cor0.col0 ) / + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2862
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2862
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * + 13 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
616
798
84

query I rowsort
SELECT ALL col0 * + 46 - 36 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1160
1942
3782

onlyif mysql # DIV for integer division: 
query I rowsort label-2865
SELECT ALL + cor0.col0 DIV - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2865
SELECT ALL + cor0.col0 / - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 70 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT DISTINCT 15 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15

query I rowsort
SELECT - cor0.col1 * 31 * 22 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
-27962
-40238
-41602

query I rowsort
SELECT ALL - cor0.col0 * + 53 + 12 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
-4811
-4864
-783

query I rowsort
SELECT 12 FROM tab2 cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT 95 FROM tab1 AS cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT ALL ( + tab2.col2 ) AS col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2874
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2874
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 34 AS col0 FROM tab0 cor0 GROUP BY col2
----
34
34
34

query I rowsort
SELECT DISTINCT 7 FROM tab0 AS cor0 GROUP BY cor0.col0
----
7

query I rowsort
SELECT 6 FROM tab1 cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT ALL 82 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT 73 + cor0.col1 + + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
155
191
195

query I rowsort
SELECT - 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-89
-89
-89

query I rowsort
SELECT 60 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2640
3420
360

query I rowsort
SELECT ALL + - 25 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
158
48
76

query I rowsort
SELECT DISTINCT 4 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4

query I rowsort
SELECT ALL 36 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT - 92 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

query I rowsort
SELECT ALL - 16 + + cor1.col2 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
22
63
8

query I rowsort
SELECT DISTINCT + 54 AS col1 FROM tab2 GROUP BY tab2.col2
----
54

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-2890
SELECT ALL 57 DIV - ( cor0.col2 * + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2890
SELECT ALL 57 / - ( cor0.col2 * + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - - 86 AS col1 FROM tab1 GROUP BY tab1.col0
----
86
86
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2892
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2892
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 78 - - 87 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
165
165
165

query I rowsort
SELECT DISTINCT 87 + - 78 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
9

query I rowsort
SELECT - 44 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3564
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2896
SELECT + cor0.col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2896
SELECT + cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 18 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
18
18
18

query I rowsort
SELECT ALL + NULLIF ( 38 + + cor0.col2, 96 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
109
46
83

query I rowsort
SELECT ALL + ( - cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 91 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT ALL + 95 AS col1 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT cor0.col0 * + cor0.col0 + - 53 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1796
623
6836

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT ALL + 83 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4814
-6557
-7221

query I rowsort
SELECT DISTINCT + 3 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1892
2451
258

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 DISTINCT - + 55 FROM tab1 GROUP BY tab1.col0
----
-55

query I rowsort
SELECT ALL + 53 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT + 10 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
150
910
920

query I rowsort
SELECT 38 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT - tab2.col0 FROM tab2, tab2 cor0 GROUP BY tab2.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-2913
SELECT 78 DIV - cor0.col2 + - cor0.col2 + + 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-19
-27
1

skipif mysql # not compatible
query I rowsort label-2913
SELECT 78 / - cor0.col2 + - cor0.col2 + + 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-19
-27
1

query I rowsort
SELECT ALL 38 + 85 * col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col2
----
3863
6073
718

query I rowsort
SELECT DISTINCT - 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-72

query I rowsort
SELECT DISTINCT - 84 * 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1932

query I rowsort
SELECT + col1 * cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT 50 FROM tab2 cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT - 24 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-24

query I rowsort
SELECT DISTINCT - 3 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3

query I rowsort
SELECT 82 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col1 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 * 9 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4356
60516
7056

query I rowsort
SELECT - 69 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-69
-69
-69

query I rowsort
SELECT DISTINCT cor0.col1 * + 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1394
2006
2074

query I rowsort
SELECT ALL - 44 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3564

query I rowsort
SELECT ALL + 0 * + 90 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 17 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 28 col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

query I rowsort
SELECT DISTINCT ( cor0.col0 ) - - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
164
44
56

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT ALL - 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT 88 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT DISTINCT + 75 AS col1 FROM tab1 GROUP BY tab1.col2
----
75

query I rowsort
SELECT + 3 + - cor0.col0 * 73 FROM tab2 AS cor0 GROUP BY col0
----
-1092
-6640
-6713

query I rowsort
SELECT cor0.col1 * 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1140
120
880

query I rowsort
SELECT - + 46 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-46
-46
-46

query I rowsort
SELECT + 8 * - 21 + - cor0.col0 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
-183
-259
-260

query I rowsort
SELECT DISTINCT - ( - 36 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
36

query I rowsort
SELECT DISTINCT - cor0.col2 * 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1392
-2204
-4582

query I rowsort
SELECT + 71 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
71
71
71

query I rowsort
SELECT + 11 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT ALL 19 FROM tab0 AS cor0 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT - COALESCE ( - 48 + - col2, 72 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
119
56
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 83 col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-2158
-3569
-6889

query I rowsort
SELECT DISTINCT - 62 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-62

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2950
SELECT CAST( NULL AS DECIMAL ) * - cor0.col0 + cor0.col1 - cor0.col0 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2950
SELECT CAST ( NULL AS REAL ) * - cor0.col0 + cor0.col1 - cor0.col0 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 56 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-56
-56
-56

query I rowsort
SELECT + 4 + 13 + cor0.col2 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
104
75
96

query I rowsort
SELECT ALL 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT - 3 * cor0.col1 * cor0.col1 + 69 FROM tab1 cor0 GROUP BY cor0.col1
----
-39
-5739
-9678

query I rowsort
SELECT ALL 63 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT 53 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1272
-2014
-4187

query I rowsort
SELECT + + 82 + + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
127
153
90

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 77 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-77

query I rowsort
SELECT - 52 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-52
-52
-52

query I rowsort
SELECT + 58 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
58
58

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT + cor0.col1 * cor0.col1 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT 18 FROM tab0, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
18
18
18

query I rowsort
SELECT ALL 3 AS col0 FROM tab2 GROUP BY tab2.col2
----
3
3
3

query I rowsort
SELECT DISTINCT 36 FROM tab2 AS cor0 GROUP BY cor0.col0
----
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 22 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT - cor0.col0 + + col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query III rowsort
SELECT ALL * FROM tab0 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT DISTINCT 87 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
87

query I rowsort
SELECT + 83 AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
83
83
83

query I rowsort
SELECT - 89 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-89
-89
-89

query I rowsort
SELECT ALL - - 98 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
98
98

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + + tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT + 61 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
17
4
55

query I rowsort
SELECT - 62 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-62
-62

query I rowsort
SELECT - 70 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-70
-70
-70

query I rowsort
SELECT ALL - 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2983
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2983
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL + - 60 * - 34 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
2040
2040
2040

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + + tab0.col2 * 50 AS col1 FROM tab0 GROUP BY tab0.col2
----
1200
1900
3950

query I rowsort
SELECT 71 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * + col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 43 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43

query I rowsort
SELECT - 42 FROM tab1 cor0 GROUP BY cor0.col1
----
-42
-42
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
28

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 64 * cor0.col2 * + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
129600
322624
4096

query I rowsort
SELECT ALL 8 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL - 55 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2420
-3135
-330

query I rowsort
SELECT ALL ( - cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 44 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-44

query I rowsort
SELECT - tab0.col1 * col1 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT cor0.col2 * - 20 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-1580
-480
-760

onlyif mysql # DIV for integer division: 
query I rowsort label-3003
SELECT ALL cor0.col2 DIV 29 FROM tab1 AS cor0 GROUP BY col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3003
SELECT ALL cor0.col2 / 29 FROM tab1 AS cor0 GROUP BY col2
----
0
1
2

query I rowsort
SELECT col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + cor0.col2 * - 2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-142
-16
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-3008
SELECT DISTINCT cor0.col2 * - 65 + 30 * + cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-2895
-4585
-490

skipif mysql # not compatible
query I rowsort label-3008
SELECT DISTINCT cor0.col2 * - 65 + 30 * + cor0.col2 / cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-2895
-4585
-490

query I rowsort
SELECT DISTINCT + 80 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
80

query I rowsort
SELECT DISTINCT + 16 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
16

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT ALL - 33 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2706
726
924

query I rowsort
SELECT + 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT 6 FROM tab0 cor0 GROUP BY cor0.col2
----
6

query I rowsort
SELECT - 38 * cor0.col0 + + 38 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-1596
-3116
-950

onlyif mysql # DIV for integer division: 
query I rowsort label-3016
SELECT - cor0.col2 DIV 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3016
SELECT - cor0.col2 / 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
0

query I rowsort
SELECT ALL - 48 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * col0 col0 FROM tab2 cor0 GROUP BY cor0.col0, col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT 13 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
13

query I rowsort
SELECT DISTINCT cor0.col1 * + 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3476
4503
474

query I rowsort
SELECT 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - - cor0.col2 AS col1 FROM tab2, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-3024
SELECT ALL cor0.col0 DIV + 59 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3024
SELECT ALL cor0.col0 / + 59 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT col1 * 74 FROM tab0 GROUP BY tab0.col1
----
0
5994

query I rowsort
SELECT DISTINCT - 81 * col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3564
-4617
-486

query I rowsort
SELECT DISTINCT - tab1.col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT ALL col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT DISTINCT col2 * col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 col1 FROM tab0 AS cor0 GROUP BY col2
----
19

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL 44 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
126
66
72

query I rowsort
SELECT ALL 64 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
64
64

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 3 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3

query I rowsort
SELECT 49 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
49
49
49

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + 84 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-84
-84
-84

query I rowsort
SELECT + ( + 39 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT - cor0.col1 + + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + cor0.col1 * 92 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4048
5244
552

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT 31 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - - 14 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
14

query I rowsort
SELECT ALL - 49 FROM tab0 GROUP BY col0
----
-49
-49
-49

query I rowsort
SELECT - 71 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-71
-71
-71

query I rowsort
SELECT DISTINCT - - 56 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
115
117
97

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 + - cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT + col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 col2 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 25 col0 FROM tab0 GROUP BY tab0.col1
----
25
25

query I rowsort
SELECT DISTINCT 65 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1690
-2795
-5395

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT + NULLIF ( 59, - 22 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 * 68 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
131648
220932
2448

query I rowsort
SELECT 37 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
120
63
80

query I rowsort
SELECT 76 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
76
76
76

query I rowsort
SELECT ALL 48 * + tab1.col0 + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
1078
1372
4018

query I rowsort
SELECT DISTINCT 72 FROM tab0 AS cor0 GROUP BY cor0.col1
----
72

query I rowsort
SELECT DISTINCT 85 + - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
41
79

query I rowsort
SELECT 57 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT + 35 * - 30 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-1050
-1050
-1050

query I rowsort
SELECT ALL + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - ( 45 ) + + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-30
46
47

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL 44 FROM tab1 cor0 GROUP BY cor0.col2
----
44
44
44

onlyif mysql # DIV for integer division: 
query I rowsort label-3075
SELECT DISTINCT cor0.col0 + - cor0.col2 DIV col2 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
152
29
72

skipif mysql # not compatible
query I rowsort label-3075
SELECT DISTINCT cor0.col0 + - cor0.col2 / col2 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
152
29
72

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 DISTINCT 21 + 31 AS col2 FROM tab1 GROUP BY tab1.col2
----
52

query I rowsort
SELECT ALL cor0.col1 FROM tab1, 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 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-71
-71
-71

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2, cor0.col1
----
58
79
87

query I rowsort
SELECT 8 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
8
8
8

query I rowsort
SELECT + cor0.col1 * - 24 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-1416
-1464
-984

query I rowsort
SELECT COALESCE ( - 73, cor0.col0, - 90 ) * - 38 + col0 FROM tab1 cor0 GROUP BY col0
----
2796
2802
2856

query I rowsort
SELECT ALL COALESCE ( + 72, - cor0.col2 ) + + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
100
154
94

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3085
SELECT cor0.col1 * + CAST( + COALESCE ( + 7, cor0.col2 ) AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
567

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3085
SELECT cor0.col1 * + CAST ( + COALESCE ( + 7, cor0.col2 ) AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
567

query I rowsort
SELECT - cor0.col1 + COALESCE ( 3, col0 ) * + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
-16
214
235

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 6, cor0.col1, + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
6

query I rowsort
SELECT ALL 57 * - COALESCE ( cor0.col0, - cor0.col1, NULLIF ( + cor0.col2, + cor0.col0 ) ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
-1254
-1596
-4674

query I rowsort
SELECT DISTINCT COALESCE ( - 65, col1 ) * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5265
0

query I rowsort
SELECT DISTINCT 62 * COALESCE ( - 12 * - col2, - cor0.col1, 84 * + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
43152
58776
64728

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL cor0.col2 * - COALESCE ( - 91, cor0.col1 * cor0.col1, + 73 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
4095
6461
728

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - cor0.col1 * COALESCE ( + 75, cor0.col1, - cor0.col2, col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3300
-4275
-450

query I rowsort
SELECT COALESCE ( cor0.col1, cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 25, cor0.col0 ) + 12 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT ALL COALESCE ( cor0.col0, col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
26
43
83

query I rowsort
SELECT ALL + NULLIF ( cor0.col0 + - cor0.col2, - COALESCE ( cor0.col2, - cor0.col0, + cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-53
19
45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3097
SELECT DISTINCT + 43 * cor0.col1 + cor0.col1 * CAST( COALESCE ( 43, - col2 ) AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6966

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3097
SELECT DISTINCT + 43 * cor0.col1 + cor0.col1 * CAST ( COALESCE ( 43, - col2 ) AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6966

query I rowsort
SELECT ALL COALESCE ( + 73, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
73
73
73

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 97, cor0.col0, + cor0.col0 ) * cor0.col1 * 54 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
214758
309042
319518

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 41, + cor0.col1 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col1
----
-41

query I rowsort
SELECT - COALESCE ( cor0.col1, cor0.col1 ) * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT col1 * + cor0.col1 + - cor0.col1 * - COALESCE ( cor0.col1, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
3872
6498
72

query I rowsort
SELECT - cor0.col2 + - col0 * + NULLIF ( COALESCE ( cor0.col2, - 37, col2 ) + cor0.col0, cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-10081
-2809
-2905

onlyif mysql # DIV for integer division: 
query I rowsort label-3104
SELECT DISTINCT - cor0.col0 * COALESCE ( + 24, - cor0.col0 + + cor0.col2 ) DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-24

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3104
SELECT DISTINCT - cor0.col0 * COALESCE ( + 24, - cor0.col0 + + cor0.col2 ) / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-24

query I rowsort
SELECT + COALESCE ( + 36, cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + + COALESCE ( - cor0.col1, cor0.col0, - 46 * 52 ) col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-38
26
83

query I rowsort
SELECT COALESCE ( + 30, + 13 ) AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT + col1 * + cor0.col2 + COALESCE ( cor0.col1 + cor0.col1, 40, + cor0.col2 ) * + 31 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
6966

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( NULLIF ( + cor0.col0, - cor0.col0 ) * 43, 52, cor0.col1 + cor0.col2 * cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
3913
3956
645

query I rowsort
SELECT COALESCE ( 68 + + col0, 40 * - cor0.col0 + 7 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
150
90
96

onlyif mysql # DIV for integer division: 
query I rowsort label-3111
SELECT DISTINCT cor0.col1 + 67 * - col1 DIV + COALESCE ( cor0.col1, 20 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-26
-6
-8

skipif mysql # not compatible
query I rowsort label-3111
SELECT DISTINCT cor0.col1 + 67 * - col1 / + COALESCE ( cor0.col1, 20 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-26
-6
-8

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col1, + cor0.col0 * - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + COALESCE ( 54, col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT ALL COALESCE ( 75, cor0.col0 + cor0.col0 * - 85 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 40, cor0.col0, + cor0.col1, cor0.col0 ) + + col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-32
31
5

onlyif mysql # DIV for integer division: 
query I rowsort label-3116
SELECT DISTINCT + COALESCE ( 42, cor0.col0 ) DIV + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3116
SELECT DISTINCT + COALESCE ( 42, cor0.col0 ) / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1

query I rowsort
SELECT ALL COALESCE ( 67 + + cor0.col1, cor0.col1 * cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
108
126
128

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( 19, cor0.col2 ) col0 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY tab2.col2
----
19
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-3119
SELECT + 46 + cor0.col0 DIV COALESCE ( 8, - col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
48
49
56

skipif mysql # not compatible
query I rowsort label-3119
SELECT + 46 + cor0.col0 / COALESCE ( 8, - col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
48
49
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3120
SELECT + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3120
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3121
SELECT + cor0.col0 * NULLIF ( + COALESCE ( cor0.col0, + cor0.col0 ), CAST( NULL AS SIGNED ) * 87 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

skipif mysql # not compatible
query I rowsort label-3121
SELECT + cor0.col0 * NULLIF ( + COALESCE ( cor0.col0, + cor0.col0 ), CAST ( NULL AS INTEGER ) * 87 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL col2 * - COALESCE ( 91 * cor0.col1, + cor0.col2, + cor0.col1 * cor0.col1 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0, col2, cor0.col1
----
-233415
-284284
-4368

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( 80, + cor0.col2, + col0 ) - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-171
-172
-95

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 16, cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16

query I rowsort
SELECT + COALESCE ( 46 + + cor0.col1, NULLIF ( 22, cor0.col1 ), + cor0.col1 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
103
52
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( - 79, - cor0.col0, cor0.col1 ) col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-79

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT - COALESCE ( + 44, cor0.col2, - 39 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-44
-44
-44

query I rowsort
SELECT DISTINCT + cor0.col2 * + COALESCE ( cor0.col2, cor0.col2 * + 21 ) AS col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col2 * + col0 * - COALESCE ( cor0.col0 * cor0.col2, - cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-1065024
-4218916
-9947716

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col0, + 5 ) + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( + 64, + col2 ) + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
107
147
90

query I rowsort
SELECT ALL COALESCE ( - cor0.col1 * + cor0.col1, cor0.col1, 4 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT + COALESCE ( + 12 + cor0.col1, ( 51 ) * cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
53
71
73

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( + 12, cor0.col1, cor0.col0, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT ALL COALESCE ( 53, cor0.col2 * + ( 19 ) ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
53
53
53

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 99, - tab2.col2 ) AS col2 FROM tab2 GROUP BY col0
----
99

onlyif mysql # DIV for integer division: 
query I rowsort label-3138
SELECT ALL + COALESCE ( + 80, cor0.col0 + - 42 ) DIV + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-3138
SELECT ALL + COALESCE ( + 80, cor0.col0 + - 42 ) / + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
5

onlyif mysql # DIV for integer division: 
query I rowsort label-3139
SELECT COALESCE ( - 83, + cor0.col1 ) DIV - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
3

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3139
SELECT COALESCE ( - 83, + cor0.col1 ) / - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
3

query I rowsort
SELECT ALL - COALESCE ( 61 + + 54, cor0.col0 + COALESCE ( 6, + cor0.col1 ) ) * + cor0.col1 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
-4715
-6785
-7015

onlyif mysql # DIV for integer division: 
query I rowsort label-3141
SELECT ALL - 13 DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3141
SELECT ALL - 13 / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 61 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT + 24 AS col0 FROM tab0 cor0 GROUP BY col2, col1
----
24

query I rowsort
SELECT ALL - 25 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
-25
-25
-25

query I rowsort
SELECT - col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - cor1.col0 * 6 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-132
-168
-492

query I rowsort
SELECT ALL - - 63 * + cor0.col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
5103

query I rowsort
SELECT 16 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + 38 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
117
62
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3150
SELECT ALL CAST( NULL AS SIGNED ) * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3150
SELECT ALL CAST ( NULL AS INTEGER ) * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 58 FROM tab2 AS cor0 GROUP BY cor0.col1
----
58
58
58

query I rowsort
SELECT 47 FROM tab2 AS cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT + col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT tab0.col1 + - 50 FROM tab0 GROUP BY col1
----
-50
31

query I rowsort
SELECT ALL col1 * + cor0.col2 + - col2 * col1 - cor0.col1 * cor0.col1 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-157464
0
0

query I rowsort
SELECT cor0.col0 + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
182
184
30

query I rowsort
SELECT ALL + 94 FROM tab1 AS cor0 GROUP BY col1
----
94
94
94

query I rowsort
SELECT + cor0.col2 * cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
357911
512
91125

query I rowsort
SELECT DISTINCT 28 * cor0.col0 + cor0.col1 * - 25 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-641
1196
466

query I rowsort
SELECT DISTINCT cor0.col2 + 12 FROM tab0 cor0 GROUP BY cor0.col2
----
36
50
91

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-3163
SELECT - 63 DIV col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3163
SELECT - 63 / col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

query I rowsort
SELECT ALL - 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 54 col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NULL
----
44
57
6

query I rowsort
SELECT ALL - col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

