sqllogictest
Artifact Content
Not logged in

Artifact 0fd65b3e6ab8d9ccba71fc6432e2a21eec327c78:


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 - ( 50 ) + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-42
-5
21

query I rowsort
SELECT cor0.col2 * 9 AS col0 FROM tab1 cor0 GROUP BY col2
----
405
639
72

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

query I rowsort
SELECT DISTINCT + ( ( - 86 ) ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-86

query I rowsort
SELECT 86 + - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
29
42
80

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

query I rowsort
SELECT DISTINCT - - 39 + 59 AS col0 FROM tab2 GROUP BY tab2.col0
----
98

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

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

query I rowsort
SELECT ALL + cor0.col0 - - 10 * + COALESCE ( col0, - cor0.col0, 27, cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
242
308
902

query I rowsort
SELECT ALL - 75 * 54 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
-4050
-4050
-4050

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

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

query I rowsort
SELECT + 59 AS col1 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 81 * + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
2106
3483
6723

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

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

query I rowsort
SELECT 20 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-1640
-440
-560

query I rowsort
SELECT + cor0.col0 + - 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
61
7

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

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

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

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

query I rowsort
SELECT cor0.col2 + cor0.col2 * 83 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2016
3192
6636

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

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

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

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 * - 6 FROM tab2 AS cor0 GROUP BY col1
----
-287
-413
-427

query I rowsort
SELECT ALL cor0.col1 * + 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2419
3481
3599

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

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

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

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

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

query I rowsort
SELECT cor0.col0 + 7 FROM tab1 cor0 GROUP BY cor0.col0
----
29
35
89

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 + + 72 * - 76 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-5393
-5434
-5448

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

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

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

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

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

query I rowsort
SELECT cor0.col2 + + cor0.col2 * + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3422
6320
7656

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 95 + - 55 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
40
40
40

query I rowsort
SELECT 22 * col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1804
484
616

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

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

query I rowsort
SELECT DISTINCT - 50 FROM tab0 GROUP BY col2
----
-50

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

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

query I rowsort
SELECT DISTINCT + 33 * + 90 AS col2 FROM tab2 GROUP BY tab2.col2
----
2970

onlyif mysql # DIV for integer division: 
query I rowsort label-68
SELECT DISTINCT - 70 DIV - 15 + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
4
85

skipif mysql # not compatible
query I rowsort label-68
SELECT DISTINCT - 70 / - 15 + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
4
85

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

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

query I rowsort
SELECT DISTINCT + 32 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-12
-25
26

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

query I rowsort
SELECT ALL 77 FROM tab2 GROUP BY col2
----
77
77
77

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col2 + + 31 FROM tab1 AS cor0 GROUP BY cor0.col2
----
102
39
76

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 95 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
117
123
177

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

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

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

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

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

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

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

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

query I rowsort
SELECT 3 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-23
-40
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL COALESCE ( 86, + cor0.col1 * cor0.col1 + cor0.col0 ) + + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
112
129
169

query I rowsort
SELECT DISTINCT + 27 + + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3391
6268
7596

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 * + 93 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
5394
7347
8091

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-118
SELECT DISTINCT cor0.col2 DIV 66 + 55 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
55
56

skipif mysql # not compatible
query I rowsort label-118
SELECT DISTINCT cor0.col2 / 66 + 55 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
55
56

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col1 + - cor0.col1 * - 2 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
123
177
183

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 9 * + cor0.col2 + cor0.col2 FROM tab2 cor0 GROUP BY col2
----
580
790
870

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 + 25 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
1508
2054
2262

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-148
SELECT 8 DIV - ( + cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-148
SELECT 8 / - ( + cor0.col2 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-169
SELECT DISTINCT cor0.col0 / col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
44
84

query I rowsort
SELECT - 75 * cor0.col1 + + 39 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3261
-411
-4236

onlyif mysql # DIV for integer division: 
query I rowsort label-171
SELECT ALL 45 DIV tab0.col0 + - 30 FROM tab0 GROUP BY tab0.col0
----
-29
-29
-30

skipif mysql # not compatible
query I rowsort label-171
SELECT ALL 45 / tab0.col0 + - 30 FROM tab0 GROUP BY tab0.col0
----
-29
-29
-30

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 40 * cor0.col1 - + cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
1599
2301
2379

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 99 * - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
2178
2772
8118

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

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

query I rowsort
SELECT - cor0.col0 * 53 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1166
-1484
-4346

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-189
SELECT cor0.col2 + - cor0.col2 * - CAST( cor0.col2 * - cor0.col2 - cor0.col2 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-14376
-499201
-56278

skipif mysql # not compatible
query I rowsort label-189
SELECT cor0.col2 + - cor0.col2 * - CAST ( cor0.col2 * - cor0.col2 - cor0.col2 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-14376
-499201
-56278

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

query I rowsort
SELECT + tab2.col1 * 50 FROM tab2 GROUP BY col1
----
2050
2950
3050

query I rowsort
SELECT DISTINCT + ( 14 ) FROM tab1 AS cor0 GROUP BY col0
----
14

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

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

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

query I rowsort
SELECT cor0.col2 * - 28 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1102
-2291
-696

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 94 * 87 FROM tab1 AS cor0 GROUP BY cor0.col1
----
8178
8178
8178

query I rowsort
SELECT DISTINCT + cor0.col1 - + 48 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-7
11
13

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-219
SELECT cor0.col2 DIV - cor0.col2 + cor0.col2 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3363
6240
7568

skipif mysql # not compatible
query I rowsort label-219
SELECT cor0.col2 / - cor0.col2 + cor0.col2 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3363
6240
7568

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

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

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-230
SELECT DISTINCT - 10 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
0

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

query I rowsort
SELECT 36 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1548
-2988
-936

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

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

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

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

query I rowsort
SELECT 46 FROM tab1 GROUP BY col1
----
46
46
46

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

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

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

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

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

query I rowsort
SELECT + col2 * + col2 + 97 AS col2 FROM tab0 GROUP BY col2
----
1541
6338
673

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - 37 + + cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-29
34
8

query I rowsort
SELECT + tab2.col2 * 38 + 31 FROM tab2 GROUP BY tab2.col2
----
2235
3033
3337

query I rowsort
SELECT 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 35 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
35
35
35

query I rowsort
SELECT ALL 55 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
134
79
93

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

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

query I rowsort
SELECT - cor0.col2 + 49 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-22
4
41

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

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

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

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

query I rowsort
SELECT 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.col2, col1
----
41
59
61

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-277
SELECT DISTINCT 94 DIV - cor0.col0 + + 55 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1427
2363
4564

skipif mysql # not compatible
query I rowsort label-277
SELECT DISTINCT 94 / - cor0.col0 + + 55 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1427
2363
4564

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 68 * - 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2856
2856
2856

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
1290
5244
7098

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5626
7663
8439

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

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

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col0 * 66 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6006
6072
990

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-312
SELECT cor0.col2 + CAST( - 4 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
4
41
67

skipif mysql # not compatible
query I rowsort label-312
SELECT cor0.col2 + CAST ( - 4 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
4
41
67

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 * col2 + 93 * - 90 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3329
-6345
-8306

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
14
1854
3221

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

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

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

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

query I rowsort
SELECT DISTINCT 98 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4018
5782
5978

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 - - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-3306
-6162
-7482

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + col0 * + 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2706
726
924

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

query I rowsort
SELECT DISTINCT - + 6 + + 55 FROM tab0 GROUP BY tab0.col2
----
49

query I rowsort
SELECT DISTINCT 65 * 84 FROM tab2 GROUP BY tab2.col2
----
5460

query I rowsort
SELECT ALL + 35 * 38 FROM tab0 GROUP BY col0
----
1330
1330
1330

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

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

query I rowsort
SELECT - cor0.col2 + - 38 * - 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1965
1973
1994

query I rowsort
SELECT DISTINCT - 33 - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-112
-57
-71

query I rowsort
SELECT ALL - tab0.col2 * ( - 20 ) AS col0 FROM tab0 GROUP BY col2
----
1580
480
760

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

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

query I rowsort
SELECT ALL - cor0.col2 * + NULLIF ( + 72, cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-3240
-5112
-576

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

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

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

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

query I rowsort
SELECT + 88 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
1320
8008
8096

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 21 + + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col0
----
103
43
49

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

query I rowsort
SELECT - tab1.col2 + 93 AS col2 FROM tab1 GROUP BY tab1.col2
----
22
48
85

query I rowsort
SELECT ALL - ( + 9 ) + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
49
70
78

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 * + 35 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1330
2765
840

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-426
SELECT + col0 DIV + 2 FROM tab0 GROUP BY tab0.col0
----
13
21
41

skipif mysql # not compatible
query I rowsort label-426
SELECT + col0 / + 2 FROM tab0 GROUP BY tab0.col0
----
13
21
41

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

query I rowsort
SELECT ALL 82 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0, cor1.col0
----
82
82
82

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

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

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

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

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

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

query I rowsort
SELECT 15 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
37
43
97

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

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

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

query I rowsort
SELECT + cor0.col1 * cor0.col1 + cor0.col1 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
4059
8142
9028

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 - 41 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-120
-65
-79

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 61 + + tab2.col0 * + 23 AS col0 FROM tab2 GROUP BY tab2.col0
----
2154
2177
406

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

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

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

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

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

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 + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

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

query I rowsort
SELECT ALL - 64 * + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1536
-2432
-5056

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 + - 87 * - 81 FROM tab2 cor0 GROUP BY cor0.col2
----
6960
6968
6989

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

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

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

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

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

query I rowsort
SELECT ALL 7 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
105
637
644

query I rowsort
SELECT + cor0.col0 * + cor0.col1 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
154
1624
3690

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL ( - 12 ) * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-540
-852
-96

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col1 * COALESCE ( 26, col1, + ( + 42 ) + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1144
1482
156

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

query I rowsort
SELECT ALL + 83 + + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
107
121
162

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

query I rowsort
SELECT ALL - cor0.col0 * + 65 + 46 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-5869
-5934
-929

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 45 + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
104
106
86

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

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

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

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

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

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

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

query I rowsort
SELECT - 41 * 81 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3321
-3321
-3321

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

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 ALL + 17 + + 85 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
102
102
102

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

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

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

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

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

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col2 HAVING NOT - tab0.col2 IS NULL
----
24
38
79

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

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

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

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

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

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

query I rowsort
SELECT cor0.col0 + + cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1806
-650
-6806

query I rowsort
SELECT ALL + 27 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1215
1917
216

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

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

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

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

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

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

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

query I rowsort
SELECT ALL col0 * 42 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
1092
1806
3486

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 43 + - 37 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6

query I rowsort
SELECT - 91 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2366
-3913
-7553

query I rowsort
SELECT + CASE 3 WHEN cor0.col0 + col0 THEN NULL ELSE + col0 END FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

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

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

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

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

query I rowsort
SELECT 69 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1656
2622
5451

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col0 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1215
-168
-5751

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 * + 21 FROM tab2 AS cor0 GROUP BY col1
----
-1239
-1281
-861

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

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

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

query I rowsort
SELECT DISTINCT CASE + cor0.col2 WHEN cor0.col2 THEN cor0.col2 ELSE NULL END FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

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

query I rowsort
SELECT - 63 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-20
-37
20

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 * 67 + - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
1584
2508
5214

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 78 + + 51 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1200
1506
4260

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

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

query I rowsort
SELECT cor0.col2 + 87 * + 94 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
8202
8216
8257

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

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

skipif mysql # not compatible
query I rowsort label-588
SELECT cor1.col0 / cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
1
1
1

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

onlyif mysql # DIV for integer division: 
query I rowsort label-590
SELECT DISTINCT - cor0.col2 DIV cor0.col1 - + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-45
-57
-7

skipif mysql # not compatible
query I rowsort label-590
SELECT DISTINCT - cor0.col2 / cor0.col1 - + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-45
-57
-7

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

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

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

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

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

query I rowsort
SELECT - col2 + - 25 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-104
-49
-63

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

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

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

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

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

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

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

query I rowsort
SELECT - 60 * + 51 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3060
-3060
-3060

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

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

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

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

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

query I rowsort
SELECT + 89 * 39 FROM tab2 GROUP BY col2
----
3471
3471
3471

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col1 + COALESCE ( + 39, + cor0.col2 * + cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
100
80
98

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-616
SELECT 60 / 15 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
4
4
4

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

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

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

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

query I rowsort
SELECT col1 * + 30 AS col2 FROM tab2 GROUP BY tab2.col1
----
1230
1770
1830

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-628
SELECT - 74 DIV cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-628
SELECT - 74 / cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-1
-12

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

query I rowsort
SELECT cor0.col2 * 33 + 98 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2012
2705
2969

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

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

query I rowsort
SELECT - 11 * + cor0.col2 - + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-288
-456
-948

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 65 * 61 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3965

query I rowsort
SELECT ALL - 82 * 61 FROM tab2 GROUP BY tab2.col1
----
-5002
-5002
-5002

query I rowsort
SELECT DISTINCT + 53 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
4823
4876
795

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

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

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

query I rowsort
SELECT cor0.col2 * col0 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
1317
182
5866

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

query I rowsort
SELECT cor0.col1 * + 21 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
1197
126
924

query I rowsort
SELECT + tab2.col1 + 41 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1722
2478
2562

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

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

query I rowsort
SELECT ALL NULLIF ( 40, - 67 ) FROM tab1 cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT 89 FROM tab1 GROUP BY tab1.col1
----
89
89
89

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-658
SELECT DISTINCT + 53 DIV 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-658
SELECT DISTINCT + 53 / 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

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

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

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

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

query I rowsort
SELECT + col2 * 99 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
5742
7821
8613

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

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

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

query I rowsort
SELECT - 65 * 42 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-2730
-2730
-2730

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

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

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

query I rowsort
SELECT ALL - 70 * 67 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-4690
-4690
-4690

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-677
SELECT 4 / + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

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

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

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

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

query I rowsort
SELECT DISTINCT - 92 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5336
-7268
-8004

query I rowsort
SELECT - cor0.col0 + + 3 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-19
-25
-79

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + tab0.col2 * + 35 FROM tab0 GROUP BY tab0.col2
----
1330
2765
840

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + 68 col1 FROM tab0 GROUP BY col0
----
111
151
94

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - - tab1.col0 * - 98 AS col2 FROM tab1 GROUP BY tab1.col0
----
-2156
-2744
-8036

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

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

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

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

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

query I rowsort
SELECT + col1 * + 32 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1452
1881
198

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

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

query I rowsort
SELECT ALL 96 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
154
175
183

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - - 27 FROM tab2 GROUP BY col1
----
27
27
27

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 37 * - 29 FROM tab1 GROUP BY tab1.col0
----
-1073
-1073
-1073

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-743
SELECT ( 12 ) DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-743
SELECT ( 12 ) / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 13 * - 36 - + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-483
-559
-560

onlyif mysql # DIV for integer division: 
query I rowsort label-757
SELECT DISTINCT COALESCE ( - 33, cor0.col2 ) DIV + 85 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif mysql # not compatible
query I rowsort label-757
SELECT DISTINCT COALESCE ( - 33, cor0.col2 ) / + 85 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

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

query I rowsort
SELECT cor0.col0 * cor0.col2 + 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1341
5372
7225

query I rowsort
SELECT - 52 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1144
-1456
-4264

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

onlyif mysql # DIV for integer division: 
query I rowsort label-762
SELECT ALL - - 92 + tab1.col2 DIV 34 AS col1 FROM tab1 GROUP BY col2
----
92
93
94

skipif mysql # not compatible
query I rowsort label-762
SELECT ALL - - 92 + tab1.col2 / 34 AS col1 FROM tab1 GROUP BY col2
----
92
93
94

query I rowsort
SELECT - COALESCE ( + 92, - cor0.col0 + 6 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - + 29 + + col1 FROM tab2 GROUP BY tab2.col1
----
12
30
32

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

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

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

query I rowsort
SELECT ALL 34 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col1 + NULLIF ( col2, - CASE - col1 WHEN + cor0.col1 / + cor0.col0 THEN - cor0.col2 END * - 11 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
17
20
26

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 20 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col2
----
-1420
-160
-900

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

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

query I rowsort
SELECT 15 + - 52 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
4747
4799
795

query I rowsort
SELECT ALL - 50 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1300
-2150
-4150

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 41 * - 35 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1435
-1435
-1435

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-822
SELECT - CAST( + col2 AS SIGNED ) * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

skipif mysql # not compatible
query I rowsort label-822
SELECT - CAST ( + col2 AS INTEGER ) * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + col0 - 43 AS col2 FROM tab1 GROUP BY col0
----
-15
-21
39

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

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

query I rowsort
SELECT DISTINCT - 62 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-107
-133
-70

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-838
SELECT ALL cor0.col1 DIV 78 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-838
SELECT ALL cor0.col1 / 78 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 2 * cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

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

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

query I rowsort
SELECT + 49 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1274
-2107
-4067

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-862
SELECT ALL + cor0.col1 DIV col0 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-57
-59

skipif mysql # not compatible
query I rowsort label-862
SELECT ALL + cor0.col1 / col0 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-57
-59

query I rowsort
SELECT + 81 FROM tab2 GROUP BY col0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 27 col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

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

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

query I rowsort
SELECT 20 * 2 FROM tab1 AS cor0 GROUP BY col1
----
40
40
40

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * - 8 col0 FROM tab1 cor0 GROUP BY col1
----
-352
-456
-48

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

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

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

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

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

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

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
----
24
38
79

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

query I rowsort
SELECT ALL - col0 * + 76 AS col1 FROM tab2 GROUP BY col0
----
-1140
-6916
-6992

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

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

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

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

query I rowsort
SELECT DISTINCT CASE cor0.col2 WHEN cor0.col2 THEN NULL WHEN - col2 THEN NULL ELSE 4 END AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

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

query I rowsort
SELECT COALESCE ( + cor0.col0, cor0.col1 * ( + cor0.col1 ) + col0 ) FROM tab2 cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT - col2 * + 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3915
-6177
-696

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

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

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

query I rowsort
SELECT + 40 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-42
12
18

query I rowsort
SELECT - 42 * + cor0.col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-2436
-3318
-3654

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-904
SELECT COALESCE ( 30, col1 DIV CAST( 11 AS SIGNED ), cor0.col0 DIV - cor0.col2 + + cor0.col2, cor0.col2 + cor0.col2 DIV col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
30
30
30

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-904
SELECT COALESCE ( 30, col1 / CAST ( 11 AS INTEGER ), cor0.col0 / - cor0.col2 + + cor0.col2, cor0.col2 + cor0.col2 / col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
30
30
30

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

query I rowsort
SELECT + tab0.col0 FROM tab0 WHERE NULL = ( NULL ) GROUP BY col0
----

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

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

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

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

query I rowsort
SELECT cor0.col0 + 96 FROM tab2 AS cor0 GROUP BY cor0.col0
----
111
187
188

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor1.col0 * 29 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col1
----
1247
2407
754

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

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

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

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

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

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

query I rowsort
SELECT + 2 * col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
273
276
45

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

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

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

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

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

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

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

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

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

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

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 ALL - col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + NULLIF ( - 92, + cor0.col2 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-92

query I rowsort
SELECT DISTINCT + 59 + - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-32
-33
44

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12

query I rowsort
SELECT DISTINCT + tab1.col1 * tab1.col1 + - 28 AS col0 FROM tab1 GROUP BY tab1.col1
----
1908
3221
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * 9 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
135
819
828

query I rowsort
SELECT - 10 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-10
-10
-10

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 69 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-69

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-81
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 col2 FROM tab2 GROUP BY col2
----
4

query I rowsort
SELECT cor0.col2 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL 9 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
9
9
9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-969
SELECT - CAST( NULL AS SIGNED ) + 21 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-969
SELECT - CAST ( NULL AS INTEGER ) + 21 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-970
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-970
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
87
87
87

query I rowsort
SELECT DISTINCT + col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL 7 AS col2 FROM tab0 GROUP BY tab0.col0
----
7
7
7

query I rowsort
SELECT - 53 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-112
-114
-94

query I rowsort
SELECT 71 + 79 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
150
150
150

query I rowsort
SELECT + 37 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT - ( cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 68 FROM tab2 AS cor0 GROUP BY col1
----
-68

query I rowsort
SELECT ALL - cor0.col0 * 32 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1376
-2656
-832

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 60, cor0.col0 ) + cor0.col1 * - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-2004
-60
-60

query I rowsort
SELECT DISTINCT cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT ALL + ( + 99 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT - 81 + 79 FROM tab1 GROUP BY tab1.col1
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 69 col2 FROM tab2 GROUP BY tab2.col2
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 19 col2 FROM tab0 GROUP BY col1
----
-19
-19

query I rowsort
SELECT DISTINCT - 39 FROM tab0 GROUP BY col0
----
-39

query I rowsort
SELECT ALL - 55 FROM tab1 GROUP BY tab1.col2
----
-55
-55
-55

query I rowsort
SELECT - col2 * - 9 FROM tab1 AS cor0 GROUP BY cor0.col2
----
405
639
72

query I rowsort
SELECT ALL 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT DISTINCT 41 * + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1558
3239
984

query I rowsort
SELECT cor0.col2 * - col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + + 15 + - ( + cor0.col0 ) FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-11
-28
-68

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 - + col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-45
53

query I rowsort
SELECT DISTINCT - 92 AS col1 FROM tab2 cor0 GROUP BY col2
----
-92

query I rowsort
SELECT ALL - 42 FROM tab0 GROUP BY tab0.col2
----
-42
-42
-42

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2028
-3071
-989

query I rowsort
SELECT ALL cor0.col0 * + 47 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
4277
4324
705

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 13 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT DISTINCT 62 FROM tab1 AS cor0 GROUP BY cor0.col2
----
62

query I rowsort
SELECT ALL + 57 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1007
SELECT ALL cor0.col0 DIV cor0.col2 - + cor0.col2 * + 4 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-150
-316
-95

skipif mysql # not compatible
query I rowsort label-1007
SELECT ALL cor0.col0 / cor0.col2 - + cor0.col2 * + 4 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-150
-316
-95

query I rowsort
SELECT ALL - - 67 AS col0 FROM tab0 GROUP BY tab0.col1
----
67
67

query I rowsort
SELECT - cor0.col0 * + 60 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-5460
-5520
-900

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - - 49 * - 69 FROM tab0 GROUP BY tab0.col2
----
-3381
-3381
-3381

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT cor1.col1 + cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
162

query I rowsort
SELECT DISTINCT - + ( 76 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
-76

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 85 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-85
-85
-85

query I rowsort
SELECT ALL 52 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * 53 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2173
3127
3233

query I rowsort
SELECT 10 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
410
590
610

query I rowsort
SELECT ALL + 64 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT + 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT - 49 FROM tab2 cor0 GROUP BY cor0.col0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 51 FROM tab2 AS cor0 GROUP BY col0
----
51
51
51

query I rowsort
SELECT DISTINCT - 70 FROM tab1 GROUP BY tab1.col0
----
-70

query I rowsort
SELECT ALL - 29 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-29
-29
-29

query I rowsort
SELECT + 27 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
27
27
27

query I rowsort
SELECT + cor0.col2 * + cor0.col2 - + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3306
6162
7482

query I rowsort
SELECT 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT 12 + - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-10
-16
-70

query I rowsort
SELECT + + col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT 94 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
94
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-1038
SELECT ALL - cor0.col1 DIV - 24 - 25 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-23
-23
-24

skipif mysql # not compatible
query I rowsort label-1038
SELECT ALL - cor0.col1 / - 24 - 25 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-23
-23
-24

query I rowsort
SELECT DISTINCT + - 82 FROM tab0 GROUP BY col0
----
-82

query I rowsort
SELECT DISTINCT + - 47 FROM tab1 GROUP BY tab1.col2
----
-47

query I rowsort
SELECT - tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT - 31 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-31
-31
-31

query I rowsort
SELECT - cor0.col2 + 16 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1185
1305
870

query I rowsort
SELECT DISTINCT - 29 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29

query I rowsort
SELECT DISTINCT - 73 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1898
-3139
-6059

query I rowsort
SELECT ALL - 65 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL 25 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 38 col0 FROM tab0 GROUP BY tab0.col1
----
38
38

query I rowsort
SELECT 52 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT 20 AS col2 FROM tab1 cor0 GROUP BY col1
----
20
20
20

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 83 col1 FROM tab2 GROUP BY col2
----
83
83
83

query I rowsort
SELECT - col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-1059
SELECT ALL tab1.col1 DIV col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1059
SELECT ALL tab1.col1 / col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 - + 4 FROM tab0 AS cor0 GROUP BY cor0.col0
----
22
39
79

query I rowsort
SELECT cor0.col2 * + 80 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4640
6320
6960

query I rowsort
SELECT DISTINCT + 57 AS col0 FROM tab0 cor0 GROUP BY col1
----
57

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT + 55 * cor0.col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
2475
3905
440

query I rowsort
SELECT ALL + 70 * 79 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5530
5530
5530

query I rowsort
SELECT - 90 FROM tab2 GROUP BY tab2.col0
----
-90
-90
-90

query I rowsort
SELECT + cor0.col2 * 77 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4466
6083
6699

query I rowsort
SELECT ALL 68 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
68
68
68

query I rowsort
SELECT col0 + cor0.col0 * + 5 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
546
552
90

onlyif mysql # DIV for integer division: 
query I rowsort label-1071
SELECT DISTINCT cor0.col0 DIV 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16
5
8

skipif mysql # not compatible
query I rowsort label-1071
SELECT DISTINCT cor0.col0 / 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16
5
8

query I rowsort
SELECT - 81 * - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
2106
3483
6723

query I rowsort
SELECT + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 69 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-69

query I rowsort
SELECT 79 FROM tab1 GROUP BY tab1.col0
----
79
79
79

query I rowsort
SELECT - 58 FROM tab2 GROUP BY col0
----
-58
-58
-58

query I rowsort
SELECT ALL - 42 FROM tab1 GROUP BY tab1.col2
----
-42
-42
-42

query I rowsort
SELECT ALL - 76 AS col2 FROM tab0 GROUP BY tab0.col0
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
126
28
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 53 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
53
53
53

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 91 * 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4368

query I rowsort
SELECT 15 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
15
15
15

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + cor0.col0 - 70 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-27
-44
13

query I rowsort
SELECT 75 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 13 ) col0 FROM tab1 cor0 GROUP BY cor0.col0
----
13

query I rowsort
SELECT ALL - 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT - 56 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-56
-56
-56

query I rowsort
SELECT 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT cor0.col0 + 57 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
100
140
83

query I rowsort
SELECT DISTINCT 46 + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
105
107
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 68 FROM tab0 AS cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54
54
54

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1101
SELECT ALL cor0.col0 * CAST( - 82 AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2132
-3526
-6806

skipif mysql # not compatible
query I rowsort label-1101
SELECT ALL cor0.col0 * CAST ( - 82 AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2132
-3526
-6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
70
70
70

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
114
12
88

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col2 - + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 97 FROM tab2 GROUP BY col1
----
-97
-97
-97

query I rowsort
SELECT DISTINCT 19 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT DISTINCT 98 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98

query I rowsort
SELECT DISTINCT 95 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
95

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT 55 FROM tab2 AS cor0 GROUP BY col1
----
55

query I rowsort
SELECT ALL 34 AS col0 FROM tab2 GROUP BY col1
----
34
34
34

query I rowsort
SELECT cor0.col1 + col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT + 92 - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
34
5

query I rowsort
SELECT 90 FROM tab1 GROUP BY tab1.col0
----
90
90
90

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT DISTINCT + 5 FROM tab2 AS cor0 GROUP BY cor0.col1
----
5

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT cor0.col0 * col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
484
6724
784

query I rowsort
SELECT + 92 FROM tab1 GROUP BY tab1.col0
----
92
92
92

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL - 16 AS col0 FROM tab1 GROUP BY tab1.col1
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-93

query I rowsort
SELECT - 26 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
1118
2158
676

onlyif mysql # DIV for integer division: 
query I rowsort label-1127
SELECT DISTINCT + + col0 DIV - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-1

skipif mysql # not compatible
query I rowsort label-1127
SELECT DISTINCT + + col0 / - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-1

query I rowsort
SELECT - tab1.col1 * + col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + cor0.col1 * 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2772
3591
378

query I rowsort
SELECT DISTINCT 78 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
78

query I rowsort
SELECT 64 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + + 49 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
120
57
94

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + 89 + + cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
573
6813
873

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT 84 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6804

query I rowsort
SELECT ALL 53 AS col2 FROM tab2 GROUP BY tab2.col2
----
53
53
53

query I rowsort
SELECT ALL 7 AS col0 FROM tab0 GROUP BY col2
----
7
7
7

query I rowsort
SELECT - 77 FROM tab2 GROUP BY tab2.col2
----
-77
-77
-77

query I rowsort
SELECT ALL cor0.col2 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - 84 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-84
-84
-84

query I rowsort
SELECT 77 FROM tab0 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT + 37 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
37
37
37

query I rowsort
SELECT ALL - cor0.col1 * 58 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2552
-3306
-348

query I rowsort
SELECT ALL + tab2.col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT - 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-44
-44

query I rowsort
SELECT DISTINCT + 99 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
99

query I rowsort
SELECT - 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-81
-81
-81

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
43

query I rowsort
SELECT + cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
225
8281
8464

query I rowsort
SELECT 65 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT + 93 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
0
162

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + - COALESCE ( - 90, tab2.col2 ) FROM tab2 GROUP BY col1
----
90
90
90

onlyif mysql # DIV for integer division: 
query I rowsort label-1158
SELECT ALL + 14 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1158
SELECT ALL + 14 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + 86 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-1160
SELECT DISTINCT cor0.col0 DIV + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-1160
SELECT DISTINCT cor0.col0 / + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT - 98 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-98
-98

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT 38 FROM tab2 GROUP BY col2
----
38
38
38

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1166
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1166
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 62 + 8 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2
298
506

query I rowsort
SELECT DISTINCT - 59 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-59

query I rowsort
SELECT ALL - cor0.col1 + - ( - col1 ) FROM tab1 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 88 FROM tab0 AS cor0 GROUP BY cor0.col1
----
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 14 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 47 ) col1 FROM tab1 GROUP BY tab1.col1
----
47

query I rowsort
SELECT DISTINCT + 40 + ( - 72 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
-32

query I rowsort
SELECT - 36 AS col1 FROM tab0 GROUP BY tab0.col0
----
-36
-36
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 * col0 col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 58 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

query I rowsort
SELECT 36 FROM tab0 AS cor0 GROUP BY col1
----
36
36

onlyif mysql # DIV for integer division: 
query I rowsort label-1181
SELECT + - 83 DIV + col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-1181
SELECT + - 83 / + col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
-3

query I rowsort
SELECT ALL 25 FROM tab0 GROUP BY col1
----
25
25

query I rowsort
SELECT cor0.col2 * - cor0.col2 + + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, col0, col2
----
-1444
-495
-6241

query I rowsort
SELECT - 93 AS col0 FROM tab2 GROUP BY tab2.col0
----
-93
-93
-93

query I rowsort
SELECT - - 88 AS col2 FROM tab2 GROUP BY tab2.col0
----
88
88
88

query I rowsort
SELECT + col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT 25 FROM tab1 GROUP BY tab1.col1
----
25

query I rowsort
SELECT - 90 AS col2 FROM tab0 GROUP BY tab0.col1
----
-90
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-1189
SELECT ALL cor0.col0 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1189
SELECT ALL cor0.col0 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT 2 + + 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT DISTINCT + col2 + - tab1.col2 * + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1980
-4970
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 64 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT - 17 FROM tab1 AS cor0 GROUP BY col2, col2
----
-17
-17
-17

query I rowsort
SELECT tab0.col0 - + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT DISTINCT + 37 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
128
129
52

query I rowsort
SELECT - cor0.col0 + + 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-35
-36
41

query I rowsort
SELECT cor0.col0 * 84 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1848
2352
6888

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + 83 FROM tab1 AS cor0 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT + 98 AS col0 FROM tab1 GROUP BY tab1.col0
----
98
98
98

query I rowsort
SELECT - 94 FROM tab0 GROUP BY tab0.col2
----
-94
-94
-94

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT 49 AS col1 FROM tab0 GROUP BY tab0.col0
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + tab0.col1 col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL > NULL
----

query I rowsort
SELECT ALL - col0 + + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL - 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT ALL 81 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL + tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1212
SELECT ( cor0.col1 ) DIV - 10 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-33
-86

skipif mysql # not compatible
query I rowsort label-1212
SELECT ( cor0.col1 ) / - 10 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-33
-86

query I rowsort
SELECT ALL + - 71 AS col0 FROM tab0 GROUP BY tab0.col0
----
-71
-71
-71

query I rowsort
SELECT + 69 FROM tab0 GROUP BY tab0.col1
----
69
69

query I rowsort
SELECT ALL cor0.col1 + - 7 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-7
-7
74

query I rowsort
SELECT ALL 53 AS col2 FROM tab2 GROUP BY tab2.col1
----
53
53
53

query I rowsort
SELECT ALL cor0.col2 * col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT - 10 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT ALL 46 * 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2622
2622
2622

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-26
-43
-83

query I rowsort
SELECT col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-36
-36
-36

query I rowsort
SELECT col1 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
132
1596
3608

query I rowsort
SELECT ALL 15 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
15
15

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 73, - cor0.col2 * cor0.col0, 69 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
73

query I rowsort
SELECT + 47 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT DISTINCT 1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT + ( 21 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
21
21
21

query I rowsort
SELECT DISTINCT 84 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 4 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
176
228
24

query I rowsort
SELECT + 55 AS col0 FROM tab1 GROUP BY col1
----
55
55
55

query I rowsort
SELECT DISTINCT + 59 + 38 AS col1 FROM tab0 GROUP BY tab0.col0
----
97

query I rowsort
SELECT 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
80
80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1234
SELECT CAST( 40 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

skipif mysql # not compatible
query I rowsort label-1234
SELECT CAST ( 40 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT + 67 AS col1 FROM tab1 GROUP BY tab1.col2
----
67
67
67

query I rowsort
SELECT ALL - 99 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-18
-99
-99

query I rowsort
SELECT - 70 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-70
-70
-70

query I rowsort
SELECT col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 + cor0.col0 FROM tab1 cor0 GROUP BY col0, col0
----
506
6806
812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT 21 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - tab0.col2 + 24 AS col2 FROM tab0 GROUP BY tab0.col2
----
-14
-55
0

query I rowsort
SELECT ALL 87 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
87
87

query I rowsort
SELECT ALL 62 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 col1 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT ALL + 67 FROM tab1 GROUP BY col2
----
67
67
67

query I rowsort
SELECT ALL 16 - 23 FROM tab2 GROUP BY col2
----
-7
-7
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-1254
SELECT DISTINCT - 88 DIV 68 FROM tab0 GROUP BY col0
----
-1

skipif mysql # not compatible
query I rowsort label-1254
SELECT DISTINCT - 88 / 68 FROM tab0 GROUP BY col0
----
-1

query I rowsort
SELECT ALL + cor0.col0 * + 54 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1188
1512
4428

query I rowsort
SELECT cor0.col0 - - cor0.col2 * + ( + cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
1987
26
83

query I rowsort
SELECT ALL - tab2.col2 + 63 FROM tab2 GROUP BY tab2.col2
----
-16
-24
5

onlyif mysql # DIV for integer division: 
query I rowsort label-1258
SELECT DISTINCT + cor0.col2 DIV cor0.col0 - - cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1261
176
5822

skipif mysql # not compatible
query I rowsort label-1258
SELECT DISTINCT + cor0.col2 / cor0.col0 - - cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1261
176
5822

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-1944
0

query I rowsort
SELECT 46 AS col2 FROM tab2 GROUP BY tab2.col2
----
46
46
46

query I rowsort
SELECT cor0.col0 * + 50 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
1100
1400
4100

query I rowsort
SELECT ALL + cor0.col0 * + 15 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1365
1380
225

query I rowsort
SELECT DISTINCT + 23 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
23

query I rowsort
SELECT ALL - + 18 AS col2 FROM tab2 GROUP BY tab2.col0
----
-18
-18
-18

query I rowsort
SELECT - - 65 FROM tab1 GROUP BY col1
----
65
65
65

query I rowsort
SELECT 4 AS col2 FROM tab1 GROUP BY col1
----
4
4
4

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT ( 68 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT + 33 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
3003
3036
495

query I rowsort
SELECT 47 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 * - 92 col1 FROM tab2 AS cor0 GROUP BY col0
----
-6532
-6532
-6532

query I rowsort
SELECT DISTINCT + 80 FROM tab2 GROUP BY tab2.col2
----
80

query I rowsort
SELECT ALL 11 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
264
418
869

query I rowsort
SELECT 27 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT col1 * + 71 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5751

query I rowsort
SELECT cor0.col1 * + 92 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5428
5612

query I rowsort
SELECT 2 - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
17
93
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 col0 FROM tab2 AS cor0 GROUP BY col1
----
47
47
47

query I rowsort
SELECT DISTINCT 18 FROM tab1 GROUP BY col1
----
18

query I rowsort
SELECT ALL - 19 FROM tab0 GROUP BY tab0.col1
----
-19
-19

query I rowsort
SELECT DISTINCT - 44 AS col0 FROM tab2 GROUP BY tab2.col2
----
-44

query I rowsort
SELECT - 17 FROM tab2 GROUP BY tab2.col1
----
-17
-17
-17

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT + 13 FROM tab2 GROUP BY tab2.col2
----
13

query I rowsort
SELECT + 78 AS col2 FROM tab1 GROUP BY tab1.col1
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 82 AS col0 FROM tab1 GROUP BY tab1.col0
----
82
82
82

query I rowsort
SELECT + 70 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 cor0 GROUP BY col0, col1
----
41
59
61

query I rowsort
SELECT col0 * 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1456
1472
240

query I rowsort
SELECT col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 41 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
112
49
86

query I rowsort
SELECT 56 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT ALL + 65 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT DISTINCT - 44 FROM tab1 GROUP BY tab1.col0
----
-44

query I rowsort
SELECT + 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT + 45 * - 21 FROM tab0 GROUP BY tab0.col0
----
-945
-945
-945

query I rowsort
SELECT + 62 * cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
2772
3591
378

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT ALL + 94 FROM tab2 AS cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT - 95 + 62 FROM tab2 AS cor0 GROUP BY col1
----
-33
-33
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 52 col1 FROM tab1 GROUP BY tab1.col1
----
-52
-52
-52

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL + col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL - 53 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-134
-53

query I rowsort
SELECT - 55 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT 19 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - 72 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT 59 * 14 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
739
747
768

query I rowsort
SELECT - 0 * 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col0 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1260
-176
-5822

query I rowsort
SELECT tab2.col2 * + 64 FROM tab2 GROUP BY tab2.col2
----
3712
5056
5568

query I rowsort
SELECT DISTINCT + - ( 82 ) FROM tab1 GROUP BY tab1.col0
----
-82

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1320
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1320
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 17 * 51 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
867
867
867

query I rowsort
SELECT ALL 98 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT ALL 29 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

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 - cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT DISTINCT 53 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
53

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col0 + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 51 AS col2 FROM tab2 GROUP BY tab2.col0
----
51

query I rowsort
SELECT ALL - 85 + 80 FROM tab1 cor0 GROUP BY cor0.col1
----
-5
-5
-5

query I rowsort
SELECT ALL - 59 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2419
3481
3599

query I rowsort
SELECT ALL + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT 99 + + 33 FROM tab2 cor0 GROUP BY cor0.col1
----
132
132
132

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL - + 40 FROM tab1 GROUP BY tab1.col1
----
-40
-40
-40

query I rowsort
SELECT 47 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
47
47
47

query I rowsort
SELECT ALL + 37 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-81
0

query I rowsort
SELECT cor0.col0 * + cor0.col2 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, col1, cor0.col2
----
1366
5377
7248

query I rowsort
SELECT DISTINCT - - col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab1 GROUP BY tab1.col0
----
43

query I rowsort
SELECT + 8 AS col0 FROM tab0 GROUP BY tab0.col1
----
8
8

query I rowsort
SELECT ALL + 59 FROM tab2 GROUP BY tab2.col1
----
59
59
59

query I rowsort
SELECT ALL 41 FROM tab2 GROUP BY tab2.col1
----
41
41
41

query I rowsort
SELECT 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT cor0.col2 + + cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
153
30
73

query I rowsort
SELECT DISTINCT - 65 AS col2 FROM tab0 GROUP BY tab0.col0
----
-65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1354
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1354
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 80 + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-52
-58
2

query I rowsort
SELECT ALL cor0.col2 - 99 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5684
-7742
-8526

query I rowsort
SELECT 78 AS col2 FROM tab1 GROUP BY tab1.col1
----
78
78
78

query I rowsort
SELECT 13 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3
-3

query I rowsort
SELECT - 63 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-63
-63
-63

query I rowsort
SELECT ALL + + 5 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-130
-215
-415

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1366
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1366
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT 16 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
16
16
16

query I rowsort
SELECT 62 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
62
62
62

query I rowsort
SELECT cor0.col1 * - 74 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5994
0

query I rowsort
SELECT - COALESCE ( cor0.col0, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - cor0.col1 * - ( - 61 * cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-400221
0

query I rowsort
SELECT ALL - + tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - 98 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT 25 AS col1 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
25
25
25

query I rowsort
SELECT 46 + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
127
46

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT - tab0.col2 - 61 AS col0 FROM tab0 GROUP BY tab0.col2
----
-140
-85
-99

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 GROUP BY col2 HAVING NOT ( NULL ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + 85 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 6 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-6

query I rowsort
SELECT 44 FROM tab2 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT ALL + cor0.col0 * - 21 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1911
-1932
-315

query I rowsort
SELECT + 78 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4524
-6162
-6786

query I rowsort
SELECT + + 40 FROM tab0 GROUP BY col2
----
40
40
40

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT ALL + 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
10
10
10

query I rowsort
SELECT DISTINCT - + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-6561
0

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT + 71 * - col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-3124
-4047
-426

query I rowsort
SELECT - - col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - 19 AS col2 FROM tab2 GROUP BY col0
----
-19
-19
-19

query I rowsort
SELECT - - 1 AS col1 FROM tab2 GROUP BY col2
----
1
1
1

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT - 63 FROM tab2 cor0 GROUP BY cor0.col1
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT + 0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 28 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-28
-28
-28

query I rowsort
SELECT - 92 FROM tab0 AS cor0 GROUP BY col0
----
-92
-92
-92

query I rowsort
SELECT - 99 AS col0 FROM tab2 GROUP BY tab2.col2
----
-99
-99
-99

query I rowsort
SELECT DISTINCT - 21 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-21

query I rowsort
SELECT - 66 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-66
-66
-66

query I rowsort
SELECT 38 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1710
2698
304

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 89 + - tab1.col2 FROM tab1 GROUP BY col2
----
18
44
81

query I rowsort
SELECT ALL + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col2 - 73 * 15 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1024
-1050
-1087

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT + 34 AS col2 FROM tab2 GROUP BY tab2.col1
----
34

query I rowsort
SELECT 95 AS col2 FROM tab2 GROUP BY tab2.col1
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-1418
SELECT DISTINCT - + 29 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-1418
SELECT DISTINCT - + 29 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
0

query I rowsort
SELECT DISTINCT cor0.col1 * 64 FROM tab2 AS cor0 GROUP BY col1
----
2624
3776
3904

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT col1 + - COALESCE ( + 68, - cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-68
13

query I rowsort
SELECT ALL + + 27 FROM tab1 GROUP BY tab1.col1
----
27
27
27

query I rowsort
SELECT + cor0.col0 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT - col0 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 68 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1768
-2924
-5644

query I rowsort
SELECT ALL 98 FROM tab0 GROUP BY col2
----
98
98
98

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col2 * - tab1.col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT + col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 10 AS col0 FROM tab0 GROUP BY tab0.col2
----
-10
-10
-10

query I rowsort
SELECT ALL 10 FROM tab2 GROUP BY col0
----
10
10
10

query I rowsort
SELECT DISTINCT - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 13 col2 FROM tab0 GROUP BY tab0.col1
----
13

query I rowsort
SELECT ALL 91 FROM tab0 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT ALL - 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-45
-45
-45

query I rowsort
SELECT - ( + col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL - 82 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 53, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
53
53
53

query I rowsort
SELECT 28 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
28
28
28

query I rowsort
SELECT DISTINCT + ( + tab0.col2 ) * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - ( - 78 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
78

query I rowsort
SELECT DISTINCT - 34 FROM tab1 GROUP BY tab1.col0
----
-34

query I rowsort
SELECT cor0.col0 + cor0.col0 * - 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2378
-638
-812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL - - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL 89 FROM tab1 GROUP BY col0
----
89
89
89

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT + 60 FROM tab2 GROUP BY tab2.col1
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1, col0, cor0.col0
----
-3772
-5369
-915

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT - tab1.col2 FROM tab1 GROUP BY col2 HAVING ( NULL ) IS NULL
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 28 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
28

query I rowsort
SELECT DISTINCT col2 FROM tab0 cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT ALL 8 + - 57 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + 33 * - 63 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-2079

query I rowsort
SELECT 92 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT 6 * 31 + cor0.col0 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
411
8467
8650

query I rowsort
SELECT ALL - 41 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-41
-41
-41

query I rowsort
SELECT + col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT 21 FROM tab0 GROUP BY tab0.col1
----
21
21

query I rowsort
SELECT + ( - 27 ) * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-1188
-1539
-162

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT + 43 FROM tab2 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 59 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-59

query I rowsort
SELECT DISTINCT 82 FROM tab2 AS cor0 GROUP BY col0
----
82

query I rowsort
SELECT + 91 FROM tab1 GROUP BY tab1.col2
----
91
91
91

query I rowsort
SELECT DISTINCT cor0.col0 + + 71 FROM tab2 AS cor0 GROUP BY cor0.col0
----
162
163
86

query I rowsort
SELECT ALL + col1 - - 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
154
73

query I rowsort
SELECT - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - 53 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col0
----
-53
-53
-53
-53
-53
-53

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
41
59
61

query I rowsort
SELECT ALL 64 FROM tab1 GROUP BY tab1.col0
----
64
64
64

query I rowsort
SELECT 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
93
93

query I rowsort
SELECT ALL + ( + tab0.col0 ) - + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL + - 26 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-67
-85
-87

query I rowsort
SELECT DISTINCT 9 AS col1 FROM tab1 GROUP BY tab1.col2
----
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 * col2 col1 FROM tab0 GROUP BY tab0.col2
----
114
237
72

query I rowsort
SELECT DISTINCT 23 AS col2 FROM tab1 GROUP BY tab1.col2
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 col0 FROM tab1 GROUP BY tab1.col0
----
81
81
81

query I rowsort
SELECT 68 + + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
112
125
74

query I rowsort
SELECT + col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT ALL - cor0.col0 + 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-26
28
34

query I rowsort
SELECT ALL + 49 + 81 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
130
130
130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 15 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-15
-15

query I rowsort
SELECT ALL - + 7 FROM tab1 GROUP BY tab1.col2
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - 21 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1701
0

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL 74 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT ALL - + 62 AS col2 FROM tab0 GROUP BY tab0.col1
----
-62
-62

query I rowsort
SELECT + 48 AS col0 FROM tab2 GROUP BY col1
----
48
48
48

query I rowsort
SELECT 38 FROM tab2 GROUP BY tab2.col1
----
38
38
38

query I rowsort
SELECT - - 32 + 10 AS col1 FROM tab2 GROUP BY tab2.col1
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + 46 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
104
125
133

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 19 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
19
19
19

query I rowsort
SELECT DISTINCT - - 30 AS col1 FROM tab1 GROUP BY tab1.col2
----
30

query I rowsort
SELECT cor0.col0 * 88 + 23 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1959
2487
7239

query I rowsort
SELECT + col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 56 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-5096
-5152
-840

query I rowsort
SELECT DISTINCT cor0.col1 + - 38 * 94 FROM tab0 AS cor0 GROUP BY col1
----
-3491
-3572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 col2 FROM tab1 GROUP BY tab1.col2
----
89

query I rowsort
SELECT + col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT 28 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT - 80 FROM tab2 cor0 GROUP BY cor0.col1
----
-80
-80
-80

query I rowsort
SELECT ALL - cor0.col2 - - 7 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-51
-72
-80

query I rowsort
SELECT ALL 25 + + 13 FROM tab1 cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT ALL - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
17

query I rowsort
SELECT ALL 65 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT - 71 AS col1 FROM tab1 GROUP BY tab1.col2
----
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + CASE - 80 WHEN tab2.col1 THEN - 83 END col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 73 col0 FROM tab0 GROUP BY tab0.col0
----
73
73
73

query I rowsort
SELECT ALL + 95 FROM tab1 AS cor0 GROUP BY cor0.col1
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-1523
SELECT ALL - cor0.col0 DIV 55 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1523
SELECT ALL - cor0.col0 / 55 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
0

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1527
SELECT DISTINCT + cor0.col0 DIV + 7 FROM tab2 AS cor0 GROUP BY cor0.col0
----
13
2

skipif mysql # not compatible
query I rowsort label-1527
SELECT DISTINCT + cor0.col0 / + 7 FROM tab2 AS cor0 GROUP BY cor0.col0
----
13
2

query I rowsort
SELECT ALL - 3 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3
-3
-3

query I rowsort
SELECT 8 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
8
8
8

query I rowsort
SELECT - + col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - 18 AS col2 FROM tab2 GROUP BY col1
----
-18
-18
-18

query I rowsort
SELECT DISTINCT cor0.col2 + 14 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
59
85

query I rowsort
SELECT cor0.col0 + 82 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
173
174
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + 73 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 + - col0 col2 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT + 29 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT + 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - 42 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-42
-42
-42

query I rowsort
SELECT - cor0.col0 + 39 FROM tab2 cor0 GROUP BY cor0.col0
----
-52
-53
24

query I rowsort
SELECT DISTINCT cor0.col2 - - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT - 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-71
-71
-71

query I rowsort
SELECT ALL - 45 FROM tab1 GROUP BY tab1.col2
----
-45
-45
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - 57 FROM tab0 GROUP BY col1
----
-57
-57

query I rowsort
SELECT DISTINCT + cor0.col2 * + 73 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4176
5688
6264

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL 16 FROM tab2 cor0 GROUP BY cor0.col1
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - 29 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT - 11 FROM tab0 GROUP BY tab0.col2
----
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL 67 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
67
67
67

query I rowsort
SELECT DISTINCT + 27 + + 52 FROM tab1 AS cor0 GROUP BY cor0.col2
----
79

query I rowsort
SELECT ALL + 9 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
9
9
9

query I rowsort
SELECT DISTINCT 17 + col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
100
43
60

query I rowsort
SELECT + cor0.col2 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
153
30
73

query I rowsort
SELECT - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 1 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 13 FROM tab1 GROUP BY tab1.col0
----
13

query I rowsort
SELECT 82 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT 10 * + 8 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT + 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - 99 FROM tab2 GROUP BY col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 2 FROM tab0 GROUP BY tab0.col0
----
2

query I rowsort
SELECT + 37 AS col2 FROM tab1 GROUP BY tab1.col2
----
37
37
37

query I rowsort
SELECT DISTINCT cor0.col0 - 78 * 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-5066
-5120
-5126

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 69 col0 FROM tab0 cor0 GROUP BY col1
----
-69

query I rowsort
SELECT DISTINCT + + 51 FROM tab1 GROUP BY tab1.col0
----
51

query I rowsort
SELECT + 41 FROM tab1 GROUP BY tab1.col2
----
41
41
41

query I rowsort
SELECT - 99 AS col1 FROM tab0 GROUP BY tab0.col2
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + tab0.col2 + + tab0.col2 * - tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-1406
-552
-6162

query I rowsort
SELECT + 74 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - cor0.col0 col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - + tab1.col0 + - 66 AS col2 FROM tab1 GROUP BY tab1.col0
----
-148
-88
-94

query I rowsort
SELECT + 37 FROM tab2 GROUP BY col1
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-1587
SELECT DISTINCT - - 45 DIV - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-3
0

skipif mysql # not compatible
query I rowsort label-1587
SELECT DISTINCT - - 45 / - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-3
0

query I rowsort
SELECT DISTINCT 82 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
82

query I rowsort
SELECT ALL + + 10 AS col2 FROM tab0 GROUP BY tab0.col0
----
10
10
10

query I rowsort
SELECT ALL + 14 AS col2 FROM tab2 GROUP BY tab2.col0
----
14
14
14

query I rowsort
SELECT DISTINCT 87 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
87

query I rowsort
SELECT - 27 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-27
-27
-27

query I rowsort
SELECT + ( + 19 ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
19
19
19

query I rowsort
SELECT ALL - 4 AS col1 FROM tab2 GROUP BY col0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + 64 FROM tab0 GROUP BY col0
----
64

query I rowsort
SELECT + col0 + ( + cor0.col0 - - cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col0
----
273
276
45

query I rowsort
SELECT DISTINCT + 67 * 91 + + col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
6105
6142
6168

query I rowsort
SELECT DISTINCT - 33 FROM tab0 GROUP BY tab0.col2
----
-33

query I rowsort
SELECT ALL - + tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 76 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col1
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 71 col1 FROM tab2 GROUP BY tab2.col1
----
-71
-71
-71

query I rowsort
SELECT ALL + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab2 GROUP BY col1
----
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 71 col0 FROM tab1 GROUP BY col1
----
-71
-71
-71

query I rowsort
SELECT DISTINCT - 95 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-95

query I rowsort
SELECT ( ( 4 ) ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT DISTINCT tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-1608
SELECT cor0.col0 DIV - cor0.col0 - + col0 * 45 FROM tab2 AS cor0 GROUP BY col0
----
-4096
-4141
-676

skipif mysql # not compatible
query I rowsort label-1608
SELECT cor0.col0 / - cor0.col0 - + col0 * 45 FROM tab2 AS cor0 GROUP BY col0
----
-4096
-4141
-676

query I rowsort
SELECT ( cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 * - tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
66
66

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col2
----
15
91
92

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT COALESCE ( + 74, cor0.col2 - cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col0 HAVING NULL IS NULL
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT 69 AS col0 FROM tab2 GROUP BY tab2.col1
----
69
69
69

query I rowsort
SELECT DISTINCT - 47 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-47

query I rowsort
SELECT + - col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1621
SELECT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1621
SELECT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
81

query I rowsort
SELECT + - 84 AS col2 FROM tab1 GROUP BY tab1.col0
----
-84
-84
-84

query I rowsort
SELECT ALL cor0.col1 * + 81 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 86 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
86
86
86

query I rowsort
SELECT DISTINCT - 57 FROM tab2 GROUP BY tab2.col2
----
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 72 AS col1 FROM tab1 GROUP BY col1
----
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + COALESCE ( - col2, tab0.col2, - 17 ) + + 9 col2 FROM tab0 GROUP BY tab0.col2
----
-15
-29
-70

query I rowsort
SELECT - ( 94 ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-94
-94
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-1633
SELECT 67 DIV 9 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
7
7
7

skipif mysql # not compatible
query I rowsort label-1633
SELECT 67 / 9 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
7
7
7

query I rowsort
SELECT 56 FROM tab0 GROUP BY tab0.col2
----
56
56
56

query I rowsort
SELECT 32 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT + 73 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
73

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - + ( + 39 ) + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-39
42

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT + 43 AS col2 FROM tab0 GROUP BY col2
----
43

query I rowsort
SELECT + cor0.col1 * col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6561

query I rowsort
SELECT + col0 + 3 FROM tab2 GROUP BY col0
----
18
94
95

query I rowsort
SELECT + 65 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
65
65

query I rowsort
SELECT 40 FROM tab2 AS cor0 GROUP BY cor0.col1
----
40
40
40

query I rowsort
SELECT - cor0.col1 * 44 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-2508
-264

query I rowsort
SELECT + 96 AS col1 FROM tab1 GROUP BY tab1.col1
----
96
96
96

query I rowsort
SELECT DISTINCT + + 30 AS col2 FROM tab1 GROUP BY tab1.col1
----
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL - - 71 FROM tab2 GROUP BY tab2.col2
----
71
71
71

query I rowsort
SELECT DISTINCT + 94 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4136
5358
564

query I rowsort
SELECT ALL 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
41

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - 90 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-90

query I rowsort
SELECT DISTINCT 62 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
62

query I rowsort
SELECT ALL 32 - - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
111
119
90

query I rowsort
SELECT DISTINCT - + 6 * tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-264
-342
-36

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 86 col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 83 col1 FROM tab0 GROUP BY tab0.col2
----
-83
-83
-83

query I rowsort
SELECT DISTINCT + 86 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86

query I rowsort
SELECT DISTINCT + cor0.col1 - - 80 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
121
139
141

query I rowsort
SELECT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + + 28 col0 FROM tab0 AS cor0 GROUP BY col2
----
107
52
66

query I rowsort
SELECT + 27 + cor0.col1 * - 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2657
-339
-3450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 col1 FROM tab0 AS cor0 GROUP BY col0
----
23

query I rowsort
SELECT + 5 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col1 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
133
150
76

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT DISTINCT + cor0.col2 * 7 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
168
266
553

query I rowsort
SELECT col2 FROM tab0 WHERE NULL IS NOT NULL GROUP BY col2
----

query I rowsort
SELECT + cor0.col1 - - 98 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4059
5841
6039

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col2 + - 21 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1832
-1874
-228

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-1681
SELECT ALL - 8 DIV - 87 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1681
SELECT ALL - 8 / - 87 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + ( 40 ) * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1800
2840
320

query I rowsort
SELECT - 97 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col2
----
-97
-97
-97

query I rowsort
SELECT + cor0.col0 * - 69 + + 16 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-1019
-6263
-6332

query I rowsort
SELECT DISTINCT + - tab2.col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT ALL + col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - cor0.col2 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-1032
-2054
-3154

query I rowsort
SELECT 7 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
7
7

onlyif mysql # DIV for integer division: 
query I rowsort label-1691
SELECT + cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1691
SELECT + cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - 86 AS col0 FROM tab0 GROUP BY tab0.col1
----
-86
-86

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT 56 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 61 col1 FROM tab0 GROUP BY col1
----
61

query I rowsort
SELECT + 87 FROM tab2 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT DISTINCT - cor0.col2 * 81 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-4698
-6399
-7047

query I rowsort
SELECT ALL 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT - 37 FROM tab1 AS cor0 GROUP BY col1
----
-37
-37
-37

query I rowsort
SELECT - 24 FROM tab1 GROUP BY tab1.col0
----
-24
-24
-24

query I rowsort
SELECT 83 + + 45 FROM tab1 GROUP BY tab1.col2
----
128
128
128

query I rowsort
SELECT DISTINCT + cor0.col1 * 44 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3564

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT - - tab2.col2 - ( + 42 ) AS col0 FROM tab2 GROUP BY col2
----
16
37
45

query I rowsort
SELECT + col2 * + col2 AS col0 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL + 68 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-13
68

query I rowsort
SELECT ALL - 25 AS col1 FROM tab0 GROUP BY tab0.col1
----
-25
-25

query I rowsort
SELECT ALL + + 51 - 14 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT 25 FROM tab0 GROUP BY tab0.col2
----
25

query I rowsort
SELECT 17 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
17
17
17

query I rowsort
SELECT ALL - - ( + 63 ) * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1638
2709
5229

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1714
SELECT - CAST( 14 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14
-14

skipif mysql # not compatible
query I rowsort label-1714
SELECT - CAST ( 14 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14
-14

query I rowsort
SELECT DISTINCT 21 FROM tab0 AS cor0 GROUP BY cor0.col1
----
21

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-1717
SELECT tab0.col2 DIV + col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1717
SELECT tab0.col2 / + col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT ALL 26 * 12 FROM tab2 GROUP BY tab2.col2
----
312
312
312

query I rowsort
SELECT ALL + 77 AS col0 FROM tab1 GROUP BY tab1.col2
----
77
77
77

query I rowsort
SELECT - 5 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col0
----
0
0
81

query I rowsort
SELECT DISTINCT - + 71 FROM tab2 GROUP BY tab2.col2
----
-71

query I rowsort
SELECT DISTINCT - + ( + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-1724
SELECT ALL - - 22 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-1724
SELECT ALL - - 22 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-3
0
0

query I rowsort
SELECT ALL + + ( + 98 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
98
98
98

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + 3 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 col1 FROM tab1 GROUP BY col2
----
70
70
70

query I rowsort
SELECT - 63 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col2
----
-63
-63
-63

query I rowsort
SELECT ALL 84 FROM tab2 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT ALL + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + - 0 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT col1 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-1737
SELECT - cor0.col0 DIV + 23 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-1737
SELECT - cor0.col0 / + 23 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-1
-3
0

query I rowsort
SELECT + 3 + 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + 12 FROM tab2 AS cor0 GROUP BY cor0.col2
----
12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1741
SELECT + CAST( col0 AS SIGNED ) * - cor0.col0 + - col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1892
-6972
-702

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1741
SELECT + CAST ( col0 AS INTEGER ) * - cor0.col0 + - col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1892
-6972
-702

onlyif mysql # DIV for integer division: 
query I rowsort label-1742
SELECT - tab0.col1 DIV + 84 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-1742
SELECT - tab0.col1 / + 84 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ( - col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 + + 93 FROM tab2 AS cor0 GROUP BY cor0.col1
----
134
152
154

query I rowsort
SELECT DISTINCT + 6 FROM tab2 GROUP BY tab2.col1
----
6

query I rowsort
SELECT DISTINCT + 30 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
2430

query I rowsort
SELECT ALL 24 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
24
24
24

query I rowsort
SELECT ALL 2 + - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6559
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 13 col2 FROM tab0 GROUP BY col0
----
13

query I rowsort
SELECT - 12 FROM tab0 GROUP BY tab0.col0
----
-12
-12
-12

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT DISTINCT - cor0.col0 - + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT ALL + 56 FROM tab1 AS cor0 GROUP BY cor0.col2
----
56
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-1756
SELECT DISTINCT - col0 DIV + ( 77 ) + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
43
57
6

skipif mysql # not compatible
query I rowsort label-1756
SELECT DISTINCT - col0 / + ( 77 ) + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
43
57
6

query I rowsort
SELECT - cor0.col1 * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col1 + 93 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
174
93

query I rowsort
SELECT cor0.col0 - + col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-14
-1854
-3221

query I rowsort
SELECT ALL - 22 AS col1 FROM tab0 GROUP BY tab0.col2
----
-22
-22
-22

query I rowsort
SELECT - 83 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-83
-83
-83

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL + 17 AS col1 FROM tab0 GROUP BY tab0.col0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
69
69
69

query I rowsort
SELECT 8 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT col0 * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40
40
40

onlyif mysql # DIV for integer division: 
query I rowsort label-1769
SELECT - cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1769
SELECT - cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT cor0.col1 + - 68 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-11
-24
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 * - 62 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-5022
0

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL + 17 AS col1 FROM tab2 GROUP BY tab2.col0
----
17
17
17

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1777
SELECT ALL cor0.col2 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1777
SELECT ALL cor0.col2 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 93 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT ALL + 71 FROM tab2 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT - 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-85
-85
-85

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1785
SELECT ALL CAST( NULL AS SIGNED ) / 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1785
SELECT ALL CAST ( NULL AS INTEGER ) / 78 AS col0 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 - 12 * - ( cor0.col1 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
972

query I rowsort
SELECT + 8 FROM tab2 GROUP BY tab2.col1
----
8
8
8

query I rowsort
SELECT + + 73 FROM tab2 GROUP BY tab2.col1
----
73
73
73

query I rowsort
SELECT ( - 35 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-35
-35
-35

query I rowsort
SELECT ( col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL 89 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
89
89
89

query I rowsort
SELECT ALL + 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
95
95
95

query I rowsort
SELECT 49 FROM tab0 cor0 GROUP BY cor0.col2
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 col0 FROM tab1 GROUP BY tab1.col1
----
-51
-51
-51

query I rowsort
SELECT - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT - 73 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5913
0

query I rowsort
SELECT ALL + 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT - 49 AS col2 FROM tab0 GROUP BY tab0.col2
----
-49
-49
-49

query I rowsort
SELECT DISTINCT ( + 48 ) FROM tab1 GROUP BY tab1.col0
----
48

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

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 - 38 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-38
-38
-38

query I rowsort
SELECT DISTINCT 80 FROM tab0 AS cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT ALL 48 AS col2 FROM tab1 GROUP BY tab1.col1
----
48
48
48

query I rowsort
SELECT DISTINCT - 40 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 69 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY col0, col1, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + 93 FROM tab0 AS cor0 GROUP BY cor0.col2
----
93

query I rowsort
SELECT DISTINCT - 38 + - cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1887
-6927
-714

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( cor0.col0 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + + 52 FROM tab1 GROUP BY col1
----
52
52
52

query I rowsort
SELECT + 33 FROM tab2 GROUP BY tab2.col2
----
33
33
33

query I rowsort
SELECT DISTINCT + 13 * - 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col1
----
-884

query I rowsort
SELECT DISTINCT - 79 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-79

query I rowsort
SELECT ALL - 80 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-80
-80
-80

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 21 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-21
-21
-21

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT - + 25 FROM tab2 GROUP BY tab2.col1
----
-25
-25
-25

query I rowsort
SELECT ALL - cor0.col0 - 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-141
-81
-87

query I rowsort
SELECT col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT + 2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2

query I rowsort
SELECT DISTINCT 56 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + 78 * cor0.col0 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
1185
7189
7268

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1831
SELECT DISTINCT CAST( NULL AS DECIMAL ) + 5 * 58 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1831
SELECT DISTINCT CAST ( NULL AS REAL ) + 5 * 58 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 68 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-68
-68
-68

query I rowsort
SELECT ALL col0 * col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT cor0.col0 * 18 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1638
1656
270

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
17
20
26

query I rowsort
SELECT ALL - - col0 AS col1 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 69 FROM tab0 GROUP BY col1
----
69
69

query I rowsort
SELECT ALL 66 FROM tab2 GROUP BY tab2.col0
----
66
66
66

onlyif mysql # DIV for integer division: 
query I rowsort label-1840
SELECT - - tab0.col0 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1840
SELECT - - tab0.col0 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT - cor0.col0 - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-164
-44
-56

query I rowsort
SELECT cor0.col2 + ( 29 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col2
----
100
100
37
37
74
74

query I rowsort
SELECT ALL tab2.col2 * 19 AS col2 FROM tab2 GROUP BY tab2.col2
----
1102
1501
1653

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 col2 FROM tab1 GROUP BY col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1846
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1846
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL + 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT ALL + tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT 45 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
45
45
45

onlyif mysql # DIV for integer division: 
query I rowsort label-1851
SELECT ALL tab1.col0 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1851
SELECT ALL tab1.col0 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1852
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1852
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
-3483
0

query I rowsort
SELECT - col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1855
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1855
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 col2 FROM tab2 GROUP BY tab2.col2
----
41
41
41

onlyif mysql # DIV for integer division: 
query I rowsort label-1857
SELECT ALL + tab0.col2 DIV - 27 col0 FROM tab0 GROUP BY col2
----
-1
-2
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1857
SELECT ALL + tab0.col2 / - 27 col0 FROM tab0 GROUP BY col2
----
-1
-2
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1858
SELECT ALL - cor0.col1 DIV - 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1858
SELECT ALL - cor0.col1 / - 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
1

query I rowsort
SELECT - 60 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-60
-60

query I rowsort
SELECT col2 + + 18 AS col1 FROM tab0 GROUP BY col2
----
42
56
97

query I rowsort
SELECT DISTINCT col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT col0 * + 67 FROM tab0 GROUP BY tab0.col0
----
1742
2881
5561

query I rowsort
SELECT 94 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0, cor0.col2
----
11
51
68

query I rowsort
SELECT + - 85 FROM tab0 GROUP BY tab0.col1
----
-85
-85

query I rowsort
SELECT - 44 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT 13 FROM tab0 GROUP BY tab0.col2
----
13

query I rowsort
SELECT DISTINCT - 74 + + 61 FROM tab1 GROUP BY tab1.col2
----
-13

query I rowsort
SELECT ALL - - NULLIF ( 40, tab2.col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
40
40
40

query I rowsort
SELECT ALL + 81 AS col2 FROM tab1 GROUP BY tab1.col0
----
81
81
81

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT DISTINCT - 94 FROM tab0 GROUP BY tab0.col1
----
-94

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1874
SELECT DISTINCT + + CAST( 51 AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col2
----
51

skipif mysql # not compatible
query I rowsort label-1874
SELECT DISTINCT + + CAST ( 51 AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col2
----
51

query I rowsort
SELECT - 41 * 18 AS col0 FROM tab0 GROUP BY tab0.col1
----
-738
-738

query I rowsort
SELECT + 6 FROM tab2 GROUP BY tab2.col1
----
6
6
6

query I rowsort
SELECT ALL 4 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
112
328
88

query I rowsort
SELECT 44 * - tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
-1056
-1672
-3476

query I rowsort
SELECT DISTINCT + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 + + 68 FROM tab2 AS cor0 GROUP BY col2
----
-3296
-6173
-7501

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT - ( + 89 ) FROM tab2 GROUP BY tab2.col2
----
-89
-89
-89

query I rowsort
SELECT DISTINCT col1 + cor0.col0 * + 38 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1715
3154
988

query I rowsort
SELECT 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT 78 - + cor0.col2 * 76 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1746
-2810
-5926

query I rowsort
SELECT - 49 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-49
-49
-49

query I rowsort
SELECT ALL 94 * + 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1316
1316

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-1889
SELECT cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1889
SELECT cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 18 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
18
18
18

query I rowsort
SELECT 68 + 64 FROM tab1 AS cor0 GROUP BY cor0.col2
----
132
132
132

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-1893
SELECT - cor0.col2 DIV - cor0.col1 + cor0.col2 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3123
-47

skipif mysql # not compatible
query I rowsort label-1893
SELECT - cor0.col2 / - cor0.col1 + cor0.col2 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3123
-47

onlyif mysql # DIV for integer division: 
query I rowsort label-1894
SELECT + cor0.col0 DIV - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1894
SELECT + cor0.col0 / - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + 12 FROM tab0 GROUP BY tab0.col1
----
12
12

query I rowsort
SELECT ALL 2 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 9 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-35
-48
3

query I rowsort
SELECT ALL + 3 FROM tab0 GROUP BY tab0.col1
----
3
3

query I rowsort
SELECT DISTINCT 16 FROM tab0 GROUP BY tab0.col1
----
16

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - - 2 FROM tab1 GROUP BY tab1.col1
----
2
2
2

query I rowsort
SELECT + cor0.col2 + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col0 + cor0.col1 * + 21 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1006
1225
148

query I rowsort
SELECT 43 FROM tab1 AS cor0 GROUP BY cor0.col0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 49 AS col0 FROM tab0 GROUP BY col2
----
49
49
49

query I rowsort
SELECT 14 * col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
616
798
84

query I rowsort
SELECT ALL + 35 FROM tab2 GROUP BY tab2.col0
----
35
35
35

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-1911
SELECT DISTINCT cor0.col0 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-1911
SELECT DISTINCT cor0.col0 / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1

query I rowsort
SELECT cor0.col2 * 83 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3735
5893
664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT - cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 15 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-15
-15
-15

query I rowsort
SELECT ALL 62 + col2 FROM tab1 GROUP BY tab1.col2
----
107
133
70

query I rowsort
SELECT - cor1.col0 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT 17 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
17
17
17

query I rowsort
SELECT ALL + 58 AS col1 FROM tab0 GROUP BY tab0.col2
----
58
58
58

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 + - 27 * 75 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
-344
1456
1696

query I rowsort
SELECT DISTINCT 15 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15

query I rowsort
SELECT DISTINCT + 49 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT DISTINCT - cor0.col1 - 95 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-176
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col2 FROM tab0 AS cor0 GROUP BY col1
----
-13
-13

query I rowsort
SELECT cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 6 col0 FROM tab2 GROUP BY tab2.col0
----
6
6
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1929
SELECT cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1929
SELECT cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 35 FROM tab1 cor0 GROUP BY cor0.col2
----
35

query I rowsort
SELECT DISTINCT 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

query I rowsort
SELECT 79 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
79
79

query I rowsort
SELECT - + 8 AS col1 FROM tab0 GROUP BY tab0.col0
----
-8
-8
-8

query I rowsort
SELECT - ( - 94 ) FROM tab1 GROUP BY tab1.col0
----
94
94
94

query I rowsort
SELECT DISTINCT - 18 FROM tab2 AS cor0 GROUP BY col0
----
-18

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1938
SELECT CAST( NULL AS DECIMAL ) * + cor0.col1 + + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1938
SELECT CAST ( NULL AS REAL ) * + cor0.col1 + + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 4 FROM tab0 AS cor0 GROUP BY col1
----
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + 93 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT DISTINCT 35 FROM tab2 cor0 GROUP BY cor0.col1
----
35

onlyif mysql # DIV for integer division: 
query I rowsort label-1943
SELECT - cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1943
SELECT - cor0.col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1
1
1

query I rowsort
SELECT tab0.col1 + 6 FROM tab0 GROUP BY tab0.col1
----
6
87

query I rowsort
SELECT ALL - 60 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-32
-38
22

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT - cor0.col1 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT DISTINCT - cor0.col2 * 41 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1558
-3239
-984

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-41
-59
-61

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + 18 FROM tab0 GROUP BY tab0.col0
----
18

query I rowsort
SELECT DISTINCT - 40 FROM tab0 GROUP BY tab0.col2
----
-40

query I rowsort
SELECT ALL 76 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
167
168
91

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT cor0.col0 + cor0.col2 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1320
5428
7280

query I rowsort
SELECT ALL + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - tab0.col1 * 42 AS col0 FROM tab0 GROUP BY tab0.col1
----
-3402
0

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + 96 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
96
96

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + 12 FROM tab1 AS cor0 GROUP BY col1
----
12
12
12

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 + + 88 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
27
29
47

query I rowsort
SELECT DISTINCT + tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
-22
-28
-82

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 19 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
101
41
47

query I rowsort
SELECT ALL 62 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
2542
3658
3782

query I rowsort
SELECT + 91 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
91
91
91

query I rowsort
SELECT - 85 FROM tab0 GROUP BY col0
----
-85
-85
-85

query I rowsort
SELECT + 90 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2340
3870
7470

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1973
SELECT DISTINCT - CAST( - 98 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
98

skipif mysql # not compatible
query I rowsort label-1973
SELECT DISTINCT - CAST ( - 98 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT ALL + 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
33
33
33

query I rowsort
SELECT DISTINCT 95 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
95

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL - 97 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-97
-97
-97

query I rowsort
SELECT - + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col1 + + 16 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
22
60
73

query I rowsort
SELECT - 85 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-85
-85
-85

query I rowsort
SELECT 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT ALL + 45 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
45
45
45

query I rowsort
SELECT - + ( tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 29 FROM tab1 cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT + 99 * + 61 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
6039
6039
6120

query I rowsort
SELECT DISTINCT 72 FROM tab1 GROUP BY col1
----
72

query I rowsort
SELECT - - 98 AS col2 FROM tab0 GROUP BY tab0.col2
----
98
98
98

query I rowsort
SELECT ALL ( col0 ) * cor0.col0 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
210
8190
8372

query I rowsort
SELECT ALL 43 FROM tab0 AS cor0 GROUP BY cor0.col1
----
43
43

query I rowsort
SELECT ALL 20 FROM tab0 AS cor0 GROUP BY cor0.col1
----
20
20

query I rowsort
SELECT 41 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76

query I rowsort
SELECT 98 AS col1 FROM tab0 GROUP BY tab0.col1
----
98
98

query I rowsort
SELECT + + 38 FROM tab0 GROUP BY tab0.col1
----
38
38

query I rowsort
SELECT ALL ( cor0.col0 ) + + cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

onlyif mysql # DIV for integer division: 
query I rowsort label-1997
SELECT DISTINCT tab0.col1 DIV 61 FROM tab0 GROUP BY tab0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-1997
SELECT DISTINCT tab0.col1 / 61 FROM tab0 GROUP BY tab0.col1
----
0
1

query I rowsort
SELECT DISTINCT + + 77 FROM tab0 GROUP BY tab0.col1
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 39 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT + + 43 FROM tab2 GROUP BY tab2.col1
----
43
43
43

query I rowsort
SELECT ALL - col2 * cor0.col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

query I rowsort
SELECT ALL + 15 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT - + ( col0 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - col0 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-153
-30
-73

query I rowsort
SELECT - - 63 AS col2 FROM tab0 GROUP BY tab0.col2
----
63
63
63

query I rowsort
SELECT 70 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1540
1960
5740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL + - 8 + + col2 FROM tab0 GROUP BY tab0.col2
----
16
30
71

query I rowsort
SELECT ALL - 46 AS col0 FROM tab0 GROUP BY tab0.col0
----
-46
-46
-46

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT ALL + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT 69 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT 33 + tab2.col2 FROM tab2 GROUP BY col2
----
112
120
91

query I rowsort
SELECT - 53 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT 85 FROM tab2 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
85
85
85

query I rowsort
SELECT DISTINCT 69 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
69

query I rowsort
SELECT cor0.col0 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY col2, col1
----
24
38
79

query I rowsort
SELECT + 24 FROM tab2 AS cor0 GROUP BY col1
----
24
24
24

query I rowsort
SELECT - cor0.col0 + ( + 24 - + cor0.col0 ) FROM tab1 cor0 GROUP BY col0
----
-140
-20
-32

query I rowsort
SELECT ALL + 4 FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT ALL - tab2.col1 * + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + cor0.col0 - 61 FROM tab2 cor0 GROUP BY cor0.col0
----
-46
30
31

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col0 - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 56 * cor0.col1 + 65 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-729
0

query I rowsort
SELECT - 7 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-7
-7
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-2033
SELECT cor0.col1 * - cor0.col1 - col0 DIV - 10 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-1672
-3472
-3720

skipif mysql # not compatible
query I rowsort label-2033
SELECT cor0.col1 * - cor0.col1 - col0 / - 10 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-1672
-3472
-3720

query I rowsort
SELECT DISTINCT - 40 FROM tab2 GROUP BY tab2.col1
----
-40

query I rowsort
SELECT DISTINCT - 1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 39 FROM tab0 AS cor0 GROUP BY cor0.col1
----
39
39

query I rowsort
SELECT ALL + 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
114
12
88

query I rowsort
SELECT + cor0.col1 + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-2043
SELECT ALL - 22 DIV cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2043
SELECT ALL - 22 / cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT 94 FROM tab0 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT - col0 - col0 FROM tab2 GROUP BY col0 HAVING NULL IS NULL
----
-182
-184
-30

query I rowsort
SELECT DISTINCT cor0.col1 / cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - 58 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-2610
-4118
-464

query I rowsort
SELECT 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT + 90 FROM tab2 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + + 92 AS col1 FROM tab2 GROUP BY tab2.col2
----
92

query I rowsort
SELECT - 78 AS col0 FROM tab0 GROUP BY col1
----
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - 32 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2592
0
0

query I rowsort
SELECT col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 55 + + 21 FROM tab1 AS cor0 GROUP BY col2, col2
----
-34
-34
-34

query I rowsort
SELECT - 13 FROM tab0 cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT - 26 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2106
0
0

query I rowsort
SELECT ALL 88 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col1
----
88
88
88

query I rowsort
SELECT - 35 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-35
-35
-35

query I rowsort
SELECT - ( - 48 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
48
48
48

query I rowsort
SELECT ( 17 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT 3 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3
84

query I rowsort
SELECT 13 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-60
-60
-60

query I rowsort
SELECT DISTINCT 63 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
63

query I rowsort
SELECT 84 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT ALL + 60 AS col0 FROM tab0 GROUP BY tab0.col0
----
60
60
60

query I rowsort
SELECT DISTINCT - tab0.col1 * 7 AS col1 FROM tab0 GROUP BY tab0.col1
----
-567
0

query I rowsort
SELECT 72 FROM tab1 GROUP BY tab1.col1
----
72
72
72

query I rowsort
SELECT - + 10 AS col0 FROM tab1 GROUP BY tab1.col1
----
-10
-10
-10

query I rowsort
SELECT + + 7 * + 87 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
609
609
609

query I rowsort
SELECT DISTINCT 89 FROM tab2 GROUP BY tab2.col2
----
89

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
81

query I rowsort
SELECT ALL 56 FROM tab1 cor0 GROUP BY col2
----
56
56
56

query I rowsort
SELECT DISTINCT - col1 * - 95 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7695

onlyif mysql # DIV for integer division: 
query I rowsort label-2077
SELECT ALL - - cor0.col1 - 91 DIV cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-9
42
56

skipif mysql # not compatible
query I rowsort label-2077
SELECT ALL - - cor0.col1 - 91 / cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-9
42
56

query I rowsort
SELECT - col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT col1 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-44
-57
-6

query I rowsort
SELECT - 82 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT + 75 * + 2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
150

query I rowsort
SELECT DISTINCT cor0.col1 + + 9 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
9
90

query I rowsort
SELECT ( 45 ) * - col2 + + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-1980
-3124
-352

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2088
SELECT ALL CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2088
SELECT ALL CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 - - cor0.col0 * 50 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1326
2193
4233

query I rowsort
SELECT + + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 20 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
111
112
35

query I rowsort
SELECT ALL tab2.col0 + + 93 FROM tab2 GROUP BY col0
----
108
184
185

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col1, - cor0.col1 ) + 74 FROM tab1 AS cor0 GROUP BY cor0.col1
----
118
131
80

query I rowsort
SELECT ALL 25 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
25
25
25

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2095
SELECT DISTINCT col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col2, cor0.col2, col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2095
SELECT DISTINCT col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col2, cor0.col2, col0
----
NULL

query I rowsort
SELECT ALL 58 FROM tab2 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT + - 25 FROM tab0 GROUP BY tab0.col2
----
-25

query I rowsort
SELECT - 64 FROM tab1 GROUP BY tab1.col2
----
-64
-64
-64

query I rowsort
SELECT cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL 91 FROM tab0 AS cor0 GROUP BY col0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + 34 - + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-57
-58
19

query I rowsort
SELECT 80 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
80
80
80

query I rowsort
SELECT DISTINCT ( cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, col2, col0
----
26
43
83

query I rowsort
SELECT - 51 AS col2 FROM tab0 GROUP BY tab0.col2
----
-51
-51
-51

query I rowsort
SELECT ALL + 5 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-10
-86
-87

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + 84 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT + cor0.col1 + 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
86
99

query I rowsort
SELECT DISTINCT 79 FROM tab2 AS cor0 GROUP BY cor0.col1
----
79

query I rowsort
SELECT ALL col1 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT ALL - - 95 + tab0.col1 FROM tab0 GROUP BY col1
----
176
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col0 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT - cor0.col1 * 12 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-528
-684
-72

query I rowsort
SELECT ALL + + 45 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-3195
-360

query I rowsort
SELECT + - 9 AS col0 FROM tab2 GROUP BY tab2.col2
----
-9
-9
-9

query I rowsort
SELECT + 88 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
88
88
88

query I rowsort
SELECT DISTINCT 29 FROM tab1 GROUP BY tab1.col1
----
29

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT + + 74 FROM tab1 GROUP BY tab1.col2
----
74
74
74

query I rowsort
SELECT ALL col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - - ( + 11 ) * - 58 AS col0 FROM tab2 GROUP BY col1
----
-638
-638
-638

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
92

query I rowsort
SELECT - 8 AS col0 FROM tab2 GROUP BY tab2.col0
----
-8
-8
-8

query I rowsort
SELECT DISTINCT 20 AS col1 FROM tab2 GROUP BY tab2.col1
----
20

query I rowsort
SELECT 51 + 49 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
100
100
100

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-2131
SELECT DISTINCT cor0.col0 DIV + 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-2131
SELECT DISTINCT cor0.col0 / + 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL - 5 AS col0 FROM tab2 GROUP BY col1
----
-5
-5
-5

query I rowsort
SELECT ALL cor0.col2 * 81 FROM tab1 AS cor0 GROUP BY col2
----
3645
5751
648

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2135
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2135
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT cor0.col0 + 78 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
104
121
161

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT DISTINCT - 11 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-891
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 82, - cor0.col2, COALESCE ( - 87, 88 * cor0.col0 + cor0.col1 ), + cor0.col1 + + col2 * + CASE 66 WHEN cor0.col0 * col2 - - 76 THEN NULL WHEN - cor0.col1 * cor0.col0 THEN col0 WHEN cor0.col0 THEN - cor0.col1 END ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT - ( 55 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-55
-55
-55

query I rowsort
SELECT + 25 + 62 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT ALL + 78 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT + 9 AS col0 FROM tab2 GROUP BY tab2.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
65
65
65

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 80, cor0.col0 * - cor0.col0 ) * col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6480

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-2147
SELECT ALL - cor0.col1 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2147
SELECT ALL - cor0.col1 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-1
0
0

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - 17 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT ALL - 52 FROM tab0 GROUP BY col1
----
-52
-52

onlyif mysql # DIV for integer division: 
query I rowsort label-2151
SELECT + tab2.col2 DIV 39 FROM tab2 GROUP BY tab2.col2
----
1
2
2

skipif mysql # not compatible
query I rowsort label-2151
SELECT + tab2.col2 / 39 FROM tab2 GROUP BY tab2.col2
----
1
2
2

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL cor0.col0 + col1 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
26
6604
83

query I rowsort
SELECT + 33 * cor0.col1 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
2697
38
79

query I rowsort
SELECT ( + 29 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT + 52 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT DISTINCT 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
13

query I rowsort
SELECT DISTINCT + 44 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col2 * COALESCE ( - 34, + cor0.col0, cor0.col2 ) FROM tab1 AS cor0 GROUP BY col2
----
-1530
-2414
-272

query I rowsort
SELECT ALL - 14 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-2163
SELECT + col1 DIV - 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2163
SELECT + col1 / - 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2164
SELECT 50 DIV cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2164
SELECT 50 / cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL <> ( NULL )
----

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NULL IS NULL
----
-26
-43
-83

query I rowsort
SELECT ALL col1 + col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT + - 94 AS col0 FROM tab2 GROUP BY tab2.col1
----
-94
-94
-94

query I rowsort
SELECT - 66 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-66
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT + 16 AS col1 FROM tab1 GROUP BY col2
----
16
16
16

query I rowsort
SELECT DISTINCT cor0.col0 * - 67 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1005
-6097
-6164

query I rowsort
SELECT + 19 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col2 * + 47 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2726
3713
4089

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-225
-8281
-8464

query I rowsort
SELECT + 6 FROM tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2179
SELECT cor0.col2 DIV 54 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2179
SELECT cor0.col2 / 54 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1
1
1

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT + 85 FROM tab1 GROUP BY tab1.col0
----
85
85
85

query I rowsort
SELECT ALL 44 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT + tab2.col2 * - 20 FROM tab2 GROUP BY col2
----
-1160
-1580
-1740

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 45 col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
45
45
45

query I rowsort
SELECT col0 * + col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - 7 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-7

query I rowsort
SELECT + + 17 FROM tab0 GROUP BY tab0.col0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT - ( + 91 ) FROM tab1 GROUP BY tab1.col1
----
-91
-91
-91

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + 59 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT DISTINCT + - NULLIF ( 62, - tab0.col0 / tab0.col0 ) AS col1 FROM tab0 GROUP BY col0
----
-62

query I rowsort
SELECT ALL - 15 FROM tab2 GROUP BY col0
----
-15
-15
-15

query I rowsort
SELECT 38 FROM tab2 GROUP BY col0
----
38
38
38

query I rowsort
SELECT + 59 FROM tab2 GROUP BY col0
----
59
59
59

query I rowsort
SELECT 86 FROM tab1 GROUP BY tab1.col0
----
86
86
86

query I rowsort
SELECT DISTINCT - ( 19 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-19

query I rowsort
SELECT 74 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT + 0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT tab2.col1 * - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 91 * cor0.col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
0
7371

query I rowsort
SELECT 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 * 98 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
4312
5586
588

query I rowsort
SELECT ALL - 2 FROM tab2 cor0 GROUP BY cor0.col1
----
-2
-2
-2

query I rowsort
SELECT ALL cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT - - 28 FROM tab0 GROUP BY tab0.col0
----
28
28
28

query I rowsort
SELECT cor0.col2 * + ( 29 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1102
2291
696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 69 - - cor0.col2 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
133
2094
5110

query I rowsort
SELECT DISTINCT + 67 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2215
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2215
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 14 * 2 FROM tab2 GROUP BY tab2.col2
----
28

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT ALL 34 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-4
-45
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 86 * + cor0.col0 FROM tab1 cor0 GROUP BY col0
----
-1892
-2408
-7052

query I rowsort
SELECT DISTINCT 66 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
66

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT + 82 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT - 11 + + 78 FROM tab2 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT + cor0.col1 + - 36 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2835
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - tab2.col1 + 82 AS col2 FROM tab2 GROUP BY tab2.col1
----
21
23
41

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT ALL 33 FROM tab1 AS cor0 GROUP BY col1
----
33
33
33

query I rowsort
SELECT DISTINCT 26 * + 80 + - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
2019
2021
2039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col0 col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL tab1.col2 * 27 FROM tab1 GROUP BY tab1.col2
----
1215
1917
216

query I rowsort
SELECT - ( cor0.col2 ) - + cor0.col2 * 62 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2835
-4473
-504

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NULL
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NOT col1 IS NOT NULL ) AND ( NULL ) IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-2237
SELECT ALL + col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2237
SELECT ALL + col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 76 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
76

query I rowsort
SELECT + ( - cor0.col0 ) * - cor0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 WHERE ( NULL ) = NULL GROUP BY cor0.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 23 col2 FROM tab0 GROUP BY tab0.col1
----
-23

query I rowsort
SELECT + tab0.col2 + + 42 AS col1 FROM tab0 GROUP BY col2
----
121
66
80

onlyif mysql # DIV for integer division: 
query I rowsort label-2246
SELECT cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2246
SELECT cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

query I rowsort
SELECT - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 71 FROM tab1 GROUP BY tab1.col0
----
71
71
71

query I rowsort
SELECT - col0 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT ( + cor0.col0 ) - - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
182
184
30

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + - tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT 1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT ALL - 44 FROM tab0 cor0 GROUP BY cor0.col1
----
-44
-44

query I rowsort
SELECT + cor0.col1 + 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
100
80
98

query I rowsort
SELECT DISTINCT - col1 + 36 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
1467
2988
936

query I rowsort
SELECT NULLIF ( cor0.col2, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
NULL
NULL
NULL

query I rowsort
SELECT ( 87 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT - - 90 + col0 AS col0 FROM tab2 GROUP BY col0
----
105
181
182

query I rowsort
SELECT - 84 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT ( 71 ) + + 53 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
124
124
124

onlyif mysql # DIV for integer division: 
query I rowsort label-2265
SELECT cor0.col1 DIV COALESCE ( + 99, - cor0.col1 * NULLIF ( + 77, - cor0.col0 * cor0.col1 + NULLIF ( 69, - cor0.col2 + + 78 ) * cor0.col1 ), cor0.col0 - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2265
SELECT cor0.col1 / COALESCE ( + 99, - cor0.col1 * NULLIF ( + 77, - cor0.col0 * cor0.col1 + NULLIF ( 69, - cor0.col2 + + 78 ) * cor0.col1 ), cor0.col0 - cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2266
SELECT - CAST( 78 AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-78
-78
-78

skipif mysql # not compatible
query I rowsort label-2266
SELECT - CAST ( 78 AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-78
-78
-78

query I rowsort
SELECT + ( 20 ) FROM tab1 GROUP BY tab1.col0
----
20
20
20

query I rowsort
SELECT 48 AS col1 FROM tab2 GROUP BY tab2.col0
----
48
48
48

query I rowsort
SELECT - 10 AS col1 FROM tab0 GROUP BY tab0.col2
----
-10
-10
-10

query I rowsort
SELECT 96 * + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2304
3648
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-91
-91
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 42 + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
123
42

query I rowsort
SELECT col2 + - ( 15 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
64
9

onlyif mysql # DIV for integer division: 
query I rowsort label-2274
SELECT DISTINCT - ( + 7 ) + cor0.col2 DIV - 40 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-7
-8

skipif mysql # not compatible
query I rowsort label-2274
SELECT DISTINCT - ( + 7 ) + cor0.col2 / - 40 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-7
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - 82 * tab2.col1 FROM tab2 GROUP BY col1
----
-3362
-4838
-5002

query I rowsort
SELECT - cor0.col0 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT DISTINCT + 1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT ALL cor0.col2 + - 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
25
33
4

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT ( NULL ) IS NOT NULL
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2284
SELECT DISTINCT 88 DIV + 5 FROM tab2 GROUP BY tab2.col0
----
17

skipif mysql # not compatible
query I rowsort label-2284
SELECT DISTINCT 88 / + 5 FROM tab2 GROUP BY tab2.col0
----
17

query I rowsort
SELECT DISTINCT - + 49 FROM tab2 GROUP BY tab2.col0
----
-49

query I rowsort
SELECT - 44 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-44
-44

query I rowsort
SELECT + 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-2289
SELECT + col1 + tab1.col1 DIV - 23 AS col2 FROM tab1 GROUP BY tab1.col1
----
43
55
6

skipif mysql # not compatible
query I rowsort label-2289
SELECT + col1 + tab1.col1 / - 23 AS col2 FROM tab1 GROUP BY tab1.col1
----
43
55
6

query I rowsort
SELECT cor0.col0 * cor0.col0 - + 14 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1835
662
6875

query I rowsort
SELECT + 33 AS col1 FROM tab2 GROUP BY col0
----
33
33
33

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 * ( cor0.col1 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, col0
----
41
59
61

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 38 FROM tab1 GROUP BY col0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT col2 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
102
150
170

query I rowsort
SELECT - 1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col0 * 68 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
1504
1949
5647

onlyif mysql # DIV for integer division: 
query I rowsort label-2300
SELECT + cor0.col2 DIV 55 FROM tab2 cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2300
SELECT + cor0.col2 / 55 FROM tab2 cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT 93 + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
6654
93

query I rowsort
SELECT ( 60 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT - cor0.col1 + cor0.col2 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, col2
----
1444
495
6241

query I rowsort
SELECT ALL + 98 FROM tab0 AS cor0 GROUP BY col0
----
98
98
98

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 22 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT DISTINCT - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL 53 FROM tab2 AS cor0 GROUP BY cor0.col1
----
53
53
53

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT + 49 FROM tab0 GROUP BY tab0.col1
----
49
49

query I rowsort
SELECT - cor0.col0 + + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 59 FROM tab0 AS cor0 GROUP BY cor0.col1
----
59

query I rowsort
SELECT ALL - col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL - 41 AS col1 FROM tab0 GROUP BY tab0.col1
----
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + + 85 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
111
128
168

query I rowsort
SELECT + 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
92
92
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 49 col1 FROM tab0 AS cor0 GROUP BY col2
----
49
49
49

onlyif mysql # DIV for integer division: 
query I rowsort label-2321
SELECT cor0.col0 DIV + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2321
SELECT cor0.col0 / + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 58 FROM tab0 AS cor0 GROUP BY col1
----
58

query I rowsort
SELECT - 55 AS col0 FROM tab2 GROUP BY tab2.col2
----
-55
-55
-55

query I rowsort
SELECT 9 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1
----
9
9
9

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 12 AS col0 FROM tab1 GROUP BY tab1.col1
----
-12

query I rowsort
SELECT + 62 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT - - ( + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 85 FROM tab0 GROUP BY tab0.col1
----
85

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ( cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - cor0.col2 * 37 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2146
-2923
-3219

query I rowsort
SELECT DISTINCT - 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-63

query I rowsort
SELECT ALL - 77 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-77
-77
-77

query I rowsort
SELECT - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + - 70 FROM tab2 GROUP BY tab2.col1
----
-70
-70
-70

query I rowsort
SELECT - 66 * + cor0.col0 - - 30 * 65 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3462
102
498

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + ( 30 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-2344
SELECT - cor0.col2 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2344
SELECT - cor0.col2 / - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT DISTINCT - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 64 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
64
64
64

query I rowsort
SELECT - col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 41 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
41

query I rowsort
SELECT - 66 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-66
-66
-66

query I rowsort
SELECT col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT ALL 88 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
54
54
54

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - 29 - + COALESCE ( - 26, - col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-3

query I rowsort
SELECT DISTINCT 23 AS col1 FROM tab2 GROUP BY col2
----
23

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT NULLIF ( - 97, cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-97
-97

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col0 * - 96 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2118
2745
7916

query I rowsort
SELECT - 21 AS col0 FROM tab2 GROUP BY col2
----
-21
-21
-21

query I rowsort
SELECT - - 73 AS col2 FROM tab2 GROUP BY col1
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
77

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-41
-59
-61

query I rowsort
SELECT + 68 * - cor0.col2 + - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-3105
-4899
-552

query I rowsort
SELECT + + col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + + 60 FROM tab1 GROUP BY col2
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 23 col1 FROM tab2 GROUP BY tab2.col1
----
-23

query I rowsort
SELECT ALL + cor0.col1 + + 93 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
134
152
154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT ALL 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 + cor0.col0 * + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 49 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2842
-3871
-4263

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 col0 FROM tab0 AS cor0 GROUP BY col1
----
86
86

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + tab1.col2 * - col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - + col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT ALL + - cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-2380
SELECT ALL cor0.col2 DIV - 89 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2380
SELECT ALL cor0.col2 / - 89 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT 34 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
34
34
34

query I rowsort
SELECT DISTINCT 57 FROM tab0 GROUP BY tab0.col2
----
57

query I rowsort
SELECT DISTINCT 21 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
102
21

query I rowsort
SELECT DISTINCT - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col1 - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT - 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

query I rowsort
SELECT 25 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1125
1775
200

query I rowsort
SELECT + 27 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
27
27
27

query I rowsort
SELECT ALL 83 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
83
83
83

query I rowsort
SELECT ALL 82 FROM tab1 cor0 GROUP BY col0
----
82
82
82

query I rowsort
SELECT ALL cor0.col2 * col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 76 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
76

query I rowsort
SELECT 17 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 53 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 * col2 col1 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 35 FROM tab0 AS cor0 GROUP BY cor0.col1
----
35
35

query I rowsort
SELECT 7 FROM tab0 AS cor0 GROUP BY col0
----
7
7
7

query I rowsort
SELECT DISTINCT tab2.col0 * - 4 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-455
-460
-75

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 11 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
11
11

query I rowsort
SELECT DISTINCT - 76 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-76

query I rowsort
SELECT ALL - 39 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-39
-39
-39

query I rowsort
SELECT 7 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
308
399
42

query I rowsort
SELECT DISTINCT ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-2406
SELECT - + tab2.col0 DIV - 81 AS col1 FROM tab2 GROUP BY col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2406
SELECT - + tab2.col0 / - 81 AS col1 FROM tab2 GROUP BY col0
----
0
1
1

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78

query I rowsort
SELECT ALL 51 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
51
51
51

query I rowsort
SELECT + 50 AS col0 FROM tab0 GROUP BY tab0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col2 * - 65 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3770
-5135
-5655

query I rowsort
SELECT + 90 FROM tab2 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
94
94
94

query I rowsort
SELECT ALL - - 99 * - 75 FROM tab2 GROUP BY tab2.col2
----
-7425
-7425
-7425

query I rowsort
SELECT DISTINCT + col0 + 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
120
60
66

query I rowsort
SELECT ALL 8 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

onlyif mysql # DIV for integer division: 
query I rowsort label-2418
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-2418
SELECT + cor0.col0 / + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT 9 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
9
9
9

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 20, cor0.col2 + - 10 * cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
-20

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 77 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT - ( - 7 ) AS col1 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT 46 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
46
46

query I rowsort
SELECT DISTINCT + 40 FROM tab1 GROUP BY tab1.col2
----
40

query I rowsort
SELECT ALL 22 AS col1 FROM tab1 GROUP BY tab1.col2
----
22
22
22

query I rowsort
SELECT col2 + cor0.col2 FROM tab0 cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT ALL - + 73 FROM tab0 GROUP BY col1
----
-73
-73

query I rowsort
SELECT - 1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + 4 * col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
180
284
32

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT ALL 11 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 col0 FROM tab2 GROUP BY tab2.col1
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 82 FROM tab0 GROUP BY col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-2438
SELECT cor0.col1 DIV + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2438
SELECT cor0.col1 / + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 78 - - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
159
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2440
SELECT CAST( - 51 AS SIGNED ) AS col0 FROM tab0 GROUP BY col1
----
-51
-51

skipif mysql # not compatible
query I rowsort label-2440
SELECT CAST ( - 51 AS INTEGER ) AS col0 FROM tab0 GROUP BY col1
----
-51
-51

query I rowsort
SELECT - cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + ( - 58 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-58
-58
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL 86 * + cor0.col0 + 32 FROM tab0 AS cor0 GROUP BY col0
----
2268
3730
7170

query I rowsort
SELECT ALL 43 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT cor0.col1 * 32 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1408
1824
192

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 60 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT ALL - 17 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT + ( - 84 ) FROM tab1 AS cor0 GROUP BY col1
----
-84
-84
-84

query I rowsort
SELECT + 97 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col1
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + + 97 AS col0 FROM tab1 GROUP BY tab1.col1
----
97
97
97

query I rowsort
SELECT 81 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT + 18 - 15 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT ALL - 98 FROM tab2 GROUP BY tab2.col2
----
-98
-98
-98

query I rowsort
SELECT ALL + - 59 * col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-5369
-5428
-885

query I rowsort
SELECT 68 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
68
68
68

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
132
1596
3608

query I rowsort
SELECT - 37 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + 37 FROM tab2 AS cor0 GROUP BY col1
----
37

query I rowsort
SELECT 63 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT DISTINCT - 78 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-78

query I rowsort
SELECT + - 66 AS col1 FROM tab1 GROUP BY tab1.col0
----
-66
-66
-66

query I rowsort
SELECT - cor0.col1 - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT ( 60 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT + 66 AS col1 FROM tab1 GROUP BY tab1.col1
----
66

query I rowsort
SELECT 96 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT cor0.col0 * - 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2002
-3311
-6391

query I rowsort
SELECT ALL 92 * - 72 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6624
-6624
-6624

query I rowsort
SELECT DISTINCT + 48 FROM tab0 AS cor0 GROUP BY cor0.col0
----
48

query I rowsort
SELECT ALL - 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-77
-77

query I rowsort
SELECT ALL - cor0.col0 * col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT - 17 FROM tab1 cor0 GROUP BY cor0.col2
----
-17
-17
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 col0 FROM tab0 cor0 GROUP BY cor0.col0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT + cor0.col0 + - 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-62
-68
-8

query I rowsort
SELECT - cor0.col0 * 34 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2788
-748
-952

query I rowsort
SELECT + tab2.col0 + tab2.col0 / tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-22
-28
-82

query I rowsort
SELECT ( - 85 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
-85
-85
-85

query I rowsort
SELECT ALL cor0.col2 + + 8 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
32
46
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 + + 18 col1 FROM tab0 GROUP BY tab0.col2
----
-20
-6
-61

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT - 20 AS col2 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
-20
-20
-20

query I rowsort
SELECT 76 AS col1 FROM tab1 GROUP BY col2
----
76
76
76

query I rowsort
SELECT + 78 FROM tab0 AS cor0 GROUP BY col2
----
78
78
78

query I rowsort
SELECT DISTINCT - col0 + 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
10
64
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 26 col1 FROM tab1 GROUP BY tab1.col0
----
26
26
26

query I rowsort
SELECT DISTINCT + cor0.col0 * - 64 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1408
-1792
-5248

query I rowsort
SELECT - ( - cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT + ( - 99 ) FROM tab0 GROUP BY tab0.col0
----
-99
-99
-99

query I rowsort
SELECT - - tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor1.col0 + - cor1.col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-182
-184
-30

query I rowsort
SELECT ALL + 55 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3190
4345
4785

query I rowsort
SELECT ALL - 92 FROM tab1 cor0 GROUP BY cor0.col1
----
-92
-92
-92

query I rowsort
SELECT ALL + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col1
----
41
59
61

query I rowsort
SELECT ALL 27 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT 15 AS col0 FROM tab1 cor0 GROUP BY col2
----
15
15
15

query I rowsort
SELECT + 76 FROM tab1 GROUP BY tab1.col0
----
76
76
76

query I rowsort
SELECT DISTINCT 75 FROM tab2 AS cor0 GROUP BY cor0.col1
----
75

query I rowsort
SELECT 58 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT DISTINCT 28 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
2548
2576
420

query I rowsort
SELECT - - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2514
SELECT + + CAST( NULL AS SIGNED ) AS col0 FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2514
SELECT + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2515
SELECT cor0.col1 DIV col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2515
SELECT cor0.col1 / col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 78 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col0 FROM tab2 GROUP BY tab2.col1
----
24

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL 2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
158
48
76

query I rowsort
SELECT cor1.col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT cor0.col0 + + 41 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
124
67
84

query I rowsort
SELECT ALL + cor0.col2 + + 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
108
134
71

query I rowsort
SELECT 20 FROM tab2 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT - + 91 FROM tab0 GROUP BY tab0.col0
----
-91

query I rowsort
SELECT + 5 FROM tab0 GROUP BY tab0.col1
----
5
5

query I rowsort
SELECT ALL 80 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1920
-3040
-6320

query I rowsort
SELECT DISTINCT 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
46

query I rowsort
SELECT DISTINCT - COALESCE ( cor0.col0, - 33 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2532
SELECT - CAST( NULL AS SIGNED ) * - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2532
SELECT - CAST ( NULL AS INTEGER ) * - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT + ( cor0.col1 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT ALL - 45 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-45
-45

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT + cor0.col0 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT + 92 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
92
92
92

query I rowsort
SELECT DISTINCT 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75

query I rowsort
SELECT ALL 12 AS col1 FROM tab0 GROUP BY tab0.col1
----
12
12

query I rowsort
SELECT ALL + 97 FROM tab0 GROUP BY tab0.col0
----
97
97
97

query I rowsort
SELECT 59 * + ( - 21 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1239
-1239
-1239

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2542
SELECT + CAST( - 91 AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
-91
-91
-91

skipif mysql # not compatible
query I rowsort label-2542
SELECT + CAST ( - 91 AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
-91
-91
-91

query I rowsort
SELECT - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + - tab2.col1 + + 98 FROM tab2 GROUP BY col1
----
37
39
57

query I rowsort
SELECT 97 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
7857

query I rowsort
SELECT ALL + 68 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
68
68

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + 29 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
29

query I rowsort
SELECT + 43 FROM tab1 cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT DISTINCT + 84 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
84

query I rowsort
SELECT ALL - 0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 98 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-98
-98

query I rowsort
SELECT 79 - + 82 * + 30 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-2381
-2381
-2381

query I rowsort
SELECT DISTINCT + 67 FROM tab2 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT + 42 FROM tab2 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT + col0 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col2 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-2378
-4661
-5307

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( + 18, col2 * - cor0.col2, + col1 + + cor0.col0 * cor0.col2 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * COALESCE ( 77, cor0.col1 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
1155
7007
7084

query I rowsort
SELECT 16 + col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
22
60
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 3 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
3

query I rowsort
SELECT DISTINCT - 90 + 10 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-80

query I rowsort
SELECT DISTINCT + 89 AS col2 FROM tab2 GROUP BY tab2.col2
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab1.col0 col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col1 + ( + cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL - cor0.col2 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - cor0.col1 * cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

query I rowsort
SELECT DISTINCT - 55 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5005
-5060
-825

query I rowsort
SELECT - 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-61
-61
-61

query I rowsort
SELECT + cor0.col0 + + 66 FROM tab2 AS cor0 GROUP BY cor0.col0
----
157
158
81

query I rowsort
SELECT ALL 43 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
43
43
43

onlyif mysql # DIV for integer division: 
query I rowsort label-2573
SELECT ALL cor0.col1 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2573
SELECT ALL cor0.col1 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col0 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
102
150
170

query I rowsort
SELECT DISTINCT + 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10

onlyif mysql # DIV for integer division: 
query I rowsort label-2576
SELECT DISTINCT cor0.col1 + + cor0.col0 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
82

skipif mysql # not compatible
query I rowsort label-2576
SELECT DISTINCT cor0.col1 + + cor0.col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 51, cor0.col1, cor0.col0 - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT DISTINCT cor0.col0 * 35 FROM tab1 AS cor0 GROUP BY col0
----
2870
770
980

query I rowsort
SELECT DISTINCT + col2 * cor0.col2 + + cor0.col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1152
12482
2888

query I rowsort
SELECT ALL - 88 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT - + 81 AS col2 FROM tab1 GROUP BY tab1.col1
----
-81

query I rowsort
SELECT + 19 FROM tab1 AS cor0 GROUP BY cor0.col0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 12 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT 48 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT ALL - cor0.col1 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0
0

query I rowsort
SELECT ALL - 32 FROM tab1 cor0 GROUP BY cor0.col0
----
-32
-32
-32

query I rowsort
SELECT ALL - 35 FROM tab0 AS cor0 GROUP BY col1
----
-35
-35

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
-58
-79
-87

query I rowsort
SELECT + 11 + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
11
92

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT 80 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
80

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL + 71 AS col2 FROM tab2 GROUP BY tab2.col0
----
71
71
71

query I rowsort
SELECT DISTINCT + - 88 FROM tab1 GROUP BY tab1.col0
----
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 4 * - 42 col1 FROM tab2 GROUP BY tab2.col2
----
168

query I rowsort
SELECT 15 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
15
15
15

onlyif mysql # DIV for integer division: 
query I rowsort label-2598
SELECT DISTINCT - cor0.col0 DIV + 65 - 50 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-50
-51

skipif mysql # not compatible
query I rowsort label-2598
SELECT DISTINCT - cor0.col0 / + 65 - 50 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-50
-51

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + 90 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2340
3870
7470

query I rowsort
SELECT 62 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
62
62
62

query I rowsort
SELECT 62 AS col1 FROM tab2 GROUP BY tab2.col1
----
62
62
62

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col1 * 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2091
3009
3111

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 41 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
3321

query I rowsort
SELECT 59 FROM tab0 cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT DISTINCT 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT DISTINCT 27 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
27

query I rowsort
SELECT + 17 FROM tab1 GROUP BY tab1.col1
----
17
17
17

query I rowsort
SELECT ALL + cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 68 FROM tab2 GROUP BY tab2.col1
----
68

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 42 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42
42
42

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2618
SELECT CAST( NULL AS DECIMAL ) * 74 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2618
SELECT CAST ( NULL AS REAL ) * 74 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 79 AS col2 FROM tab2 cor0 GROUP BY col1
----
-79
-79
-79

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
58
79
87

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
210
8190
8372

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-81
0
0

query I rowsort
SELECT 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
164
44
56

onlyif mysql # DIV for integer division: 
query I rowsort label-2628
SELECT cor0.col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2628
SELECT cor0.col0 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 33 FROM tab0 cor0 GROUP BY cor0.col1
----
-33
-33

query I rowsort
SELECT DISTINCT - 8 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-16
-16

query I rowsort
SELECT ALL + 65 FROM tab0 AS cor0 GROUP BY cor0.col1
----
65
65

query I rowsort
SELECT - cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-2638
SELECT ALL - cor0.col1 DIV + 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2638
SELECT ALL - cor0.col1 / + 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 23 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 81 * - cor0.col1 - - 95 FROM tab2 cor0 GROUP BY cor0.col1
----
-3226
-4684
-4846

query I rowsort
SELECT ALL 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
89
89
89

query I rowsort
SELECT ALL 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
73
73
73

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - 11 * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-495
-781
-88

query I rowsort
SELECT + 44 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
44
44

query I rowsort
SELECT - 32 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-32
-32
-32

query I rowsort
SELECT 89 FROM tab0 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT - ( 3 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-246
-66
-84

query I rowsort
SELECT cor0.col0 + + 48 FROM tab2 cor0 GROUP BY cor0.col0
----
139
140
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
96
96
96

query I rowsort
SELECT DISTINCT 27 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33
71
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 26 * + col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2366
2392
390

query I rowsort
SELECT ALL 0 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT DISTINCT - 83 FROM tab0 GROUP BY tab0.col2
----
-83

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT ALL + 93 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-2046
-2604
-7626

query I rowsort
SELECT 31 FROM tab1 GROUP BY tab1.col1
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 31 col1 FROM tab1 GROUP BY tab1.col0
----
31
31
31

query I rowsort
SELECT - 10 FROM tab0 AS cor0 GROUP BY col0
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
58
58
58

query I rowsort
SELECT DISTINCT + 34 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
34

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
6
6
6

query I rowsort
SELECT ALL + col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2670
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2670
SELECT DISTINCT - CAST ( NULL AS REAL ) + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL

query I rowsort
SELECT ALL 90 FROM tab0 AS cor0 GROUP BY cor0.col1
----
90
90

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 91 FROM tab0 GROUP BY tab0.col0
----
91
91
91

query I rowsort
SELECT ALL + 97 FROM tab1 GROUP BY tab1.col0
----
97
97
97

query I rowsort
SELECT DISTINCT ( + 26 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1144
1482
156

query I rowsort
SELECT ALL + 50 AS col2 FROM tab0 GROUP BY tab0.col2
----
50
50
50

query I rowsort
SELECT ALL 60 + - 12 FROM tab1 GROUP BY tab1.col0
----
48
48
48

query I rowsort
SELECT DISTINCT + 61 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT + - col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - ( - 4 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT cor0.col2 + + col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT ALL - tab1.col2 + + 71 * - tab1.col2 FROM tab1 GROUP BY col2
----
-3240
-5112
-576

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 20 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-20

query I rowsort
SELECT ALL ( + 15 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
15
15
15

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 18 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
18
99

query I rowsort
SELECT ALL cor0.col1 + + 49 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
106
55
93

query I rowsort
SELECT + + 54 FROM tab2 GROUP BY col0
----
54
54
54

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 43 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT - 60 FROM tab1 cor0 GROUP BY cor0.col0
----
-60
-60
-60

query I rowsort
SELECT ALL + 89 AS col2 FROM tab1 GROUP BY col1
----
89
89
89

query I rowsort
SELECT DISTINCT + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 13 - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-31
-44
7

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 67 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT - 19 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-19
-19
-19

query I rowsort
SELECT - cor0.col2 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT ALL + + cor0.col2 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 85 + + 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
163
163
163

query I rowsort
SELECT - - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, col2, cor0.col1
----
0
3483

query I rowsort
SELECT ALL - 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT 13 FROM tab1 GROUP BY col2
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 col1 FROM tab1 GROUP BY col1
----
99

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
75
75

query I rowsort
SELECT - col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-41
-59
-61

query I rowsort
SELECT + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 62 FROM tab1 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT DISTINCT 87 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-1914
-2436
-7134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor0.col1 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + 40 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3
-43
14

query I rowsort
SELECT DISTINCT cor0.col0 * 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1980
2520
7380

query I rowsort
SELECT ALL + 27 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT + 51 FROM tab1 GROUP BY col0
----
51
51
51

query I rowsort
SELECT cor1.col2 * cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
1444
576
6241

query I rowsort
SELECT ALL - 90 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-90
-90
-90

query I rowsort
SELECT + cor0.col0 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1032
2054
3154

query I rowsort
SELECT + 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-2727
SELECT - cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2727
SELECT - cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT 54 FROM tab1 AS cor0 GROUP BY col0
----
54
54
54

query I rowsort
SELECT ALL - + col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 58 AS col0 FROM tab0 GROUP BY tab0.col0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT 52 - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-5
46
8

query I rowsort
SELECT - 88 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-88
-88
-88

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 66 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT + 32 FROM tab0 AS cor0 GROUP BY col0
----
32
32
32

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2740
SELECT - ( 11 ) DIV - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2740
SELECT - ( 11 ) / - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT DISTINCT - - 97 AS col2 FROM tab0 GROUP BY tab0.col1
----
97

query I rowsort
SELECT ALL - 34 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-34
-34
-34

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 9 col0 FROM tab1 AS cor0 GROUP BY col1, col0, cor0.col0
----
9

query I rowsort
SELECT - - col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col1, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + cor0.col2 * 32 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
1497
2316
262

query I rowsort
SELECT + 91 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
91
91
91

query I rowsort
SELECT DISTINCT - 81 + - 48 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-129

query I rowsort
SELECT + 31 AS col1 FROM tab2 GROUP BY tab2.col0
----
31
31
31

query I rowsort
SELECT + 36 FROM tab0 GROUP BY tab0.col0
----
36
36
36

query I rowsort
SELECT + col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT - 16 FROM tab2 GROUP BY col0
----
-16
-16
-16

query I rowsort
SELECT + ( + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 82 * col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
3690
5822
656

query I rowsort
SELECT DISTINCT cor0.col1 + 85 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3444
-4956
-5124

query I rowsort
SELECT + col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 61 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
119
140
148

query I rowsort
SELECT ALL 65 FROM tab1 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT ALL cor0.col1 * 52 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4212

query I rowsort
SELECT + 46 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
46
46
46

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - col2 * col2 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT cor0.col0 * + 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL + 81 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT 83 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
83
83

query I rowsort
SELECT DISTINCT - 54 FROM tab2 cor0 GROUP BY cor0.col1
----
-54

query I rowsort
SELECT DISTINCT + 4 FROM tab1 cor0 GROUP BY cor0.col0
----
4

query I rowsort
SELECT ALL 42 * - 2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT + - 14 AS col2 FROM tab2 GROUP BY col0
----
-14
-14
-14

query I rowsort
SELECT ALL - col1 * cor0.col1 - + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1980
-3306
-42

query I rowsort
SELECT ALL - cor0.col2 * 92 + 50 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2158
-3446
-7218

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
11
11
11

query I rowsort
SELECT ALL 78 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
78
78
78

query I rowsort
SELECT + cor0.col2 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT ALL + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL + - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - NULLIF ( - col0, cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-58
-79
-87

query I rowsort
SELECT 51 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1224
-1938
-4029

query I rowsort
SELECT col0 + tab1.col0 * 69 AS col1 FROM tab1 GROUP BY tab1.col0
----
1540
1960
5740

query I rowsort
SELECT + 82 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT + cor0.col1 + + 86 FROM tab2 AS cor0 GROUP BY cor0.col1
----
127
145
147

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT - ( col0 ) FROM tab1 cor0 GROUP BY col2, cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + 33 * - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1419
-2739
-858

query I rowsort
SELECT DISTINCT + 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 * - tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT 29 FROM tab0 GROUP BY tab0.col2
----
29
29
29

query I rowsort
SELECT DISTINCT - 45 FROM tab1 GROUP BY col1
----
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + cor0.col1 + + 66 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
110
123
72

query I rowsort
SELECT + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING + col2 IS NOT NULL
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + - 37 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-22
54
55

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2803
SELECT + CAST( NULL AS DECIMAL ) * 49 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2803
SELECT + CAST ( NULL AS REAL ) * 49 FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 30 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1320
-1710
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 80 col2 FROM tab1 GROUP BY tab1.col0
----
80

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 ALL col2 col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 33 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
33

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT - ( + col2 ) * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 53 FROM tab2 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT - + 74 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
3256
4218
444

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col1 + 76 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
120
133
82

query I rowsort
SELECT cor0.col1 * 61 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
4941

query I rowsort
SELECT - 74 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-3256
-4218
-444

query I rowsort
SELECT + tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT + + 18 AS col0 FROM tab2 GROUP BY tab2.col0
----
18
18
18

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + 94 + - 65 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 25 * cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2050
550
700

query I rowsort
SELECT 79 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
79
79
79

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL - 31 FROM tab0 AS cor0 GROUP BY col1
----
-31
-31

query I rowsort
SELECT DISTINCT 19 FROM tab0 GROUP BY col2
----
19

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 75 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
75
75
75

query I rowsort
SELECT + + 58 FROM tab2 GROUP BY col1
----
58
58
58

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT ALL - tab1.col2 * col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
19
19
19

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + - 72 FROM tab2 GROUP BY tab2.col2
----
-72

query I rowsort
SELECT + cor1.col0 * cor1.col1 + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col0
----
154
1624
3690

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col1 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 59 FROM tab1 GROUP BY tab1.col0
----
59

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 75 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
75

query I rowsort
SELECT 11 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
264
418
869

query I rowsort
SELECT 57 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 12 col1 FROM tab0 GROUP BY col0
----
-12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2847
SELECT ALL CAST( NULL AS SIGNED ) * - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2847
SELECT ALL CAST ( NULL AS INTEGER ) * - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 74 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
3256
4218
444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab0.col2 * + 11 col0 FROM tab0 GROUP BY tab0.col2
----
-264
-418
-869

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 51 * - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-1122
-1428
-4182

query I rowsort
SELECT 94 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
94
94
94

query I rowsort
SELECT ALL ( 76 ) FROM tab2 GROUP BY col2
----
76
76
76

query I rowsort
SELECT - 48 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL 68 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1496
1904
5576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT + 95 FROM tab2 GROUP BY tab2.col1
----
95
95
95

query I rowsort
SELECT - col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT ( 67 ) AS col0 FROM tab1 AS cor0 GROUP BY col0
----
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 col0 FROM tab1 AS cor0 GROUP BY col2
----
76
76
76

query I rowsort
SELECT + cor0.col2 * - col1 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1920
38
79

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + col0 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

query I rowsort
SELECT + 85 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4930
-6715
-7395

query I rowsort
SELECT NULLIF ( cor0.col2, cor0.col2 ) * 64 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 12 + 25 FROM tab2 AS cor0 GROUP BY col1
----
37
37
37

query I rowsort
SELECT DISTINCT + - 25 AS col0 FROM tab0 GROUP BY tab0.col2
----
-25

query I rowsort
SELECT + + 7 FROM tab2 GROUP BY tab2.col2
----
7
7
7

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 ALL + 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
92
92
92

query I rowsort
SELECT DISTINCT ( 52 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
52

query I rowsort
SELECT ALL + 90 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1980
2520
7380

query I rowsort
SELECT DISTINCT - 27 AS col2 FROM tab0 GROUP BY tab0.col2
----
-27

query I rowsort
SELECT ALL 73 * 53 FROM tab0 AS cor0 GROUP BY col2
----
3869
3869
3869

query I rowsort
SELECT DISTINCT ( cor0.col2 ) + + 49 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
-2784
-3792
-4176

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT + 26 * + 50 FROM tab2 GROUP BY tab2.col1
----
1300
1300
1300

onlyif mysql # DIV for integer division: 
query I rowsort label-2881
SELECT - cor0.col2 + + 87 DIV 11 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-38
-64

skipif mysql # not compatible
query I rowsort label-2881
SELECT - cor0.col2 + + 87 / 11 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-38
-64

query I rowsort
SELECT ALL col2 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + 25 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1450
1975
2175

query I rowsort
SELECT cor0.col2 - - 44 FROM tab0 AS cor0 GROUP BY col2
----
123
68
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2886
SELECT ALL - 15 DIV cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2886
SELECT ALL - 15 / cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT - 10 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48
69
77

onlyif mysql # DIV for integer division: 
query I rowsort label-2888
SELECT cor0.col0 DIV - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2888
SELECT cor0.col0 / - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + 96 FROM tab0 cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT ALL + cor0.col2 * - 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2376
-3762
-7821

query I rowsort
SELECT + cor0.col1 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 * 79 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
5135
5135
5135

query I rowsort
SELECT ALL + cor0.col1 * 64 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2816
3648
384

query I rowsort
SELECT - cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) IS NOT NULL AND NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT - 74 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-74
-74
-74

query I rowsort
SELECT ALL - 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2900
SELECT ALL - 37 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2900
SELECT ALL - 37 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-2
0
0

query I rowsort
SELECT 65 FROM tab1 AS cor0 GROUP BY cor0.col1
----
65
65
65

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL + cor1.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT ALL 6 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
348
474
522

query I rowsort
SELECT ALL 31 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT ALL - 64 AS col1 FROM tab0 GROUP BY tab0.col2
----
-64
-64
-64

query I rowsort
SELECT - col1 * + cor0.col2 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
-2593
-3206
-70

onlyif mysql # DIV for integer division: 
query I rowsort label-2910
SELECT DISTINCT - cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-2910
SELECT DISTINCT - cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT 53 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - 38 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-38
-38
-38

query I rowsort
SELECT DISTINCT 11 * 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
451

query I rowsort
SELECT + cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
1444
576
6241

query I rowsort
SELECT 58 FROM tab2 AS cor0 GROUP BY col1
----
58
58
58

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - 16 AS col0 FROM tab0 GROUP BY tab0.col1
----
-16

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 63 col2 FROM tab0 GROUP BY tab0.col1
----
63
63

query I rowsort
SELECT ALL + 35 FROM tab2 GROUP BY tab2.col1
----
35
35
35

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT + 97 + - cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
40
53
91

query I rowsort
SELECT 73 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT col2 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

onlyif mysql # DIV for integer division: 
query I rowsort label-2928
SELECT DISTINCT 27 DIV - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3
0

skipif mysql # not compatible
query I rowsort label-2928
SELECT DISTINCT 27 / - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3
0

query I rowsort
SELECT DISTINCT cor0.col1 - 43 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2
16
18

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - ( + 76 ) + - 19 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-95
-95
-95

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1739
3560
3808

query I rowsort
SELECT ALL ( cor0.col0 ) * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 20 col0 FROM tab1 GROUP BY tab1.col2
----
-20

query I rowsort
SELECT - 7 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
-7
-7

query I rowsort
SELECT - 56 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT 35 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
35

query I rowsort
SELECT + + 67 AS col0 FROM tab0 GROUP BY tab0.col1
----
67
67

query I rowsort
SELECT - 25 FROM tab1 cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT - - 91 AS col1 FROM tab1 GROUP BY col2
----
91
91
91

query I rowsort
SELECT + 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 74 col2 FROM tab2 GROUP BY col2
----
74

query I rowsort
SELECT - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - + 69 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-5589
0

query I rowsort
SELECT + 97 AS col0 FROM tab2 GROUP BY tab2.col0
----
97
97
97

query I rowsort
SELECT ALL + COALESCE ( cor0.col2, cor0.col2 - + 62 ) FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + CASE + cor0.col2 WHEN + cor0.col0 + - 96 THEN 85 WHEN cor0.col2 THEN NULL ELSE NULL END FROM tab0 AS cor0 GROUP BY col0, col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 93 * 75 FROM tab1 GROUP BY tab1.col0
----
6975
6975
6975

query I rowsort
SELECT - tab0.col0 + 36 AS col0 FROM tab0 GROUP BY tab0.col0
----
-47
-7
10

query I rowsort
SELECT DISTINCT - 15 * + 76 AS col0 FROM tab0 GROUP BY col2
----
-1140

query I rowsort
SELECT DISTINCT - 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-27

query I rowsort
SELECT + 53 FROM tab2 cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT ALL 3 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3
3

query I rowsort
SELECT DISTINCT - 39 FROM tab1 GROUP BY tab1.col0
----
-39

query I rowsort
SELECT cor0.col0 * 3 - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT - cor0.col2 - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-153
-30
-73

query I rowsort
SELECT DISTINCT - - 39 FROM tab2 GROUP BY col0
----
39

query I rowsort
SELECT DISTINCT - - 40 AS col1 FROM tab2 GROUP BY tab2.col1
----
40

query I rowsort
SELECT DISTINCT - - 49 FROM tab1 GROUP BY col0
----
49

query I rowsort
SELECT - 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT - 93 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-93

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT 68 FROM tab1 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT DISTINCT ( - 71 ) * - cor0.col1 - + 67 * + 57 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3393
-695
228

query I rowsort
SELECT ALL + 58 AS col0 FROM tab1 GROUP BY col2
----
58
58
58

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-15
-91
-92

query I rowsort
SELECT - 52 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-52
-52
-52

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - 1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1
-82

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT ALL + cor0.col1 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
102
115
14

query I rowsort
SELECT DISTINCT cor0.col1 - + 49 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-49
32

query I rowsort
SELECT ALL 28 FROM tab1 AS cor0 GROUP BY cor0.col2
----
28
28
28

onlyif mysql # DIV for integer division: 
query I rowsort label-2976
SELECT cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2976
SELECT cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT 16 * 40 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
640
640
640

query I rowsort
SELECT + NULLIF ( - cor0.col0, - 66 + col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 13 * col0 FROM tab0 AS cor0 GROUP BY col0, col0, cor0.col0
----
1079
338
559

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-51
-51
-51

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT 88 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
88

query I rowsort
SELECT cor0.col2 * 38 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1710
2698
304

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 72 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-72
-72
-72

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT - - 10 FROM tab0 GROUP BY tab0.col1
----
10
10

query I rowsort
SELECT ALL - 43 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-43
-43
-43

query I rowsort
SELECT + cor0.col0 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, col0, cor0.col0
----
124
26
83

query I rowsort
SELECT 71 + + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
116
142
79

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 + + 10 FROM tab1 AS cor0 GROUP BY cor0.col0
----
494
6734
794

query I rowsort
SELECT DISTINCT + 22 - - col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
105
48
65

query I rowsort
SELECT + + 35 AS col2 FROM tab1 GROUP BY tab1.col2
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-2996
SELECT DISTINCT + 18 DIV - 23 FROM tab0 cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-2996
SELECT DISTINCT + 18 / - 23 FROM tab0 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
0
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2998
SELECT + CASE - cor0.col0 WHEN CAST( NULL AS SIGNED ) THEN - 60 + - cor0.col1 * cor0.col2 END * + cor0.col1 + + cor0.col1 FROM tab1 cor0 GROUP BY col2, cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2998
SELECT + CASE - cor0.col0 WHEN CAST ( NULL AS INTEGER ) THEN - 60 + - cor0.col1 * cor0.col2 END * + cor0.col1 + + cor0.col1 FROM tab1 cor0 GROUP BY col2, cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 50 FROM tab1 GROUP BY tab1.col1
----
-50
-50
-50

query I rowsort
SELECT ALL - cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col0
----
-44
-57
-6

query I rowsort
SELECT + col2 - 98 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-27
-53
-90

query I rowsort
SELECT + col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT - cor0.col0 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 84 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6804

query I rowsort
SELECT - 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-26
-26
-26

query I rowsort
SELECT ALL 63 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
63
63
63

query I rowsort
SELECT ALL + 29 * CASE col1 WHEN cor0.col1 THEN NULL WHEN + cor0.col2 THEN + cor0.col1 * cor0.col2 ELSE NULL END FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 37 AS col1 FROM tab2 GROUP BY tab2.col0
----
37
37
37

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - - 48 AS col1 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
48

query I rowsort
SELECT DISTINCT cor0.col1 * + 93 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7533

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL 9 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
135
819
828

query I rowsort
SELECT DISTINCT + 53 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT ALL - - 29 AS col1 FROM tab1 GROUP BY col0
----
29
29
29

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab2 GROUP BY tab2.col0
----
22

query I rowsort
SELECT ALL + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - tab2.col0 * - 6 FROM tab2 GROUP BY tab2.col0
----
546
552
90

query I rowsort
SELECT ALL - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor1.col0 - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3023
SELECT + CAST( NULL AS SIGNED ) / + 25 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3023
SELECT + CAST ( NULL AS INTEGER ) / + 25 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT DISTINCT + 74 FROM tab1 AS cor0 GROUP BY cor0.col0
----
74

query I rowsort
SELECT DISTINCT - 20 AS col1 FROM tab2 GROUP BY tab2.col1
----
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + 10 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
10
91

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 81 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
81

query I rowsort
SELECT - 25 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-25
-25

query I rowsort
SELECT DISTINCT 95 + 30 FROM tab0 AS cor0 GROUP BY cor0.col2
----
125

query I rowsort
SELECT - cor0.col2 * + 47 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-2726
-3713
-4089

query I rowsort
SELECT + cor0.col1 + ( + cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT ALL - 10 AS col0 FROM tab2 GROUP BY tab2.col2
----
-10
-10
-10

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col1 + - cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col0, cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL - 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-59
-59
-59

query I rowsort
SELECT ALL 83 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
83
83

query I rowsort
SELECT DISTINCT - 35 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-35

query I rowsort
SELECT DISTINCT 93 FROM tab0 AS cor0 GROUP BY cor0.col0
----
93

query I rowsort
SELECT 35 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1540
1995
210

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3044
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3044
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT + 13 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
13

query I rowsort
SELECT - cor0.col0 + - 75 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-103
-157
-97

query I rowsort
SELECT - 31 AS col1 FROM tab0 GROUP BY tab0.col0
----
-31
-31
-31

query I rowsort
SELECT - 49 FROM tab0 cor0 GROUP BY cor0.col2
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT cor0.col2 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
138
148
99

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT 0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL + ( - col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 37 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 + + 18 col1 FROM tab2 AS cor0 GROUP BY col2
----
35
35
35

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + 67 * + 55 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
3685
3685
3685

query I rowsort
SELECT + 67 - 82 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-15
-15
-15

query I rowsort
SELECT cor0.col2 * 13 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
585
923

query I rowsort
SELECT - cor0.col2 * - 55 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2475
3905
440

query I rowsort
SELECT ALL + 63 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT ALL 37 - - cor0.col1 * 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
406
568
586

onlyif mysql # DIV for integer division: 
query I rowsort label-3065
SELECT + cor0.col2 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
5

skipif mysql # not compatible
query I rowsort label-3065
SELECT + cor0.col2 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
5

query I rowsort
SELECT DISTINCT 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
21

onlyif mysql # DIV for integer division: 
query I rowsort label-3067
SELECT DISTINCT 4 DIV 34 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-3067
SELECT DISTINCT 4 / 34 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - 72 col0 FROM tab0 AS cor0 GROUP BY col2
----
-1728
-2736
-5688

query I rowsort
SELECT ALL 77 FROM tab0 cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT DISTINCT + 51 * cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
4050

query I rowsort
SELECT ALL - cor0.col1 + 46 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-35
46
46

query I rowsort
SELECT ALL + 3 FROM tab0 GROUP BY tab0.col2
----
3
3
3

onlyif mysql # DIV for integer division: 
query I rowsort label-3073
SELECT ALL + + 58 DIV - 25 AS col0 FROM tab2 GROUP BY tab2.col2
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-3073
SELECT ALL + + 58 / - 25 AS col0 FROM tab2 GROUP BY tab2.col2
----
-2
-2
-2

query I rowsort
SELECT 5 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
5
5
5

query I rowsort
SELECT + COALESCE ( - 72, cor0.col2 + cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-72
-72
-72

query I rowsort
SELECT + 94 FROM tab1 cor0 GROUP BY col0
----
94
94
94

query I rowsort
SELECT DISTINCT 75 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
75

query I rowsort
SELECT + cor0.col0 * - 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-104
-172
-332

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * 48 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1248
2064
3984

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3080
SELECT ALL - CAST( 90 AS SIGNED ) * - tab0.col0 + 82 FROM tab0 GROUP BY tab0.col0
----
2422
3952
7552

skipif mysql # not compatible
query I rowsort label-3080
SELECT ALL - CAST ( 90 AS INTEGER ) * - tab0.col0 + 82 FROM tab0 GROUP BY tab0.col0
----
2422
3952
7552

query I rowsort
SELECT DISTINCT 3 + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
47
60
9

query I rowsort
SELECT + 55 * tab2.col0 + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
5096
5152
840

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 * + 72 col0 FROM tab0 GROUP BY tab0.col2
----
-6840
-6840
-6840

query I rowsort
SELECT - 63 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
8

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0, col2
----
26
43
83

query I rowsort
SELECT + - 24 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-24
-24

query I rowsort
SELECT DISTINCT 53 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
53

query I rowsort
SELECT - 55 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-55
-55
-55

query I rowsort
SELECT DISTINCT 29 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-16
-42
21

query I rowsort
SELECT DISTINCT 86 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0, cor1.col0
----
86

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
162

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 45 * cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
3645

onlyif mysql # DIV for integer division: 
query I rowsort label-3096
SELECT DISTINCT + cor0.col1 DIV - col0 + 80 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1760
2238
6560

skipif mysql # not compatible
query I rowsort label-3096
SELECT DISTINCT + cor0.col1 / - col0 + 80 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1760
2238
6560

query I rowsort
SELECT 33 FROM tab2 cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT ALL - 45 + - cor0.col2 * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-3409
-6286
-7614

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 * 14 FROM tab1 AS cor0 GROUP BY cor0.col2
----
112
630
994

query I rowsort
SELECT cor0.col0 * 6 FROM tab2 AS cor0 GROUP BY cor0.col0
----
546
552
90

query I rowsort
SELECT col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 + + 71 AS col1 FROM tab1 cor0 GROUP BY col1
----
-1865
-3178
35

query I rowsort
SELECT DISTINCT 45 + - cor0.col0 * - 9 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
180
864
873

query I rowsort
SELECT ALL - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col1
----
9 values hashing to 80983fba835f74f05832d31491920fd2

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT DISTINCT + ( - 76 ) * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1824
-2888
-6004

query I rowsort
SELECT - 18 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col2
----
-18
-18
-18

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT + col2 + tab2.col2 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT - cor0.col1 - 10 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-51
-69
-71

query I rowsort
SELECT - 1 + + col1 * + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1935
3248
35

query I rowsort
SELECT DISTINCT + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - NULLIF ( cor0.col2, - cor0.col2 * cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( cor0.col2 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 49 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT 47 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-4277
-4324
-705

query I rowsort
SELECT - cor0.col2 * - 48 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2160
3408
384

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 28 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
28

query I rowsort
SELECT DISTINCT + 16 AS col2 FROM tab1 GROUP BY tab1.col0
----
16

query I rowsort
SELECT - cor0.col1 - + 14 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-20
-58
-71

query I rowsort
SELECT - + 72 AS col0 FROM tab2 GROUP BY tab2.col0
----
-72
-72
-72

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 71 FROM tab2 cor0 GROUP BY cor0.col0
----
71
71
71

onlyif mysql # DIV for integer division: 
query I rowsort label-3132
SELECT DISTINCT cor0.col0 DIV 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-3132
SELECT DISTINCT cor0.col0 / 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT + 41 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-38
17
3

query I rowsort
SELECT + cor1.col2 * + 27 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
1215
1917
216

query I rowsort
SELECT - col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 60 * 10 col0 FROM tab0 GROUP BY tab0.col0
----
-600
-600
-600

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT - 97 FROM tab0 AS cor0 GROUP BY col1
----
-97
-97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3139
SELECT + CAST( - COALESCE ( 99, - col2, - tab2.col1 ) AS SIGNED ) AS col2 FROM tab2 GROUP BY col0
----
-99
-99
-99

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3139
SELECT + CAST ( - COALESCE ( 99, - col2, - tab2.col1 ) AS INTEGER ) AS col2 FROM tab2 GROUP BY col0
----
-99
-99
-99

query I rowsort
SELECT - 17 AS col1 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
-17
-17
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 63 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
63
63
63

query I rowsort
SELECT 3 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
3
3
3

query I rowsort
SELECT ALL 26 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
26
26

query I rowsort
SELECT + 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT + 66 FROM tab1 cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT 33 * + 99 FROM tab1 AS cor0 GROUP BY col1
----
3267
3267
3267

query I rowsort
SELECT cor0.col2 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
105
121
67

query I rowsort
SELECT ALL - ( 48 ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-48
-48

query I rowsort
SELECT - cor0.col0 - - 88 FROM tab1 cor0 GROUP BY cor0.col0
----
6
60
66

query I rowsort
SELECT - + 20 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 43 * 64 col0 FROM tab0 GROUP BY tab0.col0
----
-2752
-2752
-2752

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2025
-5041
-64

query I rowsort
SELECT ALL - + 44 FROM tab1 GROUP BY tab1.col1
----
-44
-44
-44

query I rowsort
SELECT ALL - tab0.col1 + col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT - - 9 AS col0 FROM tab1 GROUP BY col2
----
9
9
9

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL 86 FROM tab2 GROUP BY tab2.col2
----
86
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
28
28
28

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3159
SELECT DISTINCT CAST( + 31 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
31

skipif mysql # not compatible
query I rowsort label-3159
SELECT DISTINCT CAST ( + 31 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
31

query I rowsort
SELECT ALL - tab1.col0 * tab1.col0 + + 55 FROM tab1 GROUP BY tab1.col0
----
-429
-6669
-729

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT ALL 19 AS col1 FROM tab0 GROUP BY tab0.col0
----
19
19
19

query I rowsort
SELECT ALL cor0.col2 - + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 93 FROM tab0 cor0 GROUP BY col1
----
-93
-93

query I rowsort
SELECT DISTINCT 61 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1342
1708
5002

query I rowsort
SELECT ALL + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + col0 * cor0.col0 + - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1806
650
6806

query I rowsort
SELECT ALL col2 FROM tab0 WHERE NULL IS NULL GROUP BY col2
----
24
38
79

query I rowsort
SELECT col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT cor0.col2 + + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT 3 * + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
135
213
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 64 * col1 col1 FROM tab0 GROUP BY col1
----
0
5184

onlyif mysql # DIV for integer division: 
query I rowsort label-3177
SELECT DISTINCT - cor0.col2 DIV cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-3177
SELECT DISTINCT - cor0.col2 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-1

query I rowsort
SELECT NULLIF ( - cor1.col2, cor0.col1 ) AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to 976cc931872319f6c60dc588d08fa95d

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
6561

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT DISTINCT - - tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-11
-14
17

query I rowsort
SELECT + 10 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col2
----
10
10
10

query I rowsort
SELECT ALL 33 AS col2 FROM tab0 GROUP BY tab0.col0
----
33
33
33

query I rowsort
SELECT - 98 FROM tab1 AS cor0 GROUP BY col1
----
-98
-98
-98

query I rowsort
SELECT DISTINCT COALESCE ( - cor0.col2, cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + COALESCE ( - cor0.col0, - cor0.col0, - cor0.col2 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 - - col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
153
30
73

query I rowsort
SELECT + 7 AS col2 FROM tab2 GROUP BY col1
----
7
7
7

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3194
SELECT DISTINCT - 28 DIV - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-3194
SELECT DISTINCT - 28 / - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
1

query I rowsort
SELECT ALL 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 WHERE NOT NULL NOT IN ( cor0.col0 ) OR + cor0.col1 IS NOT NULL GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 32 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-26
-47
-55

query I rowsort
SELECT + + 31 FROM tab1 GROUP BY tab1.col0
----
31
31
31

query I rowsort
SELECT DISTINCT 37 FROM tab0 GROUP BY tab0.col1
----
37

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT tab1.col2 * 63 AS col0 FROM tab1 GROUP BY col2
----
2835
4473
504

query I rowsort
SELECT DISTINCT col0 + + 79 * + 13 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1053
1070
1110

query I rowsort
SELECT DISTINCT cor0.col0 * 25 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2050
550
700

query I rowsort
SELECT DISTINCT ( cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT col1 - 70 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5751

query I rowsort
SELECT DISTINCT + - ( tab2.col0 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col0 * 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1222
2021
3901

query I rowsort
SELECT - + 22 FROM tab0 GROUP BY tab0.col2
----
-22
-22
-22

query I rowsort
SELECT - 85 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-4930
-6715
-7395

query I rowsort
SELECT ALL 1 * + cor0.col2 - + 74 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-36
-50
5

query I rowsort
SELECT 7 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-315
-497
-56

query I rowsort
SELECT ALL - ( - 89 ) FROM tab1 cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT 41 AS col0 FROM tab0 GROUP BY tab0.col2
----
41
41
41

query I rowsort
SELECT 37 * - cor0.col1 + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-186
1140
308

query I rowsort
SELECT + 82 FROM tab1 AS cor0 GROUP BY col0
----
82
82
82

query I rowsort
SELECT ALL - col2 + + 74 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
29
3
66

query I rowsort
SELECT DISTINCT - 27 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
14
32
34

query I rowsort
SELECT ALL 6 FROM tab2 GROUP BY tab2.col0
----
6
6
6

query I rowsort
SELECT ALL + - 11 AS col1 FROM tab2 GROUP BY tab2.col2
----
-11
-11
-11

query I rowsort
SELECT + - 9 FROM tab0 GROUP BY tab0.col1
----
-9
-9

query I rowsort
SELECT DISTINCT 80 AS col1 FROM tab1 GROUP BY tab1.col0
----
80

query I rowsort
SELECT ALL - - 37 AS col0 FROM tab0 GROUP BY tab0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT + - 56 + + tab0.col0 FROM tab0 GROUP BY col0
----
-13
-30
27

query I rowsort
SELECT - col1 AS col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT 28 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-30
-51
-59

query I rowsort
SELECT DISTINCT + 82 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
82

query I rowsort
SELECT DISTINCT 52 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
52

query I rowsort
SELECT 82 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT ALL + 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
85
85
85

query I rowsort
SELECT DISTINCT 4 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4

query I rowsort
SELECT - 36 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-42
-80
-93

query I rowsort
SELECT - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-3235
SELECT ( 88 ) - - cor0.col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
89
89
89

skipif mysql # not compatible
query I rowsort label-3235
SELECT ( 88 ) - - cor0.col1 / cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT cor0.col1 + - 80 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-23
-36
-74

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT + 56 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT 84 AS col0 FROM tab0 GROUP BY tab0.col0
----
84
84
84

query I rowsort
SELECT + 28 * - 34 FROM tab0 cor0 GROUP BY cor0.col2
----
-952
-952
-952

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - + 58 AS col0 FROM tab1 GROUP BY tab1.col2
----
-58
-58
-58

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT 98 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT + 16 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
0
0
81

query I rowsort
SELECT 61 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-18
23
37

query I rowsort
SELECT - + 10 AS col2 FROM tab0 GROUP BY tab0.col1
----
-10
-10

query I rowsort
SELECT - 82 FROM tab1 GROUP BY tab1.col2
----
-82
-82
-82

query I rowsort
SELECT ALL + 37 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3256
SELECT - - 23 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3256
SELECT - - 23 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
1

query I rowsort
SELECT 75 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14
16
34

query I rowsort
SELECT + 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT 53 + - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-30
10
27

query I rowsort
SELECT - col0 * + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-3261
SELECT + ( - tab1.col1 ) DIV + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3261
SELECT + ( - tab1.col1 ) / + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 col2 FROM tab2 GROUP BY tab2.col1
----
33
33
33

query I rowsort
SELECT DISTINCT - 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-51

query I rowsort
SELECT + 69 AS col0 FROM tab2 GROUP BY tab2.col1
----
69
69
69

query I rowsort
SELECT ALL - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - 71 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-71
-71
-71

query I rowsort
SELECT - 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-91
-91
-91

query I rowsort
SELECT ALL - tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + + 77 FROM tab2 GROUP BY tab2.col1
----
77

query I rowsort
SELECT + cor0.col0 + - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 7 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col0 * 17 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1438
380
533

query I rowsort
SELECT 70 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 82 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-3275
SELECT DISTINCT ( + cor0.col2 ) DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-3275
SELECT DISTINCT ( + cor0.col2 ) / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
0

query I rowsort
SELECT ALL - cor0.col0 * - cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col2, cor1.col1
----
9 values hashing to 19cd7195099b01c0ba4a11e95bb242f0

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - - 11 FROM tab1 GROUP BY tab1.col0
----
11

query I rowsort
SELECT - 24 + + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-24
57

query I rowsort
SELECT 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT ALL cor0.col0 - 79 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-51
-57
3

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + - cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 24 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24

query I rowsort
SELECT ALL - 26 AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-26
-26

query I rowsort
SELECT 37 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
37
37
37

query I rowsort
SELECT DISTINCT 41 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
41

query I rowsort
SELECT - 60 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-16
-3
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + + col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 38 FROM tab2 cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT cor0.col2 * 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
135
213
24

query I rowsort
SELECT DISTINCT + 66 FROM tab0 AS cor0 GROUP BY cor0.col2
----
66

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 12 - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-69
12
12

query I rowsort
SELECT - cor0.col0 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 85 * tab0.col1 FROM tab0 GROUP BY col1
----
0
6885

query I rowsort
SELECT DISTINCT - 17 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col2
----
-17

query I rowsort
SELECT - 31 FROM tab2 GROUP BY col2
----
-31
-31
-31

query I rowsort
SELECT 85 FROM tab1 cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT ALL cor0.col0 - cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
-29
16
38

query I rowsort
SELECT DISTINCT + - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3303
SELECT DISTINCT cor0.col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3303
SELECT DISTINCT cor0.col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL + tab0.col1 AS col2 FROM tab0 WHERE NOT NULL IS NULL GROUP BY tab0.col1
----

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT + 35 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL + 51 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
2244
2907
306

onlyif mysql # DIV for integer division: 
query I rowsort label-3310
SELECT cor1.col0 DIV + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3310
SELECT cor1.col0 / + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
1
1
1

query I rowsort
SELECT ALL - cor0.col0 * - 64 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1408
1792
5248

query I rowsort
SELECT cor0.col0 + ( cor0.col2 ) * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1527
619
6267

query I rowsort
SELECT ALL cor0.col1 - + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3315
SELECT ALL + cor0.col0 DIV cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3315
SELECT ALL + cor0.col0 / cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT - cor0.col1 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-114
-12
-88

query I rowsort
SELECT 87 * 88 FROM tab1 GROUP BY col2
----
7656
7656
7656

query I rowsort
SELECT 17 FROM tab0 GROUP BY col1
----
17
17

query I rowsort
SELECT 51 FROM tab2 cor0 GROUP BY cor0.col1
----
51
51
51

query I rowsort
SELECT DISTINCT + 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT - 77 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-77
-77
-77

query I rowsort
SELECT ALL - 67 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-67
-67
-67

query I rowsort
SELECT + 41 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT ALL - cor0.col1 - + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT + 67 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
67

query I rowsort
SELECT DISTINCT col0 + - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-38
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 21 + + col2 col0 FROM tab2 GROUP BY col2
----
100
108
79

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 col0 FROM tab1 GROUP BY tab1.col0
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col1 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 20 AS col2 FROM tab2 GROUP BY tab2.col0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 19 col1 FROM tab2 GROUP BY tab2.col0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
26
43
83

query I rowsort
SELECT ALL 34 FROM tab1 GROUP BY tab1.col1
----
34
34
34

query I rowsort
SELECT - cor0.col2 + - cor0.col2 * + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-2070
-5112
-72

query I rowsort
SELECT + cor0.col0 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT DISTINCT - col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) IS NOT NULL GROUP BY cor0.col0 HAVING NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1 HAVING ( NULL ) <> cor0.col1
----

query I rowsort
SELECT DISTINCT + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 60 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-2
19
27

query I rowsort
SELECT + 85 AS col1 FROM tab2 GROUP BY tab2.col1
----
85
85
85

query I rowsort
SELECT + col2 * + 59 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
3422
4661
5133

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL + NULLIF ( - cor0.col0, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT DISTINCT 39 + + cor0.col2 * 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1083
1461
1605

query I rowsort
SELECT + cor0.col2 * 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3555
5609
632

onlyif mysql # DIV for integer division: 
query I rowsort label-3349
SELECT ALL - cor0.col2 DIV + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3349
SELECT ALL - cor0.col2 / + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, col1
----
45
71
8

query I rowsort
SELECT - 52 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-52
-52
-52

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col1 * + cor0.col1 + - 53 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1628
3428
3668

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT - - 92 FROM tab1 GROUP BY col1
----
92
92
92

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab2 GROUP BY col0
----
-53

query I rowsort
SELECT 76 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-3359
SELECT ALL cor0.col2 * + COALESCE ( 25, + cor0.col1 DIV + col2, + 99 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1975
600
950

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3359
SELECT ALL cor0.col2 * + COALESCE ( 25, + cor0.col1 / + col2, + 99 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1975
600
950

query I rowsort
SELECT ALL + + 80 AS col0 FROM tab1 GROUP BY tab1.col0
----
80
80
80

query I rowsort
SELECT DISTINCT + - 60 + 15 FROM tab0 GROUP BY tab0.col0
----
-45

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + 30 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
30
30
30

query I rowsort
SELECT - 38 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-38
-38
-38

query I rowsort
SELECT - 50 FROM tab0 AS cor0 GROUP BY col2
----
-50
-50
-50

query I rowsort
SELECT DISTINCT - 32 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3368
SELECT + tab0.col0 + tab0.col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3368
SELECT + tab0.col0 + tab0.col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 72 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
72
72
72

query I rowsort
SELECT col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT + 76 AS col1 FROM tab0 GROUP BY tab0.col0
----
76
76
76

query I rowsort
SELECT + 5 FROM tab2 cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT - 54 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, cor0.col1
----
-54
-54
-54

query I rowsort
SELECT ALL - 9 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-9
-9
-9

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col0
----
15
91
92

query I rowsort
SELECT - ( - 3 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT + 0 AS col1 FROM tab2 cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT 49 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
49
49
49

query I rowsort
SELECT ALL - 69 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
1518
1932
5658

query I rowsort
SELECT 31 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
31
31
31

query I rowsort
SELECT ( 60 ) AS col1 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT DISTINCT - 94 FROM tab0 GROUP BY tab0.col2
----
-94

query I rowsort
SELECT DISTINCT + + tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT - 40 * 82 FROM tab2 AS cor0 GROUP BY col1
----
-3280

query I rowsort
SELECT DISTINCT + 40 AS col0 FROM tab2 GROUP BY col1
----
40

query I rowsort
SELECT DISTINCT + 12 FROM tab1 GROUP BY tab1.col0
----
12

query I rowsort
SELECT - 82 FROM tab2 GROUP BY tab2.col0
----
-82
-82
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 68 col0 FROM tab1 AS cor0 GROUP BY col1
----
68
68
68

onlyif mysql # DIV for integer division: 
query I rowsort label-3394
SELECT + 52 DIV 16 AS col1 FROM tab1 GROUP BY tab1.col2
----
3
3
3

skipif mysql # not compatible
query I rowsort label-3394
SELECT + 52 / 16 AS col1 FROM tab1 GROUP BY tab1.col2
----
3
3
3

query I rowsort
SELECT DISTINCT + - 61 FROM tab1 GROUP BY tab1.col1
----
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 29 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
29

onlyif mysql # DIV for integer division: 
query I rowsort label-3397
SELECT COALESCE ( 26, + cor0.col0 * cor0.col2, cor0.col0 + - cor0.col0 DIV + cor0.col1 ) FROM tab2 AS cor0 GROUP BY col0
----
26
26
26

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-3397
SELECT COALESCE ( 26, + cor0.col0 * cor0.col2, cor0.col0 + - cor0.col0 / + cor0.col1 ) FROM tab2 AS cor0 GROUP BY col0
----
26
26
26

query I rowsort
SELECT + - 39 FROM tab0 GROUP BY tab0.col2
----
-39
-39
-39

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 49, cor0.col0 * cor0.col2 - + 33 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT DISTINCT COALESCE ( + cor0.col2, col1 * + cor0.col2 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 66 + 85 * 5 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
491
491
491

query I rowsort
SELECT ALL + 63 FROM tab1 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT 87 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
87
87
87

query I rowsort
SELECT DISTINCT + tab2.col1 * + 28 AS col0 FROM tab2 GROUP BY tab2.col1
----
1148
1652
1708

query I rowsort
SELECT 67 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
67
67
67

query I rowsort
SELECT 37 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75

query I rowsort
SELECT ALL - 84 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-84
-84
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-3409
SELECT DISTINCT cor0.col2 DIV ( + 28 ) AS col1 FROM tab1 cor0 GROUP BY col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3409
SELECT DISTINCT cor0.col2 / ( + 28 ) AS col1 FROM tab1 cor0 GROUP BY col2
----
0
1
2

query I rowsort
SELECT - cor0.col2 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-102
-150
-170

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT 44 AS col2 FROM tab1 GROUP BY tab1.col2
----
44
44
44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3414
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3414
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT + 8 AS col1 FROM tab2 GROUP BY tab2.col0
----
8
8
8

query I rowsort
SELECT - 41 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-41
-41
-41

query I rowsort
SELECT 75 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
75
75
75

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT 36 + - 65 FROM tab0 GROUP BY tab0.col2
----
-29
-29
-29

query I rowsort
SELECT DISTINCT 67 FROM tab1 GROUP BY tab1.col1
----
67

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 67, tab1.col0, + ( - 26 ) ) FROM tab1 GROUP BY tab1.col1
----
67

query I rowsort
SELECT - + 99 AS col2 FROM tab2 GROUP BY tab2.col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT + ( - 64 ) + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-36
-42
18

query I rowsort
SELECT DISTINCT 93 + - 77 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
16

query I rowsort
SELECT ALL 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT DISTINCT - 77 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-168
-169
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + tab1.col2 ) col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 12 FROM tab1 AS cor0 GROUP BY cor0.col2
----
12

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
1681
3481
3721

query I rowsort
SELECT + 0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT - col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT 64 FROM tab0 AS cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT + 94 FROM tab1 cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT + cor0.col0 + - cor0.col0 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-1290
-5244
-7098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + ( + 74 ) FROM tab2 GROUP BY col0
----
74
74
74

query I rowsort
SELECT DISTINCT - 97 FROM tab2 GROUP BY tab2.col1
----
-97

query I rowsort
SELECT - + 75 FROM tab0 GROUP BY tab0.col0
----
-75
-75
-75

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 WHERE NULL IS NOT NULL GROUP BY col0
----

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3440
SELECT ALL cor0.col1 + + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3440
SELECT ALL cor0.col1 + + CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3441
SELECT - cor0.col2 DIV col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3441
SELECT - cor0.col2 / col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + 62 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
62
62
62

query I rowsort
SELECT DISTINCT 64 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
64

query I rowsort
SELECT DISTINCT + 99 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
114
190
191

query I rowsort
SELECT ( - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT + 38 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL col1 * - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT - col0 + - tab1.col0 FROM tab1 GROUP BY col0
----
-164
-44
-56

query I rowsort
SELECT 61 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
61
61
61

query I rowsort
SELECT - 66 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-66
-66
-66

query I rowsort
SELECT cor0.col2 + - 27 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
31
52
60

query I rowsort
SELECT DISTINCT + - 74 FROM tab0 GROUP BY col0
----
-74

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + - 99 * + 75 + + col1 AS col0 FROM tab2 GROUP BY col1
----
-7364
-7366
-7384

query I rowsort
SELECT ALL + 71 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3124
4047
426

query I rowsort
SELECT - + 64 FROM tab2 GROUP BY tab2.col1
----
-64
-64
-64

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 38 + 19 AS col2 FROM tab2 GROUP BY tab2.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 46 col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT ALL 73 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
73
73

query I rowsort
SELECT ALL - - 76 FROM tab1 GROUP BY tab1.col1
----
76
76
76

query I rowsort
SELECT col1 + 83 FROM tab0 GROUP BY col1
----
164
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT col1 * 50 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2200
2850
300

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 82 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
82
82
82

query I rowsort
SELECT ( + 36 ) + + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
117
36

query I rowsort
SELECT 1 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + cor0.col0 + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 26 FROM tab0 GROUP BY tab0.col0
----
26
26
26

query I rowsort
SELECT 52 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-3016
-4108
-4524

query I rowsort
SELECT DISTINCT 54 * cor0.col2 - 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3132
4266
4698

query I rowsort
SELECT ALL cor0.col2 - + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL <> NULL
----

query I rowsort
SELECT ALL 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-3477
SELECT ALL + cor0.col0 DIV - cor0.col0 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
25
42
82

skipif mysql # not compatible
query I rowsort label-3477
SELECT ALL + cor0.col0 / - cor0.col0 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
25
42
82

query I rowsort
SELECT ALL 49 AS col0 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
49
49
49

query I rowsort
SELECT DISTINCT + ( - col0 ) FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 49 FROM tab1 GROUP BY tab1.col0
----
-49

query I rowsort
SELECT DISTINCT - + 96 + + 60 FROM tab0 GROUP BY tab0.col0
----
-36

query I rowsort
SELECT DISTINCT cor0.col1 * - ( 74 ) + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-3212
-4161
-438

query I rowsort
SELECT + tab0.col1 - + 23 AS col0 FROM tab0 GROUP BY tab0.col1
----
-23
58

onlyif mysql # DIV for integer division: 
query I rowsort label-3484
SELECT DISTINCT cor0.col0 DIV - 17 col2 FROM tab0 AS cor0 GROUP BY col0
----
-1
-2
-4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3484
SELECT DISTINCT cor0.col0 / - 17 col2 FROM tab0 AS cor0 GROUP BY col0
----
-1
-2
-4

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-484
-6724
-784

query I rowsort
SELECT ALL 80 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
106
123
163

query I rowsort
SELECT - ( - 80 ) FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT 93 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
93
93
93

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab1 GROUP BY col0
----
73

query I rowsort
SELECT 82 FROM tab0 cor0 GROUP BY col1, col1
----
82
82

query I rowsort
SELECT ALL 64 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
64
64
64

query I rowsort
SELECT DISTINCT + 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT cor0.col2 + + ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 col2 FROM tab2 GROUP BY col1
----
-63
-63
-63

query I rowsort
SELECT DISTINCT + - ( 90 ) FROM tab1 GROUP BY col1
----
-90

query I rowsort
SELECT ALL + cor0.col1 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + cor0.col0 * - cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-210
-8190
-8372

onlyif mysql # DIV for integer division: 
query I rowsort label-3498
SELECT cor0.col0 DIV 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3498
SELECT cor0.col0 / 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
2

onlyif mysql # DIV for integer division: 
query I rowsort label-3499
SELECT ALL + 95 DIV - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3499
SELECT ALL + 95 / - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
-1
-2
-3

query I rowsort
SELECT + cor0.col0 + + 54 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
136
76
82

query I rowsort
SELECT + 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

onlyif mysql # DIV for integer division: 
query I rowsort label-3502
SELECT DISTINCT - 83 DIV cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-13

skipif mysql # not compatible
query I rowsort label-3502
SELECT DISTINCT - 83 / cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-1
-13

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + col0 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - 18 + - 65 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-83
-83

query I rowsort
SELECT ALL - 18 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-18
-18
-18

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + ( 22 ) AS col2 FROM tab2 GROUP BY col0
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col1 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 91 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
91
91
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3512
SELECT DISTINCT - CAST( 43 AS SIGNED ) FROM tab1 AS cor0 GROUP BY col1
----
-43

skipif mysql # not compatible
query I rowsort label-3512
SELECT DISTINCT - CAST ( 43 AS INTEGER ) FROM tab1 AS cor0 GROUP BY col1
----
-43

query I rowsort
SELECT ALL + 8 - - col2 FROM tab1 GROUP BY col2
----
16
53
79

query I rowsort
SELECT - col0 * col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT DISTINCT CASE cor0.col1 WHEN - cor0.col0 THEN NULL WHEN 77 + + col1 THEN cor0.col1 ELSE cor0.col0 END FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 27 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2214
-594
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + ( 55 ) * cor0.col1 col0 FROM tab0 AS cor0 GROUP BY col1
----
0
4536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 99 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT DISTINCT - ( 88 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-88

query I rowsort
SELECT + - 7 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-567
0

query I rowsort
SELECT + - 17 AS col0 FROM tab2 GROUP BY tab2.col2
----
-17
-17
-17

query I rowsort
SELECT DISTINCT tab0.col0 - 23 AS col2 FROM tab0 GROUP BY col0
----
20
3
60

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + 69 - + col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-22
-23
54

query I rowsort
SELECT ALL - + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT - cor0.col1 * cor0.col1 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-26
-6604
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-3528
SELECT + ( cor0.col0 ) DIV - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3528
SELECT + ( cor0.col0 ) / - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-2
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3529
SELECT DISTINCT + cor0.col0 + - CAST( NULL AS DECIMAL ) * - ( + 63 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3529
SELECT DISTINCT + cor0.col0 + - CAST ( NULL AS REAL ) * - ( + 63 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL - 16 * + 30 FROM tab2 GROUP BY col2
----
-480
-480
-480

query I rowsort
SELECT ALL - 27 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
-27
-27
-27

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + 40 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
40

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
114
12
88

query I rowsort
SELECT DISTINCT + 28 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1624
-2212
-2436

query I rowsort
SELECT DISTINCT + 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60

query I rowsort
SELECT DISTINCT - 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-19

query I rowsort
SELECT DISTINCT - col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL 53 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT ALL 72 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT + 88 * - cor0.col2 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-2112
-3344
-6952

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 75, cor0.col2 ) * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1650
2100
6150

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3546
SELECT CAST( - 48 AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

skipif mysql # not compatible
query I rowsort label-3546
SELECT CAST ( - 48 AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + 1 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
72
9

query I rowsort
SELECT DISTINCT tab1.col1 + 76 AS col2 FROM tab1 GROUP BY tab1.col1
----
120
133
82

query I rowsort
SELECT DISTINCT 49 + - 19 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30

query I rowsort
SELECT ALL + 5 FROM tab1 GROUP BY tab1.col0
----
5
5
5

query I rowsort
SELECT DISTINCT + 5 FROM tab0 GROUP BY col2
----
5

onlyif mysql # DIV for integer division: 
query I rowsort label-3552
SELECT cor0.col0 DIV cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-3552
SELECT cor0.col0 / cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
23
29
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3553
SELECT + cor0.col0 DIV 68 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3553
SELECT + cor0.col0 / 68 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + cor0.col1 * cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
3540
3782

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL - 16 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-1264
-384
-608

query I rowsort
SELECT + 54 * cor0.col2 + 27 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
2457
3861
459

query I rowsort
SELECT ALL 40 + + ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
119
64
78

query I rowsort
SELECT DISTINCT col0 + + cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

onlyif mysql # DIV for integer division: 
query I rowsort label-3560
SELECT + cor0.col0 DIV + 11 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
1
8
8

skipif mysql # not compatible
query I rowsort label-3560
SELECT + cor0.col0 / + 11 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
1
8
8

query I rowsort
SELECT + 3 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT ALL 30 FROM tab1 AS cor0 GROUP BY col0
----
30
30
30

query I rowsort
SELECT DISTINCT - 96 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-96

onlyif mysql # DIV for integer division: 
query I rowsort label-3564
SELECT cor0.col2 DIV 70 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3564
SELECT cor0.col2 / 70 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3565
SELECT cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3565
SELECT cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
1
1
1

query I rowsort
SELECT DISTINCT + 43 FROM tab0 AS cor0 GROUP BY cor0.col2
----
43

query I rowsort
SELECT ( - 41 ) + - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-122
-41

onlyif mysql # DIV for integer division: 
query I rowsort label-3568
SELECT 47 DIV 92 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3568
SELECT 47 / 92 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - ( 39 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-39
-39
-39

query I rowsort
SELECT + 79 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
79
79

query I rowsort
SELECT 54 FROM tab1 AS cor0 GROUP BY col2
----
54
54
54

query I rowsort
SELECT + 42 FROM tab0 GROUP BY tab0.col0
----
42
42
42

query I rowsort
SELECT ALL - ( 90 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-90
-90
-90

query I rowsort
SELECT 52 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
52
52
52

query I rowsort
SELECT - cor0.col2 + 3 FROM tab0 AS cor0 GROUP BY col2
----
-21
-35
-76

query I rowsort
SELECT 10 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
10
10
10

query I rowsort
SELECT + 70 FROM tab0 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT 69 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1656
2622
5451

query I rowsort
SELECT + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col0 * + 98 + ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
1485
9009
9108

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 97 col0 FROM tab0 GROUP BY tab0.col1
----
97
97

query I rowsort
SELECT + 75 AS col0 FROM tab1 GROUP BY tab1.col1
----
75
75
75

query I rowsort
SELECT ALL 15 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
15
15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3584
SELECT CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

skipif mysql # not compatible
query I rowsort label-3584
SELECT CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + 65 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
65

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3587
SELECT + CAST( NULL AS SIGNED ) + 52 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3587
SELECT + CAST ( NULL AS INTEGER ) + 52 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - cor0.col0 + + 84 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
41
58

query I rowsort
SELECT 38 * 6 FROM tab0 AS cor0 GROUP BY cor0.col1
----
228
228

query I rowsort
SELECT DISTINCT cor0.col1 - 64 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-23
-3
-5

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 * 41 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
3321

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
0
6561

query I rowsort
SELECT ALL - - 97 AS col2 FROM tab2 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3597
SELECT CAST( NULL AS DECIMAL ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3597
SELECT CAST ( NULL AS REAL ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ( - ( cor0.col1 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + 39 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
39
39

query I rowsort
SELECT DISTINCT 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 col1 FROM tab0 cor0 GROUP BY cor0.col2, col2, cor0.col2, cor0.col0
----
32
32
32

query I rowsort
SELECT 60 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + 32 AS col2 FROM tab0 GROUP BY tab0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT 97 FROM tab0 AS cor0 GROUP BY col2
----
97

query I rowsort
SELECT ( + cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT + 68 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT cor0.col2 * + 65 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3770
5135
5655

onlyif mysql # DIV for integer division: 
query I rowsort label-3614
SELECT DISTINCT cor0.col0 DIV 67 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-3614
SELECT DISTINCT cor0.col0 / 67 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT DISTINCT + + tab0.col2 + 13 FROM tab0 GROUP BY col2
----
37
51
92

query I rowsort
SELECT + - tab2.col2 * + col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + 38 FROM tab0 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT ALL cor0.col1 + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
105
38
79

query I rowsort
SELECT - 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-57
-57
-57

query I rowsort
SELECT ALL 27 AS col1 FROM tab1 GROUP BY tab1.col0
----
27
27
27

query I rowsort
SELECT DISTINCT + + 50 FROM tab2 GROUP BY tab2.col0
----
50

query I rowsort
SELECT - 71 FROM tab1 GROUP BY col0
----
-71
-71
-71

query I rowsort
SELECT DISTINCT 31 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
31

query I rowsort
SELECT - - 99 FROM tab2 GROUP BY tab2.col1
----
99
99
99

query I rowsort
SELECT 1 AS col1 FROM tab0 GROUP BY tab0.col1
----
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 65 col0 FROM tab0 GROUP BY tab0.col1
----
-65
-65

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT + 47 AS col2 FROM tab0 GROUP BY col1
----
47
47

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + 20 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
20
20
20

query I rowsort
SELECT DISTINCT - 23 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-23

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT - cor0.col2 - 47 FROM tab2 AS cor0 GROUP BY col2
----
-105
-126
-134

query I rowsort
SELECT DISTINCT + 6 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-18
-32
-73

query I rowsort
SELECT ALL - 82 FROM tab0 GROUP BY tab0.col0
----
-82
-82
-82

query I rowsort
SELECT - 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-42
-42
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 col0 FROM tab0 GROUP BY tab0.col1
----
46
46

query I rowsort
SELECT + ( 93 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT + ( - 30 ) * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2730
-2760
-450

onlyif mysql # DIV for integer division: 
query I rowsort label-3641
SELECT ALL 32 DIV cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3641
SELECT ALL 32 / cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
4

query I rowsort
SELECT ALL + 93 * - 25 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-2325
-2325
-2325

query I rowsort
SELECT ALL - 34 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-34
-34
-34

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, col2, cor0.col1
----
0

query I rowsort
SELECT + 50 * + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
2900
3950
4350

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ( - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 31 FROM tab1 GROUP BY tab1.col1
----
-31
-31
-31

query I rowsort
SELECT ALL - 78 FROM tab0 GROUP BY tab0.col1
----
-78
-78

query I rowsort
SELECT 91 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
106
182
183

query I rowsort
SELECT ALL - 89 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-89
-89
-89

query I rowsort
SELECT + 4 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT ALL - cor0.col1 + cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
164
8222
8423

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3655
SELECT cor0.col0 * + col0 - - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3655
SELECT cor0.col0 * + col0 - - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3656
SELECT ALL + 9 DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3656
SELECT ALL + 9 / + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 31 - + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-10
-28
-30

query I rowsort
SELECT + 5 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT + 14 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT ALL - cor0.col1 + - 17 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-23
-61
-74

query I rowsort
SELECT + 1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
1
1
1

query I rowsort
SELECT - 86 * - cor0.col0 + - 0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1892
2408
7052

query I rowsort
SELECT ALL - - 74 AS col2 FROM tab2 GROUP BY tab2.col0
----
74
74
74

query I rowsort
SELECT ALL + 4 FROM tab2 GROUP BY tab2.col2
----
4
4
4

query I rowsort
SELECT DISTINCT - ( 42 ) + + 70 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1722
-2702
-5572

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT 81 * + 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1458
1458
1458

query I rowsort
SELECT ALL 15 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
15
15
15

query I rowsort
SELECT DISTINCT - 55 + 9 FROM tab0 AS cor0 GROUP BY col2
----
-46

query I rowsort
SELECT DISTINCT + 96 AS col1 FROM tab2 GROUP BY tab2.col2
----
96

query I rowsort
SELECT cor0.col1 - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-20
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 10 * cor0.col2 + - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
197
297
764

query I rowsort
SELECT 60 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 41 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT DISTINCT - 64 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-64

query I rowsort
SELECT ALL + COALESCE ( cor0.col2, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col2 + - 80 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-125
-151
-88

query I rowsort
SELECT - 16 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1312
352
448

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * + cor0.col1 + - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
3731
5310
854

query I rowsort
SELECT ALL - cor0.col2 * - 41 + - 44 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
2334
3195
3523

query I rowsort
SELECT ALL - cor0.col1 * col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4

query I rowsort
SELECT tab1.col2 * 63 AS col2 FROM tab1 GROUP BY tab1.col2
----
2835
4473
504

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT - 69 AS col2 FROM tab1 GROUP BY col1
----
-69
-69
-69

query I rowsort
SELECT DISTINCT 65 FROM tab0 GROUP BY col0
----
65

query I rowsort
SELECT ALL 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
76
76

query I rowsort
SELECT ALL 3 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT - cor0.col1 + 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-57
24

query I rowsort
SELECT cor0.col1 * + 92 - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7371

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col0 - + ( - cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3694
SELECT cor0.col2 DIV 68 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3694
SELECT cor0.col2 / 68 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0
0
1

query I rowsort
SELECT 2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2
2
2

query I rowsort
SELECT DISTINCT + 21 FROM tab2 AS cor0 GROUP BY col2
----
21

query I rowsort
SELECT + 97 * - 27 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-2619
-2619
-2619

query I rowsort
SELECT 58 AS col2 FROM tab0 cor0 GROUP BY col0
----
58
58
58

query I rowsort
SELECT DISTINCT 59 FROM tab2 AS cor0 GROUP BY cor0.col1
----
59

query I rowsort
SELECT cor0.col1 * - ( - 99 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
4356
5643
594

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
81

query I rowsort
SELECT - cor0.col1 - - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL - 77 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-77
-77
-77

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + + 84 AS col1 FROM tab1 GROUP BY col1
----
84

query I rowsort
SELECT ALL - + 61 FROM tab2 GROUP BY tab2.col0
----
-61
-61
-61

query I rowsort
SELECT - 19 AS col0 FROM tab0 GROUP BY tab0.col1
----
-19
-19

query I rowsort
SELECT - 46 FROM tab2 GROUP BY tab2.col1
----
-46
-46
-46

query I rowsort
SELECT DISTINCT ( cor0.col1 ) - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3710
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col1, col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3710
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col1, col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 32 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-6
11
51

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col1 * cor0.col2 col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
2520
3053
40

query I rowsort
SELECT ( 21 ) + + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
104
47
64

query I rowsort
SELECT ( - 69 ) FROM tab1 cor0 GROUP BY col1, cor0.col0
----
-69
-69
-69

query I rowsort
SELECT DISTINCT - 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT DISTINCT + + col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT cor0.col1 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-32
-51
46

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3720
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3720
SELECT DISTINCT CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT - 45 FROM tab0 GROUP BY tab0.col0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL - tab2.col1 FROM tab2 WHERE NULL IS NOT NULL GROUP BY col1
----

query I rowsort
SELECT ALL 33 FROM tab2 AS cor0 GROUP BY cor0.col2
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - + 19 AS col0 FROM tab2 GROUP BY tab2.col0
----
-19
-19
-19

query I rowsort
SELECT 37 * - 47 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1739
-1739

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 50 col0 FROM tab1 GROUP BY col1
----
-50
-50
-50

query I rowsort
SELECT ALL - 8 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-8
-8
-8

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

query I rowsort
SELECT 73 FROM tab2 AS cor0 GROUP BY col0
----
73
73
73

query I rowsort
SELECT + 31 FROM tab0 AS cor0 GROUP BY col0
----
31
31
31

query I rowsort
SELECT DISTINCT - 9 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-9

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 58 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58

query I rowsort
SELECT - 80 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT - - 70 FROM tab0 GROUP BY tab0.col2
----
70
70
70

query I rowsort
SELECT DISTINCT 6 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
264
342
36

query I rowsort
SELECT ALL 9 AS col1 FROM tab2 GROUP BY tab2.col1
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - ( + 88 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-27
-29
-47

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3744
SELECT DISTINCT 71 * 52 + + cor0.col1 * CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3744
SELECT DISTINCT 71 * 52 + + cor0.col1 * CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT ( col2 ) FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - - COALESCE ( + 42, - col2 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
42
42
42

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 cor0 GROUP BY col2, col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3748
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3748
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 88 AS col2 FROM tab0 GROUP BY tab0.col2
----
88
88
88

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 82 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT 30 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
30

query I rowsort
SELECT - ( + 88 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-88
-88
-88

query I rowsort
SELECT DISTINCT cor0.col2 + ( - cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + 10 FROM tab1 AS cor0 GROUP BY col2
----
10
10
10

query I rowsort
SELECT + cor0.col2 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT - 23 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-23
-23
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 col0 FROM tab2 GROUP BY col2
----
57
57
57

query I rowsort
SELECT col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL - + 16 AS col0 FROM tab1 GROUP BY tab1.col1
----
-16
-16
-16

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 20 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT 33 FROM tab2 GROUP BY col0
----
33

query I rowsort
SELECT ALL - 24 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT ALL + 22 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT - ( 71 ) FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-71
-71
-71

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT - 44 * 72 FROM tab2 GROUP BY tab2.col0
----
-3168
-3168
-3168

query I rowsort
SELECT - 28 FROM tab0 AS cor0 GROUP BY col1
----
-28
-28

onlyif mysql # DIV for integer division: 
query I rowsort label-3771
SELECT - 96 DIV 6 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-16
-16
-16

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3771
SELECT - 96 / 6 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-16
-16
-16

query I rowsort
SELECT - 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT ALL + ( - cor0.col0 ) FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + 53 FROM tab2 GROUP BY col1
----
53
53
53

query I rowsort
SELECT + cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL 87 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
-41
-59
-61

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT ALL - 65 AS col0 FROM tab0 GROUP BY tab0.col2
----
-65
-65
-65

query I rowsort
SELECT ALL + + 72 FROM tab1 GROUP BY tab1.col0
----
72
72
72

query I rowsort
SELECT ALL 39 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 - col1 col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-118
-122
-82

query I rowsort
SELECT - tab1.col1 * + 89 FROM tab1 GROUP BY tab1.col1
----
-3916
-5073
-534

query I rowsort
SELECT ALL 77 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT 50 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
50
50
50

query I rowsort
SELECT + - 58 FROM tab2 GROUP BY tab2.col0
----
-58
-58
-58

query I rowsort
SELECT col0 * + 12 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1183
1196
195

query I rowsort
SELECT tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + + 47 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1128
1786
3713

query I rowsort
SELECT ALL - 15 + 36 FROM tab0 AS cor0 GROUP BY cor0.col1
----
21
21

query I rowsort
SELECT DISTINCT - 99 FROM tab2 GROUP BY tab2.col1
----
-99

query I rowsort
SELECT DISTINCT + cor0.col0 * 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2132
572
728

onlyif mysql # DIV for integer division: 
query I rowsort label-3794
SELECT cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3794
SELECT cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT + 73 + + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
118
144
81

query I rowsort
SELECT 85 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - 34 * + col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1419
-2739
-858

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col2 * - 1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 + + 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
103
104
27

query I rowsort
SELECT 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT DISTINCT + 3 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0

query I rowsort
SELECT ALL - 3 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29
-46
-86

query I rowsort
SELECT + 74 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT 12 FROM tab2 GROUP BY tab2.col1
----
12
12
12

query I rowsort
SELECT - 54 FROM tab2 GROUP BY tab2.col0
----
-54
-54
-54

query I rowsort
SELECT - 27 AS col1 FROM tab0 GROUP BY tab0.col0
----
-27
-27
-27

onlyif mysql # DIV for integer division: 
query I rowsort label-3811
SELECT + cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3811
SELECT + cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL 65 * + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
5915
5980
975

query I rowsort
SELECT ALL 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3814
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3814
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * + 33 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1254
2607
792

query I rowsort
SELECT 27 FROM tab2 GROUP BY tab2.col1
----
27
27
27

query I rowsort
SELECT + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 92 - - 50 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4142
92

query I rowsort
SELECT DISTINCT 46 + - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-35
46

query I rowsort
SELECT - 52 AS col2 FROM tab0 GROUP BY tab0.col1
----
-52
-52

query I rowsort
SELECT - + 71 FROM tab1 GROUP BY tab1.col1
----
-71
-71
-71

onlyif mysql # DIV for integer division: 
query I rowsort label-3822
SELECT ALL + 98 + - cor0.col1 DIV - 54 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98
98
99

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3822
SELECT ALL + 98 + - cor0.col1 / - 54 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98
98
99

onlyif mysql # DIV for integer division: 
query I rowsort label-3823
SELECT - 88 DIV col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-3823
SELECT - 88 / col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-11

query I rowsort
SELECT ALL ( - cor0.col0 ) * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - - 29 + + 63 FROM tab1 GROUP BY col1
----
92
92
92

query I rowsort
SELECT ALL 71 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
71
71
71

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-162
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 36 * + 87 + - tab0.col0 col0 FROM tab0 GROUP BY col0
----
3049
3089
3106

query I rowsort
SELECT ALL + - 19 FROM tab1 GROUP BY tab1.col2
----
-19
-19
-19

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 40 FROM tab2 AS cor0 GROUP BY col1
----
-40

query I rowsort
SELECT ALL 50 FROM tab1 AS cor0 GROUP BY col1
----
50
50
50

query I rowsort
SELECT DISTINCT - 27 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
-27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3834
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3834
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT - 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT 64 * + 82 FROM tab2 GROUP BY tab2.col2
----
5248
5248
5248

query I rowsort
SELECT + 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT 77 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
77
77
77

query I rowsort
SELECT ALL + 86 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
86
86
86

query I rowsort
SELECT + + 28 AS col2 FROM tab0, tab1 cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL 76 FROM tab1 cor0 GROUP BY col1
----
76
76
76

query I rowsort
SELECT 94 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT ALL - - tab2.col1 * + 50 FROM tab2 GROUP BY tab2.col1
----
2050
2950
3050

query I rowsort
SELECT ALL - cor0.col2 + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 91 AS col0 FROM tab1 GROUP BY col2
----
91

query I rowsort
SELECT + + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 29 + + 51 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + tab2.col0 AS col1 FROM tab2 WHERE ( NULL ) = NULL GROUP BY tab2.col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-3853
SELECT ALL + 61 DIV 80 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3853
SELECT ALL + 61 / 80 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 + 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-150
-8206
-8389

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 65, cor0.col1 - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT DISTINCT + + 51 FROM tab2 GROUP BY col2
----
51

query I rowsort
SELECT - cor0.col0 - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
164
44
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3859
SELECT - CAST( - col1 AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-3859
SELECT - CAST ( - col1 AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT 57 FROM tab1 GROUP BY col1
----
57

query I rowsort
SELECT ALL 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4
4
4

query I rowsort
SELECT ALL - 70 FROM tab0 cor0 GROUP BY cor0.col1
----
-70
-70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3864
SELECT + + CAST( NULL AS SIGNED ) + 76 col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3864
SELECT + + CAST ( NULL AS INTEGER ) + 76 col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 FROM tab2 cor0 GROUP BY col0, col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
210
8190
8372

query I rowsort
SELECT DISTINCT 14 + - 4 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-314
-74
-98

query I rowsort
SELECT - + 48 AS col1 FROM tab2 GROUP BY tab2.col2
----
-48
-48
-48

query I rowsort
SELECT 1 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + 8 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-73
8

query I rowsort
SELECT DISTINCT + cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3873
SELECT CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3873
SELECT CAST ( NULL AS REAL ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 79 AS col1 FROM tab1 GROUP BY tab1.col2
----
79
79
79

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
0

query I rowsort
SELECT - 28 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-28
-28
-28

query I rowsort
SELECT DISTINCT 68 FROM tab0 AS cor0 GROUP BY cor0.col0
----
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 38 * 17 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
646
646
646

query I rowsort
SELECT DISTINCT 32 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
32

query I rowsort
SELECT cor0.col0 * 94 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to b5626eb5d1ba6869c64680e1e0863deb

query I rowsort
SELECT ALL - ( cor0.col2 ) + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 61 * cor0.col1 + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2542
3658
3782

onlyif mysql # DIV for integer division: 
query I rowsort label-3883
SELECT DISTINCT cor0.col1 DIV + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3883
SELECT DISTINCT cor0.col1 / + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT - + 25 FROM tab0 GROUP BY tab0.col0
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 * col1 col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + col1 AS col2 FROM tab0 WHERE NOT NULL <> NULL GROUP BY tab0.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor1.col0 col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to c8ac9ff2992a2ce1ac2e18fb50bf2ca7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3890
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-3890
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3891
SELECT ALL + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3891
SELECT ALL + CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( col1 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 4 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 50 col2 FROM tab0 GROUP BY tab0.col2
----
50

query I rowsort
SELECT - cor0.col2 - + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-116
-158
-174

query I rowsort
SELECT ALL - col1 - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
-126
-28
-85

query I rowsort
SELECT ALL col2 + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT - col2 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT ALL 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT + 81 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col1
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT cor0.col1 * - 10 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-410
-590
-610

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 78 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-78
-78
-78

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3904
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-3904
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT cor0.col0 * 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2262
3741
7221

query I rowsort
SELECT 78 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
78
78

query I rowsort
SELECT 43 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
43
43
43

query I rowsort
SELECT DISTINCT + 75 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
75

onlyif mysql # DIV for integer division: 
query I rowsort label-3910
SELECT DISTINCT cor0.col1 DIV cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
2

skipif mysql # not compatible
query I rowsort label-3910
SELECT DISTINCT cor0.col1 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
2

query I rowsort
SELECT ALL + 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
95
95
95

query I rowsort
SELECT ALL 9 FROM tab2 AS cor0 GROUP BY cor0.col1
----
9
9
9

query I rowsort
SELECT NULLIF ( cor0.col1, + cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 82 FROM tab2 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT ALL + 33 FROM tab0 GROUP BY col2
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-3916
SELECT + tab2.col2 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3916
SELECT + tab2.col2 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3917
SELECT ALL + 69 DIV 4 FROM tab1 GROUP BY col0
----
17
17
17

skipif mysql # not compatible
query I rowsort label-3917
SELECT ALL + 69 / 4 FROM tab1 GROUP BY col0
----
17
17
17

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 26, cor0.col2, cor0.col2 ) FROM tab0 AS cor0 GROUP BY col1
----
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 + - cor0.col1 col0 FROM tab0 cor0 GROUP BY col1
----
-6642
0

query I rowsort
SELECT col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - cor0.col1 + - 89 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-170
-89

query I rowsort
SELECT DISTINCT + 86 AS col1 FROM tab0 GROUP BY tab0.col1
----
86

query I rowsort
SELECT DISTINCT + 5 + + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
46
64
66

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - 19 FROM tab2 AS cor0 GROUP BY cor0.col0, col0, col2
----
-19
-19
-19

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col1 * + ( + 75 ) - + 27 FROM tab0 cor0 GROUP BY cor0.col1
----
-27
6048

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL BETWEEN cor0.col1 AND NULL ) AND NOT NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 96 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-96

query I rowsort
SELECT cor0.col1 * + cor0.col1 - - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
3540
3782

query I rowsort
SELECT DISTINCT + 50 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50

query I rowsort
SELECT cor0.col2 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3937
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab0 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3937
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab0 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT ALL + 31 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-3939
SELECT ALL 99 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
12
2

skipif mysql # not compatible
query I rowsort label-3939
SELECT ALL 99 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
12
2

query I rowsort
SELECT DISTINCT - 5 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5

query I rowsort
SELECT - 43 + - 82 AS col2 FROM tab2 GROUP BY tab2.col2
----
-125
-125
-125

query I rowsort
SELECT - - 83 AS col1 FROM tab0 GROUP BY tab0.col0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 69 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-69
-69
-69

query I rowsort
SELECT + 95 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
110
186
187

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT DISTINCT + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + cor0.col1 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-3772
-5369
-915

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3948
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3948
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 51 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT 35 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1330
2765
840

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT + + 17 FROM tab1 GROUP BY tab1.col2
----
17
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-3954
SELECT col0 DIV - cor0.col0 + 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76
76
76

skipif mysql # not compatible
query I rowsort label-3954
SELECT col0 / - cor0.col0 + 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT ALL ( cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 * 36 FROM tab1 AS cor0 GROUP BY col1
----
1584
2052
216

query I rowsort
SELECT 89 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
89
89
89

query I rowsort
SELECT cor0.col2 + + cor0.col2 * col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
6561

query I rowsort
SELECT - 13 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-13
-13
-13

query I rowsort
SELECT - 82 + 93 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT ( cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 19 * col0 - + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1638
1656
270

query I rowsort
SELECT + 40 * + 61 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2440
2440
2440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 47 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-47

onlyif mysql # DIV for integer division: 
query I rowsort label-3966
SELECT + + tab2.col0 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3966
SELECT + + tab2.col0 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 19 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
19

query I rowsort
SELECT + col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT - 91 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-2002
-2548
-7462

query I rowsort
SELECT ALL - 53 * 37 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1961
-1961
-1961

query I rowsort
SELECT cor0.col1 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + ( - 30 ) col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-24
14
27

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - + 50 AS col0 FROM tab0 GROUP BY col0
----
-50

query I rowsort
SELECT + 77 FROM tab2 GROUP BY tab2.col2
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 41 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
41

query I rowsort
SELECT DISTINCT - 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-82

query I rowsort
SELECT ALL 80 FROM tab1 cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT 24 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 97 col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
97
97
97

query I rowsort
SELECT ALL 72 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT ALL - 58 AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-58
-58

query I rowsort
SELECT - 16 AS col2 FROM tab1 GROUP BY col0
----
-16
-16
-16

query I rowsort
SELECT - 3 FROM tab2 cor0 GROUP BY col1
----
-3
-3
-3

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 2 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-166
-52
-86

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 WHERE NOT ( NULL ) IS NOT NULL GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT DISTINCT 37 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
37

query I rowsort
SELECT ALL - cor0.col2 * + 70 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-3150
-4970
-560

query I rowsort
SELECT + col2 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
1444
576
6241

query I rowsort
SELECT + 40 FROM tab0 AS cor0 GROUP BY col1
----
40
40

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - tab0.col0 * 59 AS col2 FROM tab0 GROUP BY col0
----
-1534
-2537
-4897

query I rowsort
SELECT ALL 37 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
120
63
80

query I rowsort
SELECT - tab0.col0 - 23 FROM tab0 GROUP BY tab0.col0
----
-106
-49
-66

query I rowsort
SELECT 41 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT 45 + + col2 FROM tab1 GROUP BY tab1.col2
----
116
53
90

query I rowsort
SELECT DISTINCT + 2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4001
SELECT - 94 DIV col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4001
SELECT - 94 / col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
-1
-2
-3

query I rowsort
SELECT + 20 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
20
20
20

query I rowsort
SELECT ALL + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT - 12 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-12
-12
-12

onlyif mysql # DIV for integer division: 
query I rowsort label-4005
SELECT + cor0.col0 + + 28 DIV - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
21
27
82

skipif mysql # not compatible
query I rowsort label-4005
SELECT + cor0.col0 + + 28 / - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
21
27
82

query I rowsort
SELECT ALL + 58 AS col2 FROM tab1 GROUP BY tab1.col1
----
58
58
58

query I rowsort
SELECT DISTINCT - - 34 AS col1 FROM tab1 GROUP BY tab1.col1
----
34

query I rowsort
SELECT 9 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
9
9

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + 95 * col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
2470
4085
7885

query I rowsort
SELECT + 47 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1128
1786
3713

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 52 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-52

query I rowsort
SELECT ALL + 88 * col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
2288
3784
7304

query I rowsort
SELECT cor0.col0 - + col0 * + ( - 9 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
150
910
920

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor0.col1
----
0
81

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2025
-5041
-64

query I rowsort
SELECT - 87 FROM tab2 GROUP BY tab2.col1
----
-87
-87
-87

query I rowsort
SELECT DISTINCT + 38 * - 40 FROM tab1 cor0 GROUP BY cor0.col2
----
-1520

query I rowsort
SELECT 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT + COALESCE ( + 41, + 73 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT DISTINCT + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4024
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4024
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + ( + tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 22 FROM tab0 GROUP BY tab0.col2
----
22

query I rowsort
SELECT 96 * cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 125d538b80c229e9cb023adebddfba41

query I rowsort
SELECT 49 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2009
2891
2989

query I rowsort
SELECT DISTINCT tab1.col1 * + 77 AS col1 FROM tab1 GROUP BY tab1.col1
----
3388
4389
462

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT 3 FROM tab2 cor0 GROUP BY cor0.col1
----
3
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - 73 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-45
-51
9

query I rowsort
SELECT DISTINCT 38 AS col0 FROM tab0 GROUP BY tab0.col1
----
38

query I rowsort
SELECT 36 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2088
2844
3132

query I rowsort
SELECT ALL 73 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
73
73
73

query I rowsort
SELECT 62 FROM tab2 AS cor0 GROUP BY col0, col1
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-4038
SELECT + cor0.col2 DIV + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4038
SELECT + cor0.col2 / + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT col0 + col0 * 43 AS col2 FROM tab2 GROUP BY tab2.col0
----
4004
4048
660

query I rowsort
SELECT 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
33
33
33

query I rowsort
SELECT ALL - cor0.col2 + 1 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - 3 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT cor0.col2 * - 40 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-2320
-3160
-3480

query I rowsort
SELECT ALL 19 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 5 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
-5
-5

query I rowsort
SELECT + - 4 FROM tab1 GROUP BY tab1.col2
----
-4
-4
-4

onlyif mysql # DIV for integer division: 
query I rowsort label-4047
SELECT DISTINCT - col2 DIV ( - 31 ) col1 FROM tab0 GROUP BY col2
----
0
1
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4047
SELECT DISTINCT - col2 / ( - 31 ) col1 FROM tab0 GROUP BY col2
----
0
1
2

query I rowsort
SELECT ALL 96 * 75 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7200
7200
7200

query I rowsort
SELECT DISTINCT cor0.col1 + - 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-41
-54
-92

query I rowsort
SELECT DISTINCT - 56 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-56

query I rowsort
SELECT - cor0.col2 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT + 78 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT - 38 AS col1 FROM tab0 GROUP BY tab0.col2
----
-38

query I rowsort
SELECT - 89 FROM tab1 cor0 GROUP BY cor0.col0
----
-89
-89
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 37 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
37

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT - 22 + 94 AS col0 FROM tab2 GROUP BY tab2.col1
----
72
72
72

query I rowsort
SELECT 4 * - 25 AS col2 FROM tab1 GROUP BY tab1.col1
----
-100
-100
-100

query I rowsort
SELECT - 77 FROM tab0 GROUP BY tab0.col2
----
-77
-77
-77

onlyif mysql # DIV for integer division: 
query I rowsort label-4063
SELECT ALL 92 DIV 53 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4063
SELECT ALL 92 / 53 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - cor0.col0 + + 61 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-22
18
35

query I rowsort
SELECT 70 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
70
70
70

query I rowsort
SELECT + 2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT 91 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
149
170
178

query I rowsort
SELECT - 74 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-31
-48
9

query I rowsort
SELECT 51 FROM tab1 cor0 GROUP BY cor0.col1
----
51
51
51

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + + 43 FROM tab2 GROUP BY tab2.col2
----
43
43
43

query I rowsort
SELECT 52 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
52
52
52

query I rowsort
SELECT DISTINCT + 90 FROM tab2 GROUP BY col1
----
90

query I rowsort
SELECT ALL - - 68 AS col1 FROM tab2 GROUP BY tab2.col1
----
68
68
68

query I rowsort
SELECT ALL ( - 28 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-28
-28

query I rowsort
SELECT DISTINCT - cor0.col1 * 57 FROM tab2 cor0 GROUP BY cor0.col1
----
-2337
-3363
-3477

query I rowsort
SELECT 2 AS col1 FROM tab1 GROUP BY col2
----
2
2
2

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 46 col0 FROM tab1 GROUP BY tab1.col0
----
46
46
46

query I rowsort
SELECT 35 FROM tab0 AS cor0 GROUP BY col0
----
35
35
35

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
82
82
82

query I rowsort
SELECT 2 FROM tab2 GROUP BY tab2.col2
----
2
2
2

query I rowsort
SELECT 19 AS col0 FROM tab1 GROUP BY tab1.col2
----
19
19
19

query I rowsort
SELECT DISTINCT + 64 FROM tab1 GROUP BY tab1.col0
----
64

query I rowsort
SELECT 22 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT - + 60 FROM tab2 GROUP BY tab2.col2
----
-60
-60
-60

query I rowsort
SELECT 28 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
2548
2576
420

query I rowsort
SELECT ALL + CASE cor0.col2 WHEN cor0.col2 THEN + 50 END + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
108
129
137

query I rowsort
SELECT 56 + 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
132
1596
3608

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4096
SELECT + CAST( NULL AS DECIMAL ) + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4096
SELECT + CAST ( NULL AS REAL ) + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT 11 FROM tab1 GROUP BY tab1.col1
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-4101
SELECT + cor0.col2 DIV 67 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4101
SELECT + cor0.col2 / 67 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT ALL + cor0.col1 * - 78 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6318
0

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT - + 43 AS col0 FROM tab2 GROUP BY tab2.col1
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 80 - - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
6641
80

onlyif mysql # DIV for integer division: 
query I rowsort label-4107
SELECT ALL + 47 DIV col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4107
SELECT ALL + 47 / col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1
1

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 92 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT + 93 FROM tab0 GROUP BY tab0.col1
----
93
93

query I rowsort
SELECT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT - 65 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-65
-65

query I rowsort
SELECT + ( - 3 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + 76 FROM tab0 AS cor0 GROUP BY cor0.col1
----
76

query I rowsort
SELECT + cor0.col1 - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL - 22 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-22
-22
-22

query I rowsort
SELECT - 65 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1430
-1820
-5330

query I rowsort
SELECT cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0, cor1.col0, cor1.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col2 * 26 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
1170
1846
208

query I rowsort
SELECT ALL - + 49 + - 80 FROM tab0 GROUP BY tab0.col1
----
-129
-129

query I rowsort
SELECT + cor0.col1 * col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + 36 FROM tab2 GROUP BY tab2.col2
----
36
36
36

query I rowsort
SELECT ALL 22 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col1 FROM tab0 AS cor0 GROUP BY col0
----
2
2
2

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col1 - ( - 6 ) FROM tab2 AS cor0 GROUP BY col1
----
47
65
67

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
41
59
61

query I rowsort
SELECT - 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-5
-5
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4137
SELECT + CAST( NULL AS SIGNED ) * + 99 AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4137
SELECT + CAST ( NULL AS INTEGER ) * + 99 AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 7 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
7

query I rowsort
SELECT 87 + - 32 FROM tab1 GROUP BY tab1.col0
----
55
55
55

query I rowsort
SELECT tab2.col0 + 61 FROM tab2 GROUP BY tab2.col0
----
152
153
76

query I rowsort
SELECT 43 + ( + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
100
49
87

query I rowsort
SELECT DISTINCT - + col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + col2 * 33 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1914
2607
2871

query I rowsort
SELECT 16 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1328
416
688

query I rowsort
SELECT + 37 FROM tab0 AS cor0 GROUP BY cor0.col2
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4148
SELECT CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4148
SELECT CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 * + 86 + 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3703
-435
-4821

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 40, col1 * - tab2.col2 ) FROM tab2 GROUP BY tab2.col1
----
-40
-40
-40

query I rowsort
SELECT 51 + + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
132
51

query I rowsort
SELECT - 26 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-26
-26
-26

query I rowsort
SELECT DISTINCT + 87 AS col2 FROM tab2 GROUP BY col2
----
87

query I rowsort
SELECT DISTINCT + cor0.col2 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
1032
2054
3154

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93

query I rowsort
SELECT - 30 + + 85 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
55
55
55

onlyif mysql # DIV for integer division: 
query I rowsort label-4157
SELECT cor0.col0 DIV COALESCE ( cor0.col0, cor0.col2 ) col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4157
SELECT cor0.col0 / COALESCE ( cor0.col0, cor0.col2 ) col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
1
1
1

query I rowsort
SELECT - 45 FROM tab1 GROUP BY tab1.col2
----
-45
-45
-45

query I rowsort
SELECT DISTINCT 15 AS col2 FROM tab2 GROUP BY col0
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 0 * 23 col2 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IN ( - tab0.col0 )
----

query I rowsort
SELECT DISTINCT 92 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4163
SELECT ALL - col1 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4163
SELECT ALL - col1 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-4164
SELECT ALL + 64 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1
1
10

skipif mysql # not compatible
query I rowsort label-4164
SELECT ALL + 64 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1
1
10

query I rowsort
SELECT ALL + 56 FROM tab2 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT + - cor0.col0 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 28 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
28
28
28

query I rowsort
SELECT - ( 15 ) AS col0 FROM tab1 GROUP BY col2
----
-15
-15
-15

query I rowsort
SELECT ALL - 38 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-38
-38
-38

query I rowsort
SELECT + 97 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
5626
7663
8439

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 15, col0 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
15
15

query I rowsort
SELECT 55 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
55
55
55

query I rowsort
SELECT + 13 * - 95 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1154
-1235

query I rowsort
SELECT + + 46 AS col1 FROM tab2 GROUP BY tab2.col1
----
46
46
46

query I rowsort
SELECT ALL NULLIF ( - col2, - cor0.col2 * cor0.col2 ) * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 92 AS col1 FROM tab1 GROUP BY tab1.col0
----
92
92
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4179
SELECT ALL + 0 DIV - 50 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4179
SELECT ALL + 0 / - 50 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 29 + 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27

query I rowsort
SELECT + 74 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT - ( tab2.col1 ) FROM tab2 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 29 col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-29
-29

query I rowsort
SELECT 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
4

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4186
SELECT - CAST( col0 AS SIGNED ) * 24 FROM tab2 GROUP BY tab2.col0
----
-2184
-2208
-360

skipif mysql # not compatible
query I rowsort label-4186
SELECT - CAST ( col0 AS INTEGER ) * 24 FROM tab2 GROUP BY tab2.col0
----
-2184
-2208
-360

query I rowsort
SELECT DISTINCT - 51 AS col1 FROM tab1 GROUP BY tab1.col0
----
-51

query I rowsort
SELECT - 12 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
-12
-12

query I rowsort
SELECT + 75 FROM tab1 GROUP BY tab1.col2
----
75
75
75

query I rowsort
SELECT DISTINCT - 90 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-90

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL + 30 * - 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1680
-1680
-1680

query I rowsort
SELECT DISTINCT - cor0.col2 * + 67 FROM tab1 cor0 GROUP BY cor0.col2
----
-3015
-4757
-536

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4194
SELECT - - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4194
SELECT - - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 92 + - 52 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-144
-144
-144

onlyif mysql # DIV for integer division: 
query I rowsort label-4196
SELECT ALL + cor0.col0 DIV - cor0.col0 - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-23
-29
-83

skipif mysql # not compatible
query I rowsort label-4196
SELECT ALL + cor0.col0 / - cor0.col0 - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-23
-29
-83

query I rowsort
SELECT 74 FROM tab0 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT ALL - + 21 * 14 FROM tab2 GROUP BY tab2.col1
----
-294
-294
-294

query I rowsort
SELECT - 52 + + 94 * + 39 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3614
3614
3614

query I rowsort
SELECT DISTINCT + 58 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
58

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
102
150
170

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT - tab0.col0 + + ( 56 ) FROM tab0 GROUP BY tab0.col0
----
-27
13
30

query I rowsort
SELECT 82 FROM tab2 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT + 6 AS col1 FROM tab2 GROUP BY tab2.col1
----
6
6
6

query I rowsort
SELECT - 22 AS col1 FROM tab0 GROUP BY tab0.col2
----
-22
-22
-22

query I rowsort
SELECT 86 FROM tab2 GROUP BY tab2.col2
----
86
86
86

query I rowsort
SELECT - 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-16
-38
29

query I rowsort
SELECT ALL + 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
61
61
61

query I rowsort
SELECT DISTINCT tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 60 col1 FROM tab1 GROUP BY tab1.col1
----
60
60
60

query I rowsort
SELECT - 59 FROM tab0 GROUP BY tab0.col0
----
-59
-59
-59

query I rowsort
SELECT ALL ( + 47 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
47
47
47

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.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT 40 AS col1 FROM tab1 GROUP BY tab1.col1
----
40

query I rowsort
SELECT - 67 FROM tab0 GROUP BY tab0.col1
----
-67
-67

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT DISTINCT + 89 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
89

query I rowsort
SELECT ALL - 98 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-98
-98
-98

query I rowsort
SELECT DISTINCT + COALESCE ( 26, cor0.col0 ) - - 17 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 67 * - 37 - tab1.col1 col1 FROM tab1 GROUP BY col1
----
-2485
-2523
-2536

query I rowsort
SELECT 68 * - col1 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-5484
38
79

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 71 FROM tab1 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT - 84 AS col1 FROM tab0 GROUP BY col2
----
-84
-84
-84

query I rowsort
SELECT DISTINCT 84 FROM tab1 GROUP BY tab1.col2
----
84

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT ALL 57 FROM tab0 cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT + - ( - 51 ) FROM tab0 GROUP BY tab0.col2
----
51
51
51

query I rowsort
SELECT - NULLIF ( cor0.col2, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 26 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT ALL - cor0.col1 * + ( cor0.col1 ) + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1865
-28
-3204

query I rowsort
SELECT ALL cor0.col2 + 94 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
102
139
165

query I rowsort
SELECT - col0 * col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT - - 35 FROM tab2 GROUP BY tab2.col2
----
35
35
35

query I rowsort
SELECT DISTINCT + 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
82

query I rowsort
SELECT DISTINCT 64 AS col0 FROM tab2 GROUP BY tab2.col0
----
64

query I rowsort
SELECT 42 FROM tab1 cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + 63 FROM tab0 AS cor0 GROUP BY col1
----
63
63

query I rowsort
SELECT ALL + + col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

query I rowsort
SELECT + + 1 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT ALL + 17 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 col1 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT - - 51 FROM tab2 GROUP BY tab2.col0
----
51
51
51

query I rowsort
SELECT + cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 * - 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2132
-572
-728

query I rowsort
SELECT DISTINCT - 57 FROM tab1 GROUP BY tab1.col0
----
-57

query I rowsort
SELECT - 71 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-71
-71
-71

query I rowsort
SELECT DISTINCT - 76 AS col1 FROM tab1 GROUP BY tab1.col2
----
-76

query I rowsort
SELECT - 58 + + cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1623
3423
3663

query I rowsort
SELECT DISTINCT cor0.col1 * + 50 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2050
2950
3050

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT - 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-94
-94
-94

query I rowsort
SELECT - 7 FROM tab0 GROUP BY tab0.col1
----
-7
-7

query I rowsort
SELECT DISTINCT - col2 * + 25 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1125
-1775
-200

query I rowsort
SELECT ALL + ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT + 10 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
36
53
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 13 + - col0 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-39
-56
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 34 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
34
34
34

query I rowsort
SELECT ALL - 97 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-97
-97
-97

query I rowsort
SELECT 7 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
7
7
7

query I rowsort
SELECT ALL + CASE + cor0.col2 WHEN cor0.col2 * 52 THEN NULL WHEN - cor0.col0 THEN - cor0.col2 * ( cor0.col0 * - cor0.col0 ) END FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - + 23 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
-23

query I rowsort
SELECT + ( 6 ) FROM tab1 GROUP BY tab1.col1
----
6
6
6

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4271
SELECT DISTINCT 44 + cor0.col2 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
49

skipif mysql # not compatible
query I rowsort label-4271
SELECT DISTINCT 44 + cor0.col2 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
49

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 92, cor0.col0 + cor0.col2, cor0.col0 * cor0.col0 + + cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
92

query I rowsort
SELECT - cor0.col0 + - 34 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-117
-60
-77

query I rowsort
SELECT + - 52 FROM tab1 GROUP BY tab1.col2
----
-52
-52
-52

query I rowsort
SELECT 99 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
99
99
99

query I rowsort
SELECT - 40 AS col1 FROM tab2 GROUP BY tab2.col2
----
-40
-40
-40

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ( + col1 ) AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 1 FROM tab0 cor0 GROUP BY cor0.col1
----
-1
-1

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col0 * ( - 83 ) + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2184
3612
6972

query I rowsort
SELECT ALL 9 FROM tab0 cor0 GROUP BY cor0.col1
----
9
9

query I rowsort
SELECT ( cor0.col2 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4286
SELECT CAST( cor0.col1 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

skipif mysql # not compatible
query I rowsort label-4286
SELECT CAST ( cor0.col1 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT ALL ( cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4288
SELECT CAST( 48 AS SIGNED ) - + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-33
48
48

skipif mysql # not compatible
query I rowsort label-4288
SELECT CAST ( 48 AS INTEGER ) - + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-33
48
48

query I rowsort
SELECT 44 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
44
44
44

query I rowsort
SELECT ALL + - 5 AS col1 FROM tab0 GROUP BY tab0.col2
----
-5
-5
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor1.col0 + 3 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
29
46
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + 60 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-21
60

query I rowsort
SELECT ALL - 69 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-69
-69
-69

query I rowsort
SELECT - cor0.col0 + cor0.col0 * - 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1020
-6188
-6256

query I rowsort
SELECT - 68 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-68
-68

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 42 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
42
42
42

query I rowsort
SELECT ALL - col1 * + 37 + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1476
-2124
-2196

query I rowsort
SELECT DISTINCT 74 * 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
592

query I rowsort
SELECT - 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-52
-52

query I rowsort
SELECT ALL - 72 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT 44 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1056
1672
3476

query I rowsort
SELECT ALL + 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 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - + 66 FROM tab0 GROUP BY tab0.col2
----
-66
-66
-66

query I rowsort
SELECT DISTINCT - 66 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-66

query I rowsort
SELECT 12 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT ALL - 71 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3195
5041
568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4311
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4311
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col2 * 79 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3612
5653
638

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NOT NULL
----
44
57
6

query I rowsort
SELECT - 80 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-80
-80

query I rowsort
SELECT DISTINCT - ( 69 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3036
-3933
-414

query I rowsort
SELECT ALL 16 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
27
27
27

query I rowsort
SELECT DISTINCT + + col0 - + 80 FROM tab1 GROUP BY col0
----
-52
-58
2

query I rowsort
SELECT ALL 0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 45 AS col0 FROM tab2 GROUP BY tab2.col2
----
45
45
45

query I rowsort
SELECT DISTINCT 92 FROM tab0 cor0 GROUP BY cor0.col2
----
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4322
SELECT DISTINCT + cor0.col1 + - CAST( - 83 AS SIGNED ) * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, col2
----
-3608
-4674
-492

skipif mysql # not compatible
query I rowsort label-4322
SELECT DISTINCT + cor0.col1 + - CAST ( - 83 AS INTEGER ) * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, col2
----
-3608
-4674
-492

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - 37 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

query I rowsort
SELECT cor0.col2 * 78 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1872
2964
6162

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 10 FROM tab1 GROUP BY col1
----
10

query I rowsort
SELECT + NULLIF ( - cor0.col1, - 72 / - COALESCE ( - cor0.col0, - cor0.col0 ) ) + CASE 65 WHEN + cor0.col1 + cor0.col0 * + col2 THEN - cor0.col0 + col2 END * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 87 * col2 FROM tab2 GROUP BY tab2.col2
----
-5046
-6873
-7569

query I rowsort
SELECT + cor0.col1 - + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 86 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
73

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT cor0.col2 * + 88 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3960
6248
704

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4339
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4339
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 68 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-68
-68
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-4341
SELECT DISTINCT cor0.col2 DIV 2 FROM tab1 cor0 GROUP BY cor0.col2
----
22
35
4

skipif mysql # not compatible
query I rowsort label-4341
SELECT DISTINCT cor0.col2 / 2 FROM tab1 cor0 GROUP BY cor0.col2
----
22
35
4

query I rowsort
SELECT ALL + cor0.col0 * COALESCE ( 94 * cor0.col2, cor0.col0 + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
118440
16544
547268

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4343
SELECT CAST( NULL AS DECIMAL ) col0 FROM tab2 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-4343
SELECT CAST ( NULL AS REAL ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( 46 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
46
46
46

query I rowsort
SELECT DISTINCT cor0.col0 * + 10 FROM tab2 cor0 GROUP BY cor0.col0
----
150
910
920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 31 * 69 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
2139
2139
2139

query I rowsort
SELECT DISTINCT ( + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
158
48
76

query I rowsort
SELECT + 16 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
16
16

query I rowsort
SELECT - 3 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-3
-3

query I rowsort
SELECT ALL col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - 87 AS col0 FROM tab2 GROUP BY tab2.col1
----
-87
-87
-87

query I rowsort
SELECT - 60 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-60
-60
-60

query I rowsort
SELECT ALL 99 FROM tab2 AS cor0 GROUP BY col0
----
99
99
99

query I rowsort
SELECT col0 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + 29 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT ALL 61 FROM tab2 AS cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT 25 * cor0.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
1450
1975
2175

query I rowsort
SELECT - 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-44
-44
-44

query I rowsort
SELECT 41 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
41
41

query I rowsort
SELECT ALL - 53 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-53
-53
-53

query I rowsort
SELECT cor0.col0 + 31 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
122
123
46

query I rowsort
SELECT ALL + tab0.col1 * 44 + 42 * 56 AS col2 FROM tab0 GROUP BY tab0.col1
----
2352
5916

query I rowsort
SELECT - 80 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-80
-80
-80

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL + 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 DISTINCT 14 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT DISTINCT 25 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25

query I rowsort
SELECT ALL 24 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT 10 FROM tab0 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT ALL - col0 + + 97 AS col1 FROM tab1 GROUP BY tab1.col0
----
15
69
75

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT 60 * 20 FROM tab0 GROUP BY col0
----
1200
1200
1200

query I rowsort
SELECT DISTINCT 88 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
88

onlyif mysql # DIV for integer division: 
query I rowsort label-4377
SELECT - cor0.col1 DIV - 25 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1
2
2

skipif mysql # not compatible
query I rowsort label-4377
SELECT - cor0.col1 / - 25 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1
2
2

query I rowsort
SELECT cor0.col2 * - 65 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2925
-4615
-520

query I rowsort
SELECT DISTINCT + 9 FROM tab0 GROUP BY col1
----
9

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT col2 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-19
-45
53

query I rowsort
SELECT ( 68 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT ALL 84 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + + 63 AS col1 FROM tab2 GROUP BY col0
----
63

query I rowsort
SELECT DISTINCT 58 FROM tab1 GROUP BY tab1.col1
----
58

query I rowsort
SELECT DISTINCT 85 AS col1 FROM tab0 GROUP BY tab0.col1
----
85

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 + - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
10
51
65

query I rowsort
SELECT DISTINCT + cor1.col1 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1 HAVING ( NULL ) <> NULL
----

query I rowsort
SELECT DISTINCT ( 90 ) + - 30 AS col1 FROM tab1 GROUP BY tab1.col2
----
60

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-4396
SELECT - cor0.col0 DIV cor0.col0 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
43
5
56

skipif mysql # not compatible
query I rowsort label-4396
SELECT - cor0.col0 / cor0.col0 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
43
5
56

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) - - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
0

query I rowsort
SELECT 0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 41 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
2419
2501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 99 * col2 + 33 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5775
7854
8646

query I rowsort
SELECT DISTINCT + ( 5 ) FROM tab2 GROUP BY tab2.col1
----
5

query I rowsort
SELECT ALL 43 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 8 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-8

query I rowsort
SELECT + + col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col1 * 96 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
3936
5664
5856

query I rowsort
SELECT 39 AS col1 FROM tab1 GROUP BY col2
----
39
39
39

query I rowsort
SELECT ALL 61 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
61
61
61

query I rowsort
SELECT ALL 69 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-12
69
69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4411
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4411
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col1
----
NULL

query I rowsort
SELECT DISTINCT + 68 FROM tab2 AS cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT DISTINCT - 20 FROM tab1 GROUP BY tab1.col0
----
-20

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + cor0.col1 + + col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2007
3294
44

query I rowsort
SELECT + 24 + - 98 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2328
-3700
-7718

query I rowsort
SELECT 81 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT DISTINCT - 74 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-74

query I rowsort
SELECT ALL cor0.col1 + 84 FROM tab2 AS cor0 GROUP BY cor0.col1
----
125
143
145

query I rowsort
SELECT - 65 * - tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1536
2432
5056

query I rowsort
SELECT ALL + 96 * cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
2304
3648
7584

query I rowsort
SELECT - 25 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-25
-25
-25

query I rowsort
SELECT + ( col1 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4424
SELECT CAST( col1 AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-4424
SELECT CAST ( col1 AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 91 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
4004
5187
546

query I rowsort
SELECT DISTINCT - 41 FROM tab0 AS cor0 GROUP BY col0
----
-41

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab1 WHERE NOT NULL IS NOT NULL GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT + - ( tab2.col1 ) FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
74

query I rowsort
SELECT ALL + 15 + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
39
53
94

query I rowsort
SELECT - col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + 76 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT ALL + - 28 AS col2 FROM tab1 GROUP BY col1
----
-28
-28
-28

query I rowsort
SELECT 52 FROM tab0 GROUP BY tab0.col2
----
52
52
52

query I rowsort
SELECT ALL 51 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
4131

query I rowsort
SELECT cor0.col2 + 55 * - 29 FROM tab0 cor0 GROUP BY col2, cor0.col0, cor0.col2, col0
----
-1516
-1557
-1571

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + 52 FROM tab2 GROUP BY tab2.col1
----
52
52
52

query I rowsort
SELECT + 14 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
55
73
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 3 col1 FROM tab1 GROUP BY tab1.col2
----
3
3
3

query I rowsort
SELECT + 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT + 34 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT ALL 52 FROM tab2 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ( cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 60 + 26 col0 FROM tab2 GROUP BY col2
----
-34

query I rowsort
SELECT 68 - - 7 * 9 FROM tab1 cor0 GROUP BY col1
----
131
131
131

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
22
28
82

query I rowsort
SELECT ALL 71 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
71
71

query I rowsort
SELECT ALL - cor0.col1 + + 51 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6
45
7

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 81 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT 16 FROM tab0 AS cor0 GROUP BY cor0.col1
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT DISTINCT - 6 FROM tab1 GROUP BY tab1.col2
----
-6

query I rowsort
SELECT + 48 FROM tab0 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT DISTINCT + 15 FROM tab1 AS cor0 GROUP BY col0
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 78 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
78
78
78

query I rowsort
SELECT - cor0.col0 * 42 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1176
-3444
-924

query I rowsort
SELECT + 52 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
52
52
52

query I rowsort
SELECT - 2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-2
-2
-2

query I rowsort
SELECT - 44 - 19 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-63
-63
-63

query I rowsort
SELECT 36 * tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
1008
2952
792

query I rowsort
SELECT + cor0.col2 + - col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT col2 * + 3 - col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
169
18
78

query I rowsort
SELECT cor0.col0 + - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 48 - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-31
10
24

query I rowsort
SELECT DISTINCT 0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT + 5 AS col0 FROM tab0 GROUP BY tab0.col0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 * - cor1.col1 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-2173
-3127
-3233

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT ALL - 28 FROM tab0 GROUP BY tab0.col0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col1 ) + cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + 84 FROM tab2 GROUP BY tab2.col2
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + + cor0.col0 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
12
12
12

query I rowsort
SELECT - 99 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-1485
-9009
-9108

query I rowsort
SELECT ALL 40 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
-39
-47

query I rowsort
SELECT ALL + 56 FROM tab1 GROUP BY col0
----
56
56
56

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, col0
----
41
59
61

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col1
----
45
71
8

query I rowsort
SELECT cor0.col0 + + 43 FROM tab0 AS cor0 GROUP BY cor0.col0
----
126
69
86

query I rowsort
SELECT DISTINCT - ( 10 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-10

query I rowsort
SELECT DISTINCT 44 * 37 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1546
1600
1606

query I rowsort
SELECT DISTINCT 51 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
51

query I rowsort
SELECT DISTINCT + + 26 AS col1 FROM tab0 GROUP BY tab0.col2
----
26

query I rowsort
SELECT DISTINCT - ( 0 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT 81 FROM tab2 AS cor0 GROUP BY cor0.col0
----
81
81
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4495
SELECT DISTINCT cor0.col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4495
SELECT DISTINCT cor0.col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT col1 * col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT 60 * - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-2460
-3540
-3660

onlyif mysql # DIV for integer division: 
query I rowsort label-4498
SELECT ALL - cor0.col2 DIV + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4498
SELECT ALL - cor0.col2 / + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 43 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
43

query I rowsort
SELECT DISTINCT - ( - col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - cor0.col2 * + COALESCE ( cor0.col2, col2 ) AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + 76 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT ALL + 6 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL + cor0.col1 * 94 FROM tab0 cor0 GROUP BY cor0.col1
----
0
7614

query I rowsort
SELECT ( 76 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
76
76
76

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT 92 FROM tab1 GROUP BY tab1.col1
----
92
92
92

query I rowsort
SELECT - 3 AS col0 FROM tab0 GROUP BY tab0.col0
----
-3
-3
-3

query I rowsort
SELECT - 29 FROM tab2 GROUP BY tab2.col0
----
-29
-29
-29

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4511
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4511
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 43 AS col1 FROM tab1 GROUP BY tab1.col1
----
43
43
43

query I rowsort
SELECT DISTINCT 18 FROM tab0 GROUP BY col0
----
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 73 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73

query I rowsort
SELECT 37 + - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-34
-8
29

query I rowsort
SELECT - 9 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT ALL + ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col1 * 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2673

query I rowsort
SELECT - 7 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
37
50

query I rowsort
SELECT + cor0.col1 * - cor0.col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1892
-30
-3192

query I rowsort
SELECT ALL - - 21 AS col1 FROM tab2 GROUP BY tab2.col1
----
21
21
21

query I rowsort
SELECT DISTINCT + 55 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1430
2365
4565

query I rowsort
SELECT DISTINCT + col2 + 37 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1368
-2844
-864

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 6 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, col0
----
22
28
82

query I rowsort
SELECT ALL - 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-51
-51
-51

query I rowsort
SELECT ALL 44 + + col1 FROM tab2 AS cor0 GROUP BY col1
----
103
105
85

query I rowsort
SELECT + 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT ALL 64 * - 99 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-6336
-6336
-6336

query I rowsort
SELECT 77 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 4 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
180
284
32

query I rowsort
SELECT 53 FROM tab0 GROUP BY tab0.col0
----
53
53
53

query I rowsort
SELECT ALL - + 93 AS col1 FROM tab2 GROUP BY tab2.col1
----
-93
-93
-93

query I rowsort
SELECT + 34 * 2 AS col2 FROM tab0 GROUP BY tab0.col0
----
68
68
68

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4537
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4537
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL + 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 81 AS col0 FROM tab1 GROUP BY col2
----
81
81
81

query I rowsort
SELECT ALL - 2 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-2
-2
-2

query I rowsort
SELECT - 15 * - 78 - + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1088
1142
1148

query I rowsort
SELECT - 74 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-74
-74
-74

query I rowsort
SELECT ALL col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 85 AS col1 FROM tab0 GROUP BY tab0.col1
----
85
85

query I rowsort
SELECT + 91 AS col1 FROM tab2 GROUP BY tab2.col1
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col2 FROM tab2 GROUP BY tab2.col1
----
2
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4550
SELECT DISTINCT + CAST( - 13 AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-13

skipif mysql # not compatible
query I rowsort label-4550
SELECT DISTINCT + CAST ( - 13 AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-13

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4552
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4552
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-124
-26
-83

query I rowsort
SELECT ALL 28 FROM tab0 GROUP BY tab0.col2
----
28
28
28

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT DISTINCT col2 + - 49 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4
-41
22

query I rowsort
SELECT + 29 FROM tab0 cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT 11 AS col0 FROM tab1 GROUP BY col2
----
11
11
11

query I rowsort
SELECT + 60 FROM tab0 GROUP BY col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 88 + 58 * - 20 FROM tab0 cor0 GROUP BY col0
----
-1072

onlyif mysql # DIV for integer division: 
query I rowsort label-4563
SELECT DISTINCT - cor0.col2 DIV cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4563
SELECT DISTINCT - cor0.col2 / cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-1

query I rowsort
SELECT 78 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2028
-3354
-6474

query I rowsort
SELECT + cor0.col0 * 32 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1376
2656
832

query I rowsort
SELECT + 51 AS col2 FROM tab2 GROUP BY tab2.col1
----
51
51
51

query I rowsort
SELECT ALL + 55 FROM tab0 AS cor0 GROUP BY cor0.col1
----
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT NULLIF ( + cor0.col0, + cor0.col0 ) + + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + COALESCE ( cor0.col0, cor0.col0 - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4570
SELECT DISTINCT tab2.col2 DIV tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NOT NULL
----
1

skipif mysql # not compatible
query I rowsort label-4570
SELECT DISTINCT tab2.col2 / tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NOT NULL
----
1

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 26 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT ALL - 51 FROM tab1 GROUP BY tab1.col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - 98 AS col0 FROM tab1 GROUP BY tab1.col0
----
-98

query I rowsort
SELECT ALL col0 * 98 AS col1 FROM tab2 GROUP BY tab2.col0
----
1470
8918
9016

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
0
81

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4578
SELECT ALL cor0.col0 + CAST( NULL AS DECIMAL ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4578
SELECT ALL cor0.col0 + CAST ( NULL AS REAL ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 93 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2232
3534
7347

query I rowsort
SELECT 28 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT - cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4583
SELECT - cor0.col1 * CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4583
SELECT - cor0.col1 * CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT 85 * 56 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
4760
4760
4760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL CASE cor0.col0 WHEN + cor0.col0 * 2 THEN NULL ELSE - COALESCE ( + 68, cor0.col1 + 78, cor0.col0 * col2 + cor0.col0 ) + - cor0.col0 END + - cor0.col0 * - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
142
8122
8304

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT - + cor0.col1 AS col1 FROM tab1, tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 9 AS col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
-9
-9
-9

query I rowsort
SELECT + 69 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
69
69
69

query I rowsort
SELECT - 35 FROM tab0 GROUP BY tab0.col2
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-4592
SELECT DISTINCT + cor0.col0 DIV 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
7

skipif mysql # not compatible
query I rowsort label-4592
SELECT DISTINCT + cor0.col0 / 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2
7

query I rowsort
SELECT DISTINCT 25 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
25

query I rowsort
SELECT + 53 FROM tab0 AS cor0 GROUP BY col0
----
53
53
53

query I rowsort
SELECT DISTINCT + 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * - cor1.col0 col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 43585949313c2e6dfed0419b111aa422

query I rowsort
SELECT 29 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT + 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
91
91
91

query I rowsort
SELECT ALL tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT 68 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2992
3876
408

query I rowsort
SELECT - 27 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-27
-27
-27

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + 97 FROM tab0 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT tab2.col0 * 45 + - 44 AS col1 FROM tab2 GROUP BY tab2.col0
----
4051
4096
631

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
158
48
76

query I rowsort
SELECT 12 FROM tab0 GROUP BY tab0.col1
----
12
12

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT DISTINCT + col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT - 43 * 29 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1247
-1247
-1247

onlyif mysql # DIV for integer division: 
query I rowsort label-4612
SELECT ALL - 69 DIV - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4612
SELECT ALL - 69 / - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
2

query I rowsort
SELECT cor0.col2 * - 56 - cor0.col2 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
-1368
-2166
-4503

query I rowsort
SELECT + 34 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT DISTINCT + - 65 AS col1 FROM tab0 GROUP BY col0
----
-65

query I rowsort
SELECT ALL 94 FROM tab2 AS cor0 GROUP BY cor0.col2
----
94
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-4617
SELECT cor0.col2 DIV 26 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4617
SELECT cor0.col2 / 26 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4620
SELECT cor0.col2 + - 42 DIV cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
45
71

skipif mysql # not compatible
query I rowsort label-4620
SELECT cor0.col2 + - 42 / cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
45
71

query I rowsort
SELECT + 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11
11

query I rowsort
SELECT - NULLIF ( 0, - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT - col0 + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT cor0.col2 + 65 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1438
1865
5401

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
-1305
-5336
-7189

query I rowsort
SELECT DISTINCT - + 48 * tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
-2112
-2736
-288

query I rowsort
SELECT 99 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
99
99
99

query I rowsort
SELECT 31 FROM tab1 AS cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT 66 FROM tab1 AS cor0 GROUP BY cor0.col1
----
66

query I rowsort
SELECT ALL + - 31 FROM tab2 GROUP BY tab2.col2
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT + col1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL + 97 * - 54 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-5238
-5238
-5238

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
93

query I rowsort
SELECT 23 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
23
23
23

onlyif mysql # DIV for integer division: 
query I rowsort label-4637
SELECT DISTINCT + - 8 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
query I rowsort label-4637
SELECT DISTINCT + - 8 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT 19 AS col1 FROM tab0 GROUP BY tab0.col0
----
19
19
19

query I rowsort
SELECT DISTINCT + 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 33 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
33
33
33

query I rowsort
SELECT + cor0.col2 + + 60 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
139
84
98

query I rowsort
SELECT - + tab2.col1 * 27 FROM tab2 GROUP BY tab2.col1
----
-1107
-1593
-1647

query I rowsort
SELECT ALL - 28 AS col2 FROM tab2 GROUP BY tab2.col2
----
-28
-28
-28

query I rowsort
SELECT ALL + ( 26 ) FROM tab2 GROUP BY tab2.col2
----
26
26
26

query I rowsort
SELECT DISTINCT - 86 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-86

query I rowsort
SELECT DISTINCT + ( - 11 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-11

query I rowsort
SELECT + 71 FROM tab0 cor0 GROUP BY col2
----
71
71
71

query I rowsort
SELECT + + 3 FROM tab1 GROUP BY tab1.col1
----
3
3
3

query I rowsort
SELECT 20 FROM tab1 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT 33 AS col1 FROM tab0 cor0 GROUP BY col0
----
33
33
33

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL 41 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1845
2911
328

query I rowsort
SELECT DISTINCT 18 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
18

query I rowsort
SELECT + 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0, cor0.col0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 0 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT DISTINCT + 17 + - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-24
-42
-44

query I rowsort
SELECT DISTINCT + 51 FROM tab2 GROUP BY col2
----
51

query I rowsort
SELECT DISTINCT 84 * 46 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
3773
3849

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT - 88 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-88
-88
-88

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + + 32 AS col0 FROM tab0 GROUP BY tab0.col0
----
32
32
32

query I rowsort
SELECT ALL cor0.col2 * + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
47
47
47

query I rowsort
SELECT 83 AS col1 FROM tab2 GROUP BY tab2.col0
----
83
83
83

query I rowsort
SELECT DISTINCT - + 51 FROM tab2 GROUP BY tab2.col1
----
-51

query I rowsort
SELECT DISTINCT - 4 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4

query I rowsort
SELECT ALL - 6 FROM tab2 GROUP BY col0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT - 10 FROM tab2 AS cor0 GROUP BY col0
----
-10

query I rowsort
SELECT 24 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
115
116
39

query I rowsort
SELECT ALL col0 * 85 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2210
3655
7055

query I rowsort
SELECT DISTINCT - 29 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-29

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
58
79
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 95, + cor0.col2, col2 + + cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT - ( col1 ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + col1 - + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-32
-51
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 30 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
78

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT + + 43 FROM tab1 GROUP BY tab1.col0
----
43
43
43

query I rowsort
SELECT COALESCE ( cor0.col0, 64, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 83 col1 FROM tab2 GROUP BY col2
----
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 41 col0 FROM tab2 cor0 GROUP BY col1
----
41

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT 62 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
153
154
77

query I rowsort
SELECT DISTINCT - 44 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-101
-50
-88

query I rowsort
SELECT DISTINCT - cor0.col0 * 71 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
-1846
-3053
-5893

query I rowsort
SELECT + cor0.col1 - + 2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
4
42
55

query I rowsort
SELECT ALL + 41 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + + 88 AS col1 FROM tab2 GROUP BY col2
----
88
88
88

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
0

query I rowsort
SELECT cor0.col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col0
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT 98 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

onlyif mysql # DIV for integer division: 
query I rowsort label-4698
SELECT - 5 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4698
SELECT - 5 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 22 FROM tab1 GROUP BY col0
----
-22
-22
-22

query I rowsort
SELECT + 25 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
66
84
86

query I rowsort
SELECT ALL - 94 * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-5452
-7426
-8178

query I rowsort
SELECT DISTINCT + 74 AS col1 FROM tab1 GROUP BY tab1.col2
----
74

query I rowsort
SELECT - COALESCE ( col2, + cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT 36 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 * - cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-1027
-312
-494

query I rowsort
SELECT DISTINCT 96 FROM tab2 AS cor0 GROUP BY col0
----
96

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4708
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4708
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 89 * - 21 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-1869
-1869

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT + - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL NULLIF ( + 62, - 61 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT DISTINCT + 30 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + 39 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-42
39

query I rowsort
SELECT ALL 30 + col0 * - 38 FROM tab2 AS cor0 GROUP BY col0
----
-3428
-3466
-540

query I rowsort
SELECT DISTINCT ( 53 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
53

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4717
SELECT - cor0.col0 * + CAST( NULL AS SIGNED ) + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4717
SELECT - cor0.col0 * + CAST ( NULL AS INTEGER ) + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 77 + 88 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
165

query I rowsort
SELECT DISTINCT 7 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-31
-72

query I rowsort
SELECT 8 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
8
8
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
100
71
92

onlyif mysql # DIV for integer division: 
query I rowsort label-4722
SELECT DISTINCT + cor0.col1 DIV - 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2
-3

skipif mysql # not compatible
query I rowsort label-4722
SELECT DISTINCT + cor0.col1 / - 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2
-3

query I rowsort
SELECT - 12 FROM tab1 AS cor0 GROUP BY col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT - 1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 18, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT DISTINCT 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
67

query I rowsort
SELECT + cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT + 98 + + 84 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
3794
4886
602

query I rowsort
SELECT ALL col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT + 18 * - cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1729
-1748
-285

query I rowsort
SELECT - 10 + cor0.col1 * - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
-1691
-3491
-3731

query I rowsort
SELECT 55 FROM tab2 AS cor0 GROUP BY col1
----
55
55
55

query I rowsort
SELECT 81 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT ALL - cor0.col1 * 62 FROM tab1 cor0 GROUP BY cor0.col1
----
-2728
-3534
-372

query I rowsort
SELECT - 75 + + tab0.col1 * 99 AS col1 FROM tab0 GROUP BY tab0.col1
----
-75
7944

query I rowsort
SELECT DISTINCT + col2 - col2 FROM tab0 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT + 87 FROM tab2 GROUP BY tab2.col0
----
87

onlyif mysql # DIV for integer division: 
query I rowsort label-4740
SELECT DISTINCT 30 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-4740
SELECT DISTINCT 30 / - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT + col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 / cor0.col1 + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NULL = ( NULL )
----

query I rowsort
SELECT DISTINCT 22 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT DISTINCT + 11 FROM tab0 GROUP BY tab0.col1
----
11

query I rowsort
SELECT ALL + 14 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT ALL cor0.col0 * + 8 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
208
344
664

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT ALL + 60 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2700
-4260
-480

query I rowsort
SELECT DISTINCT 33 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
124
125
48

query I rowsort
SELECT 7 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
406
553
609

query I rowsort
SELECT - 15 FROM tab0 GROUP BY col1
----
-15
-15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4753
SELECT - CAST( NULL AS SIGNED ) - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4753
SELECT - CAST ( NULL AS INTEGER ) - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 12 FROM tab2 GROUP BY tab2.col1
----
-12
-12
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT ALL tab0.col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NULL
----
1444
576
6241

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 + cor0.col0 + + cor0.col2 * 3 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
115
197
263

query I rowsort
SELECT + 89 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
89
89
89

query I rowsort
SELECT ALL + cor0.col1 * - 7 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-264
-342
-36

query I rowsort
SELECT ALL - NULLIF ( + cor0.col0, + cor0.col1 + cor0.col0 * - cor0.col0 ) * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-3772
-5369
-915

query I rowsort
SELECT ALL 25 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1975
600
950

query I rowsort
SELECT + - 19 FROM tab1 GROUP BY tab1.col0
----
-19
-19
-19

query I rowsort
SELECT - 62 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-143
-62

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-138
-148
-99

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT cor0.col2 * 88 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2112
3344
6952

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - cor0.col1 * COALESCE ( + 35, cor0.col2 * - cor0.col0 ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-2835
0

query I rowsort
SELECT - 95 FROM tab0 GROUP BY tab0.col1
----
-95
-95

query I rowsort
SELECT ALL 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT DISTINCT 5 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT - 58 AS col1 FROM tab1 GROUP BY tab1.col2
----
-58
-58
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 75 * cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-6075
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 77 + col2 FROM tab1 AS cor0 GROUP BY col2
----
122
148
85

query I rowsort
SELECT ALL + 47 FROM tab1 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT - 62 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-62
-62
-62

query I rowsort
SELECT + + 78 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT DISTINCT 96 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
96

query I rowsort
SELECT + 74 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
74
74
74

query I rowsort
SELECT DISTINCT + 99 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16
56
73

query I rowsort
SELECT ALL + 98 FROM tab1 GROUP BY col1
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + + 56 col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
138
78
84

query I rowsort
SELECT ALL 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
23
23
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4790
SELECT CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4790
SELECT CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT + cor0.col1 * + 82 FROM tab2 AS cor0 GROUP BY col1
----
3362
4838
5002

query I rowsort
SELECT + cor0.col1 * - 19 FROM tab0 AS cor0 GROUP BY col1
----
-1539
0

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL 78 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT DISTINCT 18 FROM tab2 AS cor0 GROUP BY cor0.col0
----
18

query I rowsort
SELECT + 8 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT DISTINCT - cor0.col0 * - 78 AS col1 FROM tab0 cor0 GROUP BY col0
----
2028
3354
6474

query I rowsort
SELECT NULLIF ( + 45, cor0.col0 ) * - 69 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3105
-3105
-3105

query I rowsort
SELECT cor0.col0 + + 33 FROM tab0 AS cor0 GROUP BY cor0.col0
----
116
59
76

query I rowsort
SELECT cor0.col2 - - 18 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
105
76
97

query I rowsort
SELECT - 6 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT 86 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 32 col2 FROM tab2 AS cor0 GROUP BY col1
----
32

query I rowsort
SELECT ALL + 67 FROM tab0 AS cor0 GROUP BY col2
----
67
67
67

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
2378
4661
5307

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 18 col0 FROM tab2 GROUP BY col2
----
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 - 92 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-11
-92

query I rowsort
SELECT + 1 FROM tab2 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT - + 32 FROM tab0 GROUP BY tab0.col0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT 0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4812
SELECT - 31 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4812
SELECT - 31 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + 66 ) col2 FROM tab0 AS cor0 GROUP BY col1
----
-66
-66

query I rowsort
SELECT 45 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1845
2655
2745

onlyif mysql # DIV for integer division: 
query I rowsort label-4815
SELECT ALL cor0.col1 DIV cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4815
SELECT ALL cor0.col1 / cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4816
SELECT 88 * cor0.col0 + CAST( NULL AS SIGNED ) col0 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4816
SELECT 88 * cor0.col0 + CAST ( NULL AS INTEGER ) col0 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
124
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - col0 - - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
80
80

query I rowsort
SELECT - 77 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-39
-53
2

query I rowsort
SELECT ALL - 51 FROM tab0 AS cor0 GROUP BY col2
----
-51
-51
-51

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab2 cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + cor0.col1 * 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
484
627
66

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-4826
SELECT DISTINCT cor0.col2 + cor0.col1 DIV 87 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

skipif mysql # not compatible
query I rowsort label-4826
SELECT DISTINCT cor0.col2 + cor0.col1 / 87 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + 64 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
64
64
64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4828
SELECT ALL - CAST( NULL AS SIGNED ) / - col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4828
SELECT ALL - CAST ( NULL AS INTEGER ) / - col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 63 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT 74 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
74
74
74

query I rowsort
SELECT + ( cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + 44 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
44
44

query I rowsort
SELECT - tab2.col0 + CASE 96 WHEN tab2.col0 THEN NULL ELSE + col0 END FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT ALL + 5 AS col0 FROM tab0 GROUP BY tab0.col1
----
5
5

query I rowsort
SELECT cor0.col1 * 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 83 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2158
3569
6889

query I rowsort
SELECT ALL 42 FROM tab2 GROUP BY tab2.col2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 65 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 col0 FROM tab0 GROUP BY tab0.col2
----
-31
-31
-31

onlyif mysql # DIV for integer division: 
query I rowsort label-4841
SELECT ALL 83 DIV - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4841
SELECT ALL 83 / - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
-1
-2
-3

query I rowsort
SELECT ALL tab0.col0 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
30

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col0, col1
----
44
57
6

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT ALL - 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-86
-86
-86

query I rowsort
SELECT + 81 FROM tab1 AS cor0 GROUP BY col1
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - cor0.col0 * - 91 + - col0 FROM tab2 AS cor0 GROUP BY col0
----
1350
8190
8280

query I rowsort
SELECT DISTINCT 72 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72

query I rowsort
SELECT - 23 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-23
-23
-23

query I rowsort
SELECT 97 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT + 98 FROM tab2 GROUP BY col2
----
98
98
98

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3364
6241
7569

query I rowsort
SELECT 14 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 48 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-48

query I rowsort
SELECT DISTINCT - 55 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-55

query I rowsort
SELECT - 81 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
-81
-81

query I rowsort
SELECT DISTINCT cor0.col0 + - 17 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
66
9

query I rowsort
SELECT ALL + col2 - + 58 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-13
-50
13

query I rowsort
SELECT 78 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
100
106
160

query I rowsort
SELECT ALL - 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-66
-66
-66

query I rowsort
SELECT + - 1 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - 98 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-98
-98
-98

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 + 75 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1519
6316
651

query I rowsort
SELECT 92 FROM tab2 AS cor0 GROUP BY col2
----
92
92
92

query I rowsort
SELECT 69 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
3105
4899
552

query I rowsort
SELECT col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 77 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
77
77
77

query I rowsort
SELECT ALL + 10 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-150
-910
-920

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - 64 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-155
-156
-79

query I rowsort
SELECT cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT ( cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT ALL + 32 AS col2 FROM tab1 GROUP BY tab1.col1
----
32
32
32

query I rowsort
SELECT ALL 68 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
2992
3876
408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT col0 * ( + 80 * + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
164320
252320
82560

query I rowsort
SELECT + 83 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4885
SELECT DISTINCT - tab0.col2 DIV 70 FROM tab0 GROUP BY col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-4885
SELECT DISTINCT - tab0.col2 / 70 FROM tab0 GROUP BY col2
----
-1
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4886
SELECT ALL + cor0.col1 + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4886
SELECT ALL + cor0.col1 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 * + 61 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-4941
0

query I rowsort
SELECT DISTINCT - tab0.col2 * + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 12 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
12
12
12

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NULL
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-4893
SELECT DISTINCT + cor0.col0 DIV 19 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
4

skipif mysql # not compatible
query I rowsort label-4893
SELECT DISTINCT + cor0.col0 / 19 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
4

query I rowsort
SELECT ALL cor0.col0 - 73 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-30
-47
10

query I rowsort
SELECT DISTINCT - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col1 FROM tab2 AS cor0 GROUP BY col2
----
72
72
72

query I rowsort
SELECT ALL 40 AS col0 FROM tab2 GROUP BY col1
----
40
40
40

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4898
SELECT CAST( NULL AS DECIMAL ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4898
SELECT CAST ( NULL AS REAL ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT - ( + cor0.col2 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 38 FROM tab1 GROUP BY tab1.col2
----
38
38
38

query I rowsort
SELECT + 65 FROM tab0 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT + 18 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1494
468
774

query I rowsort
SELECT DISTINCT 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16

query I rowsort
SELECT ALL 18 FROM tab1 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - 28 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-28

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4907
SELECT + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4907
SELECT + CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 35 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) = NULL
----

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 95 col2 FROM tab0 AS cor0 GROUP BY col0
----
95
95
95

query I rowsort
SELECT - + 20 AS col1 FROM tab0 GROUP BY col0
----
-20
-20
-20

query I rowsort
SELECT ALL - col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 40 AS col1 FROM tab1 GROUP BY tab1.col1
----
40
40
40

query I rowsort
SELECT ALL + 91 - + 77 FROM tab0 GROUP BY col1
----
14
14

query I rowsort
SELECT ALL 81 AS col1 FROM tab2 GROUP BY tab2.col0
----
81
81
81

query I rowsort
SELECT ALL + 53 FROM tab0 GROUP BY tab0.col0
----
53
53
53

query I rowsort
SELECT DISTINCT + cor0.col2 + 1 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT - 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT 5 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
5

query I rowsort
SELECT DISTINCT 70 * 14 FROM tab2 AS cor0 GROUP BY cor0.col2
----
980

query I rowsort
SELECT - 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT + 62 AS col0 FROM tab2 GROUP BY tab2.col2
----
62
62
62

query I rowsort
SELECT DISTINCT + 87 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT + 40 FROM tab2 GROUP BY tab2.col2
----
40

query I rowsort
SELECT ALL - + 42 AS col2 FROM tab2 GROUP BY tab2.col1
----
-42
-42
-42

query I rowsort
SELECT 26 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL - + 43 FROM tab2 GROUP BY col0
----
-43
-43
-43

query I rowsort
SELECT col1 * 23 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1012
1311
138

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 34 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT + 89 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
89
89
89

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4938
SELECT DISTINCT cor0.col0 * - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4938
SELECT DISTINCT cor0.col0 * - CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-4939
SELECT + cor0.col1 DIV 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4939
SELECT + cor0.col1 / 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, col0
----
22
28
82

query I rowsort
SELECT ALL - + 77 * col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-4466
-6083
-6699

query I rowsort
SELECT + NULLIF ( + col1, cor0.col1 * - col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT 15 FROM tab0 cor0 GROUP BY col2
----
15
15
15

query I rowsort
SELECT ALL 79 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
79
79
79

query I rowsort
SELECT - cor0.col1 * + 13 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-1053
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4946
SELECT ALL cor0.col1 + - 97 DIV 32 FROM tab0 cor0 GROUP BY cor0.col1
----
-3
78

skipif mysql # not compatible
query I rowsort label-4946
SELECT ALL cor0.col1 + - 97 / 32 FROM tab0 cor0 GROUP BY cor0.col1
----
-3
78

query I rowsort
SELECT DISTINCT + 75 FROM tab1 GROUP BY tab1.col2
----
75

query I rowsort
SELECT + 28 AS col2 FROM tab0 GROUP BY tab0.col1
----
28
28

query I rowsort
SELECT + ( - cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col1 * - 19 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1121
-1159
-779

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - + tab1.col1 + - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-114
-12
-88

query I rowsort
SELECT 76 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
76
76
76

query I rowsort
SELECT - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-4955
SELECT DISTINCT - 20 DIV 39 + 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32

skipif mysql # not compatible
query I rowsort label-4955
SELECT DISTINCT - 20 / 39 + 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT DISTINCT - + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT 53 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4823
4876
795

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2565
-3124
-48

query I rowsort
SELECT + cor0.col0 * - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT + cor0.col2 - - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
153
30
73

query I rowsort
SELECT + 3 FROM tab0 GROUP BY col2
----
3
3
3

query I rowsort
SELECT DISTINCT + col2 FROM tab0 WHERE NOT ( NULL ) < NULL GROUP BY tab0.col2 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT - tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING ( NULL ) <> ( NULL )
----

query I rowsort
SELECT - cor0.col0 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT + 1 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
72
9

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-4970
SELECT ALL cor0.col1 DIV NULLIF ( - col2, - cor0.col1 ) col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4970
SELECT ALL cor0.col1 / NULLIF ( - col2, - cor0.col1 ) col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

query I rowsort
SELECT + col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 93 + - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
14
35
6

query I rowsort
SELECT + 23 * - 88 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-2024
-2024
-2024

query I rowsort
SELECT DISTINCT 62 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62

query I rowsort
SELECT ALL - 59 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-59
-59
-59

query I rowsort
SELECT DISTINCT 53 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1272
2014
4187

onlyif mysql # DIV for integer division: 
query I rowsort label-4977
SELECT DISTINCT + 58 DIV + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1, cor1.col2
----
1
9

skipif mysql # not compatible
query I rowsort label-4977
SELECT DISTINCT + 58 / + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1, cor1.col2
----
1
9

query I rowsort
SELECT DISTINCT 64 FROM tab2 AS cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT + 25 AS col1 FROM tab2 GROUP BY tab2.col0
----
25
25
25

query I rowsort
SELECT cor0.col1 * + ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 69 col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
69

query I rowsort
SELECT ALL - 58 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-58
-58
-58

query I rowsort
SELECT DISTINCT + 73 * tab1.col2 + - 63 FROM tab1 GROUP BY tab1.col2
----
3222
5120
521

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT + 19 FROM tab1 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT DISTINCT + 34 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34

query I rowsort
SELECT ALL + 61 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
61
61
61

query I rowsort
SELECT - 40 * cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3549
-3588
-585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 88 col1 FROM tab2 GROUP BY tab2.col2
----
88

query I rowsort
SELECT - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT - 87 FROM tab0 GROUP BY col2
----
-87
-87
-87

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL + col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
162

query I rowsort
SELECT tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL cor1.col2 * - 63 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-1512
-2394
-4977

query I rowsort
SELECT 71 FROM tab0 GROUP BY tab0.col1
----
71
71

query I rowsort
SELECT - 39 AS col1 FROM tab0 GROUP BY tab0.col1
----
-39
-39

query I rowsort
SELECT 81 FROM tab0 GROUP BY tab0.col1
----
81
81

query I rowsort
SELECT + 82 FROM tab0 AS cor0 GROUP BY col0
----
82
82
82

query I rowsort
SELECT DISTINCT 34 FROM tab0 GROUP BY tab0.col2
----
34

onlyif mysql # DIV for integer division: 
query I rowsort label-5003
SELECT ALL + 99 DIV - tab0.col0 FROM tab0 GROUP BY col0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5003
SELECT ALL + 99 / - tab0.col0 FROM tab0 GROUP BY col0
----
-1
-2
-3

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT 9 + 64 FROM tab2 AS cor0 GROUP BY cor0.col2
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT + 68 AS col0 FROM tab2 GROUP BY tab2.col2
----
68
68
68

query I rowsort
SELECT + 80 FROM tab2 GROUP BY tab2.col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT + col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 30 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-30
-30
-30

query I rowsort
SELECT 48 * 10 - + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
388
389
465

query I rowsort
SELECT - - 61 * + 43 FROM tab2 GROUP BY tab2.col2
----
2623
2623
2623

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT cor0.col1 + cor0.col2 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2622
3168
54

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + ( - tab0.col2 ) AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + 40 * - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-2320
-3160
-3480

query I rowsort
SELECT 45 + + 10 FROM tab1 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL 97 AS col2 FROM tab2 GROUP BY col1
----
97
97
97

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 22 FROM tab1 AS cor0 GROUP BY col1
----
22
22
22

query I rowsort
SELECT ALL + 34 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
34
34
34

query I rowsort
SELECT ALL cor0.col0 * cor0.col1 + 89 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
1004
3861
5458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL - col0 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-124
-26
-83

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 26 FROM tab0 AS cor0 GROUP BY cor0.col2
----
26

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71
71
71

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5031
SELECT + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5031
SELECT + CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - - ( - 86 ) FROM tab0 GROUP BY col2
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + cor0.col1 + + cor0.col2 * - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col2, cor0.col2
----
-4392
1394
708

query I rowsort
SELECT ALL + ( 58 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
58
58
58

query I rowsort
SELECT - 28 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-28
-28

query I rowsort
SELECT + + 25 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
104
112
83

query I rowsort
SELECT DISTINCT 6 * + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
486

query I rowsort
SELECT - 77 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-77
-77
-77

query I rowsort
SELECT DISTINCT + 79 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
101
107
161

query I rowsort
SELECT 88 FROM tab1 cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT DISTINCT - 5 AS col1 FROM tab1 GROUP BY tab1.col1
----
-5

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor0.col0 * - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-225
-8281
-8464

query I rowsort
SELECT 18 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
18
18
18

query I rowsort
SELECT ALL + ( col1 ) * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # DIV for integer division: 
query I rowsort label-5047
SELECT ALL + cor0.col2 DIV - ( col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5047
SELECT ALL + cor0.col2 / - ( col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + 34 FROM tab1 AS cor0 GROUP BY col2
----
34
34
34

query I rowsort
SELECT ALL + 44 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT 48 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
48
48
48

query I rowsort
SELECT ALL + ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT 46 AS col1 FROM tab2 GROUP BY tab2.col1
----
46
46
46

query I rowsort
SELECT + 95 AS col1 FROM tab2 GROUP BY tab2.col0
----
95
95
95

query I rowsort
SELECT DISTINCT + 41 * - col2 - cor0.col2 * - 85 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2552
3476
3828

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col0 ) * cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT 90 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
90
90
90

query I rowsort
SELECT - + 97 AS col2 FROM tab1 GROUP BY col1
----
-97
-97
-97

query I rowsort
SELECT 51 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT ALL - cor0.col0 * - 73 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1095
6643
6716

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 37 FROM tab2 cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT + 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT 87 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT DISTINCT + 56 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT 53 FROM tab0 AS cor0 GROUP BY col2
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 + + cor1.col2 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
45
66
74

query I rowsort
SELECT ALL - 4 * + 74 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-296
-296
-296

query I rowsort
SELECT + + 97 AS col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
97
97
97

query I rowsort
SELECT - 79 FROM tab2 GROUP BY col0
----
-79
-79
-79

query I rowsort
SELECT ALL - 70 AS col1 FROM tab1 GROUP BY tab1.col1
----
-70
-70
-70

query I rowsort
SELECT ALL - 5 FROM tab1 GROUP BY tab1.col1
----
-5
-5
-5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5076
SELECT col2 / - CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5076
SELECT col2 / - CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 26 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT - 60 AS col1 FROM tab0 GROUP BY tab0.col2
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + 14 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
14

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5082
SELECT cor0.col2 / CAST( NULL AS SIGNED ) + cor0.col2 * + 97 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5082
SELECT cor0.col2 / CAST ( NULL AS INTEGER ) + cor0.col2 * + 97 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 99 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-38
-40
-58

query I rowsort
SELECT 68 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col0 FROM tab0 GROUP BY tab0.col0
----
72
72
72

query I rowsort
SELECT ALL + 9 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-35
-48
3

query I rowsort
SELECT cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col0
----
45
71
8

query I rowsort
SELECT + - col2 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT - col1 * 65 FROM tab0 AS cor0 GROUP BY col1
----
-5265
0

query I rowsort
SELECT ALL - 71 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-71
-71
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 77 col2 FROM tab1 AS cor0 GROUP BY col1
----
77
77
77

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT cor0.col2 * col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + 72 FROM tab2 GROUP BY col0
----
72
72
72

onlyif mysql # DIV for integer division: 
query I rowsort label-5101
SELECT col1 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5101
SELECT col1 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5102
SELECT ALL - NULLIF ( - cor0.col1, + CAST( NULL AS SIGNED ) ) + + 21 FROM tab0 cor0 GROUP BY cor0.col1
----
102
21

skipif mysql # not compatible
query I rowsort label-5102
SELECT ALL - NULLIF ( - cor0.col1, + CAST ( NULL AS INTEGER ) ) + + 21 FROM tab0 cor0 GROUP BY cor0.col1
----
102
21

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 12 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT ALL + 92 AS col2 FROM tab1 GROUP BY tab1.col1
----
92
92
92

query I rowsort
SELECT ALL + 74 FROM tab2 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

onlyif mysql # DIV for integer division: 
query I rowsort label-5108
SELECT 38 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5108
SELECT 38 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-43

onlyif mysql # DIV for integer division: 
query I rowsort label-5110
SELECT + 15 DIV col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5110
SELECT + 15 / col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5111
SELECT ALL - cor0.col2 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5111
SELECT ALL - cor0.col2 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3
0
0

query I rowsort
SELECT + - 84 - 59 AS col2 FROM tab2 GROUP BY tab2.col0
----
-143
-143
-143

query I rowsort
SELECT ALL - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT 43 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
43
43
43

query I rowsort
SELECT - ( + 63 ) FROM tab1 GROUP BY tab1.col0
----
-63
-63
-63

query I rowsort
SELECT - 77 AS col2 FROM tab1 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
-77
-77
-77

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

query I rowsort
SELECT + 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + - 3 AS col0 FROM tab2 GROUP BY tab2.col0
----
-3

query I rowsort
SELECT - 7 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-7
-7
-7

query I rowsort
SELECT tab2.col1 * tab2.col1 + - tab2.col1 * 37 AS col0 FROM tab2 GROUP BY tab2.col1
----
1298
1464
164

query I rowsort
SELECT + - 2 FROM tab1 GROUP BY tab1.col1
----
-2
-2
-2

query I rowsort
SELECT cor0.col2 * + 27 + - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
1026
2133
567

query I rowsort
SELECT + cor0.col0 * - 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3549
-3588
-585

query I rowsort
SELECT ALL - 8 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

query I rowsort
SELECT ALL 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT 69 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3105
4899
552

query I rowsort
SELECT - col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + tab0.col2 * - 37 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1406
-2923
-888

query I rowsort
SELECT + 73 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT - ( 99 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-99
-99
-99

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, col0
----
15
91
92

query I rowsort
SELECT ALL + 63 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
5103

query I rowsort
SELECT - 60 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-60
-60
-60

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col2 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 + 76 * - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-3420
-5396
-608

query I rowsort
SELECT + 95 FROM tab0 AS cor0 GROUP BY col2
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-5142
SELECT cor0.col2 DIV + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5142
SELECT cor0.col2 / + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT + 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT + 76 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT ALL - 1 FROM tab0 AS cor0 GROUP BY col1
----
-1
-1

query I rowsort
SELECT + - 81 FROM tab0 GROUP BY tab0.col1
----
-81
-81

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
83

query I rowsort
SELECT - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-15
-91
-92

query I rowsort
SELECT 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-1305
-5336
-7189

query I rowsort
SELECT + 99 - - tab0.col2 FROM tab0 GROUP BY col2
----
123
137
178

query I rowsort
SELECT col2 * + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT 57 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
57
57
57

query I rowsort
SELECT DISTINCT - + 78 * 21 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1638

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5156
SELECT DISTINCT CAST( + 33 AS SIGNED ) + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
124
125
48

skipif mysql # not compatible
query I rowsort label-5156
SELECT DISTINCT CAST ( + 33 AS INTEGER ) + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
124
125
48

query I rowsort
SELECT DISTINCT cor0.col1 + - 93 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-32
-34
-52

query I rowsort
SELECT 52 + 89 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
141
141
141

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5159
SELECT DISTINCT cor0.col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5159
SELECT DISTINCT cor0.col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT 85 * + 87 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7395
7395
7395

query I rowsort
SELECT - 15 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT ALL + 11 AS col1 FROM tab2 GROUP BY tab2.col0
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 0 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5165
SELECT - cor0.col2 DIV + col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5165
SELECT - cor0.col2 / + col2 AS col0 FROM tab1 AS cor0 GROUP BY col1, col0, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT 49 * - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
-3969
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5167
SELECT 74 DIV - col2 + - 9 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-10
-10
-18

skipif mysql # not compatible
query I rowsort label-5167
SELECT 74 / - col2 + - 9 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-10
-10
-18

query I rowsort
SELECT ALL - + tab2.col1 * 10 AS col2 FROM tab2 GROUP BY tab2.col1
----
-410
-590
-610

query I rowsort
SELECT - 24 AS col2 FROM tab2 GROUP BY tab2.col0
----
-24
-24
-24

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5170
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + - 53 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5170
SELECT DISTINCT + CAST ( NULL AS REAL ) + - 53 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT - 79 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3239
4661
4819

query I rowsort
SELECT cor0.col1 + - 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-10
-48
3

query I rowsort
SELECT + + col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 49 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2009
2891
2989

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 0 * + 35 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 53 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
53
53
53

query I rowsort
SELECT 46 + + cor0.col0 FROM tab2 cor0 GROUP BY col0, cor0.col0
----
137
138
61

query I rowsort
SELECT col1 + + 74 FROM tab0 AS cor0 GROUP BY cor0.col1
----
155
74

query I rowsort
SELECT 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
57
57
57

query I rowsort
SELECT - 97 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-16
-97
-97

query I rowsort
SELECT + 22 + ( cor0.col1 - cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
22
22

query I rowsort
SELECT DISTINCT col2 - - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-5183
SELECT + 17 DIV - 47 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5183
SELECT + 17 / - 47 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 + + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
41
59
61

query I rowsort
SELECT 94 FROM tab1 AS cor0 GROUP BY cor0.col2
----
94
94
94

onlyif mysql # DIV for integer division: 
query I rowsort label-5187
SELECT - cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5187
SELECT - cor0.col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5188
SELECT + tab1.col2 + + CAST( 29 AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col2
----
100
37
74

skipif mysql # not compatible
query I rowsort label-5188
SELECT + tab1.col2 + + CAST ( 29 AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col2
----
100
37
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL + cor0.col2 * + 56 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
3248
4424
4872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
52

query I rowsort
SELECT - cor0.col0 + - 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-108
-109
-32

query I rowsort
SELECT ALL - 51 FROM tab1 GROUP BY col2
----
-51
-51
-51

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5194
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5194
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT - col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT + 10 FROM tab0 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT col1 * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL + cor0.col0 / - cor0.col0 FROM tab2 AS cor0 WHERE ( NULL ) IS NOT NULL GROUP BY cor0.col0
----

query I rowsort
SELECT cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT DISTINCT - 63 FROM tab0 cor0 GROUP BY col2
----
-63

query I rowsort
SELECT ALL 74 * - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3330
-5254
-592

query I rowsort
SELECT 72 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
72
72
72

query I rowsort
SELECT ALL - tab0.col1 AS col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + ( + col1 ) - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + 78 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
78
78
78

query I rowsort
SELECT + cor0.col1 - 92 AS col2 FROM tab1 AS cor0 GROUP BY col1, col0
----
-35
-48
-86

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT 98 + 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
182
182
182

query I rowsort
SELECT ALL - 28 * col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1064
-2212
-672

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 37 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 46 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT 61 + + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, col2
----
104
144
87

query I rowsort
SELECT DISTINCT - 95 * col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-4180
-5415
-570

query I rowsort
SELECT - 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT + 51 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-20
43
6

query I rowsort
SELECT - 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6
-6
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-5222
SELECT DISTINCT 87 DIV 67 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-5222
SELECT DISTINCT 87 / 67 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1

query I rowsort
SELECT 15 * + col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
1134

query I rowsort
SELECT 91 + + cor0.col1 * - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6470
91

query I rowsort
SELECT DISTINCT 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27

query I rowsort
SELECT 95 * 56 FROM tab1 GROUP BY col1
----
5320
5320
5320

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 * - 91 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-4050
-6390
-720

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - cor0.col2 + + COALESCE ( 22, cor0.col0, - cor0.col1 + cor0.col2 * col2, + cor0.col1 + - 10 ) * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1659
504
798

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 51 col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-5231
SELECT - 68 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5231
SELECT - 68 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-2
0

query I rowsort
SELECT DISTINCT 28 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
28

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-32
-51
46

query I rowsort
SELECT - 8 FROM tab1 GROUP BY col1
----
-8
-8
-8

query I rowsort
SELECT + cor0.col1 + 17 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
76
78

query I rowsort
SELECT - 52 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-52
-52

query I rowsort
SELECT DISTINCT + 64 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
64

query I rowsort
SELECT 85 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
85
85
85

query I rowsort
SELECT ALL + 8 + - 43 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-35
-35
-35

query I rowsort
SELECT ALL 10 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT ALL + 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT cor0.col0 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5369
915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45

query I rowsort
SELECT - col0 * + col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NULL
----
-1849
-676
-6889

query I rowsort
SELECT - cor0.col0 + - 52 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-135
-78
-95

query I rowsort
SELECT DISTINCT cor0.col0 + + 90 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
105
181
182

query I rowsort
SELECT DISTINCT cor0.col2 * 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 40 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT ALL + 36 FROM tab0 GROUP BY col2
----
36
36
36

query I rowsort
SELECT DISTINCT 61 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
4941

query I rowsort
SELECT DISTINCT - 28 FROM tab2 GROUP BY col1
----
-28

query I rowsort
SELECT DISTINCT + col2 * + 82 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
4756
6478
7134

query I rowsort
SELECT DISTINCT - 0 AS col1 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT + 75 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
75
75
75

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + ( 29 ) - - col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
108
53
67

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT + - ( 52 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
-52
-52
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 col0 FROM tab2 GROUP BY tab2.col2
----
76
76
76

query I rowsort
SELECT 93 AS col1 FROM tab1 GROUP BY tab1.col0
----
93
93
93

query I rowsort
SELECT + 45 FROM tab1 GROUP BY col0
----
45
45
45

query I rowsort
SELECT DISTINCT - cor0.col0 - - 69 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1768
2924
5644

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5266
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5266
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT + - 24 FROM tab2 GROUP BY col0
----
-24
-24
-24

query I rowsort
SELECT + cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5270
SELECT DISTINCT col0 DIV cor0.col0 + 8 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
9

skipif mysql # not compatible
query I rowsort label-5270
SELECT DISTINCT col0 / cor0.col0 + 8 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
9

query I rowsort
SELECT ALL cor0.col1 + - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-20
-26

query I rowsort
SELECT - 7 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

query I rowsort
SELECT 36 + + 51 FROM tab1 GROUP BY tab1.col2
----
87
87
87

query I rowsort
SELECT ALL 7 FROM tab1 AS cor0 GROUP BY col0
----
7
7
7

query I rowsort
SELECT - 35 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-27
10
36

query I rowsort
SELECT + 62 FROM tab2 AS cor0 GROUP BY col0
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 4 + - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-28
-42
-83

query I rowsort
SELECT - 13 AS col2 FROM tab0 GROUP BY col0
----
-13
-13
-13

query I rowsort
SELECT ALL ( + 75 ) * - col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1950
-3225
-6225

query I rowsort
SELECT + 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT DISTINCT 90 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
90

query I rowsort
SELECT 89 FROM tab1 GROUP BY col1
----
89
89
89

query I rowsort
SELECT DISTINCT 57 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 73 col0 FROM tab1 GROUP BY tab1.col1
----
-73
-73
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, col1
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col2 * + 97 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4365
6887
776

query I rowsort
SELECT - - 42 AS col1 FROM tab2 GROUP BY tab2.col0
----
42
42
42

query I rowsort
SELECT 44 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
44
44
44

query I rowsort
SELECT cor0.col0 + 50 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1274
-2107
-4067

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT 26 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-18
-31
20

query I rowsort
SELECT DISTINCT 87 * + col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
5046
6873
7569

query I rowsort
SELECT ALL + + 81 FROM tab2 GROUP BY col0
----
81
81
81

query I rowsort
SELECT 89 FROM tab1 AS cor0 GROUP BY col1
----
89
89
89

query I rowsort
SELECT ALL + 41 * cor0.col0 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1091
3318
896

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-5298
SELECT ALL + CAST( + col1 AS SIGNED ) DIV 48 FROM tab2 GROUP BY tab2.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5298
SELECT ALL + CAST ( + col1 AS INTEGER ) / 48 FROM tab2 GROUP BY tab2.col1
----
0
1
1

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
105
121
67

query I rowsort
SELECT ALL cor0.col1 * 52 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
4212

query I rowsort
SELECT ALL - col0 + 69 AS col0 FROM tab2 GROUP BY tab2.col0
----
-22
-23
54

onlyif mysql # DIV for integer division: 
query I rowsort label-5303
SELECT ALL + + 65 DIV 82 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5303
SELECT ALL + + 65 / 82 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 33 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
116
59
76

query I rowsort
SELECT DISTINCT 14 AS col2 FROM tab1 GROUP BY tab1.col0
----
14

query I rowsort
SELECT DISTINCT - 52 + 75 AS col0 FROM tab1 GROUP BY tab1.col0
----
23

query I rowsort
SELECT DISTINCT + + 99 AS col2 FROM tab0 GROUP BY tab0.col2
----
99

query I rowsort
SELECT + 93 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
4185
6603
744

query I rowsort
SELECT DISTINCT cor0.col2 * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT + 42 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 24 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 14 * - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-616
-798
-84

query I rowsort
SELECT DISTINCT 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8

query I rowsort
SELECT + cor0.col0 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 4, + cor0.col1 * 26, col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 82 + col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
140
161
169

query I rowsort
SELECT 71 FROM tab0 GROUP BY col2
----
71
71
71

query I rowsort
SELECT + 7 FROM tab0 GROUP BY tab0.col2
----
7
7
7

query I rowsort
SELECT - 55 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-55
-55
-55

query I rowsort
SELECT DISTINCT - - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ( - tab2.col0 ) * + 71 AS col0 FROM tab2 GROUP BY col0
----
-1065
-6461
-6532

query I rowsort
SELECT - 35 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-35
-35
-35

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5325
SELECT DISTINCT - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5325
SELECT DISTINCT - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL + 51 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
108
57
95

query I rowsort
SELECT + + 81 AS col2 FROM tab1 GROUP BY tab1.col0
----
81
81
81

query I rowsort
SELECT ALL + 60 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT - 5 FROM tab1 GROUP BY tab1.col2
----
-5
-5
-5

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT 3 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
11
48
74

query I rowsort
SELECT + 10 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
440
570
60

query I rowsort
SELECT ALL 46 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT - - 50 FROM tab2 GROUP BY tab2.col0
----
50
50
50

query I rowsort
SELECT DISTINCT + ( - 20 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-20

query I rowsort
SELECT ALL 9 FROM tab1 cor0 GROUP BY col1
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 + 54 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT 34 * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
1972
2686
2958

query I rowsort
SELECT - ( + 26 ) FROM tab1 GROUP BY col0
----
-26
-26
-26

query I rowsort
SELECT ALL + ( + 37 ) * 76 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
2812
2812
2812

query I rowsort
SELECT cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 * - cor0.col0 + 26 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-199
-8255
-8438

query I rowsort
SELECT cor0.col2 + + 30 * 81 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
2454
2468
2509

query I rowsort
SELECT DISTINCT - 81 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-81

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5347
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5347
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 78 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
78
78
78

query I rowsort
SELECT DISTINCT 39 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
39

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2025
5041
64

query I rowsort
SELECT DISTINCT - - 39 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
39

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - 31 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + col1 + - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
3405
6300
7630

query I rowsort
SELECT DISTINCT - - 23 + 2 * 67 AS col1 FROM tab0 GROUP BY tab0.col0
----
157

query I rowsort
SELECT ALL - cor0.col0 * 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-286
-473
-913

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5359
SELECT - - tab2.col0 - - CAST( col0 AS SIGNED ) * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

skipif mysql # not compatible
query I rowsort label-5359
SELECT - - tab2.col0 - - CAST ( col0 AS INTEGER ) * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

query I rowsort
SELECT ALL + 65 FROM tab1 GROUP BY tab1.col0
----
65
65
65

query I rowsort
SELECT + 79 + + 74 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
153
153
153

query I rowsort
SELECT 34 - - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
75
93
95

query I rowsort
SELECT ALL 54 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
133
78
92

query I rowsort
SELECT 41 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT ALL cor0.col1 * NULLIF ( - 6, 49 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-264
-342
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-1944
0
0

query I rowsort
SELECT ALL 34 + col2 FROM tab0 AS cor0 GROUP BY col2
----
113
58
72

query I rowsort
SELECT + cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT cor0.col2 + 32 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
111
119
90

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1681
3481
3721

query I rowsort
SELECT - 36 * + 80 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2880
-2880
-2880

query I rowsort
SELECT ALL - 5 * col0 FROM tab2 AS cor0 GROUP BY col0
----
-455
-460
-75

query I rowsort
SELECT - 19 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT 6 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
6
6
6

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
225
8281
8464

onlyif mysql # DIV for integer division: 
query I rowsort label-5378
SELECT ALL col0 - 48 DIV col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
20
27
82

skipif mysql # not compatible
query I rowsort label-5378
SELECT ALL col0 - 48 / col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
20
27
82

query I rowsort
SELECT DISTINCT + COALESCE ( 53, + 93 ) FROM tab1 cor0 GROUP BY cor0.col1
----
53

onlyif mysql # DIV for integer division: 
query I rowsort label-5380
SELECT ALL 26 DIV 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
13
13

skipif mysql # not compatible
query I rowsort label-5380
SELECT ALL 26 / 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 79 FROM tab0 cor0 GROUP BY col2
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 10 col1 FROM tab2 AS cor0 GROUP BY col2
----
10
10
10

query I rowsort
SELECT DISTINCT - col1 + + 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-58
23

query I rowsort
SELECT DISTINCT 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 + + 30 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT ALL cor0.col0 * 54 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4914
4968
810

query I rowsort
SELECT - cor0.col2 * cor0.col1 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2419
-4720
-5368

query I rowsort
SELECT DISTINCT cor0.col0 - + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT cor0.col1 * + 65 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2860
3705
390

query I rowsort
SELECT ALL 68 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT ALL - 92 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-10
-64
-70

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + cor0.col0 * 48 FROM tab2 cor0 GROUP BY col0
----
4368
4416
720

query I rowsort
SELECT 72 FROM tab1 GROUP BY tab1.col0
----
72
72
72

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5397
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 3 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5397
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 3 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT ALL - ( + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - 5 AS col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT + 0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT ALL 47 FROM tab2 GROUP BY col1
----
47
47
47

query I rowsort
SELECT ( + cor0.col0 ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - 92 + - 2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-94

query I rowsort
SELECT DISTINCT cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col2
----
26
43
83

query I rowsort
SELECT 7 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
7
7
7

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-5406
SELECT CAST( 5 AS SIGNED ) + cor0.col0 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

skipif mysql # not compatible
query I rowsort label-5406
SELECT CAST ( 5 AS INTEGER ) + cor0.col0 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT + 49 FROM tab1 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT + - 10 AS col0 FROM tab2 GROUP BY tab2.col0
----
-10
-10
-10

query I rowsort
SELECT + + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 7 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
7

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col2 * cor0.col0 + - 68 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-920
1001
285

query I rowsort
SELECT ALL + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 92 * - ( + tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
5336
7268
8004

query I rowsort
SELECT DISTINCT + 35 FROM tab0 AS cor0 GROUP BY cor0.col1
----
35

query I rowsort
SELECT ALL 86 FROM tab2 GROUP BY tab2.col0
----
86
86
86

query I rowsort
SELECT ALL 32 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT ALL + 84 FROM tab0 cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT + 9 FROM tab0 AS cor0 GROUP BY col0
----
9
9
9

query I rowsort
SELECT ALL + ( - 30 ) FROM tab2 GROUP BY tab2.col0
----
-30
-30
-30

query I rowsort
SELECT 42 FROM tab2 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT - cor0.col1 * + 2 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-114
-12
-88

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 * 98 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2574
4257
8217

query I rowsort
SELECT ( + 12 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
12
12

onlyif mysql # DIV for integer division: 
query I rowsort label-5429
SELECT - 5 DIV - ( + cor0.col2 ) + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

skipif mysql # not compatible
query I rowsort label-5429
SELECT - 5 / - ( + cor0.col2 ) + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5430
SELECT ALL + 15 DIV cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5430
SELECT ALL + 15 / cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 45 + + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
128
71
88

query I rowsort
SELECT - ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT ALL + 94 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT - - 43 - - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
114
51
88

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT 50 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
50
50
50

query I rowsort
SELECT DISTINCT 5 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5

query I rowsort
SELECT 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-5440
SELECT + ( - 33 ) DIV - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5440
SELECT + ( - 33 ) / - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab1 GROUP BY tab1.col0
----
64

query I rowsort
SELECT - cor0.col1 * 31 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2511
0

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT 3 FROM tab2 GROUP BY tab2.col2
----
3
3
3

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 2 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
2

query I rowsort
SELECT - 93 * + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3813
-5487
-5673

query I rowsort
SELECT - + tab2.col2 - - 94 AS col0 FROM tab2 GROUP BY col2
----
15
36
7

query I rowsort
SELECT cor0.col2 * 69 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4002
5451
6003

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5451
SELECT CAST( + 26 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
26
26
26

skipif mysql # not compatible
query I rowsort label-5451
SELECT CAST ( + 26 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
26
26
26

query I rowsort
SELECT + 13 AS col1 FROM tab2 GROUP BY tab2.col1
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col0 * cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
490
6768
841

query I rowsort
SELECT DISTINCT 35 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
35

query I rowsort
SELECT 80 FROM tab1 cor0 GROUP BY cor0.col1
----
80
80
80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5456
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5456
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * - 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3784
-4902
-516

query I rowsort
SELECT ALL - 61 * tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-5551
-5612
-915

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL 84 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 36 FROM tab2 GROUP BY tab2.col1
----
36
36
36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 82, cor0.col1 - cor0.col2 * - CASE + cor0.col1 * + cor0.col1 WHEN cor0.col1 + cor0.col2 THEN cor0.col2 WHEN cor0.col2 * - col2 + - cor0.col1 THEN col0 END ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT - cor0.col2 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, col2, cor0.col1
----
-1944
0
0

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-5467
SELECT DISTINCT - col2 - 59 DIV 79 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-45
-71
-8

skipif mysql # not compatible
query I rowsort label-5467
SELECT DISTINCT - col2 - 59 / 79 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 11 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 8 col1 FROM tab0 GROUP BY tab0.col0
----
8
8
8

query I rowsort
SELECT 6 FROM tab0 GROUP BY tab0.col2
----
6
6
6

query I rowsort
SELECT - 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-41
-41
-41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5473
SELECT DISTINCT CAST( - cor0.col2 AS SIGNED ) * - 24 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1392
1896
2088

skipif mysql # not compatible
query I rowsort label-5473
SELECT DISTINCT CAST ( - cor0.col2 AS INTEGER ) * - 24 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1392
1896
2088

query I rowsort
SELECT DISTINCT - 75 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-75

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 7 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col0
----
7

query I rowsort
SELECT ALL - cor0.col2 * 20 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1580
-480
-760

query I rowsort
SELECT - 9 FROM tab0 AS cor0 GROUP BY col1
----
-9
-9

query I rowsort
SELECT 83 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT - + 48 FROM tab0 GROUP BY tab0.col1
----
-48
-48

query I rowsort
SELECT ALL + 9 * 51 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
459
459
459

query I rowsort
SELECT ALL + cor0.col2 - + 79 FROM tab0 AS cor0 GROUP BY col2
----
-41
-55
0

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT 85 FROM tab0 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT DISTINCT 18 FROM tab2 AS cor0 GROUP BY col0
----
18

query I rowsort
SELECT DISTINCT - + 39 AS col0 FROM tab0 GROUP BY tab0.col2
----
-39

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING - col2 IS NOT NULL
----
45
71
8

query I rowsort
SELECT DISTINCT col2 * + 93 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, col2
----
2232
3534
7347

query I rowsort
SELECT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 61 * 48 FROM tab0 GROUP BY tab0.col1
----
-2928
-2928

query I rowsort
SELECT ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT ( - 3 ) FROM tab0 AS cor0 GROUP BY col2
----
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT 4 FROM tab2 cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 * 7 + + 25 FROM tab1 AS cor0 GROUP BY cor0.col2
----
340
522
81

query I rowsort
SELECT DISTINCT - col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col2 * - 13 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1027
-1131
-754

query I rowsort
SELECT DISTINCT ( - 27 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-27

query I rowsort
SELECT DISTINCT - 13 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13

query I rowsort
SELECT DISTINCT cor0.col1 - - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT - - col2 FROM tab1 GROUP BY col2
----
45
71
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5505
SELECT CAST( NULL AS SIGNED ) col2 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5505
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-5507
SELECT ALL cor0.col0 DIV 81 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5507
SELECT ALL cor0.col0 / 81 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT ALL + + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - cor0.col0 * - 10 FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
150
910
920

query I rowsort
SELECT DISTINCT 73 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
111
152
97

query I rowsort
SELECT + 51 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT ALL - 74 - + 63 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-137
-137
-137

query I rowsort
SELECT DISTINCT 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60

query I rowsort
SELECT ALL 60 * 99 + - col2 * + ( 45 + + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2276
-3282
952

query I rowsort
SELECT DISTINCT cor0.col2 * + 85 + - 97 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1943
3133
6618

query I rowsort
SELECT + cor0.col0 + col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

query I rowsort
SELECT + 98 AS col1 FROM tab2 GROUP BY tab2.col0
----
98
98
98

query I rowsort
SELECT + 25 FROM tab1 GROUP BY tab1.col0
----
25
25
25

query I rowsort
SELECT 53 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - cor0.col2 + - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT - 11 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-11

query I rowsort
SELECT DISTINCT - ( tab1.col2 ) + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT ALL cor0.col0 * col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT ALL - 99 FROM tab0 GROUP BY tab0.col2
----
-99
-99
-99

query I rowsort
SELECT 71 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
71
71
71

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 82 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
82

query I rowsort
SELECT 83 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
83
83
83

query I rowsort
SELECT ALL + 92 FROM tab1 GROUP BY tab1.col1
----
92
92
92

query I rowsort
SELECT ALL - cor0.col0 + 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
14
31

query I rowsort
SELECT ALL + cor0.col0 * 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2457
2484
405

onlyif mysql # DIV for integer division: 
query I rowsort label-5534
SELECT - 98 DIV + 85 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5534
SELECT - 98 / + 85 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT - cor0.col1 - cor0.col1 * + 57 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2552
-3306
-348

query I rowsort
SELECT DISTINCT - 97 + + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-26
-52
-89

query I rowsort
SELECT cor0.col0 + 1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16
92
93

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - 4 AS col1 FROM tab1 GROUP BY tab1.col1
----
-4
-4
-4

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # DIV for integer division: 
query I rowsort label-5544
SELECT + 75 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-5544
SELECT + 75 / - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-2
-3
0

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-484
-6724
-784

query I rowsort
SELECT - 85 * cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-1870
-2380
-6970

query I rowsort
SELECT DISTINCT + 92 + cor0.col1 * - col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
-1589
-3389
-3629

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0, cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT cor0.col1 * - cor0.col1 + - col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1722
-3540
-3782

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - + 97 * - tab0.col1 + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
7938

query I rowsort
SELECT + 84 - - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
129
155
92

query I rowsort
SELECT ALL 99 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT + 74 FROM tab1 AS cor0 GROUP BY cor0.col2
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL 86 FROM tab1 GROUP BY tab1.col0
----
86
86
86

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 FROM tab1 cor0 GROUP BY col2, col1
----
1936
3249
36

query I rowsort
SELECT + 77 + - col2 AS col1 FROM tab2 GROUP BY col2
----
-10
-2
19

query I rowsort
SELECT - 55 + + tab1.col2 FROM tab1 GROUP BY col2
----
-10
-47
16

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5564
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5564
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5565
SELECT ALL - 27 DIV - 67 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5565
SELECT ALL - 27 / - 67 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 52 FROM tab2 GROUP BY tab2.col0
----
-52

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - 18 AS col0 FROM tab1 GROUP BY tab1.col2
----
-18

onlyif mysql # DIV for integer division: 
query I rowsort label-5569
SELECT DISTINCT COALESCE ( 5, - cor0.col1 DIV + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
5

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5569
SELECT DISTINCT COALESCE ( 5, - cor0.col1 / + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + 5 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT ALL + 45 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
1260
3690
990

query I rowsort
SELECT + 33 FROM tab0 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT - cor0.col1 * - 36 FROM tab2 AS cor0 GROUP BY col1
----
1476
2124
2196

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 72 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1728
-2736
-5688

query I rowsort
SELECT DISTINCT 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
85

query I rowsort
SELECT ( - 32 ) FROM tab0 GROUP BY tab0.col2
----
-32
-32
-32

onlyif mysql # DIV for integer division: 
query I rowsort label-5580
SELECT + cor0.col1 DIV cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
3

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5580
SELECT + cor0.col1 / cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
3

query I rowsort
SELECT DISTINCT 99 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
99

query I rowsort
SELECT DISTINCT - - col2 + - 67 AS col2 FROM tab0 GROUP BY tab0.col2
----
-29
-43
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT ALL 68 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col2
----
68
68
68

query I rowsort
SELECT ALL 16 FROM tab0 AS cor0 GROUP BY cor0.col0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * cor0.col1 + col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2436
4740
5394

query I rowsort
SELECT + 34 * + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1462
2822
884

query I rowsort
SELECT + col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 6 FROM tab2 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT ALL 30 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
113
56
73

query I rowsort
SELECT + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - 66 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-66

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.col1
----
24
38
79

query I rowsort
SELECT 35 * - 5 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-175
-175
-175

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-5596
SELECT + 94 DIV - 2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47
-47
-47

skipif mysql # not compatible
query I rowsort label-5596
SELECT + 94 / - 2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47
-47
-47

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5597
SELECT DISTINCT cor0.col1 + + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5597
SELECT DISTINCT cor0.col1 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
NULL

query I rowsort
SELECT - 71 FROM tab0 AS cor0 GROUP BY col2
----
-71
-71
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 58 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT + 88 AS col0 FROM tab2 GROUP BY tab2.col2
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
135
136
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 99 col0 FROM tab1 GROUP BY tab1.col2
----
99
99
99

query I rowsort
SELECT - col1 + 62 FROM tab1 AS cor0 GROUP BY col1
----
18
5
56

query I rowsort
SELECT ALL + 73 + 98 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
171
171
171

query I rowsort
SELECT + 2 FROM tab0 AS cor0 GROUP BY col2
----
2
2
2

query I rowsort
SELECT DISTINCT + 2 AS col0 FROM tab2 GROUP BY col2
----
2

onlyif mysql # DIV for integer division: 
query I rowsort label-5607
SELECT cor0.col0 DIV 74 AS col1 FROM tab2 cor0 GROUP BY col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5607
SELECT cor0.col0 / 74 AS col1 FROM tab2 cor0 GROUP BY col0
----
0
1
1

query I rowsort
SELECT ALL 80 FROM tab2 GROUP BY tab2.col2
----
80
80
80

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT ALL 85 + - 0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 96 FROM tab0 cor0 GROUP BY cor0.col2
----
96

query I rowsort
SELECT DISTINCT + 91 * 81 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
7371

query I rowsort
SELECT DISTINCT 94 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 * + 66 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
5915
5980
975

query I rowsort
SELECT + 85 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, col0
----
85
85
85

query I rowsort
SELECT - 81 FROM tab0 GROUP BY col1
----
-81
-81

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL col0 + 44 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
135
136
59

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT + - 86 * - tab0.col2 + ( + 49 ) * 91 AS col2 FROM tab0 GROUP BY tab0.col2
----
11253
6523
7727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + 81 AS col1 FROM tab2 GROUP BY tab2.col0
----
81
81
81

query I rowsort
SELECT DISTINCT + + 7 FROM tab1 GROUP BY tab1.col2
----
7

query I rowsort
SELECT + 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
73
73
73

query I rowsort
SELECT + col0 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL - ( - 78 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
78
78

query I rowsort
SELECT + + 55 AS col0 FROM tab1 GROUP BY tab1.col2
----
55
55
55

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab2 GROUP BY tab2.col0
----
92

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT DISTINCT + 43 - - col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
122
67
81

query I rowsort
SELECT tab2.col1 + + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
118
122
82

query I rowsort
SELECT ALL 75 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - 3 + 8 * - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-355
-459
-51

query I rowsort
SELECT - 7 + + cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1437
569
6234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( cor0.col2 ) * - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - cor0.col0 * - NULLIF ( 80, cor0.col2 + - cor0.col0 ) col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
2159
3464
6678

query I rowsort
SELECT cor0.col0 * - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT DISTINCT - 16 * + col0 + 68 FROM tab1 GROUP BY tab1.col0
----
-1244
-284
-380

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 col1 FROM tab2 AS cor0 GROUP BY col0
----
60
60
60

query I rowsort
SELECT DISTINCT 9 - ( cor0.col2 + cor0.col2 * + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3413
-6311
-7647

query I rowsort
SELECT - cor0.col1 + + 60 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
3
54

query I rowsort
SELECT DISTINCT 44 * 93 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4092

query I rowsort
SELECT DISTINCT - 29 + - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-100
-37
-74

query I rowsort
SELECT - 70 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-70
-70
-70

query I rowsort
SELECT ALL - cor0.col0 + 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-35
-36
41

query I rowsort
SELECT + 22 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1298
1342
902

query I rowsort
SELECT ALL cor0.col1 - + col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - 18 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-18
-18
-18

query I rowsort
SELECT + 98 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5684
7742
8526

query I rowsort
SELECT cor0.col1 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-17
-20
-26

query I rowsort
SELECT cor0.col0 + + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT col1 * - 16 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1296
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5661
SELECT DISTINCT - cor0.col2 DIV cor0.col2 FROM tab0 cor0 GROUP BY col2
----
-1

skipif mysql # not compatible
query I rowsort label-5661
SELECT DISTINCT - cor0.col2 / cor0.col2 FROM tab0 cor0 GROUP BY col2
----
-1

query I rowsort
SELECT ALL + 84 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col1
----
84
84
84
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
95
95
95

query I rowsort
SELECT 52 AS col2 FROM tab0 cor0 GROUP BY col0
----
52
52
52

query I rowsort
SELECT DISTINCT 19 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
19

query I rowsort
SELECT ALL + - 0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT 57 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
2337
3363
3477

onlyif mysql # DIV for integer division: 
query I rowsort label-5668
SELECT DISTINCT col0 DIV 35 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5668
SELECT DISTINCT col0 / 35 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

query I rowsort
SELECT ALL + 37 FROM tab0 GROUP BY tab0.col2
----
37
37
37

query I rowsort
SELECT - cor0.col2 - - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5671
SELECT - cor0.col1 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5671
SELECT - cor0.col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-1
-1
-1

query I rowsort
SELECT - cor0.col2 * + 16 AS col1 FROM tab0 cor0 GROUP BY col2
----
-1264
-384
-608

query I rowsort
SELECT cor0.col1 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT 71 * cor0.col2 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
4118
5609
6177

query I rowsort
SELECT + + col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-59
-59
-59

query I rowsort
SELECT ALL 9 AS col0 FROM tab2 GROUP BY tab2.col0
----
9
9
9

query I rowsort
SELECT ALL + 41 FROM tab0 GROUP BY tab0.col0
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 76 col0 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 ( - 11 ) col1 FROM tab0 GROUP BY tab0.col0
----
-11
-11
-11

query I rowsort
SELECT 73 FROM tab1 cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT DISTINCT + + 42 AS col0 FROM tab0 GROUP BY tab0.col2
----
42

query I rowsort
SELECT - cor0.col2 * 26 FROM tab0 AS cor0 GROUP BY col2
----
-2054
-624
-988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( 54, cor0.col2 + 63 * + cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT + 96 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1440
8736
8832

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
6

query I rowsort
SELECT ( col2 ) + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT - 21 + - 7 AS col0 FROM tab0 GROUP BY tab0.col0
----
-28
-28
-28

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5689
SELECT DISTINCT + cor0.col1 * + CAST( NULL AS SIGNED ) + + 76 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5689
SELECT DISTINCT + cor0.col1 * + CAST ( NULL AS INTEGER ) + + 76 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT cor0.col0 - - 14 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
40
57
97

query I rowsort
SELECT - 29 * 52 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-1508
-1508
-1508

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, col0, cor0.col1
----
0
0
81

query I rowsort
SELECT 77 FROM tab0 cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT - 75 FROM tab2 GROUP BY col0
----
-75
-75
-75

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 * + 14 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1148
-308
-392

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 76 col2 FROM tab0 GROUP BY tab0.col1
----
76

query I rowsort
SELECT ALL - 78 + + 95 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-5588
-7583
-8343

query I rowsort
SELECT - 43 AS col0 FROM tab1 GROUP BY tab1.col1
----
-43
-43
-43

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT + col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 24 FROM tab2 AS cor0 GROUP BY col2
----
24

query I rowsort
SELECT - cor0.col1 * - 21 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
1701

query I rowsort
SELECT 45 + + cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1981
3294
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
-81
0
0

query I rowsort
SELECT DISTINCT + + 81 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
4698
6399
7047

query I rowsort
SELECT DISTINCT + + 53 FROM tab2 GROUP BY col2
----
53

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 - + cor0.col2 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1188
-12
684

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-46
32
51

query I rowsort
SELECT DISTINCT - 33 + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-27
11
24

query I rowsort
SELECT - + col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 7 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
168
266
553

query I rowsort
SELECT + tab2.col2 + 66 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3770
-5135
-5655

query I rowsort
SELECT cor0.col1 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
0
0
1944

onlyif mysql # DIV for integer division: 
query I rowsort label-5718
SELECT ALL - col1 DIV 35 FROM tab0 GROUP BY tab0.col1
----
-2
0

skipif mysql # not compatible
query I rowsort label-5718
SELECT ALL - col1 / 35 FROM tab0 GROUP BY tab0.col1
----
-2
0

query I rowsort
SELECT DISTINCT - 49 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 col1 FROM tab1 AS cor0 GROUP BY col0
----
-27
-27
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 69 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT - - 47 FROM tab0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT + 62 AS col1 FROM tab2 GROUP BY tab2.col1
----
62
62
62

query I rowsort
SELECT + 45 FROM tab2 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + + 38 AS col1 FROM tab0 GROUP BY tab0.col1
----
38
38

query I rowsort
SELECT - cor0.col2 * 16 + - cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2052
-7505
-960

query I rowsort
SELECT ALL - 60 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-60
-60
-60

query I rowsort
SELECT ALL - ( - ( - 86 ) ) AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-86
-86
-86

query I rowsort
SELECT DISTINCT + cor0.col1 + - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
164
44
56

query I rowsort
SELECT 19 - + col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-64
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 86 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-86
-86
-86

query I rowsort
SELECT + 83 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
12
38
75

query I rowsort
SELECT DISTINCT 66 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
66

query I rowsort
SELECT ALL - col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT ALL + col0 - 36 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-10
47
7

query I rowsort
SELECT - 27 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-27
-27
-27

query I rowsort
SELECT - 21 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-21
-21
-21

query I rowsort
SELECT - + 33 AS col0 FROM tab2 GROUP BY tab2.col1
----
-33
-33
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 40 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40

query I rowsort
SELECT + + col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 58 FROM tab2 GROUP BY tab2.col1
----
-58

query I rowsort
SELECT DISTINCT - + 21 AS col0 FROM tab2 GROUP BY col0
----
-21

query I rowsort
SELECT ALL 2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 - + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1406
552
6162

query I rowsort
SELECT DISTINCT - 7 FROM tab0 GROUP BY col0
----
-7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5749
SELECT DISTINCT cor0.col2 + CAST( NULL AS SIGNED ) / + 19 FROM tab2 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5749
SELECT DISTINCT cor0.col2 + CAST ( NULL AS INTEGER ) / + 19 FROM tab2 AS cor0 GROUP BY col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 1 * - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 53 FROM tab1 AS cor0 GROUP BY cor0.col1
----
53

query I rowsort
SELECT cor0.col0 - + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col0 * - 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2214
-594
-756

query I rowsort
SELECT - 29 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-29
-29
-29

query I rowsort
SELECT - - 47 AS col0 FROM tab2 GROUP BY tab2.col1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 13 FROM tab0 GROUP BY tab0.col0
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - + 16 FROM tab1 GROUP BY tab1.col0
----
-16
-16
-16

query I rowsort
SELECT 98 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
2548
4214
8134

query I rowsort
SELECT ALL ( - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 55 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-5766
SELECT DISTINCT 19 DIV 31 AS col2 FROM tab1 GROUP BY tab1.col2
----
0

skipif mysql # not compatible
query I rowsort label-5766
SELECT DISTINCT 19 / 31 AS col2 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT + col0 + - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 11 FROM tab2 GROUP BY col0
----
11

query I rowsort
SELECT - - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL 83 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-1826
-2324
-6806

query I rowsort
SELECT 39 FROM tab0 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT 23 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT 38 + col1 * ( 62 ) FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
38
5060

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + 99 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT 17 - + 87 FROM tab2 GROUP BY tab2.col0
----
-70
-70
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0 HAVING NOT NULL > NULL
----

query I rowsort
SELECT - 76 + - 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-88
-88
-88

query I rowsort
SELECT DISTINCT 0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT + + col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 81 * 40 FROM tab0 GROUP BY tab0.col0
----
-3240
-3240
-3240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT + 51 FROM tab0 AS cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT cor0.col1 * - col1 + + 39 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1642
-3442
-3682

query I rowsort
SELECT - 7 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

query I rowsort
SELECT + 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + - 6 AS col1 FROM tab2 GROUP BY col2
----
-6
-6
-6

query I rowsort
SELECT - 77 - - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-19
10
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 34 col0 FROM tab2 GROUP BY tab2.col2
----
-34
-34
-34

query I rowsort
SELECT DISTINCT 1 AS col1 FROM tab0 GROUP BY tab0.col0
----
1

query I rowsort
SELECT 61 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
61
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5798
SELECT ALL col0 DIV + 13 + col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1852
678
6895

skipif mysql # not compatible
query I rowsort label-5798
SELECT ALL col0 / + 13 + col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1852
678
6895

query I rowsort
SELECT - cor0.col1 + + 41 FROM tab0 AS cor0 GROUP BY col1
----
-40
41

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 - + 95 FROM tab0 cor0 GROUP BY cor0.col2
----
1349
481
6146

onlyif mysql # DIV for integer division: 
query I rowsort label-5801
SELECT 50 DIV 63 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5801
SELECT 50 / 63 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5802
SELECT ALL - tab2.col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5802
SELECT ALL - tab2.col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT + 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT DISTINCT + 95 AS col1 FROM tab1 GROUP BY tab1.col2
----
95

query I rowsort
SELECT DISTINCT + 16 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-28
-41
10

query I rowsort
SELECT DISTINCT 4 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5808
SELECT cor0.col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY col0, col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5808
SELECT cor0.col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY col0, col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 98 FROM tab1 AS cor0 GROUP BY col2
----
98
98
98

query I rowsort
SELECT ALL 13 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col2, cor0.col2
----
75
75
75

query I rowsort
SELECT ALL + 54 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 12 FROM tab1 GROUP BY col1
----
12
12
12

query I rowsort
SELECT ALL col1 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT ALL 11 AS col2 FROM tab2 GROUP BY tab2.col1
----
11
11
11

query I rowsort
SELECT DISTINCT cor0.col2 + - col2 FROM tab1 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT + 86 FROM tab2 AS cor0 GROUP BY col2
----
86

query I rowsort
SELECT col0 - + ( ( col0 ) ) FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
74
74
74

query I rowsort
SELECT ALL 10 * + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
150
910
920

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
52
52
52

query I rowsort
SELECT 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
52
52
52

query I rowsort
SELECT 65 AS col2 FROM tab0 GROUP BY tab0.col1
----
65
65

query I rowsort
SELECT 82 AS col0 FROM tab2 GROUP BY tab2.col1
----
82
82
82

query I rowsort
SELECT - + 3 AS col1 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT ALL cor0.col0 * 11 AS col2 FROM tab2 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
1001
1012
165

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 62 col0 FROM tab0 GROUP BY tab0.col1
----
-62

query I rowsort
SELECT + 40 FROM tab1 GROUP BY tab1.col2
----
40
40
40

query I rowsort
SELECT + 12 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
528
684
72

query I rowsort
SELECT ALL - 20 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1420
-160
-900

query I rowsort
SELECT + 28 AS col0 FROM tab2 GROUP BY tab2.col0
----
28
28
28

query I rowsort
SELECT 76 * + 66 AS col1 FROM tab1 GROUP BY tab1.col0
----
5016
5016
5016

query I rowsort
SELECT ALL - 82 + 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-22
-22

query I rowsort
SELECT DISTINCT 88 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col0 - + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-240
-8372
-8556

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + cor0.col2 * - 9 - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-580
-790
-870

query I rowsort
SELECT - 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-11
-11
-11

query I rowsort
SELECT ALL - + cor0.col2 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 10 FROM tab2 GROUP BY col2
----
10
10
10

query I rowsort
SELECT ALL + - 96 FROM tab0 GROUP BY tab0.col0
----
-96
-96
-96

query I rowsort
SELECT ALL - cor0.col2 * 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3600
-5680
-640

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 + cor0.col1 * 84 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3740
4845
510

query I rowsort
SELECT ALL ( cor0.col1 ) + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + 87 FROM tab1 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT - COALESCE ( cor0.col1, + cor0.col1 + cor0.col1, 64 + - cor0.col1 ) - - col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-57
38
79

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + 56 FROM tab1 cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT ALL - 69 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-69
-69
-69

query I rowsort
SELECT - 80 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1200
-7280
-7360

query I rowsort
SELECT DISTINCT 23 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
23

query I rowsort
SELECT DISTINCT 78 + - 69 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1872
3045
5805

query I rowsort
SELECT - 55 AS col1 FROM tab1 GROUP BY col0
----
-55
-55
-55

onlyif mysql # DIV for integer division: 
query I rowsort label-5857
SELECT tab1.col0 DIV - 35 FROM tab1 GROUP BY col0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5857
SELECT tab1.col0 / - 35 FROM tab1 GROUP BY col0
----
-2
0
0

query I rowsort
SELECT - 55 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-55
-55
-55

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 * col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1034
1316
3854

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL >= NULL
----

query I rowsort
SELECT + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT ( + col0 ) IS NOT NULL
----

query I rowsort
SELECT + 9 FROM tab1 GROUP BY tab1.col0
----
9
9
9

query I rowsort
SELECT cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col1 * col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT cor0.col2 + + 64 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
102
143
88

onlyif mysql # DIV for integer division: 
query I rowsort label-5867
SELECT DISTINCT cor0.col0 DIV ( - 47 DIV 12 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-27
-8

skipif mysql # not compatible
query I rowsort label-5867
SELECT DISTINCT cor0.col0 / ( - 47 / 12 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-27
-8

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT 81 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col0, col0, cor0.col1
----
122
140
142

query I rowsort
SELECT 45 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
45
45
45

query I rowsort
SELECT - 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-76
-76
-76

query I rowsort
SELECT + 34 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 49 col2 FROM tab0 GROUP BY tab0.col0
----
-49
-49
-49

query I rowsort
SELECT - 73 FROM tab0 GROUP BY tab0.col1
----
-73
-73

query I rowsort
SELECT + 54 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
2214
3186
3294

query I rowsort
SELECT 2 FROM tab0 GROUP BY tab0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT 34 AS col0 FROM tab1 cor0 GROUP BY col2
----
34

query I rowsort
SELECT + + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - 20 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-20
-20

query I rowsort
SELECT 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
5
5
5

query I rowsort
SELECT DISTINCT + 78 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
116
157

query I rowsort
SELECT 79 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
79
79
79

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - ( - cor0.col2 ) + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col2 + + 69 * + ( - cor0.col2 * + cor0.col2 ) col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-234494
-435290
-527568

query I rowsort
SELECT cor0.col0 + cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
105
121
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5887
SELECT cor0.col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5887
SELECT cor0.col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - 88 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-88
-88
-88

query I rowsort
SELECT - + 17 AS col2 FROM tab1 GROUP BY tab1.col2
----
-17
-17
-17

query I rowsort
SELECT - + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + col2 * 95 FROM tab2 GROUP BY tab2.col2
----
5510
7505
8265

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT ALL - 33 FROM tab1 GROUP BY tab1.col2
----
-33
-33
-33

query I rowsort
SELECT DISTINCT 56 - - 12 AS col0 FROM tab2 GROUP BY tab2.col2
----
68

query I rowsort
SELECT ALL 17 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 52 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0, cor0.col0
----
52
52
52

query I rowsort
SELECT - + 64 AS col0 FROM tab1 GROUP BY tab1.col0
----
-64
-64
-64

query I rowsort
SELECT ALL 97 FROM tab2 cor0 GROUP BY cor0.col1
----
97
97
97

onlyif mysql # DIV for integer division: 
query I rowsort label-5900
SELECT - 14 DIV + col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5900
SELECT - 14 / + col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT ALL ( 14 ) AS col1 FROM tab0 cor0 GROUP BY col0
----
14
14
14

query I rowsort
SELECT DISTINCT - cor0.col0 + ( - 21 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-104
-47
-64

query I rowsort
SELECT cor0.col1 * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 91 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-91
-91
-91

query I rowsort
SELECT ALL - - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL + 81 + - 74 FROM tab2 GROUP BY col1
----
7
7
7

query I rowsort
SELECT - 36 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-36
-36
-36

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 84 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-84
-84
-84

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 FROM tab0 AS cor0 GROUP BY col2, col2
----
1444
576
6241

query I rowsort
SELECT ( - cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col1 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT + 57 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT + cor1.col1 - + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
0

query I rowsort
SELECT - - 20 AS col2 FROM tab0 GROUP BY col1
----
20
20

query I rowsort
SELECT DISTINCT 22 * 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1804

query I rowsort
SELECT ALL - 83 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - 7 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-7
-7
-7

query I rowsort
SELECT ( + 52 ) + + 48 FROM tab2 GROUP BY tab2.col1
----
100
100
100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 9 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-405
-639
-72

query I rowsort
SELECT + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT cor0.col2 * col2 + - 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-10
1951
4967

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 col2 FROM tab0 cor0 GROUP BY col0
----
70
70
70

query I rowsort
SELECT - 90 FROM tab0 AS cor0 GROUP BY col0
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL 57 + - 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
55
55

query I rowsort
SELECT ALL + ( cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 89 * + cor0.col0 + cor0.col0 col0 FROM tab2 cor0 GROUP BY col0
----
1350
8190
8280

query I rowsort
SELECT DISTINCT + cor0.col2 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-5936
SELECT DISTINCT + 78 DIV + col0 FROM tab2 GROUP BY col0
----
0
5

skipif mysql # not compatible
query I rowsort label-5936
SELECT DISTINCT + 78 / + col0 FROM tab2 GROUP BY col0
----
0
5

query I rowsort
SELECT ALL - + col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-83
-83
-83

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col0
----
22
22
28
28
82
82

query I rowsort
SELECT 93 FROM tab1 AS cor0 GROUP BY col0
----
93
93
93

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5942
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5942
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL > NULL
----

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
48

query I rowsort
SELECT DISTINCT + + ( - 38 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-38

onlyif mysql # DIV for integer division: 
query I rowsort label-5946
SELECT ALL - tab1.col1 DIV - 50 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
58
6

skipif mysql # not compatible
query I rowsort label-5946
SELECT ALL - tab1.col1 / - 50 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
58
6

query I rowsort
SELECT ALL + tab2.col1 + - 59 FROM tab2 GROUP BY tab2.col1
----
-18
0
2

query I rowsort
SELECT DISTINCT 93 FROM tab1 GROUP BY tab1.col1
----
93

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 70 FROM tab2 GROUP BY col2
----
-70

query I rowsort
SELECT + cor0.col1 * - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT + 11 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
11
11
11

query I rowsort
SELECT DISTINCT - 17 AS col1 FROM tab1 GROUP BY tab1.col0
----
-17

query I rowsort
SELECT - tab2.col0 * + 27 AS col1 FROM tab2 GROUP BY tab2.col0
----
-2457
-2484
-405

query I rowsort
SELECT ALL + + 92 * + 2 AS col2 FROM tab2 GROUP BY tab2.col2
----
184
184
184

query I rowsort
SELECT 19 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-5957
SELECT DISTINCT cor0.col0 DIV - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-5957
SELECT DISTINCT cor0.col0 / - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1

query I rowsort
SELECT ALL NULLIF ( + cor0.col0, + cor0.col0 ) / - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 64 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
64
64
64

query I rowsort
SELECT ALL 70 AS col2 FROM tab0 GROUP BY col1
----
70
70

query I rowsort
SELECT ALL 96 AS col0 FROM tab2 GROUP BY tab2.col0
----
96
96
96

query I rowsort
SELECT - 77 AS col2 FROM tab2 GROUP BY tab2.col0
----
-77
-77
-77

query I rowsort
SELECT - tab1.col1 * 32 FROM tab1 GROUP BY tab1.col1
----
-1408
-1824
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL - 71 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-71
-71

query I rowsort
SELECT - cor0.col0 + 13 AS col0 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
-13
-30
-70

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
81

query I rowsort
SELECT ALL + cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT + cor0.col1 IS NULL AND NULL NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col2 * col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - 5 * 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-250

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT cor0.col2 * 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
4095
6461
728

query I rowsort
SELECT 71 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT ALL + col0 * - ( - col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-5977
SELECT ALL cor0.col1 DIV 3 + + cor0.col0 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
3785
5388
935

skipif mysql # not compatible
query I rowsort label-5977
SELECT ALL cor0.col1 / 3 + + cor0.col0 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
3785
5388
935

query I rowsort
SELECT + - 5 AS col2 FROM tab1 GROUP BY tab1.col1
----
-5
-5
-5

query I rowsort
SELECT + col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 86 FROM tab2 GROUP BY col1
----
-86
-86
-86

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col2 * 9 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
405
639
72

query I rowsort
SELECT - 32 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-17
59
60

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5984
SELECT CAST( NULL AS DECIMAL ) * + 2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5984
SELECT CAST ( NULL AS REAL ) * + 2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 87 AS col1 FROM tab0 GROUP BY tab0.col2
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * 57 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1482
2451
4731

onlyif mysql # DIV for integer division: 
query I rowsort label-5987
SELECT cor0.col2 * + COALESCE ( - cor0.col2, cor0.col0 DIV + col2 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-3364
-6241
-7569

skipif mysql # not compatible
query I rowsort label-5987
SELECT cor0.col2 * + COALESCE ( - cor0.col2, cor0.col0 / + col2 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + 63 AS col1 FROM tab2 GROUP BY tab2.col2
----
63

query I rowsort
SELECT cor0.col1 - - 48 * - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2068
-2679
-282

query I rowsort
SELECT ALL - 74 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-74
-74
-74

query I rowsort
SELECT + 83 FROM tab2 GROUP BY tab2.col0
----
83
83
83

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
93

query I rowsort
SELECT ALL cor0.col0 * 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
1100
1400
4100

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5994
SELECT cor0.col2 * 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-5994
SELECT cor0.col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 58 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
58
58
58

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
142
16
90

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 976cc931872319f6c60dc588d08fa95d

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 * cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-56

query I rowsort
SELECT ALL + 98 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 23 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT ALL - cor0.col0 * + col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 95 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1425
8645
8740

query I rowsort
SELECT ALL - 38 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-38
-38

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-6561
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 14 col2 FROM tab1 GROUP BY col1
----
-14
-14
-14

query I rowsort
SELECT + 30 FROM tab0 AS cor0 GROUP BY col2
----
30
30
30

query I rowsort
SELECT cor0.col2 * 13 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1027
312
494

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 59 col2 FROM tab0 GROUP BY tab0.col2
----
-59
-59
-59

query I rowsort
SELECT cor0.col1 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 71 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-71

query I rowsort
SELECT DISTINCT + 44 + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
101
50
88

query I rowsort
SELECT DISTINCT 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
49

query I rowsort
SELECT ALL 37 + + 1 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
38
38

query I rowsort
SELECT + 34 + 92 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
126
126
126

query I rowsort
SELECT ALL + ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0, cor0.col0
----
-1936
-3249
-36

query I rowsort
SELECT ALL - 15 + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
26
44
46

query I rowsort
SELECT + cor0.col1 - + 61 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4860
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 + + 64 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
102
143
88

query I rowsort
SELECT 83 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6026
SELECT + cor0.col0 DIV + 50 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6026
SELECT + cor0.col0 / + 50 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT + 37 AS col2 FROM tab1 GROUP BY col1
----
37

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 68 + - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
-3
23
60

onlyif mysql # DIV for integer division: 
query I rowsort label-6030
SELECT DISTINCT cor0.col1 DIV col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6030
SELECT DISTINCT cor0.col1 / col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT - 46 FROM tab1 cor0 GROUP BY cor0.col1
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 9 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT ALL 78 + - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
-5
35
52

query I rowsort
SELECT 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
26
43
83

query I rowsort
SELECT col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - 45 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + 58 FROM tab2 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT ALL - col1 * ( - cor0.col1 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT - 47 FROM tab1 GROUP BY tab1.col2
----
-47
-47
-47

query I rowsort
SELECT + 55 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT DISTINCT - tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL col1 + + 35 FROM tab0 AS cor0 GROUP BY col1
----
116
35

query I rowsort
SELECT 63 AS col2 FROM tab0 GROUP BY tab0.col2
----
63
63
63

query I rowsort
SELECT 46 AS col1 FROM tab1 GROUP BY tab1.col1
----
46
46
46

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 87 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-6050
SELECT ALL 26 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6050
SELECT ALL 26 / - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + - 80 + 23 FROM tab2 GROUP BY tab2.col1
----
-57
-57
-57

query I rowsort
SELECT ( 74 ) * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1110
6734
6808

query I rowsort
SELECT + 64 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
484
6724
784

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL 59 FROM tab1 AS cor0 GROUP BY col0
----
59
59
59

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
105
121
67

query I rowsort
SELECT ALL 66 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
124
145
153

query I rowsort
SELECT + 85 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
85
85
85

query I rowsort
SELECT DISTINCT - 64 FROM tab1 GROUP BY tab1.col1
----
-64

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 - 90 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-11
-52
-66

query I rowsort
SELECT - cor0.col1 + 56 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
12
50

query I rowsort
SELECT 61 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2745
-4331
-488

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-32
-51
46

query I rowsort
SELECT 45 FROM tab1 AS cor0 GROUP BY col0
----
45
45
45

query I rowsort
SELECT ALL + cor0.col0 * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT DISTINCT + 4 AS col1 FROM tab1 GROUP BY col2
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT - 71 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-71
-71
-71

query I rowsort
SELECT DISTINCT + + tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT - + 84 AS col2 FROM tab0 GROUP BY tab0.col0
----
-84

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + 99 FROM tab0 GROUP BY tab0.col0
----
99
99
99

query I rowsort
SELECT ALL - + 67 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-39
-45
15

query I rowsort
SELECT NULLIF ( cor0.col1, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 43 * cor0.col2 FROM tab1 cor0 GROUP BY col2
----
-1935
-3053
-344

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 35 FROM tab2 AS cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT NULLIF ( - 93, tab1.col1 + 57 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-93
-93
-93

query I rowsort
SELECT ALL COALESCE ( + cor0.col0, - col0 ) FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
102
115
14

query I rowsort
SELECT - - col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL col1 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - 31 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-31
-31
-31

query I rowsort
SELECT + cor0.col2 * col0 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL 72 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-6093
SELECT DISTINCT cor0.col1 DIV + 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-6093
SELECT DISTINCT cor0.col1 / + 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT - 44 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-44
-44
-44

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
-81
-81
-81
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 - ( 28 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-4
10
51

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6097
SELECT ALL + ( cor0.col2 ) / col2 + CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6097
SELECT ALL + ( cor0.col2 ) / col2 + CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6098
SELECT + 70 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6098
SELECT + 70 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
0

query I rowsort
SELECT - 25 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2050
550
700

query I rowsort
SELECT 38 FROM tab2 AS cor0 GROUP BY col1
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 12 ) * + 47 + - cor0.col0 * + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-112
-1285
-6325

query I rowsort
SELECT DISTINCT + + 43 FROM tab0 GROUP BY col0
----
43

query I rowsort
SELECT ALL - 81 FROM tab1 GROUP BY col0
----
-81
-81
-81

query I rowsort
SELECT ALL - - 52 FROM tab2 GROUP BY col0
----
52
52
52

query I rowsort
SELECT - + 34 AS col1 FROM tab2 GROUP BY tab2.col0
----
-34
-34
-34

query I rowsort
SELECT cor0.col2 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT ALL 61 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-18
23
37

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) IS NOT NULL
----
-24
-38
-79

query I rowsort
SELECT ALL col2 + 65 FROM tab0 AS cor0 GROUP BY cor0.col2
----
103
144
89

query I rowsort
SELECT DISTINCT cor0.col2 * 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1566
2133
2349

query I rowsort
SELECT 80 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6480

query I rowsort
SELECT DISTINCT 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54

query I rowsort
SELECT - ( 36 ) * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
3276
3312
540

query I rowsort
SELECT ALL + 6 FROM tab1 AS cor0 GROUP BY cor0.col1
----
6
6
6

query I rowsort
SELECT 1 - + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-40
-58
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT DISTINCT + 13 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13

query I rowsort
SELECT ALL 74 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 col1 FROM tab0 AS cor0 GROUP BY col2
----
43
43
43

query I rowsort
SELECT tab1.col1 - - 65 AS col0 FROM tab1 GROUP BY tab1.col1
----
109
122
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 col0 FROM tab1 GROUP BY tab1.col0
----
-70

query I rowsort
SELECT DISTINCT col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT ALL 71 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT ALL + 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT ALL - - tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT cor0.col1 * 79 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6399

query I rowsort
SELECT ALL + 76 FROM tab0 AS cor0 GROUP BY cor0.col1
----
76
76

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 16 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
16

query I rowsort
SELECT DISTINCT 21 FROM tab2 cor0 GROUP BY cor0.col1
----
21

query I rowsort
SELECT ALL + 92 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
7452

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( + cor0.col1 ) col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 59 FROM tab1 GROUP BY tab1.col2
----
-59

query I rowsort
SELECT 47 FROM tab0 AS cor0 GROUP BY col2
----
47
47
47

onlyif mysql # DIV for integer division: 
query I rowsort label-6139
SELECT ALL + cor0.col0 DIV + 6 FROM tab2 AS cor0 GROUP BY col0
----
15
15
2

skipif mysql # not compatible
query I rowsort label-6139
SELECT ALL + cor0.col0 / + 6 FROM tab2 AS cor0 GROUP BY col0
----
15
15
2

query I rowsort
SELECT ALL + 16 * + cor0.col1 + + col1 * + 42 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
2552
3306
348

query I rowsort
SELECT - col2 + + col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3422
-6320
-7656

query I rowsort
SELECT col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 75 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-75

query I rowsort
SELECT ALL + 32 FROM tab0 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT + 93 * col0 FROM tab2 GROUP BY tab2.col0
----
1395
8463
8556

query I rowsort
SELECT DISTINCT 55 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
55

query I rowsort
SELECT tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2 AS cor0 WHERE NOT NULL IS NOT NULL GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor1.col2 * cor1.col2 + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
3422
6320
7656

query I rowsort
SELECT 38 FROM tab2 AS cor0 GROUP BY col0
----
38
38
38

query I rowsort
SELECT ALL - col2 + + 86 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
15
41
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6153
SELECT DISTINCT - CAST( cor0.col1 AS SIGNED ) * + 34 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1496
-1938
-204

skipif mysql # not compatible
query I rowsort label-6153
SELECT DISTINCT - CAST ( cor0.col1 AS INTEGER ) * + 34 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1496
-1938
-204

query I rowsort
SELECT - 57 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2565
4047
456

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 * + ( 99 ) AS col1 FROM tab1 AS cor0 GROUP BY col1
----
4356
5643
594

query I rowsort
SELECT ALL + cor0.col1 + - 74 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-17
-30
-68

query I rowsort
SELECT ALL - 1 * - 31 AS col2 FROM tab2 GROUP BY tab2.col0
----
31
31
31

query I rowsort
SELECT ALL + 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT ALL + 32 AS col1 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
32
32
32

query I rowsort
SELECT DISTINCT 98 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
98

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 * cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
308
399
42

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT ALL 6 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
6
6
6

query I rowsort
SELECT DISTINCT 32 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2624
704
896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 13 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13

query I rowsort
SELECT cor0.col0 * 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2788
748
952

query I rowsort
SELECT + cor0.col0 + cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
506
6806
812

query I rowsort
SELECT ALL 31 AS col0 FROM tab1 GROUP BY tab1.col0
----
31
31
31

query I rowsort
SELECT - 88 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-88
-88
-88

query I rowsort
SELECT + 32 AS col0 FROM tab0 GROUP BY col2
----
32
32
32

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - col1 + 4 FROM tab2 GROUP BY tab2.col1
----
-37
-55
-57

query I rowsort
SELECT + ( - 6 ) + - col0 * tab2.col0 FROM tab2 GROUP BY col0
----
-231
-8287
-8470

query I rowsort
SELECT + 18 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
18
18

query I rowsort
SELECT 67 + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
131
2092
5108

query I rowsort
SELECT ALL cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT col0 + 67 FROM tab2 AS cor0 GROUP BY col0
----
158
159
82

query I rowsort
SELECT - 29 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT 82 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1, cor1.col2
----
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 99 + 54 col0 FROM tab2 GROUP BY col1
----
153

query I rowsort
SELECT DISTINCT + + col0 + + 14 AS col2 FROM tab0 GROUP BY tab0.col0
----
40
57
97

query I rowsort
SELECT DISTINCT + 40 AS col2 FROM tab0 GROUP BY tab0.col1
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6186
SELECT - cor0.col2 + 31 DIV cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6186
SELECT - cor0.col2 + 31 / cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT + 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

query I rowsort
SELECT DISTINCT - ( tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT 57 * 49 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2793
2793
2793

query I rowsort
SELECT - ( col0 ) * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 39 * tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
3549
3588
585

query I rowsort
SELECT + 34 FROM tab1 AS cor0 GROUP BY col1
----
34
34
34

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1892
6972
702

query I rowsort
SELECT col1 * col1 AS col0 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT - 73 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT 19 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
19
19
19

query I rowsort
SELECT ALL - 99 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
-4356
-5643
-594

query I rowsort
SELECT + col2 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 22 + - cor0.col0 * - col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1282
198
5844

query I rowsort
SELECT + 73 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col0, col2
----
3285
5183
584

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
1849
676
6889

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6202
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6202
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL cor0.col0 + + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
126
28
85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6204
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6204
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 76 * - 5 FROM tab1 GROUP BY col1
----
380

query I rowsort
SELECT + ( 90 ) FROM tab1 AS cor0 GROUP BY col2
----
90
90
90

query I rowsort
SELECT 79 FROM tab0 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT ALL + 70 FROM tab2 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT DISTINCT cor1.col1 * 11 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col2
----
451
649
671

query I rowsort
SELECT + 60 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
104
117
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 28 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
28

query I rowsort
SELECT 39 FROM tab1 AS cor0 GROUP BY col0
----
39
39
39

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6214
SELECT + CAST( NULL AS DECIMAL ) + - 22 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6214
SELECT + CAST ( NULL AS REAL ) + - 22 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 90 * - col0 + + cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1496
-1736
-656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT + 69 AS col2 FROM tab1 GROUP BY tab1.col0
----
69
69
69

query I rowsort
SELECT + 73 FROM tab2 GROUP BY tab2.col0
----
73
73
73

query I rowsort
SELECT DISTINCT + 40 FROM tab0 GROUP BY tab0.col1
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT - 87 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-87
-87
-87

query I rowsort
SELECT - 2 * 4 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-8
-8
-8

query I rowsort
SELECT - 6 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 36 col1 FROM tab1 GROUP BY tab1.col1
----
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-6226
SELECT DISTINCT cor0.col0 DIV + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
1

skipif mysql # not compatible
query I rowsort label-6226
SELECT DISTINCT cor0.col0 / + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
1

query I rowsort
SELECT DISTINCT col2 - + ( - 11 - - 26 ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-7
30
56

query I rowsort
SELECT ALL - cor0.col2 * ( + cor0.col0 * 3 ) + cor0.col0 * - 68 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15106
-6020
-7930

query I rowsort
SELECT ALL cor0.col2 * NULLIF ( cor0.col1, cor0.col1 ) + cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-6231
SELECT - 66 DIV 81 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6231
SELECT - 66 / 81 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL + 85 AS col1 FROM tab2 GROUP BY tab2.col0
----
85
85
85

query I rowsort
SELECT ALL - ( cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - 78 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-78
-78
-78

query I rowsort
SELECT ALL + cor0.col1 + + 75 FROM tab2 AS cor0 GROUP BY cor0.col1
----
116
134
136

query I rowsort
SELECT DISTINCT 20 AS col0 FROM tab2 GROUP BY tab2.col0
----
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 40 col2 FROM tab1 GROUP BY tab1.col0
----
40

query I rowsort
SELECT - + 56 FROM tab0 GROUP BY col2
----
-56
-56
-56

query I rowsort
SELECT + + 38 AS col0 FROM tab0 GROUP BY tab0.col2
----
38
38
38

query I rowsort
SELECT DISTINCT + 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
44

query I rowsort
SELECT cor0.col1 + 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
102
51
89

query I rowsort
SELECT col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ALL + 64 FROM tab1 cor0 GROUP BY cor0.col2
----
64
64
64

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 25, - cor0.col0 * cor0.col1, cor0.col2 + - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT ALL - 78 AS col0 FROM tab0 GROUP BY tab0.col2
----
-78
-78
-78

query I rowsort
SELECT DISTINCT - 40 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-111
-48
-85

query I rowsort
SELECT 57 FROM tab2 cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT DISTINCT 46 - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-45
-46
31

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
57

query I rowsort
SELECT DISTINCT + 5 FROM tab0 GROUP BY tab0.col2
----
5

query I rowsort
SELECT ALL + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col0 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-83
38

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
41
59
61

query I rowsort
SELECT - cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
0
0
81

query I rowsort
SELECT ALL 9 + cor0.col1 FROM tab0 cor0 GROUP BY col1
----
9
90

query I rowsort
SELECT tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - cor0.col2 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-116
-158
-174

query I rowsort
SELECT ALL + 94 FROM tab2, tab1 cor0 GROUP BY tab2.col0
----
94
94
94

query I rowsort
SELECT ALL tab0.col1 - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL - 33 FROM tab1 cor0 GROUP BY cor0.col2
----
-33
-33
-33

query I rowsort
SELECT ALL + 89 AS col2 FROM tab0 GROUP BY tab0.col0
----
89
89
89

query I rowsort
SELECT DISTINCT + + 35 FROM tab1 GROUP BY tab1.col0
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT ALL - 19 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1102
-1501
-1653

query I rowsort
SELECT + - 70 FROM tab2 GROUP BY tab2.col1
----
-70
-70
-70

query I rowsort
SELECT ALL tab1.col2 * - 91 AS col2 FROM tab1 GROUP BY col2
----
-4095
-6461
-728

query I rowsort
SELECT DISTINCT 63 + 63 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
126

query I rowsort
SELECT ALL + 9 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
522
711
783

query I rowsort
SELECT ALL 91 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
91
91
91

query I rowsort
SELECT DISTINCT 56 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
3248
4424
4872

query I rowsort
SELECT 39 AS col2 FROM tab1 GROUP BY tab1.col0
----
39
39
39

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6561

query I rowsort
SELECT COALESCE ( cor0.col1, - cor0.col1, 72 * 83 - - cor0.col1 * cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT + + tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 91 FROM tab0 GROUP BY col2
----
91
91
91

query I rowsort
SELECT 48 * + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
2112
2736
288

query I rowsort
SELECT DISTINCT + + 64 FROM tab0 GROUP BY col0
----
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 col0 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
18

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 80 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
102
108
162

query I rowsort
SELECT - 57 * 73 + + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-4069
-4070
-4146

query I rowsort
SELECT ALL 60 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2700
4260
480

query I rowsort
SELECT ALL + + 31 * 58 AS col1 FROM tab2 GROUP BY tab2.col0
----
1798
1798
1798

query I rowsort
SELECT + ( + 54 ) AS col1 FROM tab0 AS cor0 GROUP BY col2
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6293
SELECT DISTINCT + + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6293
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col2 FROM tab0, tab2 cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + 10 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
10
10

query I rowsort
SELECT - + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT col2 + 62 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
120
141
149

query I rowsort
SELECT 90 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3960
5130
540

query I rowsort
SELECT - col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + 8 - + 59 FROM tab2 GROUP BY tab2.col0
----
-51
-51
-51

query I rowsort
SELECT - + 22 AS col2 FROM tab2 GROUP BY tab2.col0
----
-22
-22
-22

onlyif mysql # DIV for integer division: 
query I rowsort label-6302
SELECT + cor0.col1 DIV + 16 FROM tab1 cor0 GROUP BY cor0.col1
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6302
SELECT + cor0.col1 / + 16 FROM tab1 cor0 GROUP BY cor0.col1
----
0
2
3

query I rowsort
SELECT DISTINCT - + 95 AS col0 FROM tab2 GROUP BY tab2.col1
----
-95

query I rowsort
SELECT col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
105
38
79

query I rowsort
SELECT DISTINCT - + 20 FROM tab1 GROUP BY tab1.col2
----
-20

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6306
SELECT ALL - - CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6306
SELECT ALL - - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 95 AS col1 FROM tab0 GROUP BY tab0.col2
----
95
95
95

query I rowsort
SELECT + cor0.col2 + 5 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
63
84
92

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0, cor0.col1, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col2 - + 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-20
17
43

query I rowsort
SELECT DISTINCT + - 45 FROM tab1 GROUP BY col2
----
-45

onlyif mysql # DIV for integer division: 
query I rowsort label-6312
SELECT ALL cor0.col1 DIV + 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6312
SELECT ALL cor0.col1 / + 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT + 68 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
68
68
68

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
1980
3306
42

query I rowsort
SELECT DISTINCT 37 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
37

query I rowsort
SELECT DISTINCT 53 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 55 col1 FROM tab1 GROUP BY tab1.col2
----
55

query I rowsort
SELECT DISTINCT 0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 41 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( NULLIF ( + cor0.col0, - cor0.col2 ) ) * + cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL + col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 4 - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4
-85

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 40 FROM tab2 AS cor0 GROUP BY col2
----
40
40
40

query I rowsort
SELECT + 51 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
51
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-6328
SELECT cor0.col0 + cor0.col1 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
11
91
92

skipif mysql # not compatible
query I rowsort label-6328
SELECT cor0.col0 + cor0.col1 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
11
91
92

query I rowsort
SELECT ALL - 76 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1976
-3268
-6308

query I rowsort
SELECT + 7 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-567
0

query I rowsort
SELECT ALL - 44 FROM tab1 GROUP BY tab1.col1
----
-44
-44
-44

query I rowsort
SELECT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL 62 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT ALL 53 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
53
53
53

query I rowsort
SELECT - 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-81
-81
-81

onlyif mysql # DIV for integer division: 
query I rowsort label-6337
SELECT cor0.col2 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6337
SELECT cor0.col2 / - cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 * - 14 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1134
0

query I rowsort
SELECT - cor0.col1 * + 45 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3645
0

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab0 cor0 GROUP BY col0, cor0.col2, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 74 + 25 col2 FROM tab0 GROUP BY tab0.col1
----
99
99

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 52, + col2 ) * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2288
2964
312

query I rowsort
SELECT ALL + 71 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT + 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27

query I rowsort
SELECT 51 + COALESCE ( 31, + cor0.col1 * cor0.col1 ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
82
82
82

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT + 1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + 76 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT ALL - 47 AS col0 FROM tab0 GROUP BY tab0.col0
----
-47
-47
-47

query I rowsort
SELECT + 32 + 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
68
68
68

query I rowsort
SELECT - 21 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-1722
-462
-588

query I rowsort
SELECT 92 - + 30 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
62
62
62

query I rowsort
SELECT + 39 FROM tab1 AS cor0 GROUP BY col0
----
39
39
39

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 DISTINCT + 54 FROM tab0 GROUP BY col2
----
54

onlyif mysql # DIV for integer division: 
query I rowsort label-6360
SELECT ALL 14 DIV 17 FROM tab1 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6360
SELECT ALL 14 / 17 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT ALL + 95 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT DISTINCT 88 + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
129
147
149

query I rowsort
SELECT ALL 48 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48
48
48

onlyif mysql # DIV for integer division: 
query I rowsort label-6364
SELECT ALL 17 DIV 73 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6364
SELECT ALL 17 / 73 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - - col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL + cor0.col1 + ( - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2
-27
12

query I rowsort
SELECT ALL + 31 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 * + 70 col1 FROM tab1 GROUP BY tab1.col1
----
4480
4480
4480

query I rowsort
SELECT ALL tab1.col2 * 19 FROM tab1 GROUP BY col2
----
1349
152
855

query I rowsort
SELECT - 46 * - 85 FROM tab1 GROUP BY col1
----
3910
3910
3910

query I rowsort
SELECT ALL + + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT 79 FROM tab0 AS cor0 GROUP BY cor0.col0
----
79

query I rowsort
SELECT DISTINCT + 37 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - cor0.col2 + cor0.col2 col0 FROM tab0 cor0 GROUP BY col2, cor0.col1, cor0.col2
----
1482
600
6320

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6375
SELECT DISTINCT - cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6375
SELECT DISTINCT - cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 + - 61 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-46
30
31

query I rowsort
SELECT DISTINCT 78 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
78

query I rowsort
SELECT 85 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * ( cor0.col0 ) + - cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
138
8202
8406

query I rowsort
SELECT + cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT cor0.col1 * 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4268
5529
582

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, col2
----
0
0
6561

query I rowsort
SELECT ( 94 ) AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
94
94
94

query I rowsort
SELECT 89 + - 35 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT ALL + tab0.col1 * col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6388
SELECT DISTINCT CAST( 34 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
34

skipif mysql # not compatible
query I rowsort label-6388
SELECT DISTINCT CAST ( 34 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT + col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - ( cor0.col1 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT 0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-6393
SELECT - col1 DIV ( 99 * - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6393
SELECT - col1 / ( 99 * - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 + - 41 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-47
-85
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - col2 + cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY col2
----
1980
4970
56

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col1, cor0.col2
----
9 values hashing to 0b6eac60b12718df0c5ffc2484241344

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 64 ) col1 FROM tab0 cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT ALL - 37 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-37
-37
-37

query I rowsort
SELECT + 45 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
127
67
73

query I rowsort
SELECT ALL 24 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
105
24

query I rowsort
SELECT ALL + 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT DISTINCT + 71 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
71

query I rowsort
SELECT ALL - col1 - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT 7 + 90 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
97
97
97

query I rowsort
SELECT + 85 * 71 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col1
----
6035
6035
6035

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6408
SELECT - cor0.col2 DIV - col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6408
SELECT - cor0.col2 / - col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT 25 + + 88 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
113
113

query I rowsort
SELECT DISTINCT - - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab0 GROUP BY tab0.col0
----
57

query I rowsort
SELECT - - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT 99 FROM tab2 GROUP BY col1
----
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 * - col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1224
-1938
-4029

query I rowsort
SELECT ALL + - col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * 44 + col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1935
-3053
-344

query I rowsort
SELECT 78 FROM tab0 cor0 GROUP BY cor0.col1
----
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-6418
SELECT DISTINCT + cor0.col1 DIV 34 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-6418
SELECT DISTINCT + cor0.col1 / 34 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-6421
SELECT - col2 DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6421
SELECT - col2 / + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT - 79 FROM tab1 GROUP BY tab1.col1
----
-79
-79
-79

query I rowsort
SELECT DISTINCT - - 89 AS col2 FROM tab1 GROUP BY tab1.col0
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col1 FROM tab1 GROUP BY tab1.col0
----
93
93
93

query I rowsort
SELECT ALL + 28 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
28
28

query I rowsort
SELECT 30 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
30
30
30

query I rowsort
SELECT ALL + + 76 FROM tab2 GROUP BY tab2.col1
----
76
76
76

query I rowsort
SELECT - + 88 FROM tab2 GROUP BY tab2.col2
----
-88
-88
-88

query I rowsort
SELECT cor0.col0 * col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT 73 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
73

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT + 70 - - 6 FROM tab2 GROUP BY tab2.col0
----
76
76
76

query I rowsort
SELECT + ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 * 61 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
5551
5612
915

query I rowsort
SELECT 52 AS col1 FROM tab1 GROUP BY tab1.col1
----
52
52
52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6438
SELECT - CAST( NULL AS SIGNED ) col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6438
SELECT - CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-22
-28
-82

query I rowsort
SELECT - 14 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-14
-14
-14

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6441
SELECT + CAST( + 0 AS SIGNED ) * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6441
SELECT + CAST ( + 0 AS INTEGER ) * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 93 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
10
50
67

query I rowsort
SELECT DISTINCT + 78 * 36 FROM tab2 GROUP BY tab2.col0
----
2808

query I rowsort
SELECT DISTINCT 60 FROM tab2 GROUP BY tab2.col0
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT + ( - 92 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-92

query I rowsort
SELECT ALL 49 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1078
1372
4018

query I rowsort
SELECT - 68 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-68
-68
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-6449
SELECT ALL cor0.col2 DIV + 34 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
2
2

skipif mysql # not compatible
query I rowsort label-6449
SELECT ALL cor0.col2 / + 34 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
2
2

query I rowsort
SELECT + 24 FROM tab0 cor0 GROUP BY cor0.col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-6451
SELECT ALL cor0.col2 DIV - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6451
SELECT ALL cor0.col2 / - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - tab0.col1 * NULLIF ( + tab0.col1 - tab0.col1, 63 ) FROM tab0 GROUP BY col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6453
SELECT - cor0.col1 + cor0.col1 DIV col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-80
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6453
SELECT - cor0.col1 + cor0.col1 / col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-80
0
0

query I rowsort
SELECT cor0.col2 * - 80 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1920
-3040
-6320

query I rowsort
SELECT ALL 51 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-20
43
6

query I rowsort
SELECT ALL - 28 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-28
-28
-28

query I rowsort
SELECT 24 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1056
-1368
-144

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-81
0

query I rowsort
SELECT + 64 FROM tab1 GROUP BY col0
----
64
64
64

query I rowsort
SELECT ALL 1 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
46
72
9

query I rowsort
SELECT DISTINCT 19 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
19

query I rowsort
SELECT 33 FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT DISTINCT - 48 AS col1 FROM tab1 GROUP BY tab1.col2
----
-48

query I rowsort
SELECT ALL 62 AS col1 FROM tab1 cor0 GROUP BY col2
----
62
62
62

query I rowsort
SELECT 79 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT - - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * - tab1.col0 col2 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT ( + 65 ) * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1560
2470
5135

query I rowsort
SELECT + 49 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-34
23
6

query I rowsort
SELECT ALL + cor0.col0 - - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 4 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
4

query I rowsort
SELECT ALL - col1 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 58 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
58
58
58

onlyif mysql # DIV for integer division: 
query I rowsort label-6477
SELECT - 4 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6477
SELECT - 4 / + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT DISTINCT - 85 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-85

query I rowsort
SELECT 25 FROM tab1 AS cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
142
16
90

query I rowsort
SELECT ALL 8 * + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
192
304
632

query I rowsort
SELECT DISTINCT - 82 FROM tab2 GROUP BY col0
----
-82

query I rowsort
SELECT DISTINCT - + cor0.col1 FROM tab2, tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - 57 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-57
-57
-57

query I rowsort
SELECT DISTINCT - 19 FROM tab2 GROUP BY col1
----
-19

query I rowsort
SELECT DISTINCT - 52 AS col0 FROM tab0 GROUP BY tab0.col1
----
-52

query I rowsort
SELECT 90 FROM tab1 GROUP BY tab1.col2
----
90
90
90

query I rowsort
SELECT - ( - 63 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
63
63

query I rowsort
SELECT ALL + 7 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT ALL + cor0.col1 * + 48 + 58 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col1
----
3946
58

query I rowsort
SELECT + 79 FROM tab1 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT 76 AS col0 FROM tab2 GROUP BY col2
----
76
76
76

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6495
SELECT CAST( NULL AS DECIMAL ) / cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6495
SELECT CAST ( NULL AS REAL ) / cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-75

query I rowsort
SELECT ALL 7 + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
7
88

query I rowsort
SELECT DISTINCT + 46 FROM tab0 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
46

query I rowsort
SELECT col0 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT 55 FROM tab1 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT ALL 2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT cor0.col0 * 94 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2444
4042
7802

query I rowsort
SELECT ( + cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT - 21 * 36 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-771
-847
-848

query I rowsort
SELECT ALL - tab1.col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 7 * 66 col0 FROM tab0 AS cor0 GROUP BY col1
----
462
543

query I rowsort
SELECT - 73 FROM tab2 GROUP BY tab2.col0
----
-73
-73
-73

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 9 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
9
9
9

query I rowsort
SELECT - 59 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-59
-59

query I rowsort
SELECT col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 53 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-53

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab0 GROUP BY col2
----
16

query I rowsort
SELECT tab2.col1 + - 69 FROM tab2 GROUP BY col1
----
-10
-28
-8

query I rowsort
SELECT 83 + - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1766
-593
-6806

query I rowsort
SELECT ( - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - + cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT + 59 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
59
59
59

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - tab2.col1 * - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT ALL - col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT + + tab0.col2 + 71 FROM tab0 GROUP BY tab0.col2
----
109
150
95

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 26 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2132
572
728

query I rowsort
SELECT - cor0.col2 + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY col0, col2
----
-72
12
34

query I rowsort
SELECT ALL ( + cor0.col1 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 76 AS col2 FROM tab2 GROUP BY tab2.col1
----
76

query I rowsort
SELECT COALESCE ( 83, cor0.col1 * - cor0.col1 - 81 ) * cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1, cor0.col2
----
0
0
6723

query I rowsort
SELECT + cor0.col2 + 94 * + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
5510
7505
8265

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
82
82
82

query I rowsort
SELECT ALL 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT ALL - cor0.col1 + + 89 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7128

query I rowsort
SELECT 80 AS col1 FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT DISTINCT - 59 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-59

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-29
16
38

query I rowsort
SELECT DISTINCT - 71 + - 32 FROM tab2 GROUP BY tab2.col1
----
-103

query I rowsort
SELECT ALL - cor1.col0 + + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to 8e2ce2a5da0a607a539bbad1dbf41d59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 49 col1 FROM tab1 GROUP BY col0
----
-49

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT - 89 AS col0 FROM tab0 GROUP BY tab0.col1
----
-89
-89

query I rowsort
SELECT + ( 25 ) * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2025

query I rowsort
SELECT ALL + 71 FROM tab1 AS cor0 GROUP BY col1
----
71
71
71

query I rowsort
SELECT 24 AS col0 FROM tab2 GROUP BY tab2.col2
----
24
24
24

query I rowsort
SELECT ALL - 28 FROM tab1 AS cor0 GROUP BY col2
----
-28
-28
-28

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT - 90 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-6551
SELECT + 43 DIV 80 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6551
SELECT + 43 / 80 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT - 98 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
4312
5586
588

query I rowsort
SELECT + cor0.col0 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT + 90 AS col1 FROM tab2 GROUP BY tab2.col2
----
90
90
90

query I rowsort
SELECT - cor0.col1 * 15 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-660
-855
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 + + 83 col1 FROM tab1 GROUP BY tab1.col2
----
99

query I rowsort
SELECT 32 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
32
32
32

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT DISTINCT 66 * + cor0.col1 + - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
2665
3835
3965

query I rowsort
SELECT ALL ( cor0.col0 ) AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + tab2.col2 * - 99 FROM tab2 GROUP BY tab2.col2
----
-5742
-7821
-8613

query I rowsort
SELECT - - tab0.col0 * 30 FROM tab0 GROUP BY tab0.col0
----
1290
2490
780

query I rowsort
SELECT DISTINCT - - tab0.col2 * 31 AS col0 FROM tab0 GROUP BY tab0.col2
----
1178
2449
744

query I rowsort
SELECT 72 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT - 31 FROM tab2 AS cor0 GROUP BY col1
----
-31
-31
-31

query I rowsort
SELECT ALL ( - 88 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-88
-88
-88

query I rowsort
SELECT DISTINCT - 73 FROM tab1 GROUP BY tab1.col0
----
-73

query I rowsort
SELECT ALL ( + 2 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2
2
2

query I rowsort
SELECT ( ( - cor0.col0 ) ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 52 + 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
125
125
125

query I rowsort
SELECT ALL tab1.col2 * 80 FROM tab1 GROUP BY tab1.col2
----
3600
5680
640

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 6 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
546
552
90

onlyif mysql # DIV for integer division: 
query I rowsort label-6579
SELECT + tab1.col1 DIV + 32 FROM tab1 GROUP BY tab1.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6579
SELECT + tab1.col1 / + 32 FROM tab1 GROUP BY tab1.col1
----
0
1
1

query I rowsort
SELECT DISTINCT + 50 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
50

query I rowsort
SELECT ALL + - 42 FROM tab2 GROUP BY col1
----
-42
-42
-42

query I rowsort
SELECT 47 AS col1 FROM tab0 GROUP BY col0
----
47
47
47

query I rowsort
SELECT ALL + tab2.col2 * + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT ALL 4 FROM tab2 cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT 4 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - 31 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-31
-31
-31

query I rowsort
SELECT + 70 AS col1 FROM tab0 GROUP BY tab0.col2
----
70
70
70

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL - 67 AS col1 FROM tab1 GROUP BY tab1.col1
----
-67
-67
-67

query I rowsort
SELECT ALL ( - 73 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-73
-73
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + 5 FROM tab2 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT DISTINCT 10 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-13
-13
-13

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT cor0.col0 - - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT - 31 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-31

query I rowsort
SELECT 69 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-22
-23
54

query I rowsort
SELECT ALL 93 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 48 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-48

query I rowsort
SELECT - col1 + 24 AS col0 FROM tab1 GROUP BY col1
----
-20
-33
18

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT - 32 FROM tab0 cor0 GROUP BY cor0.col2
----
-32
-32
-32

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT 48 FROM tab1 cor0 GROUP BY col2
----
48

query I rowsort
SELECT - 58 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + col2 - 63 FROM tab0 cor0 GROUP BY cor0.col2
----
-25
-39
16

query I rowsort
SELECT + 25 AS col2 FROM tab0 GROUP BY tab0.col2
----
25
25
25

query I rowsort
SELECT + - 94 FROM tab0 GROUP BY tab0.col0
----
-94
-94
-94

query I rowsort
SELECT - cor0.col0 + 34 * - 23 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-808
-825
-865

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6616
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6616
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT DISTINCT 72 FROM tab1 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT - ( ( tab2.col2 ) ) + tab2.col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3306
6162
7482

query I rowsort
SELECT DISTINCT + 22 AS col1 FROM tab2 GROUP BY col0
----
22

query I rowsort
SELECT - 64 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-64
-64
-64

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + 7 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
182
301
581

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 15 col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
-15
-15
-15

query I rowsort
SELECT - cor0.col1 + - 77 FROM tab0 cor0 GROUP BY cor0.col1
----
-158
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT col1 IS NULL
----
0
6561

query I rowsort
SELECT - col1 * 98 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-3926
-5691
-5963

query I rowsort
SELECT DISTINCT - + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 13, + tab1.col1, tab1.col0 ) FROM tab1 GROUP BY tab1.col1
----
13
13
13

query I rowsort
SELECT + 98 AS col0 FROM tab0 GROUP BY tab0.col2
----
98
98
98

query I rowsort
SELECT + 36 FROM tab0 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT + cor0.col2 + + 99 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
123
137
178

query I rowsort
SELECT cor0.col0 * + 16 - NULLIF ( - col0, cor0.col0 * + 26 + + 29 ) FROM tab0 AS cor0 GROUP BY col0
----
1411
442
731

query I rowsort
SELECT - 43 FROM tab0 GROUP BY tab0.col1
----
-43
-43

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + ( - COALESCE ( + 62, col1 + + cor0.col2, + cor0.col2 ) ) FROM tab0 AS cor0 GROUP BY col0
----
-62
-62
-62

onlyif mysql # DIV for integer division: 
query I rowsort label-6636
SELECT ALL - cor0.col0 DIV 81 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6636
SELECT ALL - cor0.col0 / 81 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
0

query I rowsort
SELECT 97 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col0
----
97
97
97

query I rowsort
SELECT DISTINCT - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 72 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
72

query I rowsort
SELECT 13 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
13
13
13

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6641
SELECT CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6641
SELECT CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6642
SELECT 74 DIV 68 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6642
SELECT 74 / 68 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 95 col2 FROM tab0 GROUP BY tab0.col1
----
95

query I rowsort
SELECT 43 + + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
126
69
86

query I rowsort
SELECT ALL 80 FROM tab1 cor0 GROUP BY col0
----
80
80
80

query I rowsort
SELECT DISTINCT + 21 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
21

query I rowsort
SELECT 96 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
96
96
96

query I rowsort
SELECT ALL - 0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 7 * + cor0.col2 - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
144
228
474

onlyif mysql # DIV for integer division: 
query I rowsort label-6650
SELECT - 4 DIV + tab1.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6650
SELECT - 4 / + tab1.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 39 AS col0 FROM tab2 GROUP BY tab2.col1
----
39

query I rowsort
SELECT DISTINCT - - 69 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
107
148
93

query I rowsort
SELECT - col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
138
148
99

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT cor0.col1 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT 15 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 28 * col2 col1 FROM tab1 GROUP BY tab1.col2
----
1260
1988
224

onlyif mysql # DIV for integer division: 
query I rowsort label-6660
SELECT ALL + cor0.col1 DIV - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6660
SELECT ALL + cor0.col1 / - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT 90 + 20 FROM tab1 GROUP BY col0
----
110
110
110

query I rowsort
SELECT 17 FROM tab0 AS cor0 GROUP BY col1, col0
----
17
17
17

query I rowsort
SELECT + + 57 * + 89 AS col0 FROM tab1 GROUP BY tab1.col1
----
5073
5073
5073

query I rowsort
SELECT DISTINCT + 18 FROM tab1 GROUP BY tab1.col2
----
18

query I rowsort
SELECT - 18 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-18
-18
-18

onlyif mysql # DIV for integer division: 
query I rowsort label-6666
SELECT + cor0.col0 DIV - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6666
SELECT + cor0.col0 / - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col1 + cor0.col1 * - 33 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2592
0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 99 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT - 20 AS col1 FROM tab1 GROUP BY tab1.col2
----
-20
-20
-20

onlyif mysql # DIV for integer division: 
query I rowsort label-6673
SELECT ALL - 9 DIV - col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6673
SELECT ALL - 9 / - col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT 66 FROM tab0 GROUP BY tab0.col0
----
66
66
66

query I rowsort
SELECT ALL + cor0.col1 * + 77 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6237

query I rowsort
SELECT - 17 * + 83 FROM tab1 cor0 GROUP BY cor0.col1
----
-1411
-1411
-1411

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - 46 + 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT - + 18 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-1638
-1656
-270

query I rowsort
SELECT DISTINCT + 81 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
81

query I rowsort
SELECT + NULLIF ( 18, cor0.col2 * - 54 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
18
18
18

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + 65 * cor1.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 0169bbc83aa119f34259169c44b08fe9

query I rowsort
SELECT DISTINCT + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6686
SELECT + CAST( NULL AS SIGNED ) * 3 AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6686
SELECT + CAST ( NULL AS INTEGER ) * 3 AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 - + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL NULLIF ( cor0.col0, col0 * cor0.col0 ) * - 93 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2046
-2604
-7626

query I rowsort
SELECT + 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
70
70
70

query I rowsort
SELECT 66 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
66
66
66

query I rowsort
SELECT DISTINCT - + 87 FROM tab1 GROUP BY tab1.col0
----
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6692
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6692
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - tab2.col2 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 44 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1144
-1892
-3652

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL >= ( NULL )
----

query I rowsort
SELECT - + 57 + + tab0.col2 FROM tab0 GROUP BY col2
----
-19
-33
22

query I rowsort
SELECT 19 * - 1 + + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
24
64
7

query I rowsort
SELECT DISTINCT 0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT ALL - ( cor0.col2 ) + - 69 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-107
-148
-93

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( COALESCE ( 6, + cor0.col0 ), - cor0.col2 ) * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
156
258
498

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 67 col1 FROM tab1 GROUP BY tab1.col2
----
67

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab2 GROUP BY tab2.col2
----
-53

query I rowsort
SELECT - 77 FROM tab1 GROUP BY tab1.col1
----
-77
-77
-77

query I rowsort
SELECT ALL 52 FROM tab2 GROUP BY tab2.col0
----
52
52
52

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 65 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
33
33

query I rowsort
SELECT cor0.col0 + col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
240
8372
8556

query I rowsort
SELECT ALL + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 + - cor0.col0 * - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
324
8380
8563

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
1936
3249
36

query I rowsort
SELECT cor0.col2 * cor0.col2 + 15 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1459
591
6256

query I rowsort
SELECT ALL - 66 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-66
-66
-66

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT - 56 FROM tab0 GROUP BY col2
----
-56
-56
-56

query I rowsort
SELECT DISTINCT + col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6718
SELECT - cor0.col0 DIV - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6718
SELECT - cor0.col0 / - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col2 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT 43 FROM tab2 GROUP BY tab2.col2
----
43
43
43

query I rowsort
SELECT 52 * 30 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1560
1560
1560

query I rowsort
SELECT DISTINCT cor0.col2 + - 82 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3
-44
-58

query I rowsort
SELECT DISTINCT - cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-6725
SELECT DISTINCT 29 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-6725
SELECT DISTINCT 29 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + 8 FROM tab0 GROUP BY tab0.col2
----
8

onlyif mysql # DIV for integer division: 
query I rowsort label-6728
SELECT ALL cor0.col1 DIV 47 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-6728
SELECT ALL cor0.col1 / 47 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
1

query I rowsort
SELECT + - 60 * 50 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-3000
-3000
-3000

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
37
37
37

query I rowsort
SELECT DISTINCT + - 80 FROM tab0 GROUP BY col1
----
-80

query I rowsort
SELECT - 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT 68 FROM tab1 GROUP BY tab1.col1
----
68
68
68

query I rowsort
SELECT 75 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
75
75
75

query I rowsort
SELECT DISTINCT 65 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1690
2795
5395

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT ( cor0.col1 ) * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-6561
0

query I rowsort
SELECT - 12 FROM tab1 cor0 GROUP BY cor0.col0
----
-12
-12
-12

query I rowsort
SELECT DISTINCT 41 FROM tab2 AS cor0 GROUP BY cor0.col0
----
41

query I rowsort
SELECT + 27 * + 92 AS col2 FROM tab1 GROUP BY tab1.col0
----
2484
2484
2484

query I rowsort
SELECT - ( - ( 1 ) ) FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col2 col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 52 - - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
111
113
93

query I rowsort
SELECT DISTINCT + 56 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
56

query I rowsort
SELECT DISTINCT - 35 AS col2 FROM tab0 GROUP BY tab0.col2
----
-35

query I rowsort
SELECT tab2.col2 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT col2 * + col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + 41 AS col1 FROM tab0 GROUP BY tab0.col1
----
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 9 col0 FROM tab2 GROUP BY tab2.col2
----
9
9
9

onlyif mysql # DIV for integer division: 
query I rowsort label-6751
SELECT - 76 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6751
SELECT - 76 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
0
0

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 * - 57 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-627
-627
-627

query I rowsort
SELECT DISTINCT + 31 FROM tab0 GROUP BY tab0.col2
----
31

onlyif mysql # DIV for integer division: 
query I rowsort label-6755
SELECT 63 DIV 41 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6755
SELECT 63 / 41 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3
3
3

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6757
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6757
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6758
SELECT DISTINCT cor0.col0 DIV + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1

skipif mysql # not compatible
query I rowsort label-6758
SELECT DISTINCT cor0.col0 / + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1

query I rowsort
SELECT DISTINCT + 3 - 71 FROM tab2 GROUP BY tab2.col2
----
-68

query I rowsort
SELECT DISTINCT 70 - + 96 AS col1 FROM tab0 GROUP BY tab0.col2
----
-26

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 WHERE NULL IS NOT NULL GROUP BY cor0.col2 HAVING NOT ( NULL ) > ( NULL )
----

query I rowsort
SELECT ALL col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6764
SELECT DISTINCT tab1.col0 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1

skipif mysql # not compatible
query I rowsort label-6764
SELECT DISTINCT tab1.col0 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-6765
SELECT ALL + 51 DIV - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-6
0

skipif mysql # not compatible
query I rowsort label-6765
SELECT ALL + 51 / - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-6
0

query I rowsort
SELECT ALL + 75 + + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
101
118
158

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - 37 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-37
-37
-37

query I rowsort
SELECT - 42 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-42
-42
-42

query I rowsort
SELECT ALL + col0 * 99 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2178
2772
8118

query I rowsort
SELECT ALL cor0.col0 * + 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
2156
2744
8036

query I rowsort
SELECT 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
51
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-6773
SELECT col1 - col1 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
55
6

skipif mysql # not compatible
query I rowsort label-6773
SELECT col1 - col1 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
55
6

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 40 FROM tab0 GROUP BY tab0.col1
----
-40
-40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6776
SELECT - col0 + - CAST( NULL AS SIGNED ) * + 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6776
SELECT - col0 + - CAST ( NULL AS INTEGER ) * + 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 + 64 FROM tab2 AS cor0 GROUP BY col1
----
105
123
125

query I rowsort
SELECT cor0.col1 * 29 FROM tab2 cor0 GROUP BY cor0.col1
----
1189
1711
1769

query I rowsort
SELECT - 27 FROM tab2 GROUP BY tab2.col1
----
-27
-27
-27

query I rowsort
SELECT + 77 + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
101
115
156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + 87 * 42 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3695
3713
3715

query I rowsort
SELECT ALL cor0.col1 + + COALESCE ( - cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2
-27
12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6783
SELECT + CAST( - 86 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-86
-86
-86

skipif mysql # not compatible
query I rowsort label-6783
SELECT + CAST ( - 86 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-86
-86
-86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6784
SELECT DISTINCT - - CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6784
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL cor1.col2 AS col1 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - - tab0.col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT col1 * tab1.col1 + - tab1.col1 FROM tab1 GROUP BY col1
----
1892
30
3192

query I rowsort
SELECT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 69 FROM tab2 cor0 GROUP BY cor0.col1
----
69

query I rowsort
SELECT ALL + tab2.col2 + + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6795
SELECT ALL CAST( col2 AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif mysql # not compatible
query I rowsort label-6795
SELECT ALL CAST ( col2 AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT 75 + + cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-150
-8206
-8389

query I rowsort
SELECT + 46 FROM tab0 GROUP BY tab0.col0
----
46
46
46

query I rowsort
SELECT ALL - 11 + + cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1433
565
6230

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
3772
5369
915

query I rowsort
SELECT 86 + 44 FROM tab2 GROUP BY col1
----
130
130
130

query I rowsort
SELECT ALL 61 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT + 21 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
21
21
21

query I rowsort
SELECT - 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-47
-47
-47

onlyif mysql # DIV for integer division: 
query I rowsort label-6805
SELECT ALL - tab2.col1 DIV 12 FROM tab2 GROUP BY tab2.col1
----
-3
-4
-5

skipif mysql # not compatible
query I rowsort label-6805
SELECT ALL - tab2.col1 / 12 FROM tab2 GROUP BY tab2.col1
----
-3
-4
-5

query I rowsort
SELECT ALL - cor0.col0 + - 34 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1505
-2905
-910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - 73 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT DISTINCT - 62 * + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3596
-4898
-5394

query I rowsort
SELECT ( - COALESCE ( col0, + COALESCE ( + col0, cor0.col0, + cor0.col0 ) * - cor0.col0 ) ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 70 FROM tab0 AS cor0 GROUP BY col0
----
70

query I rowsort
SELECT - 88 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-88
-88
-88

query I rowsort
SELECT ALL + 88 FROM tab1 GROUP BY tab1.col1
----
88
88
88

query I rowsort
SELECT ALL 9 * - col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-405
-639
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 20 col2 FROM tab0 GROUP BY tab0.col0
----
-20
-20
-20

query I rowsort
SELECT - 8 AS col1 FROM tab2 GROUP BY tab2.col2
----
-8
-8
-8

query I rowsort
SELECT 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT DISTINCT - 71 AS col1 FROM tab1 GROUP BY tab1.col0
----
-71

query I rowsort
SELECT + 65 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
65
65
65

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 87 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-5
-59
-65

query I rowsort
SELECT cor0.col2 - 47 FROM tab0 cor0 GROUP BY cor0.col2
----
-23
-9
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 18 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col2
----
1044
1422
1566

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT + 85 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
85

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT 31 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
113
53
59

query I rowsort
SELECT - 40 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT - 59 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-59
-59
-59

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + 61 FROM tab2 GROUP BY tab2.col2
----
61
61
61

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 9 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
9
9
9

query I rowsort
SELECT DISTINCT + 85 FROM tab0 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT + 43 FROM tab2 GROUP BY tab2.col1
----
43
43
43

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT ( ( NULL ) IS NOT NULL ) AND ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col0 + + 4 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
26
32
86

query I rowsort
SELECT ALL + 38 + 44 AS col0 FROM tab0 GROUP BY tab0.col0
----
82
82
82

query I rowsort
SELECT DISTINCT 18 FROM tab1 AS cor0 GROUP BY cor0.col2
----
18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6846
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6846
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 col2 FROM tab2 GROUP BY tab2.col2
----
-79
-79
-79

query I rowsort
SELECT ALL - cor1.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col2
----
-15
-91
-92

query I rowsort
SELECT + ( + 50 ) - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-7
44
6

query I rowsort
SELECT - 96 FROM tab0 GROUP BY tab0.col0
----
-96
-96
-96

query I rowsort
SELECT DISTINCT + 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
82

query I rowsort
SELECT 72 FROM tab2 AS cor0 GROUP BY col1
----
72
72
72

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL ( + cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 29 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
29
29

onlyif mysql # DIV for integer division: 
query I rowsort label-6858
SELECT DISTINCT + 48 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
3

skipif mysql # not compatible
query I rowsort label-6858
SELECT DISTINCT + 48 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
3

query I rowsort
SELECT ALL 21 AS col2 FROM tab2 GROUP BY tab2.col1
----
21
21
21

query I rowsort
SELECT + 3 FROM tab1 GROUP BY tab1.col2
----
3
3
3

query I rowsort
SELECT + 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
74
74
74

query I rowsort
SELECT ALL cor0.col0 + - cor0.col1 * NULLIF ( cor0.col0, 72 + - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-3440
26
83

query I rowsort
SELECT DISTINCT + 7 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
7

query I rowsort
SELECT DISTINCT - 69 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5589
0

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT DISTINCT + 80 FROM tab1 GROUP BY tab1.col0
----
80

query I rowsort
SELECT 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT + 46 * 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
552
552
552

query I rowsort
SELECT - 61 FROM tab2 cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT DISTINCT + 51 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
51

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + 70 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
70
70
70

query I rowsort
SELECT 83 * col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1826
2324
6806

query I rowsort
SELECT + 7 FROM tab2 GROUP BY tab2.col2
----
7
7
7

query I rowsort
SELECT ALL 56 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1232
1568
4592

query I rowsort
SELECT ALL - 92 FROM tab2 AS cor0 GROUP BY col0
----
-92
-92
-92

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 DISTINCT - + 79 FROM tab0 GROUP BY tab0.col2
----
-79

query I rowsort
SELECT DISTINCT + ( + 93 ) FROM tab2 GROUP BY tab2.col1
----
93

query I rowsort
SELECT DISTINCT 30 - - 93 AS col1 FROM tab0 GROUP BY tab0.col2
----
123

query I rowsort
SELECT DISTINCT + - 25 FROM tab1 GROUP BY tab1.col1
----
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-82
-82
-82

query I rowsort
SELECT ALL - col1 * + tab2.col1 + 61 AS col2 FROM tab2 GROUP BY col1
----
-1620
-3420
-3660

query I rowsort
SELECT - cor0.col0 + - 36 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-118
-58
-64

query I rowsort
SELECT + 51 FROM tab2 AS cor0 GROUP BY col2
----
51
51
51

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - 58 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-58

query I rowsort
SELECT 18 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1062
1098
738

query I rowsort
SELECT ALL 20 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT ALL 62 - cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3302
-6179
-7507

query I rowsort
SELECT + 7 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
168
266
553

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 * 89 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1320
8008
8096

query I rowsort
SELECT - - 27 - 31 FROM tab1 GROUP BY tab1.col0
----
-4
-4
-4

query I rowsort
SELECT - cor0.col2 * + 33 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1485
-2343
-264

query I rowsort
SELECT + ( cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) AS col2 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 35 FROM tab0 GROUP BY tab0.col0
----
-35

query I rowsort
SELECT ALL + 57 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
57
57
57

query I rowsort
SELECT - col2 * - 69 + 1 AS col1 FROM tab0 GROUP BY tab0.col2
----
1657
2623
5452

query I rowsort
SELECT DISTINCT + + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + tab0.col1 + - tab0.col1 * col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT DISTINCT - + 39 AS col2 FROM tab1 GROUP BY tab1.col1
----
-39

query I rowsort
SELECT cor0.col1 + - 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
19
21

query I rowsort
SELECT DISTINCT - 19 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-19
62

query I rowsort
SELECT 82 FROM tab0 GROUP BY col0
----
82
82
82

query I rowsort
SELECT ALL 93 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
93
93
93

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 - 5 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-5
-6566

query I rowsort
SELECT + tab1.col2 * 25 - + tab1.col2 * + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-3266
-900
136

query I rowsort
SELECT cor0.col1 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

onlyif mysql # DIV for integer division: 
query I rowsort label-6914
SELECT - cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6914
SELECT - cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 2 * + 42 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-84

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - 9 AS col1 FROM tab1 GROUP BY tab1.col2
----
-9
-9
-9

query I rowsort
SELECT - ( 71 ) * - 86 FROM tab0 cor0 GROUP BY cor0.col0
----
6106
6106
6106

query I rowsort
SELECT - 17 AS col1 FROM tab2 cor0 GROUP BY col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 20 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
20

query I rowsort
SELECT DISTINCT - + 45 FROM tab2 GROUP BY col2
----
-45

query I rowsort
SELECT DISTINCT cor0.col0 - + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 7 * + cor0.col1 + 47 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-240
-366
-380

query I rowsort
SELECT DISTINCT + - 65 FROM tab1 GROUP BY tab1.col1
----
-65

query I rowsort
SELECT DISTINCT - tab0.col1 AS col2 FROM tab0 WHERE NOT NULL IS NOT NULL GROUP BY col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6933
SELECT ALL 25 DIV - 80 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-6933
SELECT ALL 25 / - 80 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT - 77 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-77
-77
-77

query I rowsort
SELECT 56 + - col0 FROM tab2 GROUP BY col0
----
-35
-36
41

query I rowsort
SELECT DISTINCT + cor0.col2 + - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-45
53

query I rowsort
SELECT - ( cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + ( - 72 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
-72

query I rowsort
SELECT DISTINCT - 96 AS col2 FROM tab2 GROUP BY tab2.col0
----
-96

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - 85 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT + 19 FROM tab1 GROUP BY col1
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 83 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
83

query I rowsort
SELECT DISTINCT - + 1 FROM tab0 GROUP BY col1
----
-1

query I rowsort
SELECT - col1 * - col1 FROM tab1 cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT cor0.col0 * + cor0.col1 + 83 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3855
5452
998

query I rowsort
SELECT ALL + - 53 FROM tab1 GROUP BY tab1.col1
----
-53
-53
-53

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT - 7 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-7
-7
-7

query I rowsort
SELECT - NULLIF ( + cor0.col0, cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 97 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT ALL cor0.col0 + 10 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
36
53
93

query I rowsort
SELECT DISTINCT cor0.col0 * + 37 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1591
3071
962

query I rowsort
SELECT 24 + - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-19
-2
-59

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT ALL + - ( - 16 ) FROM tab2 GROUP BY col2
----
16
16
16

query I rowsort
SELECT cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL tab0.col1 AS col2 FROM tab0 WHERE NOT ( NULL ) IS NULL GROUP BY tab0.col1
----

query I rowsort
SELECT + 55 FROM tab1 GROUP BY tab1.col1
----
55
55
55

query I rowsort
SELECT ALL 16 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT ALL - 94 FROM tab1 GROUP BY tab1.col1
----
-94
-94
-94

query I rowsort
SELECT 81 * - col0 + col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-2080
-3440
-6640

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT ( - 30 ) * 61 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1830
-1830
-1830

onlyif mysql # DIV for integer division: 
query I rowsort label-6966
SELECT + cor0.col1 DIV 81 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
1

skipif mysql # not compatible
query I rowsort label-6966
SELECT + cor0.col1 / 81 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT - 31 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 40 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3240

query I rowsort
SELECT ALL + 78 FROM tab2 AS cor0 GROUP BY cor0.col1
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-6972
SELECT + cor0.col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6972
SELECT + cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 97 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-97
-97
-97

query I rowsort
SELECT ALL cor0.col0 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - col0 * + cor0.col0 + + col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
-210
-8190
-8372

query I rowsort
SELECT col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + ( 3 ) AS col2 FROM tab2 GROUP BY col1
----
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * 74 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3256
4218
444

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT 86 AS col0 FROM tab1 GROUP BY col1
----
86
86
86

query I rowsort
SELECT - 15 FROM tab0 GROUP BY tab0.col0
----
-15
-15
-15

query I rowsort
SELECT ALL + 23 FROM tab1 GROUP BY col2
----
23
23
23

query I rowsort
SELECT 54 FROM tab2 GROUP BY tab2.col0
----
54
54
54

query I rowsort
SELECT + COALESCE ( - 85, - cor0.col2 ) + 99 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
14
14
14

query I rowsort
SELECT DISTINCT 30 FROM tab0 AS cor0 GROUP BY cor0.col0
----
30

query I rowsort
SELECT DISTINCT + + 28 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1624
2212
2436

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6987
SELECT - CAST( + 6 AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
-6
-6
-6

skipif mysql # not compatible
query I rowsort label-6987
SELECT - CAST ( + 6 AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
-6
-6
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-6988
SELECT - cor0.col0 DIV cor0.col0 + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-6988
SELECT - cor0.col0 / cor0.col0 + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
14
90
91

query I rowsort
SELECT ALL 65 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT ALL + col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + 34 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-4
-45
10

query I rowsort
SELECT cor0.col2 * + 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
405
639
72

query I rowsort
SELECT cor0.col2 + ( + 23 - cor0.col2 ) * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2088
4503
5655

query I rowsort
SELECT - 49 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-49
-49
-49

query I rowsort
SELECT DISTINCT tab2.col2 * + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 + + 46 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
143
143

query I rowsort
SELECT 70 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
70
70
70

query I rowsort
SELECT ALL 63 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT ALL - 46 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-46
-46
-46

onlyif mysql # DIV for integer division: 
query I rowsort label-7000
SELECT DISTINCT - cor0.col2 DIV + 75 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-7000
SELECT DISTINCT - cor0.col2 / + 75 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0

query I rowsort
SELECT col2 AS col2 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + 10 FROM tab2 GROUP BY tab2.col1
----
10
10
10

query I rowsort
SELECT cor0.col1 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 48 + col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
139
140
63

query I rowsort
SELECT + 24 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
24
24
24

query I rowsort
SELECT 46 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 * cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4277
4324
705

query I rowsort
SELECT DISTINCT + 72 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
72

query I rowsort
SELECT DISTINCT + 42 AS col0 FROM tab0 GROUP BY tab0.col0
----
42

query I rowsort
SELECT DISTINCT - - 86 FROM tab0 GROUP BY tab0.col2
----
86

query I rowsort
SELECT - 41 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-123
-63
-69

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
76

query I rowsort
SELECT ALL + ( + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 42 + + cor0.col2 col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
121
66
80

query I rowsort
SELECT DISTINCT - cor0.col2 + 37 FROM tab0 cor0 GROUP BY cor0.col2
----
-1
-42
13

query I rowsort
SELECT DISTINCT - col2 + 23 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-22
-48
15

query I rowsort
SELECT + cor0.col2 - 62 FROM tab1 cor0 GROUP BY cor0.col2
----
-17
-54
9

query I rowsort
SELECT ALL 94 FROM tab0 GROUP BY tab0.col0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 * - tab2.col0 + - col0 col0 FROM tab2 GROUP BY col0
----
-240
-8372
-8556

query I rowsort
SELECT tab0.col1 * - col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - cor0.col2 * 28 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1260
-1988
-224

query I rowsort
SELECT ALL 23 * - 80 + col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
-1757
-1797
-1814

query I rowsort
SELECT DISTINCT + 70 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
70

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col1 - - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + + 46 FROM tab1 GROUP BY tab1.col1
----
46
46
46

query I rowsort
SELECT ALL col1 + - 1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT - cor0.col2 + - 99 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5800
-7900
-8700

onlyif mysql # DIV for integer division: 
query I rowsort label-7029
SELECT cor0.col2 DIV cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7029
SELECT cor0.col2 / cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + 97 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
97
97

query I rowsort
SELECT + 96 AS col2 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, cor0.col2, + cor0.col2 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT 59 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
130
67

query I rowsort
SELECT DISTINCT - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT 8 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-352
-456
-48

query I rowsort
SELECT ALL - 52 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-52
-52
-52

query I rowsort
SELECT ALL 50 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT cor0.col0 * - 38 FROM tab0 cor0 GROUP BY cor0.col0
----
-1634
-3154
-988

query I rowsort
SELECT ALL 40 FROM tab2 AS cor0 GROUP BY cor0.col1
----
40
40
40

query I rowsort
SELECT col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT - + 61 AS col2 FROM tab1 GROUP BY tab1.col2
----
-61

query I rowsort
SELECT + ( col2 ) + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT + - 94 FROM tab1 GROUP BY tab1.col2
----
-94
-94
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-7045
SELECT cor0.col2 - cor0.col2 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
58
79
92

skipif mysql # not compatible
query I rowsort label-7045
SELECT cor0.col2 - cor0.col2 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
58
79
92

query I rowsort
SELECT ALL - 70 FROM tab1 GROUP BY tab1.col2
----
-70
-70
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT DISTINCT col2 + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
138
148
99

query I rowsort
SELECT 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + 72 FROM tab2 cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-166
-52
-86

query I rowsort
SELECT DISTINCT + 93 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
93

query I rowsort
SELECT DISTINCT + 96 FROM tab2 GROUP BY tab2.col0
----
96

query I rowsort
SELECT DISTINCT cor0.col0 + + 26 FROM tab2 cor0 GROUP BY cor0.col0
----
117
118
41

query I rowsort
SELECT + cor0.col0 + 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
137
80
97

query I rowsort
SELECT 63 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 93 + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-11
-65
-71

query I rowsort
SELECT ALL 0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-7064
SELECT DISTINCT + 14 DIV + 61 FROM tab2 cor0 GROUP BY col1
----
0

skipif mysql # not compatible
query I rowsort label-7064
SELECT DISTINCT + 14 / + 61 FROM tab2 cor0 GROUP BY col1
----
0

query I rowsort
SELECT ALL 41 - + 56 FROM tab0 cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT 8 FROM tab0 cor0 GROUP BY cor0.col1
----
8
8

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT - 38 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-38
-38

query I rowsort
SELECT + cor0.col0 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-132
-1596
-3608

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 47, + cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
47

query I rowsort
SELECT + 42 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
42
42

query I rowsort
SELECT + 45 FROM tab2 GROUP BY tab2.col0
----
45
45
45

query I rowsort
SELECT DISTINCT - cor0.col2 + 52 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-19
44
7

query I rowsort
SELECT DISTINCT 44 FROM tab2 GROUP BY tab2.col1
----
44

query I rowsort
SELECT - 8 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-192
-304
-632

query I rowsort
SELECT 31 - cor0.col2 * col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3333
-6210
-7538

query I rowsort
SELECT DISTINCT - 28 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-28

query I rowsort
SELECT cor0.col0 + col0 * 28 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2639
2668
435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 88 + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
112
126
167

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT + 31 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT DISTINCT + + 66 FROM tab0 GROUP BY col0
----
66

query I rowsort
SELECT DISTINCT + COALESCE ( - 70, - 66 ) + - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-128
-149
-157

query I rowsort
SELECT ALL 91 * - cor0.col0 + + 44 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-2322
-3869
-7509

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT DISTINCT 88 FROM tab1 GROUP BY col1
----
88

query I rowsort
SELECT DISTINCT - - ( - 32 ) FROM tab0 GROUP BY tab0.col0
----
-32

query I rowsort
SELECT DISTINCT + - 10 + tab0.col0 * tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1839
666
6879

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 86 col1 FROM tab1 GROUP BY tab1.col0
----
-86
-86
-86

query I rowsort
SELECT ALL + 36 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
36
36
36

query I rowsort
SELECT DISTINCT + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 * 45 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4004
-4048
-660

query I rowsort
SELECT 94 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col1
----
94
94
94

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - - tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
182
184
30

query I rowsort
SELECT DISTINCT + col1 * COALESCE ( 54, + 95 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4374

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT + cor0.col0 * 95 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2470
4085
7885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 35 col0 FROM tab0 GROUP BY tab0.col2
----
35
35
35

query I rowsort
SELECT DISTINCT 97 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
97

query I rowsort
SELECT DISTINCT 26 FROM tab0 AS cor0 GROUP BY col0
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 77 + - 36 col2 FROM tab0 GROUP BY tab0.col0
----
41
41
41

query I rowsort
SELECT + 97 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT + + 60 FROM tab0 GROUP BY tab0.col1
----
60
60

query I rowsort
SELECT + 49 * 19 AS col1 FROM tab0 GROUP BY tab0.col2
----
931
931
931

query I rowsort
SELECT + 14 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 17 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-17

query I rowsort
SELECT - + 3 FROM tab1 GROUP BY col0
----
-3
-3
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 0 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT 72 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
72
72
72

query I rowsort
SELECT DISTINCT 90 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
90

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab2 GROUP BY tab2.col1
----
87

query I rowsort
SELECT - 97 FROM tab2 AS cor0 GROUP BY col0, col1, cor0.col2
----
-97
-97
-97

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 78 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
78
78
78

query I rowsort
SELECT 91 + + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
149
170
178

query I rowsort
SELECT DISTINCT - + 75 FROM tab2 GROUP BY tab2.col2
----
-75

query I rowsort
SELECT DISTINCT + 45 FROM tab0 AS cor0 GROUP BY col1
----
45

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-1936
-3249
-36

query I rowsort
SELECT cor0.col1 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
133
150
76

query I rowsort
SELECT + 79 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT 0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7128
SELECT - 12 DIV cor0.col2 - + cor0.col0 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-3772
-5369
-915

skipif mysql # not compatible
query I rowsort label-7128
SELECT - 12 / cor0.col2 - + cor0.col0 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT DISTINCT - - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + 6 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

query I rowsort
SELECT DISTINCT + 2 AS col0 FROM tab2 GROUP BY tab2.col2
----
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 21 FROM tab2 cor0 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT DISTINCT - cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 52 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT - col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 34 * cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1485
2343
264

query I rowsort
SELECT - 30 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-30
-30
-30

query I rowsort
SELECT 51 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1326
2193
4233

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT 8 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
8
8
8

query I rowsort
SELECT ALL + - col0 AS col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT 61 AS col0 FROM tab2 GROUP BY tab2.col2
----
61
61
61

query I rowsort
SELECT + cor0.col0 * 7 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
182
301
581

query I rowsort
SELECT ALL - 89 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT + 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28

onlyif mysql # DIV for integer division: 
query I rowsort label-7150
SELECT - cor0.col0 * 79 + + cor0.col0 DIV 97 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1185
-7189
-7268

skipif mysql # not compatible
query I rowsort label-7150
SELECT - cor0.col0 * 79 + + cor0.col0 / 97 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1185
-7189
-7268

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7151
SELECT DISTINCT - cor0.col2 + cor0.col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7151
SELECT DISTINCT - cor0.col2 + cor0.col0 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT + + 7 FROM tab1 GROUP BY tab1.col1
----
7
7
7

query I rowsort
SELECT ALL 56 + - 46 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT ALL + 6 * cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
168
266
553

query I rowsort
SELECT ALL NULLIF ( - cor0.col1, cor0.col1 ) + - ( + col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 44 col2 FROM tab2 GROUP BY col0
----
44
44
44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7158
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7158
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL col2 + cor0.col2 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1968
38
79

query I rowsort
SELECT tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT + ( tab0.col0 ) * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT ALL 45 + cor0.col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1641
177
3653

query I rowsort
SELECT ALL - + 4 FROM tab0 GROUP BY tab0.col1
----
-4
-4

query I rowsort
SELECT DISTINCT - 2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT ALL 56 FROM tab0 cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT DISTINCT cor0.col0 * ( + cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
225
8281
8464

query I rowsort
SELECT ALL + 51 FROM tab1 GROUP BY tab1.col0
----
51
51
51

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 0, + cor1.col2 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
0
0
0

query I rowsort
SELECT + + ( 81 ) FROM tab1 GROUP BY tab1.col2
----
81
81
81

query I rowsort
SELECT cor0.col0 * 88 FROM tab1 cor0 GROUP BY col0
----
1936
2464
7216

query I rowsort
SELECT - cor0.col1 * 60 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-4817
26
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7174
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7174
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT ALL 94 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
94
94
94

query I rowsort
SELECT cor0.col1 * cor0.col1 + 27 * 31 FROM tab0 AS cor0 GROUP BY col1
----
7398
837

query I rowsort
SELECT DISTINCT - 35 FROM tab1 AS cor0 GROUP BY col1
----
-35

query I rowsort
SELECT + 39 * + 8 - - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
336
350
391

query I rowsort
SELECT - 40 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-40
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 col1 FROM tab0 GROUP BY tab0.col0
----
-49
-49
-49

query I rowsort
SELECT ALL 78 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT + 61 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 71 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT - 9 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-17
-54
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 16 - + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-75
-76
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 14 * + tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-1106
-336
-532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 * - cor0.col0 + + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-105
-637
-644

onlyif mysql # DIV for integer division: 
query I rowsort label-7189
SELECT 22 DIV - col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7189
SELECT 22 / - col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT 84 + + col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
175
176
99

query I rowsort
SELECT DISTINCT 68 FROM tab0 AS cor0 GROUP BY col1
----
68

query I rowsort
SELECT ALL + cor0.col2 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7193
SELECT ALL - 28 DIV 50 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7193
SELECT ALL - 28 / 50 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - 74 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-74
-74
-74

query I rowsort
SELECT 63 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor0.col1 * 80 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
3520
4560
480

query I rowsort
SELECT - ( + 37 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 * - col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT ALL - cor0.col2 + ( col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 53 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
53

query I rowsort
SELECT DISTINCT cor0.col0 * + 79 + + 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1268
7272
7351

query I rowsort
SELECT DISTINCT - 25 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-25

query I rowsort
SELECT DISTINCT 96 + 19 FROM tab2 AS cor0 GROUP BY cor0.col0
----
115

query I rowsort
SELECT ALL + + 30 FROM tab2 GROUP BY tab2.col0
----
30
30
30

query I rowsort
SELECT DISTINCT 97 FROM tab2 GROUP BY tab2.col2
----
97

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 WHERE NOT ( NULL ) IS NOT NULL GROUP BY col2
----
45
71
8

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT ALL 71 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1065
6461
6532

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL 12 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 36 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
36

query I rowsort
SELECT DISTINCT ( - 86 ) FROM tab0 GROUP BY tab0.col0
----
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 75 col1 FROM tab0 AS cor0 GROUP BY col2
----
-1800
-2850
-5925

query I rowsort
SELECT DISTINCT - - ( - 26 ) AS col0 FROM tab2 GROUP BY col1
----
-26

query I rowsort
SELECT - cor0.col2 * - 37 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1406
2923
888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 - - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT + 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT 66 * - 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4884
-4884
-4884

onlyif mysql # DIV for integer division: 
query I rowsort label-7223
SELECT - + tab0.col0 DIV tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7223
SELECT - + tab0.col0 / tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-1

query I rowsort
SELECT + + 17 FROM tab1 GROUP BY tab1.col0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 * - 5 col2 FROM tab1 GROUP BY tab1.col1
----
220
285
30

query I rowsort
SELECT DISTINCT + tab1.col1 * 60 AS col0 FROM tab1 GROUP BY tab1.col1
----
2640
3420
360

query I rowsort
SELECT ALL tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL + - col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - 21 AS col2 FROM tab2 AS cor0 GROUP BY col2, col1
----
-21
-21
-21

query I rowsort
SELECT DISTINCT 30 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
30

query I rowsort
SELECT ALL + + 92 FROM tab1 GROUP BY col2
----
92
92
92

query I rowsort
SELECT + + col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 22 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-69
-70
7

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT - col2 * + 6 AS col0 FROM tab0 GROUP BY tab0.col2
----
-144
-228
-474

query I rowsort
SELECT ALL - 56 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-56
-56
-56

query I rowsort
SELECT ALL - 82 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-82
-82
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-7238
SELECT + 4 * - cor0.col2 + cor0.col1 DIV + 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-152
-316
-96

skipif mysql # not compatible
query I rowsort label-7238
SELECT + 4 * - cor0.col2 + cor0.col1 / + 93 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-152
-316
-96

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL ( 87 ) FROM tab1 GROUP BY tab1.col0
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7241
SELECT ALL 23 DIV 54 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-7241
SELECT ALL 23 / 54 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + 49 FROM tab2 AS cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT + 2 + - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-39
-57
-59

onlyif mysql # DIV for integer division: 
query I rowsort label-7244
SELECT DISTINCT col2 DIV col2 AS col0 FROM tab1 GROUP BY col2
----
1

skipif mysql # not compatible
query I rowsort label-7244
SELECT DISTINCT col2 / col2 AS col0 FROM tab1 GROUP BY col2
----
1

query I rowsort
SELECT ALL + 31 FROM tab0 cor0 GROUP BY cor0.col1
----
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 47 FROM tab0 GROUP BY tab0.col0
----
47
47
47

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 * cor0.col1 + 66 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
66
6627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 86 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT ALL + 84 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT ALL + 38 FROM tab1 GROUP BY col1
----
38
38
38

query I rowsort
SELECT DISTINCT + 71 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
71

query I rowsort
SELECT - 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-66
-66
-66

query I rowsort
SELECT ALL + cor0.col0 * 7 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
105
637
644

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + 92 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT NULLIF ( cor0.col0, - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
82

query I rowsort
SELECT + 45 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col1
----
45
45
45

query I rowsort
SELECT ALL 88 * - col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-3960
-6248
-704

query I rowsort
SELECT 46 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + + 5 + - col1 FROM tab2 GROUP BY tab2.col1
----
-36
-54
-56

query I rowsort
SELECT + - 75 FROM tab0 GROUP BY tab0.col1
----
-75
-75

query I rowsort
SELECT 50 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
129
74
88

onlyif mysql # DIV for integer division: 
query I rowsort label-7268
SELECT 57 DIV cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-7268
SELECT 57 / cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
0
2
2

query I rowsort
SELECT - 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-96
-96
-96

query I rowsort
SELECT + col2 - + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING tab1.col2 IS NULL
----

query I rowsort
SELECT DISTINCT 45 FROM tab0 AS cor0 GROUP BY col0
----
45

query I rowsort
SELECT DISTINCT cor0.col0 - + ( 64 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-21
-38
19

query I rowsort
SELECT + cor0.col1 + 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
55
73
75

query I rowsort
SELECT DISTINCT + 60 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
151
152
75

query I rowsort
SELECT DISTINCT 39 + - cor0.col1 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1897
-3210
3

query I rowsort
SELECT col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
58
79
87

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL + 42 * + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1008
1596
3318

query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
14

query I rowsort
SELECT ALL 63 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT 57 FROM tab0 GROUP BY tab0.col1
----
57

query I rowsort
SELECT - 62 AS col0 FROM tab1 GROUP BY tab1.col2
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - - 35 AS col2 FROM tab1 GROUP BY col0
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 49 col2 FROM tab0 GROUP BY tab0.col1
----
-49

query I rowsort
SELECT ALL 13 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
13
13
13

query I rowsort
SELECT 30 FROM tab1 AS cor0 GROUP BY col0, col0, cor0.col0
----
30
30
30

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
15
91
92

query I rowsort
SELECT DISTINCT - 92 AS col0 FROM tab1 GROUP BY col1
----
-92

query I rowsort
SELECT ALL - cor0.col2 + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-38
-79
57

query I rowsort
SELECT col1 + 27 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
108
27

query I rowsort
SELECT - cor0.col1 * 87 + - col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-7128
0

query I rowsort
SELECT - + 29 FROM tab0 GROUP BY tab0.col0
----
-29
-29
-29

query I rowsort
SELECT - 5 FROM tab2 GROUP BY tab2.col1
----
-5
-5
-5

query I rowsort
SELECT - 34 FROM tab1 GROUP BY tab1.col0
----
-34
-34
-34

query I rowsort
SELECT - ( + 21 ) FROM tab0 AS cor0 GROUP BY col1
----
-21
-21

query I rowsort
SELECT + 19 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-3
-63
-9

query I rowsort
SELECT DISTINCT - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 + + 31 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
2592

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + 90 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
114
128
169

query I rowsort
SELECT - - COALESCE ( tab2.col0, + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - 93 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-93
-93
-93

query I rowsort
SELECT 40 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 20 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT cor0.col0 + + NULLIF ( cor0.col0, 52 * - 66 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT - 26 * - 0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT 59 + - 56 FROM tab0 AS cor0 GROUP BY col1
----
3
3

query I rowsort
SELECT + 21 * - tab1.col1 FROM tab1 GROUP BY col1
----
-1197
-126
-924

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 68 col2 FROM tab2 GROUP BY col1
----
68
68
68

query I rowsort
SELECT DISTINCT 78 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
78

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-7313
SELECT DISTINCT + cor0.col1 DIV + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
1

skipif mysql # not compatible
query I rowsort label-7313
SELECT DISTINCT + cor0.col1 / + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7314
SELECT ALL - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7314
SELECT ALL - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + ( col1 ) * + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + 73 FROM tab2 AS cor0 GROUP BY cor0.col0
----
73

query I rowsort
SELECT - cor0.col1 * 2 FROM tab1 cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT + 8 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT ALL 45 FROM tab0 cor0 GROUP BY col2
----
45
45
45

query I rowsort
SELECT 80 FROM tab1 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 * 27 FROM tab2 cor0 GROUP BY col2
----
-1508
-2054
-2262

query I rowsort
SELECT ALL 20 AS col1 FROM tab1 GROUP BY col0
----
20
20
20

query I rowsort
SELECT DISTINCT col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
6561

query I rowsort
SELECT ALL - COALESCE ( + 77, cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
-77
-77
-77

query I rowsort
SELECT ALL 79 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT DISTINCT cor0.col1 - cor0.col1 * + 21 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1180
-1220
-820

query I rowsort
SELECT + 3 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT DISTINCT 74 FROM tab1 GROUP BY tab1.col1
----
74

onlyif mysql # DIV for integer division: 
query I rowsort label-7329
SELECT 15 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7329
SELECT 15 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
2

query I rowsort
SELECT + 82 AS col0 FROM tab2 GROUP BY tab2.col2
----
82
82
82

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 82 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1230
7462
7544

query I rowsort
SELECT - + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-7334
SELECT ALL col2 DIV + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7334
SELECT ALL col2 / + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ( - 96 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT + 99 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT - ( - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT 92 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
4140
6532
736

query I rowsort
SELECT + 14 FROM tab1 GROUP BY tab1.col1
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT - tab1.col0 * - 2 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + 31 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
31
31
31

query I rowsort
SELECT 88 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5104
-6952
-7656

query I rowsort
SELECT ALL + + 31 FROM tab0 GROUP BY col2
----
31
31
31

query I rowsort
SELECT - + col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - 82 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-82
-82
-82

query I rowsort
SELECT - cor0.col0 + ( 7 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, col0
----
-19
-36
-76

query I rowsort
SELECT - 52 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
-52
-52
-52

query I rowsort
SELECT - cor0.col0 + + 15 * cor0.col0 FROM tab1 cor0 GROUP BY col0, col1
----
1148
308
392

query I rowsort
SELECT ALL - ( 99 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-99
-99
-99

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 65 AS col0 FROM tab2 GROUP BY col2
----
-65
-65
-65

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 37 FROM tab2 GROUP BY tab2.col0
----
37

query I rowsort
SELECT DISTINCT 34 FROM tab2 GROUP BY col1
----
34

query I rowsort
SELECT DISTINCT - 46 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-46

query I rowsort
SELECT + cor0.col0 - 49 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-34
42
43

query I rowsort
SELECT - 99 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT 46 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT DISTINCT COALESCE ( 2, + cor0.col0, 91 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2

query I rowsort
SELECT DISTINCT cor0.col1 + - 56 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-15
3
5

query I rowsort
SELECT + 25 AS col1 FROM tab0 GROUP BY tab0.col1
----
25
25

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 48 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT 81 AS col2 FROM tab1 GROUP BY tab1.col2
----
81
81
81

query I rowsort
SELECT DISTINCT - 18 + 55 FROM tab2 GROUP BY tab2.col0
----
37

query I rowsort
SELECT DISTINCT + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + col0 * - tab1.col0 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT + 1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT ALL + col1 * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
2378
4661
5307

query I rowsort
SELECT DISTINCT 18 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
18

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 65 * col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
1430
1820
5330

query I rowsort
SELECT ALL - cor0.col1 - + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT + 29 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
100
37
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col2 FROM tab0 GROUP BY tab0.col2
----
38
38
38

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 25, 70, + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT 42 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT ALL + NULLIF ( + tab2.col1, - ( col1 ) ) AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL - 48 FROM tab0 GROUP BY col2
----
-48
-48
-48

query I rowsort
SELECT 79 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3476
4503
474

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 97 * + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7857

query I rowsort
SELECT ALL - cor0.col1 + 70 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11
29
9

query I rowsort
SELECT ALL - 23 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-23
-23
-23

query I rowsort
SELECT COALESCE ( - cor0.col2, + cor0.col2 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 86 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT ALL - 19 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT - 37 * + 23 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-851
-851
-851

query I rowsort
SELECT + 91 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
91
91
91

query I rowsort
SELECT DISTINCT 75 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
75

query I rowsort
SELECT ALL + - 54 AS col0 FROM tab1 GROUP BY tab1.col0
----
-54
-54
-54

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL = ( NULL )
----

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 cor0 GROUP BY col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT - tab1.col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT + + 23 FROM tab1 GROUP BY tab1.col2
----
23
23
23

query I rowsort
SELECT DISTINCT 30 + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
113
56
73

query I rowsort
SELECT ALL + 51 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-35

query I rowsort
SELECT ALL - + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 54 AS col2 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT - + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - ( 9 ) AS col0 FROM tab2 GROUP BY col2
----
-9
-9
-9

query I rowsort
SELECT ALL 3 FROM tab0 GROUP BY tab0.col0
----
3
3
3

query I rowsort
SELECT + + 29 AS col0 FROM tab2 GROUP BY tab2.col0
----
29
29
29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7412
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7412
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 60 AS col2 FROM tab2 GROUP BY tab2.col1
----
60
60
60

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT 82 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT DISTINCT 65 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
65

query I rowsort
SELECT - - cor0.col0 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

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 ALL + 39 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + 29 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
100
37
74

query I rowsort
SELECT + 59 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
59
59
59

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col0
----
22
28
82

query I rowsort
SELECT 60 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4860

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - 48 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-48
-48
-48

query I rowsort
SELECT + cor0.col2 - col2 * 29 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1064
-2212
-672

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 ALL - 98 FROM tab1 GROUP BY tab1.col2
----
-98
-98
-98

query I rowsort
SELECT DISTINCT - 96 + 65 FROM tab2 GROUP BY col2
----
-31

query I rowsort
SELECT DISTINCT 8 * - 77 AS col1 FROM tab2 GROUP BY tab2.col0
----
-616

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + 43 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-15
-36
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 + 10 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
106
106
106

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
26

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-81
0
0

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 37 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-37

query I rowsort
SELECT ALL + + col0 * 91 AS col2 FROM tab1 GROUP BY tab1.col0
----
2002
2548
7462

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7441
SELECT DISTINCT 97 + cor0.col2 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7441
SELECT DISTINCT 97 + cor0.col2 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 23 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT DISTINCT 58 FROM tab1 GROUP BY col2
----
58

query I rowsort
SELECT + 12 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
12
12
12

query I rowsort
SELECT DISTINCT + cor0.col0 * - ( cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + cor0.col0 * + cor0.col0 + + 49 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
533
6773
833

query I rowsort
SELECT DISTINCT - cor0.col1 + - col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-126
-28
-85

query I rowsort
SELECT cor0.col2 - 23 * 72 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1577
-1618
-1632

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 78 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT ALL - 62 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - 94 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-94
-94
-94

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 24 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col1
----
-1056
-1368
-144

query I rowsort
SELECT DISTINCT 18 FROM tab2 AS cor0 GROUP BY col1
----
18

query I rowsort
SELECT DISTINCT + 29 FROM tab2 GROUP BY tab2.col1
----
29

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT cor0.col0 - - cor0.col0 * + 23 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1968
528
672

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-44
-57
-6

query I rowsort
SELECT - 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-21
-21
-21

query I rowsort
SELECT 50 FROM tab1 cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT ALL + col0 + - 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-32
-38
22

query I rowsort
SELECT cor0.col0 + + cor0.col0 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1288
198
5904

query I rowsort
SELECT + 2 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
2
2
2

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL <= NULL
----

query I rowsort
SELECT cor0.col1 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0
0

query I rowsort
SELECT ALL cor0.col2 * + 34 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
1972
2686
2958

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - col0 - + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT - cor0.col0 + 15 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
-13
-67
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-7476
SELECT 65 DIV 98 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7476
SELECT 65 / 98 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 * - 29 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2349

query I rowsort
SELECT 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40
40
40

query I rowsort
SELECT 47 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
47
47
47

query I rowsort
SELECT ALL - 85 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-4
-85

query I rowsort
SELECT ALL + 94 AS col2 FROM tab0 GROUP BY tab0.col1
----
94
94

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT - ( + cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT 17 FROM tab0 GROUP BY tab0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT + tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 61 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
61
61
61

query I rowsort
SELECT DISTINCT + + 82 FROM tab2 GROUP BY tab2.col1
----
82

query I rowsort
SELECT - 76 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-76
-76
-76

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 23, col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
23
23
23

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.col2, col1
----
0
0
0

query I rowsort
SELECT ALL 22 FROM tab0 AS cor0 GROUP BY col2
----
22
22
22

query I rowsort
SELECT DISTINCT 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86

query I rowsort
SELECT col0 - 66 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-38
-44
16

query I rowsort
SELECT DISTINCT - 60 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-60

query I rowsort
SELECT - 32 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-32
-32
-32

query I rowsort
SELECT col0 - + 62 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-19
-36
21

query I rowsort
SELECT ALL 36 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT ALL - col2 * - 56 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
1344
2128
4424

query I rowsort
SELECT - cor0.col1 - 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col2
----
-102
-104
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * + col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT + col1 * - 13 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-572
-741
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 16 col2 FROM tab0 GROUP BY tab0.col0
----
-16

query I rowsort
SELECT DISTINCT - 77 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-77

onlyif mysql # DIV for integer division: 
query I rowsort label-7506
SELECT DISTINCT cor0.col2 DIV - 34 - - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
69
8

skipif mysql # not compatible
query I rowsort label-7506
SELECT DISTINCT cor0.col2 / - 34 - - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
69
8

onlyif mysql # DIV for integer division: 
query I rowsort label-7507
SELECT ALL - tab2.col2 DIV 48 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7507
SELECT ALL - tab2.col2 / 48 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 * 67 col2 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
-3283
-3283
-3283

query I rowsort
SELECT DISTINCT - 71 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-71

query I rowsort
SELECT ALL - 1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT DISTINCT + cor0.col1 * NULLIF ( 94, - 37 ) FROM tab2 cor0 GROUP BY cor0.col2, col1, cor0.col2
----
3854
5546
5734

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7513
SELECT cor0.col0 - - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7513
SELECT cor0.col0 - - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 84 AS col2 FROM tab2 GROUP BY tab2.col0
----
84
84
84

query I rowsort
SELECT 97 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
97
97
97

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT 21 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
21

query I rowsort
SELECT - col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-77

query I rowsort
SELECT ALL + - 14 FROM tab1 GROUP BY col1
----
-14
-14
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT DISTINCT + col0 * - cor0.col0 - + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT cor0.col2 * 83 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
4814
6557
7221

query I rowsort
SELECT 78 AS col2 FROM tab2 GROUP BY tab2.col1
----
78
78
78

query I rowsort
SELECT - cor0.col1 * + 96 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-4224
-5472
-576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT - cor0.col1 - + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT - cor0.col0 + + COALESCE ( - cor0.col0, cor0.col0 * - col0 + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT - - 28 FROM tab2 GROUP BY tab2.col2
----
28

query I rowsort
SELECT DISTINCT col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT - 88 AS col1 FROM tab2 GROUP BY col0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT - 67 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-67

query I rowsort
SELECT - cor0.col1 - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT + 5 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
5
5
5

query I rowsort
SELECT 19 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
19
19
19

query I rowsort
SELECT ALL 86 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
86
86
86

query I rowsort
SELECT - ( cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + 45 + + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
124
69
83

query I rowsort
SELECT DISTINCT + 55 * col2 FROM tab2 GROUP BY tab2.col2
----
3190
4345
4785

query I rowsort
SELECT DISTINCT - + 47 + - 43 AS col1 FROM tab1 GROUP BY tab1.col2
----
-90

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 14 + - 32 FROM tab0 cor0 GROUP BY col1
----
-18
-18

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
26
43
83

query I rowsort
SELECT + ( cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT ALL + cor0.col0 + ( cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT ALL + ( - 21 ) * + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1218
-1659
-1827

query I rowsort
SELECT DISTINCT - 86 + 52 FROM tab0 AS cor0 GROUP BY col0
----
-34

query I rowsort
SELECT ALL - col0 + - tab2.col0 FROM tab2 GROUP BY col0
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-7553
SELECT - 34 DIV cor0.col0 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
5
56

skipif mysql # not compatible
query I rowsort label-7553
SELECT - 34 / cor0.col0 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
5
56

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 68 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1496
-1904
-5576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - + 44 AS col2 FROM tab2 GROUP BY tab2.col0
----
-44
-44
-44

query I rowsort
SELECT + 44 + 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
122
122
122

query I rowsort
SELECT ALL cor0.col2 * 32 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1440
2272
256

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-7561
SELECT + tab0.col2 DIV 81 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7561
SELECT + tab0.col2 / 81 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT + - col2 + 22 AS col0 FROM tab1 GROUP BY tab1.col2
----
-23
-49
14

query I rowsort
SELECT ALL - 75 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-75
-75
-75

query I rowsort
SELECT - + tab0.col0 * 38 AS col1 FROM tab0 GROUP BY col0
----
-1634
-3154
-988

query I rowsort
SELECT ALL + 71 FROM tab0 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT ALL + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + cor0.col2 * + 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2655
4189
472

query I rowsort
SELECT DISTINCT - 6 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6

query I rowsort
SELECT ALL - ( + cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 98 AS col2 FROM tab1 GROUP BY tab1.col1
----
98
98
98

onlyif mysql # DIV for integer division: 
query I rowsort label-7571
SELECT ALL cor0.col1 DIV cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7571
SELECT ALL cor0.col1 / cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT - 90 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-90
-90
-90

query I rowsort
SELECT ALL - 26 FROM tab1 GROUP BY col0
----
-26
-26
-26

query I rowsort
SELECT DISTINCT + 79 FROM tab1 GROUP BY tab1.col2
----
79

query I rowsort
SELECT 33 FROM tab1 GROUP BY tab1.col2
----
33
33
33

query I rowsort
SELECT DISTINCT - + 7 FROM tab2 GROUP BY tab2.col0
----
-7

query I rowsort
SELECT ALL - tab1.col1 * tab1.col1 FROM tab1 WHERE NULL IS NOT NULL GROUP BY tab1.col1
----

query I rowsort
SELECT - 68 + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-150
-90
-96

query I rowsort
SELECT - 73 FROM tab1 GROUP BY tab1.col0
----
-73
-73
-73

query I rowsort
SELECT ALL + 35 AS col1 FROM tab2 GROUP BY tab2.col2
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-7581
SELECT DISTINCT + 53 DIV cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
3

skipif mysql # not compatible
query I rowsort label-7581
SELECT DISTINCT + 53 / cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
3

query I rowsort
SELECT DISTINCT + 54 FROM tab2 GROUP BY tab2.col1
----
54

query I rowsort
SELECT ALL - 97 FROM tab1 GROUP BY tab1.col1
----
-97
-97
-97

query I rowsort
SELECT + 82 - 77 AS col0 FROM tab2 GROUP BY tab2.col0
----
5
5
5

query I rowsort
SELECT - 9 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT + tab0.col2 + + 74 AS col1 FROM tab0 GROUP BY tab0.col2
----
112
153
98

query I rowsort
SELECT cor0.col2 + 49 * 57 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
2817
2831
2872

query I rowsort
SELECT ALL - - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7589
SELECT DISTINCT + + 40 + tab0.col2 DIV + COALESCE ( + 34, col0 + tab0.col2 ) col0 FROM tab0 GROUP BY tab0.col2
----
40
41
42

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7589
SELECT DISTINCT + + 40 + tab0.col2 / + COALESCE ( + 34, col0 + tab0.col2 ) col0 FROM tab0 GROUP BY tab0.col2
----
40
41
42

query I rowsort
SELECT DISTINCT + 87 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
128
146
148

query I rowsort
SELECT DISTINCT + 22 AS col2 FROM tab1 GROUP BY tab1.col1
----
22

query I rowsort
SELECT DISTINCT 2 FROM tab0 GROUP BY tab0.col2
----
2

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab1 GROUP BY tab1.col2
----
76

query I rowsort
SELECT + 40 AS col1 FROM tab2 GROUP BY tab2.col0
----
40
40
40

query I rowsort
SELECT ALL - tab2.col1 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + cor0.col1 + 61 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
105
118
67

query I rowsort
SELECT ALL 69 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT + 19 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT + 30 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT + 22 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1804
484
616

query I rowsort
SELECT DISTINCT + tab0.col0 * tab0.col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT + - 95 FROM tab2 GROUP BY tab2.col2
----
-95
-95
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-7603
SELECT DISTINCT 96 DIV + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7603
SELECT DISTINCT 96 / + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
1

query I rowsort
SELECT DISTINCT - tab0.col0 + 16 AS col1 FROM tab0 GROUP BY tab0.col0
----
-10
-27
-67

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL + 47 + 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
132
132
132

query I rowsort
SELECT - col1 * - tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 33 col2 FROM tab1 GROUP BY col1
----
33
33
33

query I rowsort
SELECT DISTINCT 95 * 79 FROM tab1 GROUP BY tab1.col2
----
7505

query I rowsort
SELECT - 65 * 57 FROM tab0 AS cor0 GROUP BY col1
----
-3705
-3705

query I rowsort
SELECT 9 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
9
9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7612
SELECT + tab0.col1 + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7612
SELECT + tab0.col1 + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - 89 - col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-130
-148
-150

query I rowsort
SELECT DISTINCT 63 FROM tab1 cor0 GROUP BY col1
----
63

query I rowsort
SELECT DISTINCT + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7617
SELECT ALL cor0.col1 DIV cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7617
SELECT ALL cor0.col1 / cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7618
SELECT DISTINCT cor0.col0 DIV cor0.col0 + - 87 FROM tab1 cor0 GROUP BY cor0.col0
----
-86

skipif mysql # not compatible
query I rowsort label-7618
SELECT DISTINCT cor0.col0 / cor0.col0 + - 87 FROM tab1 cor0 GROUP BY cor0.col0
----
-86

query I rowsort
SELECT 95 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
95
95
95

query I rowsort
SELECT 59 FROM tab2 GROUP BY tab2.col0
----
59
59
59

query I rowsort
SELECT + - tab1.col1 + + 93 FROM tab1 GROUP BY tab1.col1
----
36
49
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7622
SELECT DISTINCT + 61 DIV 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4

skipif mysql # not compatible
query I rowsort label-7622
SELECT DISTINCT + 61 / 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4

query I rowsort
SELECT - cor0.col2 - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-142
-16
-90

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-24
-38
-79

query I rowsort
SELECT 86 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT ALL 68 AS col2 FROM tab1 GROUP BY tab1.col2
----
68
68
68

query I rowsort
SELECT - cor0.col0 * 80 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2080
-3440
-6640

query I rowsort
SELECT DISTINCT 61 FROM tab2 cor0 GROUP BY col1
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-7631
SELECT + - 54 DIV - tab1.col0 FROM tab1 GROUP BY col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7631
SELECT + - 54 / - tab1.col0 FROM tab1 GROUP BY col0
----
0
1
2

query I rowsort
SELECT tab0.col1 * col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT 25 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-7634
SELECT - - tab0.col0 DIV + tab0.col0 + + ( tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-7634
SELECT - - tab0.col0 / + tab0.col0 + + ( tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
27
44
84

query I rowsort
SELECT tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL 56 * - col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1344
-2128
-4424

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL - 25 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-25
-25
-25

query I rowsort
SELECT DISTINCT + - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7641
SELECT + cor0.col0 + - col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7641
SELECT + cor0.col0 + - col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 70 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2870
-4130
-4270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 * + 91 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1365
1365
1365

query I rowsort
SELECT DISTINCT + 66 AS col2 FROM tab0 GROUP BY tab0.col0
----
66

query I rowsort
SELECT DISTINCT cor0.col1 * 35 + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
1584
2052
216

query I rowsort
SELECT DISTINCT - + 43 FROM tab0 GROUP BY tab0.col2
----
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + 63 col0 FROM tab1 GROUP BY col2
----
-8
18
55

query I rowsort
SELECT ALL 48 AS col0 FROM tab2 GROUP BY tab2.col1
----
48
48
48

query I rowsort
SELECT - 22 * cor0.col2 FROM tab0 cor0 GROUP BY col2
----
-1738
-528
-836

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL < NULL
----

query I rowsort
SELECT 91 FROM tab1 GROUP BY col1
----
91
91
91

query I rowsort
SELECT ALL 67 * - 62 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-4154
-4154
-4154

query I rowsort
SELECT ALL col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - cor0.col2 * 67 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1608
-2546
-5293

query I rowsort
SELECT DISTINCT 55 FROM tab2 GROUP BY tab2.col1
----
55

query I rowsort
SELECT - tab2.col1 * tab2.col1 + 11 FROM tab2 GROUP BY tab2.col1
----
-1670
-3470
-3710

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 84 col2 FROM tab0 GROUP BY tab0.col1
----
84
84

query I rowsort
SELECT DISTINCT - 4 FROM tab0 GROUP BY tab0.col2
----
-4

query I rowsort
SELECT DISTINCT tab0.col2 * tab0.col2 + + 78 AS col0 FROM tab0 GROUP BY tab0.col2
----
1522
6319
654

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7660
SELECT DISTINCT - CASE - COALESCE ( + tab2.col2, tab2.col1, tab2.col0 * + tab2.col1 + + tab2.col0 ) WHEN CAST( NULL AS SIGNED ) THEN - tab2.col2 ELSE NULL END AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7660
SELECT DISTINCT - CASE - COALESCE ( + tab2.col2, tab2.col1, tab2.col0 * + tab2.col1 + + tab2.col0 ) WHEN CAST ( NULL AS INTEGER ) THEN - tab2.col2 ELSE NULL END AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT DISTINCT 68 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
68

onlyif mysql # DIV for integer division: 
query I rowsort label-7662
SELECT DISTINCT + 6 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0

skipif mysql # not compatible
query I rowsort label-7662
SELECT DISTINCT + 6 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT - 22 FROM tab0 GROUP BY tab0.col1
----
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 48 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-48

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-41
-59
-61

query I rowsort
SELECT - 23 AS col2 FROM tab2 GROUP BY tab2.col1
----
-23
-23
-23

query I rowsort
SELECT ( 4 ) FROM tab2 GROUP BY col2
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
1032
2054
3154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT + + tab0.col0 * col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + + tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + tab2.col1 FROM tab2 WHERE NULL NOT IN ( - tab2.col0 * tab2.col0 - + tab2.col1 ) GROUP BY tab2.col1
----

query I rowsort
SELECT ALL + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 17 col0 FROM tab0 GROUP BY tab0.col1
----
-17
-17

query I rowsort
SELECT ALL ( tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 + + ( - 3 + - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3

query I rowsort
SELECT ALL - cor0.col0 + 12 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1001
1012
165

query I rowsort
SELECT cor0.col2 * + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1260
176
5822

query I rowsort
SELECT cor0.col2 + 64 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1743
2776
5350

query I rowsort
SELECT ALL + - tab1.col2 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL - tab2.col1 + - 11 AS col1 FROM tab2 GROUP BY tab2.col1
----
-52
-70
-72

query I rowsort
SELECT - + 67 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-9
12
20

query I rowsort
SELECT ALL - col1 + + 24 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1357
1403
943

query I rowsort
SELECT + 55 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
114
116
96

query I rowsort
SELECT - + 19 FROM tab2 GROUP BY tab2.col0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT 29 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29

query I rowsort
SELECT + cor0.col2 - + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - cor1.col0 - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT + 59 AS col0 FROM tab1 GROUP BY tab1.col0
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-7693
SELECT ALL + 56 DIV + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
3

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7693
SELECT ALL + 56 / + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + + 21 FROM tab2 AS cor0 GROUP BY cor0.col2
----
100
108
79

query I rowsort
SELECT - 82 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT + 54 - 85 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-31
-31
-31

query I rowsort
SELECT - - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-7699
SELECT DISTINCT + cor0.col2 + - col2 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
44
7
70

skipif mysql # not compatible
query I rowsort label-7699
SELECT DISTINCT + cor0.col2 + - col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
44
7
70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7700
SELECT - tab2.col1 * - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7700
SELECT - tab2.col1 * - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL - ( 59 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-59
-59

query I rowsort
SELECT DISTINCT 73 FROM tab2 GROUP BY tab2.col0
----
73

query I rowsort
SELECT DISTINCT + - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT tab0.col0 * + 27 AS col2 FROM tab0 GROUP BY col0
----
1161
2241
702

query I rowsort
SELECT ALL 38 + 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
106
106
106

query I rowsort
SELECT ALL - 73 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-73
-73
-73

query I rowsort
SELECT DISTINCT + 60 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
60

query I rowsort
SELECT ALL - + tab2.col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT tab1.col1 * - tab1.col1 FROM tab1 GROUP BY col1 HAVING NULL IS NULL
----
-1936
-3249
-36

query I rowsort
SELECT tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL tab1.col2 FROM tab1 WHERE NULL < NULL GROUP BY tab1.col2
----

query I rowsort
SELECT cor0.col1 + - cor0.col0 * 83 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
-2158
-3488
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col1 FROM tab1 GROUP BY tab1.col0
----
-13
-13
-13

query I rowsort
SELECT - 17 FROM tab2 GROUP BY tab2.col0
----
-17
-17
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 17 + - col2 col1 FROM tab0 GROUP BY col2
----
-41
-55
-96

onlyif mysql # DIV for integer division: 
query I rowsort label-7717
SELECT - cor0.col0 DIV - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7717
SELECT - cor0.col0 / - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT + + 95 FROM tab1 GROUP BY tab1.col0
----
95
95
95

query I rowsort
SELECT + + 28 FROM tab2 GROUP BY tab2.col1
----
28
28
28

query I rowsort
SELECT ALL 79 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT - tab0.col1 * col1 FROM tab0 WHERE NOT tab0.col1 * tab0.col1 IS NULL GROUP BY tab0.col1 HAVING NULL < NULL
----

query I rowsort
SELECT DISTINCT - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NOT NULL
----
-15
-91
-92

query I rowsort
SELECT ALL + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - - 45 FROM tab1 GROUP BY tab1.col1
----
45
45
45

query I rowsort
SELECT + COALESCE ( + 46, - col0 ) * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4186
4232
690

query I rowsort
SELECT DISTINCT 58 FROM tab0 AS cor0 GROUP BY cor0.col0
----
58

query I rowsort
SELECT ALL - 32 FROM tab0 GROUP BY tab0.col1
----
-32
-32

query I rowsort
SELECT ALL - 87 FROM tab2 AS cor0 GROUP BY col1
----
-87
-87
-87

query I rowsort
SELECT ALL - 86 * + tab1.col1 FROM tab1 GROUP BY col1
----
-3784
-4902
-516

query I rowsort
SELECT ALL + - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + col2 + - COALESCE ( - cor0.col2, cor0.col2, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT - 73 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-73
-73
-73

query I rowsort
SELECT DISTINCT 40 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1760
2280
240

query I rowsort
SELECT ALL - tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT 25 * cor0.col1 - - 97 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
2122
97

query I rowsort
SELECT ( 55 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
55
55
55

query I rowsort
SELECT - 62 + 55 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - 89 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-89
-89
-89

query I rowsort
SELECT - cor0.col1 + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
1892
30
3192

query I rowsort
SELECT + 17 - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-41
-62
-70

query I rowsort
SELECT DISTINCT + 19 * 28 FROM tab1 AS cor0 GROUP BY cor0.col1
----
532

query I rowsort
SELECT col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - tab2.col2 + 72 AS col2 FROM tab2 GROUP BY tab2.col2
----
-15
-7
14

query I rowsort
SELECT + + 62 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
5022

query I rowsort
SELECT ALL tab1.col2 - + 99 AS col0 FROM tab1 GROUP BY tab1.col2
----
-28
-54
-91

query I rowsort
SELECT cor0.col1 * + 5 FROM tab2 AS cor0 GROUP BY cor0.col1
----
205
295
305

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + + 60 AS col2 FROM tab1 GROUP BY tab1.col2
----
60
60
60

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT 84 AS col0 FROM tab2 cor0 GROUP BY col2
----
84

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 * col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
1722
3540
3782

query I rowsort
SELECT - - 27 FROM tab1 GROUP BY tab1.col1
----
27
27
27

query I rowsort
SELECT ALL - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT ALL + cor1.col1 * + cor0.col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to c4e317ffe8e2ab808196df55a85cd090

query I rowsort
SELECT 9 FROM tab0 AS cor0 GROUP BY col2
----
9
9
9

query I rowsort
SELECT + 60 AS col2 FROM tab0 GROUP BY tab0.col2
----
60
60
60

query I rowsort
SELECT - - 19 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1349
152
855

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + + col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL 78 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT ALL + - 23 AS col0 FROM tab1 GROUP BY tab1.col1
----
-23
-23
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 col1 FROM tab0 GROUP BY tab0.col1
----
53
53

query I rowsort
SELECT ALL 8 + - 27 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT ( + 19 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT + ( 62 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT DISTINCT - 29 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + 22 AS col2 FROM tab0 GROUP BY tab0.col0
----
22
22
22

query I rowsort
SELECT + cor0.col1 * - cor0.col1 FROM tab2 cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + 60 FROM tab2 GROUP BY tab2.col0
----
60
60
60

query I rowsort
SELECT ALL - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-7779
SELECT ALL cor0.col0 DIV 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-7779
SELECT ALL cor0.col0 / 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-7780
SELECT - tab2.col2 + - 4 DIV 95 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

skipif mysql # not compatible
query I rowsort label-7780
SELECT - tab2.col2 + - 4 / 95 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 38 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + tab0.col1 + + 81 FROM tab0 GROUP BY tab0.col1
----
162
81

query I rowsort
SELECT DISTINCT + 26 AS col1 FROM tab0 GROUP BY tab0.col1
----
26

onlyif mysql # DIV for integer division: 
query I rowsort label-7785
SELECT DISTINCT - - tab1.col0 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-7785
SELECT DISTINCT - - tab1.col0 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT DISTINCT 62 FROM tab0 GROUP BY tab0.col0
----
62

query I rowsort
SELECT ALL - + 3 FROM tab2 GROUP BY tab2.col0
----
-3
-3
-3

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT DISTINCT - tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - 52 FROM tab0 GROUP BY tab0.col0
----
-52
-52
-52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7793
SELECT ALL + + col2 * CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7793
SELECT ALL + + col2 * CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 17 FROM tab1 AS cor0 GROUP BY cor0.col1
----
17

query I rowsort
SELECT ALL 72 * + 70 FROM tab0 GROUP BY tab0.col2
----
5040
5040
5040

query I rowsort
SELECT + 12 * 58 AS col2 FROM tab2 GROUP BY tab2.col2
----
696
696
696

query I rowsort
SELECT DISTINCT - 84 + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-13
-39
-76

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 90cf6ec6406229dce3ed591cac36d8fb

query I rowsort
SELECT DISTINCT 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT cor0.col2 * - 62 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-3596
-4898
-5394

query I rowsort
SELECT ALL ( tab0.col1 ) * col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 69 AS col0 FROM tab2 GROUP BY tab2.col0
----
69

query I rowsort
SELECT DISTINCT + tab2.col2 * + 87 FROM tab2 GROUP BY tab2.col2
----
5046
6873
7569

query I rowsort
SELECT + cor0.col2 * 60 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3480
4740
5220

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 98 col1 FROM tab2 GROUP BY tab2.col0
----
-98
-98
-98

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT col0 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT DISTINCT - col1 * - 83 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6723

query I rowsort
SELECT DISTINCT - + tab2.col2 * - 35 FROM tab2 GROUP BY tab2.col2
----
2030
2765
3045

query I rowsort
SELECT tab2.col1 AS col0 FROM tab2 WHERE NOT - tab2.col0 BETWEEN ( NULL ) AND NULL GROUP BY tab2.col1
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7814
SELECT DISTINCT - tab2.col1 + - CAST( + 6 AS SIGNED ) * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-287
-413
-427

skipif mysql # not compatible
query I rowsort label-7814
SELECT DISTINCT - tab2.col1 + - CAST ( + 6 AS INTEGER ) * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-287
-413
-427

query I rowsort
SELECT col2 * - tab0.col2 FROM tab0 WHERE NULL IS NOT NULL GROUP BY tab0.col2
----

query I rowsort
SELECT ALL + + tab2.col0 * 31 FROM tab2 GROUP BY tab2.col0
----
2821
2852
465

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - ( 22 ), tab0.col2 * ( COALESCE ( tab0.col1, 24 * - tab0.col0, tab0.col0 ) * - tab0.col2 ) ) + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
16
2
57

query I rowsort
SELECT DISTINCT 84 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
84

query I rowsort
SELECT DISTINCT + - 85 FROM tab0 GROUP BY tab0.col0
----
-85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7820
SELECT DISTINCT CAST( NULL AS SIGNED ) / + tab1.col1 FROM tab1 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7820
SELECT DISTINCT CAST ( NULL AS INTEGER ) / + tab1.col1 FROM tab1 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT + ( + 96 ) FROM tab0 GROUP BY col1
----
96

query I rowsort
SELECT DISTINCT - 43 * 15 FROM tab0 GROUP BY tab0.col1
----
-645

query I rowsort
SELECT ALL + 64 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT ALL + + tab2.col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + - tab2.col2 - 55 FROM tab2 GROUP BY tab2.col2
----
-113
-134
-142

query I rowsort
SELECT ALL + 64 - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor0.col0
----
-19
-19
21
21
38
38

query I rowsort
SELECT + 69 + 17 * - tab2.col2 FROM tab2 GROUP BY col2
----
-1274
-1410
-917

onlyif mysql # DIV for integer division: 
query I rowsort label-7828
SELECT ALL - cor0.col2 DIV 36 + 68 * - 75 FROM tab1 AS cor0 GROUP BY col2
----
-5100
-5101
-5101

skipif mysql # not compatible
query I rowsort label-7828
SELECT ALL - cor0.col2 / 36 + 68 * - 75 FROM tab1 AS cor0 GROUP BY col2
----
-5100
-5101
-5101

onlyif mysql # DIV for integer division: 
query I rowsort label-7829
SELECT ALL - 6 DIV - cor0.col2 + - 87 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-87
-87
-87

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7829
SELECT ALL - 6 / - cor0.col2 + - 87 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-87
-87
-87

query I rowsort
SELECT + 60 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col0 FROM tab1 GROUP BY tab1.col1
----
86
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-7832
SELECT + 65 DIV col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7832
SELECT + 65 / col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7833
SELECT CAST( NULL AS DECIMAL ) / 74 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7833
SELECT CAST ( NULL AS REAL ) / 74 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7836
SELECT + tab2.col0 DIV tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7836
SELECT + tab2.col0 / tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + + 51 FROM tab1 GROUP BY tab1.col2
----
51

query I rowsort
SELECT 19 * 50 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
950
950
950

query I rowsort
SELECT + + 66 FROM tab2 GROUP BY tab2.col1
----
66
66
66

query I rowsort
SELECT - 52 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-3016
-4108
-4524

onlyif mysql # DIV for integer division: 
query I rowsort label-7841
SELECT ALL + col0 DIV cor0.col0 + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-7841
SELECT ALL + col0 / cor0.col0 + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

query I rowsort
SELECT + 39 AS col1 FROM tab0 GROUP BY tab0.col0
----
39
39
39

query I rowsort
SELECT + + 88 FROM tab2 GROUP BY tab2.col1
----
88
88
88

query I rowsort
SELECT 52 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
143
144
67

query I rowsort
SELECT + cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT - tab0.col1 - - col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT + 0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT 90 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1980
2520
7380

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
126
28
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 * - cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-5670
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 - - 38 col1 FROM tab0 GROUP BY tab0.col1
----
83

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + 51 * - col1 FROM tab1 GROUP BY tab1.col1
----
-2244
-2907
-306

query I rowsort
SELECT ALL - tab1.col2 AS col0 FROM tab1 WHERE - tab1.col2 IS NULL GROUP BY tab1.col2
----

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + tab1.col0 + col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT - + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT col2 * 60 FROM tab2 GROUP BY tab2.col2
----
3480
4740
5220

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT + tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT tab0.col1 * + 82 FROM tab0 GROUP BY tab0.col1
----
0
6642

query I rowsort
SELECT DISTINCT 58 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58

query I rowsort
SELECT DISTINCT 88 FROM tab2 cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT + col2 * - 84 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3723
-5920
-666

query I rowsort
SELECT - 22 * 57 + - cor0.col1 * - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
-1254
5307

query I rowsort
SELECT 81 + - cor0.col0 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-144
-8200
-8383

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7869
SELECT DISTINCT - CAST( NULL AS SIGNED ) * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7869
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT DISTINCT - + ( col0 ) + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT + 31 + + 61 AS col1 FROM tab2 GROUP BY tab2.col2
----
92

onlyif mysql # DIV for integer division: 
query I rowsort label-7872
SELECT ALL 16 DIV tab1.col2 FROM tab1 GROUP BY col2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7872
SELECT ALL 16 / tab1.col2 FROM tab1 GROUP BY col2
----
0
0
2

query I rowsort
SELECT DISTINCT cor0.col1 - 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-22
16
29

query I rowsort
SELECT ALL + 55 FROM tab2 AS cor0 GROUP BY cor0.col0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 13 FROM tab1 GROUP BY tab1.col0
----
13
13
13

query I rowsort
SELECT + 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT ALL + ( - cor0.col2 ) + + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3306
6162
7482

query I rowsort
SELECT + + 41 FROM tab2 GROUP BY tab2.col0
----
41
41
41

query I rowsort
SELECT - + 35 AS col1 FROM tab0 GROUP BY tab0.col2
----
-35
-35
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT - tab0.col2 + + tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1482
-600
-6320

query I rowsort
SELECT tab0.col2 * - col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT cor0.col1 + - cor0.col1 * 22 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1701
0

query I rowsort
SELECT DISTINCT 92 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3772
-5428
-5612

onlyif mysql # DIV for integer division: 
query I rowsort label-7890
SELECT ALL cor0.col2 DIV + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7890
SELECT ALL cor0.col2 / + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col0, cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 83 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-83

query I rowsort
SELECT + 27 AS col0 FROM tab1 GROUP BY tab1.col1
----
27
27
27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7893
SELECT DISTINCT - tab0.col0 + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7893
SELECT DISTINCT - tab0.col0 + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL - - tab0.col2 + 12 FROM tab0 GROUP BY tab0.col2
----
36
50
91

query I rowsort
SELECT ALL col2 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT - + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-7898
SELECT DISTINCT tab1.col1 + - tab1.col1 DIV + 21 col1 FROM tab1 GROUP BY col1
----
42
55
6

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7898
SELECT DISTINCT tab1.col1 + - tab1.col1 / + 21 col1 FROM tab1 GROUP BY col1
----
42
55
6

query I rowsort
SELECT + tab0.col1 - - 27 * tab0.col1 FROM tab0 GROUP BY col1
----
0
2268

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 64 * - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1408
1792
5248

query I rowsort
SELECT + tab2.col2 + - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7902
SELECT + 54 DIV tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
1
6

skipif mysql # not compatible
query I rowsort label-7902
SELECT + 54 / tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
1
6

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-7905
SELECT + - tab2.col2 DIV tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7905
SELECT + - tab2.col2 / tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT - - 96 AS col0 FROM tab2 GROUP BY tab2.col0
----
96
96
96

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT + - col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 4 FROM tab0 GROUP BY tab0.col2
----
4

query I rowsort
SELECT DISTINCT - + 39 FROM tab2 GROUP BY tab2.col2
----
-39

query I rowsort
SELECT ALL + 12 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
12
12
12

query I rowsort
SELECT - 37 AS col1 FROM tab0 GROUP BY tab0.col2
----
-37
-37
-37

query I rowsort
SELECT + 58 FROM tab0 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
43

query I rowsort
SELECT + tab1.col1 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - - tab1.col0 * 33 - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
2624
704
896

query I rowsort
SELECT ALL 56 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
138
78
84

query I rowsort
SELECT - tab0.col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + + 29 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
120
121
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 46 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
46

query I rowsort
SELECT DISTINCT - 10 AS col1 FROM tab0 GROUP BY tab0.col2
----
-10

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7924
SELECT + cor0.col2 + - CAST( NULL AS SIGNED ) * 33 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7924
SELECT + cor0.col2 + - CAST ( NULL AS INTEGER ) * 33 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-7925
SELECT tab1.col1 DIV 69 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7925
SELECT tab1.col1 / 69 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT cor0.col1 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
14

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
41
59
61

query I rowsort
SELECT - + ( 10 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-10
-10
-10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7929
SELECT DISTINCT - tab2.col2 / + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7929
SELECT DISTINCT - tab2.col2 / + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT DISTINCT 39 FROM tab0 GROUP BY col1
----
39

query I rowsort
SELECT DISTINCT - 3 FROM tab1 GROUP BY tab1.col1
----
-3

query I rowsort
SELECT - - 51 FROM tab1 GROUP BY tab1.col2
----
51
51
51

query I rowsort
SELECT ALL 92 FROM tab1 GROUP BY tab1.col2
----
92
92
92

query I rowsort
SELECT cor0.col1 + + 18 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
18
18
99

onlyif mysql # DIV for integer division: 
query I rowsort label-7935
SELECT ALL - 6 DIV 21 - + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-24
-38
-79

skipif mysql # not compatible
query I rowsort label-7935
SELECT ALL - 6 / 21 - + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-24
-38
-79

query I rowsort
SELECT - + 85 + 4 FROM tab0 GROUP BY tab0.col0
----
-81
-81
-81

query I rowsort
SELECT cor0.col2 + cor0.col2 * 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2842
3871
4263

query I rowsort
SELECT ALL 73 * - ( tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-2993
-4307
-4453

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + + COALESCE ( + 62, col2, 94, - 39 * tab2.col0 ) FROM tab2 GROUP BY tab2.col1
----
62
62
62

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT DISTINCT + 99 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99

query I rowsort
SELECT col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT DISTINCT + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL 38 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
119
38

query I rowsort
SELECT ALL - cor0.col1 - - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT col2 + col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1482
600
6320

query I rowsort
SELECT DISTINCT + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 58 FROM tab0 GROUP BY tab0.col2
----
58
58
58

query I rowsort
SELECT 76 - + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-16
61

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
57

query I rowsort
SELECT DISTINCT - col0 * tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-240
-8372
-8556

query I rowsort
SELECT ALL + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + ( tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 81 * + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
4698
6399
7047

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + tab2.col1 col0 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) IS NOT NULL
----
118
122
82

query I rowsort
SELECT - 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 + 52 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT ALL - 74 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-165
-166
-89

query I rowsort
SELECT DISTINCT + ( - 92 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-92

query I rowsort
SELECT DISTINCT - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 3 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + 1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT col1 * + 30 + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1271
1829
1891

query I rowsort
SELECT DISTINCT - 15 * - 13 FROM tab1 GROUP BY tab1.col2
----
195

onlyif mysql # DIV for integer division: 
query I rowsort label-7969
SELECT + tab2.col0 DIV tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7969
SELECT + tab2.col0 / tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab0 GROUP BY tab0.col0
----
-24

query I rowsort
SELECT DISTINCT + 80 AS col0 FROM tab0 GROUP BY tab0.col0
----
80

query I rowsort
SELECT ALL - + 49 FROM tab0 GROUP BY tab0.col1
----
-49
-49

query I rowsort
SELECT DISTINCT + col2 * - 31 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1395
-2201
-248

query I rowsort
SELECT DISTINCT COALESCE ( - 80, - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-80

query I rowsort
SELECT + - 78 FROM tab0 GROUP BY tab0.col1
----
-78
-78

query I rowsort
SELECT ALL 79 FROM tab0 GROUP BY tab0.col2
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-7978
SELECT + tab2.col0 + tab2.col0 DIV - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
14
90
91

skipif mysql # not compatible
query I rowsort label-7978
SELECT + tab2.col0 + tab2.col0 / - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
14
90
91

query I rowsort
SELECT DISTINCT + 90 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY col0
----
2340
3870
7470

query I rowsort
SELECT ALL - - col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - ( - cor0.col2 ) * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + 93 AS col2 FROM tab2 GROUP BY tab2.col2
----
93
93
93

query I rowsort
SELECT + + 80 FROM tab1 GROUP BY tab1.col2
----
80
80
80

query I rowsort
SELECT - 9 - + 86 FROM tab1 GROUP BY tab1.col2
----
-95
-95
-95

query I rowsort
SELECT DISTINCT tab1.col2 * + col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-15
-91
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7987
SELECT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7987
SELECT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 7 FROM tab0 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT + + 99 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
180
99

query I rowsort
SELECT - tab1.col1 * col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT DISTINCT - 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-87

query I rowsort
SELECT ALL + 58 FROM tab0 cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT ALL + 43 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2494
3397
3741

query I rowsort
SELECT ALL + 55 * - tab2.col0 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-5096
-5152
-840

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT 55 * col1 + - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
2214
3186
3294

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-7998
SELECT tab2.col1 DIV 72 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7998
SELECT tab2.col1 / 72 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-8001
SELECT ALL - col2 DIV tab2.col2 + + col2 FROM tab2 GROUP BY tab2.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-8001
SELECT ALL - col2 / tab2.col2 + + col2 FROM tab2 GROUP BY tab2.col2
----
57
78
86

query I rowsort
SELECT ALL tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col1 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT - 75 FROM tab0 GROUP BY col1
----
-75
-75

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col1, cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8007
SELECT CAST( NULL AS SIGNED ) * + 35 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8007
SELECT CAST ( NULL AS INTEGER ) * + 35 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 14 FROM tab0 GROUP BY col2
----
14

query I rowsort
SELECT - 33 AS col0 FROM tab0 GROUP BY tab0.col1
----
-33
-33

query I rowsort
SELECT - cor0.col0 + - cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-506
-6806
-812

query I rowsort
SELECT DISTINCT + 48 * - col0 + + col0 FROM tab2 GROUP BY tab2.col0
----
-4277
-4324
-705

query I rowsort
SELECT DISTINCT - tab1.col0 * + col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 88 FROM tab0 GROUP BY tab0.col1
----
88

query I rowsort
SELECT cor0.col2 + + cor0.col2 * - 61 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1440
-2280
-4740

query I rowsort
SELECT DISTINCT + tab0.col2 * + ( 28 ) FROM tab0 GROUP BY tab0.col2
----
1064
2212
672

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT + tab1.col0 * - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT tab2.col1 * + 99 FROM tab2 GROUP BY col1
----
4059
5841
6039

query I rowsort
SELECT ALL + 2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2
2
2

query I rowsort
SELECT - tab2.col0 + tab2.col0 FROM tab2 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 * + tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT 97 AS col1 FROM tab0 GROUP BY tab0.col0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col0 FROM tab0 GROUP BY tab0.col0
----
14
14
14

query I rowsort
SELECT - 69 AS col2 FROM tab1 GROUP BY tab1.col0
----
-69
-69
-69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8025
SELECT ALL + CAST( - 89 AS SIGNED ) col2 FROM tab2 GROUP BY tab2.col2
----
-89
-89
-89

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8025
SELECT ALL + CAST ( - 89 AS INTEGER ) col2 FROM tab2 GROUP BY tab2.col2
----
-89
-89
-89

onlyif mysql # DIV for integer division: 
query I rowsort label-8026
SELECT DISTINCT - - 55 DIV - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif mysql # not compatible
query I rowsort label-8026
SELECT DISTINCT - - 55 / - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col2 * COALESCE ( - 40, cor0.col1 * - ( cor0.col2 ) ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2320
-3160
-3480

query I rowsort
SELECT 44 AS col0 FROM tab1 GROUP BY col1
----
44
44
44

query I rowsort
SELECT ALL NULLIF ( - 26, - tab2.col2 ) + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
32
53
61

query I rowsort
SELECT ALL 24 FROM tab0 GROUP BY tab0.col1
----
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 59 col2 FROM tab1 GROUP BY tab1.col1
----
-59
-59
-59

query I rowsort
SELECT ALL + 55 FROM tab1 GROUP BY tab1.col0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + - 46 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2024
-2622
-276

query I rowsort
SELECT ALL + 88 FROM tab2 GROUP BY tab2.col1
----
88
88
88

query I rowsort
SELECT ALL - 22 FROM tab0 GROUP BY tab0.col1
----
-22
-22

query I rowsort
SELECT - - 6 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
6
6
6

query I rowsort
SELECT DISTINCT + 65 FROM tab1 GROUP BY tab1.col1
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 15 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
615
885
915

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - ( 61 ) FROM tab2 GROUP BY tab2.col2
----
-61

query I rowsort
SELECT ALL - 82 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-82
-82

query I rowsort
SELECT 73 AS col0 FROM tab1 GROUP BY tab1.col0
----
73
73
73

query I rowsort
SELECT + + 78 FROM tab1 GROUP BY tab1.col0
----
78
78
78

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
73

query I rowsort
SELECT 79 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1738
2212
6478

query I rowsort
SELECT DISTINCT - 74 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-74

query I rowsort
SELECT 72 + - 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT + ( + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + + tab0.col1 + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8052
SELECT + tab0.col2 + + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8052
SELECT + tab0.col2 + + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT col1 - ( + col0 + cor0.col1 ) FROM tab2 cor0 GROUP BY col0, col1
----
-15
-91
-92

query I rowsort
SELECT 6 FROM tab2 cor0 GROUP BY cor0.col0, col0, cor0.col2
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-8055
SELECT 49 DIV - 54 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8055
SELECT 49 / - 54 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + COALESCE ( 67, + 32, tab1.col0 ) + 68 col1 FROM tab1 GROUP BY tab1.col0
----
135

query I rowsort
SELECT 23 FROM tab0 AS cor0 GROUP BY cor0.col1
----
23
23

query I rowsort
SELECT 69 FROM tab0 GROUP BY tab0.col0
----
69
69
69

query I rowsort
SELECT - 71 + - 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-151
-151
-151

query I rowsort
SELECT DISTINCT - 18 AS col2 FROM tab2 GROUP BY col0
----
-18

query I rowsort
SELECT + + 93 AS col1 FROM tab2 GROUP BY tab2.col2
----
93
93
93

query I rowsort
SELECT DISTINCT - tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT DISTINCT - col2 + 91 FROM tab1 GROUP BY tab1.col2
----
20
46
83

query I rowsort
SELECT 53 + + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
134
53

query I rowsort
SELECT tab2.col2 * 87 AS col2 FROM tab2 GROUP BY tab2.col2
----
5046
6873
7569

query I rowsort
SELECT ALL tab0.col1 + 99 AS col0 FROM tab0 GROUP BY tab0.col1
----
180
99

query I rowsort
SELECT DISTINCT tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-88
-88

query I rowsort
SELECT - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING ( NULL ) NOT IN ( col2 + - tab0.col2 )
----

query I rowsort
SELECT - + tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT 59 FROM tab0 AS cor0 GROUP BY cor0.col1
----
59
59

query I rowsort
SELECT ALL + 69 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col1 * tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL + - tab0.col0 * - col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT - tab2.col1 * tab2.col1 + - 78 FROM tab2 GROUP BY tab2.col1
----
-1759
-3559
-3799

query I rowsort
SELECT - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT ALL col0 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT NULLIF ( - 76, col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT DISTINCT + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab2.col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT - tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + tab0.col1 + + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 5 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT DISTINCT - - 18 FROM tab0 GROUP BY tab0.col1
----
18

query I rowsort
SELECT ALL 50 FROM tab2 GROUP BY tab2.col0
----
50
50
50

query I rowsort
SELECT ALL + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + 85 FROM tab2 GROUP BY tab2.col2
----
85
85
85

query I rowsort
SELECT + - 91 FROM tab1 GROUP BY tab1.col0
----
-91
-91
-91

query I rowsort
SELECT cor0.col2 + 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
109
117
88

query I rowsort
SELECT + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 94 AS col0 FROM tab1 GROUP BY tab1.col2
----
94
94
94

query I rowsort
SELECT + 17 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1003
-1037
-697

query I rowsort
SELECT cor0.col0 * + 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1804
484
616

query I rowsort
SELECT ALL + 62 FROM tab1 GROUP BY tab1.col0
----
62
62
62

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 ALL - 40 FROM tab1 GROUP BY tab1.col2
----
-40
-40
-40

query I rowsort
SELECT ALL - 6 AS col2 FROM tab2 GROUP BY tab2.col1
----
-6
-6
-6

query I rowsort
SELECT DISTINCT + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT - 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-6
-6
-6

query I rowsort
SELECT ALL - col1 + 95 FROM tab1 AS cor0 GROUP BY cor0.col1
----
38
51
89

query I rowsort
SELECT DISTINCT 66 AS col1 FROM tab2 GROUP BY tab2.col1
----
66

query I rowsort
SELECT DISTINCT - ( tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + - 32 AS col0 FROM tab1 GROUP BY tab1.col1
----
-32
-32
-32

query I rowsort
SELECT ALL - - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 53 FROM tab0 GROUP BY tab0.col0
----
53

query I rowsort
SELECT ALL - + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-26
-43
-83

query I rowsort
SELECT 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT ALL - 10 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-240
-380
-790

query I rowsort
SELECT ALL 64 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
64
64
64

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 84 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-84
-84
-84

query I rowsort
SELECT DISTINCT - - tab0.col2 * + tab0.col2 + tab0.col2 * 84 FROM tab0 GROUP BY tab0.col2
----
12877
2592
4636

query I rowsort
SELECT 51 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1326
2193
4233

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL tab2.col2 * + ( - 52 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-3016
-4108
-4524

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, col0
----
44
57
6

query I rowsort
SELECT tab1.col2 * - 79 AS col0 FROM tab1 GROUP BY tab1.col2
----
-3555
-5609
-632

query I rowsort
SELECT ALL - 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-55
-55
-55

query I rowsort
SELECT DISTINCT 64 FROM tab1 AS cor0 GROUP BY cor0.col0
----
64

query I rowsort
SELECT ALL tab2.col2 + - 24 FROM tab2 GROUP BY col2
----
34
55
63

query I rowsort
SELECT ALL - 75 AS col2 FROM tab0 GROUP BY col0
----
-75
-75
-75

query I rowsort
SELECT ALL + 11 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
11
11
11

query I rowsort
SELECT ALL - 13 * col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-616
-798
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + - tab1.col0 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-8132
SELECT - 70 DIV - 21 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-8132
SELECT - 70 / - 21 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT ALL 91 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
91
91
91

query I rowsort
SELECT DISTINCT 49 * 73 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
3577

query I rowsort
SELECT DISTINCT 99 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
99

query I rowsort
SELECT 60 * + 61 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3660
3660
3660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + - 42 col2 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
-34
29
3

query I rowsort
SELECT DISTINCT + 17 FROM tab0 GROUP BY tab0.col1
----
17

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT + - col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - 80 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1920
3040
6320

query I rowsort
SELECT 36 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-45
36

query I rowsort
SELECT ALL cor0.col1 * 65 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2860
3705
390

query I rowsort
SELECT - 42 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT ALL + 17 FROM tab2 GROUP BY tab2.col0
----
17
17
17

query I rowsort
SELECT + cor0.col2 + - 96 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-58
-72

query I rowsort
SELECT - - 13 AS col0 FROM tab0 GROUP BY tab0.col2
----
13
13
13

query I rowsort
SELECT + + 55 AS col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
55
55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8151
SELECT DISTINCT + tab2.col1 / CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8151
SELECT DISTINCT + tab2.col1 / CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab1.col1 + + tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT - - 15 AS col2 FROM tab1 GROUP BY tab1.col1
----
15
15
15

onlyif mysql # DIV for integer division: 
query I rowsort label-8154
SELECT ALL cor0.col1 + + cor0.col1 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-8154
SELECT ALL cor0.col1 + + cor0.col1 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

query I rowsort
SELECT - + tab1.col2 * + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
93

query I rowsort
SELECT ALL + 7 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT - 26 FROM tab2 AS cor0 GROUP BY col1
----
-26
-26
-26

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * tab1.col2 col1 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NOT NULL
----
2025
5041
64

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) > NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-8165
SELECT - tab1.col1 DIV - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8165
SELECT - tab1.col1 / - tab1.col1 col0 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT ALL - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - cor0.col1 + cor1.col0 * cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1, cor1.col0
----
9 values hashing to 18fa97be934af9ec64ecb55719ca883d

query I rowsort
SELECT DISTINCT - col1 * 5 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-405
0

query I rowsort
SELECT + 93 FROM tab1 GROUP BY tab1.col0
----
93
93
93

query I rowsort
SELECT ALL + - 32 AS col2 FROM tab0 GROUP BY tab0.col2
----
-32
-32
-32

query I rowsort
SELECT DISTINCT + 45 AS col2 FROM tab0 GROUP BY tab0.col1
----
45

query I rowsort
SELECT tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - 4 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-4

query I rowsort
SELECT DISTINCT 31 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
72
90
92

query I rowsort
SELECT DISTINCT - 76 FROM tab1 GROUP BY tab1.col2
----
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-8176
SELECT + + COALESCE ( - 51, col2 * - col0 ) DIV + 84 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8176
SELECT + + COALESCE ( - 51, col2 * - col0 ) / + 84 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT 34 AS col2 FROM tab2 GROUP BY tab2.col1
----
34
34
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8178
SELECT ALL + cor0.col2 + + CAST( NULL AS SIGNED ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8178
SELECT ALL + cor0.col2 + + CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 + col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-1980
-4970
-56

query I rowsort
SELECT + + ( + 6 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-8181
SELECT ALL + + tab1.col2 DIV - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8181
SELECT ALL + + tab1.col2 / - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

query I rowsort
SELECT - NULLIF ( - tab2.col2, 82 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 43 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-40
0
17

query I rowsort
SELECT ALL - - tab0.col1 + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT 50 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
108
129
137

query I rowsort
SELECT - - 60 AS col0 FROM tab1 GROUP BY tab1.col1
----
60
60
60

query I rowsort
SELECT 70 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
128
149
157

query I rowsort
SELECT DISTINCT - tab2.col0 * + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT 88 FROM tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col0 col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8191
SELECT - - tab2.col1 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8191
SELECT - - tab2.col1 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8192
SELECT - CAST( NULL AS SIGNED ) * 57 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8192
SELECT - CAST ( NULL AS INTEGER ) * 57 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - tab2.col0 * - 91 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1380
8372
8464

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8194
SELECT CAST( NULL AS SIGNED ) col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8194
SELECT CAST ( NULL AS INTEGER ) col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-54
-54
-54

query I rowsort
SELECT ALL + + tab1.col1 * 59 FROM tab1 GROUP BY tab1.col1
----
2596
3363
354

query I rowsort
SELECT - 79 AS col2 FROM tab1 GROUP BY tab1.col2
----
-79
-79
-79

query I rowsort
SELECT 77 AS col2 FROM tab2 GROUP BY tab2.col0
----
77
77
77

query I rowsort
SELECT - - 97 * ( tab0.col2 * tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
140068
55872
605377

query I rowsort
SELECT - - 74 AS col2 FROM tab2 GROUP BY tab2.col0
----
74
74
74

query I rowsort
SELECT tab2.col2 * - tab2.col2 + ( + 73 ) FROM tab2 GROUP BY tab2.col2
----
-3291
-6168
-7496

query I rowsort
SELECT tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL 23 * - 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-138
-138
-138

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT DISTINCT tab0.col0 * + 20 AS col0 FROM tab0 GROUP BY tab0.col0
----
1660
520
860

query I rowsort
SELECT + + 15 * tab0.col0 FROM tab0 GROUP BY col0
----
1245
390
645

query I rowsort
SELECT + 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT ALL ( 18 ) FROM tab1 cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT + cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT tab0.col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT ALL + - 73 FROM tab0 GROUP BY tab0.col1
----
-73
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 32 col2 FROM tab1 GROUP BY tab1.col2
----
-32
-32
-32

query I rowsort
SELECT cor0.col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
158
48
76

query I rowsort
SELECT + + tab2.col1 * 96 AS col0 FROM tab2 GROUP BY tab2.col1
----
3936
5664
5856

query I rowsort
SELECT ALL 23 FROM tab0 GROUP BY tab0.col0
----
23
23
23

query I rowsort
SELECT + 67 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col2
----
-38
-38
-38

query I rowsort
SELECT DISTINCT + - tab1.col0 + + col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
462
6642
756

query I rowsort
SELECT + 79 + - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
18
20
38

query I rowsort
SELECT - 34 FROM tab2 GROUP BY tab2.col2
----
-34
-34
-34

query I rowsort
SELECT ( 96 ) FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
96
96
96

query I rowsort
SELECT + - 88 AS col2 FROM tab2 GROUP BY tab2.col1
----
-88
-88
-88

query I rowsort
SELECT 37 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
37
37
37

query I rowsort
SELECT DISTINCT + 76 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
76

query I rowsort
SELECT ALL NULLIF ( tab1.col0, col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 42 FROM tab1 GROUP BY tab1.col0
----
42
42
42

query I rowsort
SELECT ALL - 94 FROM tab2 GROUP BY tab2.col2
----
-94
-94
-94

query I rowsort
SELECT + 78 AS col1 FROM tab2 GROUP BY tab2.col0
----
78
78
78

query I rowsort
SELECT ALL - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT 37 AS col1 FROM tab2 GROUP BY tab2.col2
----
37
37
37

query I rowsort
SELECT DISTINCT - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT DISTINCT 45 + - 49 AS col0 FROM tab1 GROUP BY tab1.col1
----
-4

query I rowsort
SELECT ALL - ( - col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - 28 AS col0 FROM tab2 GROUP BY tab2.col2
----
-28
-28
-28

query I rowsort
SELECT DISTINCT + ( tab0.col2 ) - 70 FROM tab0 GROUP BY col2
----
-32
-46
9

query I rowsort
SELECT DISTINCT + cor0.col1 + - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - cor0.col2 - 97 * 14 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-1366
-1403
-1429

query I rowsort
SELECT DISTINCT tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL - + 76 * 16 AS col2 FROM tab1 GROUP BY tab1.col1
----
-1216
-1216
-1216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 96 col0 FROM tab2 GROUP BY tab2.col0
----
-96
-96
-96

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 72, - tab2.col1 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-72
-72
-72

query I rowsort
SELECT 35 AS col2 FROM tab2 GROUP BY tab2.col2
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-8247
SELECT + tab2.col2 DIV - 9 AS col0 FROM tab2 GROUP BY tab2.col2
----
-6
-8
-9

skipif mysql # not compatible
query I rowsort label-8247
SELECT + tab2.col2 / - 9 AS col0 FROM tab2 GROUP BY tab2.col2
----
-6
-8
-9

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8248
SELECT - CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8248
SELECT - CAST ( NULL AS REAL ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 74 col0 FROM tab0 AS cor0 GROUP BY col0
----
-74

query I rowsort
SELECT - tab0.col1 FROM tab0 WHERE col2 IN ( + tab0.col0 * + col0 ) GROUP BY tab0.col1
----

query I rowsort
SELECT ALL + tab1.col2 AS col0 FROM tab1 WHERE NOT - tab1.col1 / + tab1.col2 IS NULL GROUP BY col2
----
45
71
8

query I rowsort
SELECT tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL <= ( NULL )
----

query I rowsort
SELECT 86 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
101
177
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 69 FROM tab2 GROUP BY tab2.col2
----
69
69
69

query I rowsort
SELECT DISTINCT + 36 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
36

query I rowsort
SELECT - cor0.col1 * - cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6480

query I rowsort
SELECT ALL 3 FROM tab2 GROUP BY tab2.col2
----
3
3
3

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-8260
SELECT ALL tab2.col1 DIV - 39 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8260
SELECT ALL tab2.col1 / - 39 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1
-1
-1

query I rowsort
SELECT + + tab2.col1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT COALESCE ( + cor0.col0, cor0.col0 ) * - 91 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2366
-3913
-7553

query I rowsort
SELECT + 50 AS col1 FROM tab0 GROUP BY col0
----
50
50
50

query I rowsort
SELECT ALL + cor0.col0 + + 56 FROM tab0 AS cor0 GROUP BY cor0.col0
----
139
82
99

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col0 + - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-38
26
83

query I rowsort
SELECT DISTINCT - + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - + 10 FROM tab1 GROUP BY tab1.col0
----
-10
-10
-10

query I rowsort
SELECT + 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT - tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + - tab1.col1 * + tab1.col1 - - 36 FROM tab1 GROUP BY tab1.col1
----
-1900
-3213
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8272
SELECT cor0.col0 DIV - 8 FROM tab1 AS cor0 GROUP BY col0
----
-10
-2
-3

skipif mysql # not compatible
query I rowsort label-8272
SELECT cor0.col0 / - 8 FROM tab1 AS cor0 GROUP BY col0
----
-10
-2
-3

query I rowsort
SELECT - 43 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-19
-5
36

query I rowsort
SELECT DISTINCT - - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT col1 * + col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + 83 FROM tab1 GROUP BY tab1.col0
----
83
83
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8279
SELECT - CAST( - 13 AS SIGNED ) + 33 col0 FROM tab0 AS cor0 GROUP BY col1
----
46
46

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8279
SELECT - CAST ( - 13 AS INTEGER ) + 33 col0 FROM tab0 AS cor0 GROUP BY col1
----
46
46

query I rowsort
SELECT ALL - 38 FROM tab0 GROUP BY tab0.col0
----
-38
-38
-38

onlyif mysql # DIV for integer division: 
query I rowsort label-8281
SELECT DISTINCT + cor0.col0 DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-8281
SELECT DISTINCT + cor0.col0 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1

query I rowsort
SELECT 39 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
39
39
39

query I rowsort
SELECT DISTINCT + tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 79 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-79

query I rowsort
SELECT ALL - 65 FROM tab0 GROUP BY tab0.col2
----
-65
-65
-65

query I rowsort
SELECT - 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT ALL - 50 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-50
-50
-50

query I rowsort
SELECT - + NULLIF ( tab2.col2, ( tab2.col2 ) ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + 27 + + 22 AS col1 FROM tab0 GROUP BY tab0.col2
----
49
49
49

query I rowsort
SELECT + 43 FROM tab1 GROUP BY tab1.col1
----
43
43
43

query I rowsort
SELECT DISTINCT - + 27 AS col2 FROM tab2 GROUP BY tab2.col1
----
-27

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL <= NULL
----

query I rowsort
SELECT ALL 13 FROM tab0 GROUP BY tab0.col2
----
13
13
13

query I rowsort
SELECT + + tab1.col0 * + 81 AS col1 FROM tab1 GROUP BY col0
----
1782
2268
6642

query I rowsort
SELECT - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8298
SELECT - cor0.col0 DIV cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8298
SELECT - cor0.col0 / cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-1
-1
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8299
SELECT cor0.col0 + - cor0.col2 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8299
SELECT cor0.col0 + - cor0.col2 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab2.col2 * 69 AS col0 FROM tab2 GROUP BY tab2.col2
----
-4002
-5451
-6003

query I rowsort
SELECT ALL - 91 FROM tab1 GROUP BY col2
----
-91
-91
-91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8302
SELECT DISTINCT + CAST( - ( - tab1.col1 ) AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-8302
SELECT DISTINCT + CAST ( - ( - tab1.col1 ) AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL + 38 FROM tab1 GROUP BY tab1.col1
----
38
38
38

query I rowsort
SELECT ALL + - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - tab2.col0 * - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col1 * col1 AS col1 FROM