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 - 31 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-31
-31
-31

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

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

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

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

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

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 13 + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
37
51
92

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

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

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NULL
----
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 cor0.col2 + - 89 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-10
-2
-31

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

query I rowsort
SELECT ALL + 91 + ( - cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
12
33
4

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

query I rowsort
SELECT DISTINCT + tab0.col2 * + tab0.col2 - + COALESCE ( + 64, col2 ) AS col0 FROM tab0 GROUP BY col2
----
1380
512
6177

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

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

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

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-32
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col2, cor1.col1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-32
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col2, cor1.col1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-37
SELECT 12 DIV 68 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-37
SELECT 12 / 68 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT 59 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3422
4661
5133

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

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

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

query I rowsort
SELECT ALL 44 * + 98 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
4312
4312
4312

query I rowsort
SELECT 51 * col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2958
4029
4437

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

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

query I rowsort
SELECT DISTINCT - tab0.col0 * 70 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1794
-2967
-5727

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + - 65 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-37
-43
17

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

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

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

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

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

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

query I rowsort
SELECT ALL - - 39 + - tab1.col1 FROM tab1 GROUP BY col1
----
-18
-5
33

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

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

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

query I rowsort
SELECT DISTINCT 92 - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
13
54
68

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

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

query I rowsort
SELECT 44 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
102
123
131

query I rowsort
SELECT - cor0.col2 * 31 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1395
-2201
-248

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

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

query I rowsort
SELECT + 90 - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
29
31
49

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-83
SELECT 87 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
2

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 41 * 15 + + 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
616
616
616

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-100
SELECT DISTINCT - NULLIF ( cor0.col1, + CAST( NULL AS SIGNED ) ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-100
SELECT DISTINCT - NULLIF ( cor0.col1, + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

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

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

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

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

query I rowsort
SELECT - + 92 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
4140
6532
736

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col0 FROM tab2 GROUP BY col0 HAVING NOT ( NULL ) IS NULL OR NOT ( NULL ) IS NULL
----

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - tab0.col0 * + 91 + + 85 * 67 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1858
1782
3329

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * - 21 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1911
-1932
-315

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

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

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

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

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

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

query I rowsort
SELECT 61 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2684
3477
366

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

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

query I rowsort
SELECT DISTINCT - ( 41 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-41

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

query I rowsort
SELECT 75 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

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

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

query I rowsort
SELECT ALL cor0.col1 * 89 + + 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
7303
94
94

query I rowsort
SELECT DISTINCT + - 67 + - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-112
-138
-75

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 * - 11 col2 FROM tab1 GROUP BY col1
----
-484
-627
-66

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

onlyif mysql # DIV for integer division: 
query I rowsort label-141
SELECT + 56 + 41 DIV + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
56
56
56

skipif mysql # not compatible
query I rowsort label-141
SELECT + 56 + 41 / + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
56
56
56

query I rowsort
SELECT DISTINCT + 35 + 33 FROM tab1 AS cor0 GROUP BY col0, col1
----
68

query I rowsort
SELECT ALL + tab1.col1 * 35 FROM tab1 GROUP BY tab1.col1
----
1540
1995
210

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT tab2.col1 + COALESCE ( 82 + 87, - tab2.col2 * - tab2.col2, 74, + tab2.col2 + + tab2.col0 * tab2.col2 ) AS col1 FROM tab2 GROUP BY col1
----
210
228
230

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

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

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

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

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

query I rowsort
SELECT 1 + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
59
80
88

query I rowsort
SELECT + 52 * + cor0.col1 - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
2040
2977
3157

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

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

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

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

query I rowsort
SELECT + tab1.col1 - 96 AS col0 FROM tab1 GROUP BY tab1.col1
----
-39
-52
-90

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

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

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

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

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

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

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

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

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

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 + cor0.col0 * 33 + + 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1479
2799
918

query I rowsort
SELECT ALL + 98 + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
104
142
155

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-173
SELECT DISTINCT + 90 DIV 72 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-173
SELECT DISTINCT + 90 / 72 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT 76 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
100
114
155

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

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

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

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

query I rowsort
SELECT + 51 * col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
2958
4029
4437

query I rowsort
SELECT ALL 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 17 + - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-64
17

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

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

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

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

query I rowsort
SELECT + - 83 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-109
-126
-166

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col0 + 13 FROM tab2 AS cor0 GROUP BY cor0.col0
----
104
105
28

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

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

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

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 + 31 col1 FROM tab1 GROUP BY tab1.col1
----
31
31
31

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

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

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

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

query I rowsort
SELECT ALL + - 12 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-264
-336
-984

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

onlyif mysql # DIV for integer division: 
query I rowsort label-202
SELECT ALL 16 DIV - 52 col2 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-202
SELECT ALL 16 / - 52 col2 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-203
SELECT 24 - cor0.col2 DIV + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
23
23
23

skipif mysql # not compatible
query I rowsort label-203
SELECT 24 - cor0.col2 / + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT - 70 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1820
-3010
-5810

query I rowsort
SELECT - - ( - 50 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
-50
-50
-50

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

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

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

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

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

query I rowsort
SELECT - tab2.col1 - 42 AS col1 FROM tab2 GROUP BY tab2.col1
----
-101
-103
-83

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-218
SELECT DISTINCT col1 DIV col2 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-21
-38
-79

skipif mysql # not compatible
query I rowsort label-218
SELECT DISTINCT col1 / col2 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-21
-38
-79

query I rowsort
SELECT DISTINCT + tab2.col1 * 96 AS col2 FROM tab2 GROUP BY tab2.col1
----
3936
5664
5856

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

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

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

query I rowsort
SELECT - 78 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1716
-2184
-6396

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

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

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

query I rowsort
SELECT - 26 * + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-2132
-572
-728

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

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

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

query I rowsort
SELECT DISTINCT - 89 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-130
-148
-150

query I rowsort
SELECT ALL 36 + + 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
135
135
135

query I rowsort
SELECT ALL + tab0.col2 * + ( 58 ) FROM tab0 GROUP BY col2
----
1392
2204
4582

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

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

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

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

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

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

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

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

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 tab0.col1 - - 62 FROM tab0 GROUP BY tab0.col1
----
143
62

query I rowsort
SELECT + col0 + 48 FROM tab2 GROUP BY tab2.col0
----
139
140
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 col1 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL <> NULL
----

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-254
SELECT - cor0.col0 DIV - 3 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
27
7
9

skipif mysql # not compatible
query I rowsort label-254
SELECT - cor0.col0 / - 3 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
27
7
9

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

query I rowsort
SELECT + 96 - - 57 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
153
153
153

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

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

query I rowsort
SELECT - COALESCE ( - tab1.col0, + 65 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

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

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

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

query I rowsort
SELECT - 46 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2070
-3266
-368

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - - COALESCE ( + 40, tab1.col2 * + tab1.col1 ) + - CASE 38 WHEN tab1.col0 THEN NULL ELSE - 55 END FROM tab1 GROUP BY col0
----
95
95
95

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 11 * tab0.col0 col2 FROM tab0 GROUP BY col0
----
-286
-473
-913

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 - + 85 col0 FROM tab2 AS cor0 GROUP BY col1
----
-24
-26
-44

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - 87 + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-49
-63
-8

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

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

query I rowsort
SELECT 47 + + ( + col0 ) * + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
272
8328
8511

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-291
SELECT DISTINCT - - COALESCE ( 89, - tab1.col0 ) + CAST( col0 AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
111
117
171

skipif mysql # not compatible
query I rowsort label-291
SELECT DISTINCT - - COALESCE ( 89, - tab1.col0 ) + CAST ( col0 AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
111
117
171

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-294
SELECT - col0 + + col0 DIV 63 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-90
-91

skipif mysql # not compatible
query I rowsort label-294
SELECT - col0 + + col0 / 63 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-90
-91

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

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

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

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

query I rowsort
SELECT - cor0.col1 * cor0.col1 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1892
-30
-3192

query I rowsort
SELECT 61 * + 82 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
5002
5002
5002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - 72 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3168
-4104
-432

query I rowsort
SELECT DISTINCT cor0.col2 + - 81 FROM tab0 cor0 GROUP BY cor0.col2
----
-2
-43
-57

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

query I rowsort
SELECT + 95 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3895
5605
5795

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-317
SELECT ALL 66 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-317
SELECT ALL 66 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1
2

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

onlyif mysql # DIV for integer division: 
query I rowsort label-319
SELECT ALL + - tab2.col1 DIV + 82 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-319
SELECT ALL + - tab2.col1 / + 82 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL - + tab2.col0 * + 47 AS col0 FROM tab2 GROUP BY tab2.col0
----
-4277
-4324
-705

query I rowsort
SELECT ALL cor0.col1 * 33 FROM tab1 AS cor0 GROUP BY col1
----
1452
1881
198

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

onlyif mysql # DIV for integer division: 
query I rowsort label-323
SELECT + cor0.col0 - + cor0.col0 DIV cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
14
90
91

skipif mysql # not compatible
query I rowsort label-323
SELECT + cor0.col0 - + cor0.col0 / cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
14
90
91

query I rowsort
SELECT cor0.col2 * + 41 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1558
3239
984

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

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

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

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

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

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

query I rowsort
SELECT ALL - + 5 * col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-455
-460
-75

query I rowsort
SELECT 70 * col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
3080
3990
420

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

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col2 * 83 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
4814
6557
7221

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 26 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
2366
2392
390

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

query I rowsort
SELECT DISTINCT + cor0.col2 + + 27 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
106
114
85

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

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

query I rowsort
SELECT - 28 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-6
0
54

query I rowsort
SELECT + 4 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
364
368
60

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

query I rowsort
SELECT ALL + 25 * 1 AS col1 FROM tab0 GROUP BY tab0.col2
----
25
25
25

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

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

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

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

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

query I rowsort
SELECT + - 30 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-6
49
8

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * - 55 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2430
-3834
-432

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL col0 + 55 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
146
147
70

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

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

query I rowsort
SELECT 35 * 44 AS col2 FROM tab1 GROUP BY tab1.col2
----
1540
1540
1540

query I rowsort
SELECT + cor0.col0 * - NULLIF ( - cor0.col0 * 31, cor0.col1 - - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
20956
213559
57319

query I rowsort
SELECT DISTINCT cor0.col0 - 3 FROM tab2 AS cor0 GROUP BY col0
----
12
88
89

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

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

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

query I rowsort
SELECT DISTINCT - 29 + 33 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
2677
697
895

query I rowsort
SELECT + + 84 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1848
-2352
-6888

query I rowsort
SELECT DISTINCT + 43 * col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1032
1634
3397

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

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

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

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

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

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

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

query I rowsort
SELECT 79 + + 1 FROM tab2 GROUP BY tab2.col0
----
80
80
80

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-403
SELECT DISTINCT - cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 WHERE ( NULL ) IS NULL GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-403
SELECT DISTINCT - cor0.col2 / cor0.col2 FROM tab2 AS cor0 WHERE ( NULL ) IS NULL GROUP BY cor0.col2
----
-1

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - col0 * 15 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1230
-330
-420

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

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

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 94 + - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
15
56
70

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

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 ALL - + 44 * 69 + - 97 FROM tab2 GROUP BY tab2.col2
----
-3133
-3133
-3133

query I rowsort
SELECT ALL + tab1.col0 + - ( 54 ) FROM tab1 GROUP BY tab1.col0
----
-26
-32
28

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

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

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

query I rowsort
SELECT 69 + + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
160
161
84

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

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

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

query I rowsort
SELECT DISTINCT tab0.col0 + + 33 AS col2 FROM tab0 GROUP BY col0
----
116
59
76

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 + ( + cor0.col0 ) * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1352
13778
3698

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

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

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

query I rowsort
SELECT ALL + tab1.col1 * tab1.col1 + 27 FROM tab1 GROUP BY tab1.col1
----
1963
3276
63

query I rowsort
SELECT 32 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
38
76
89

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

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

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

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

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

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - tab0.col2 + COALESCE ( 88, - tab0.col1, tab0.col0 * + 13, + tab0.col2 ) AS col0 FROM tab0 GROUP BY col2
----
50
64
9

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

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

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

query I rowsort
SELECT 45 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
128
71
88

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-472
SELECT - - 0 / tab0.col2 FROM tab0 GROUP BY col2
----
0
0
0

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-480
SELECT DISTINCT 44 DIV - 68 + - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

skipif mysql # not compatible
query I rowsort label-480
SELECT DISTINCT 44 / - 68 + - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + tab1.col1 + 98 FROM tab1 GROUP BY tab1.col1
----
104
142
155

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

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

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

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

query I rowsort
SELECT ALL + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL NOT IN ( + tab1.col1 * - col1 )
----

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

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

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

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

query I rowsort
SELECT - tab1.col0 * - 84 + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1870
2380
6970

query I rowsort
SELECT + tab2.col0 * + tab2.col0 + 43 AS col0 FROM tab2 GROUP BY tab2.col0
----
268
8324
8507

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - cor0.col2 * + 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3770
-5135
-5655

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

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

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

query I rowsort
SELECT DISTINCT + + 72 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
130
151
159

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-522
SELECT ALL 6 / - 27 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

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

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

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

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

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

query I rowsort
SELECT cor0.col1 * - 7 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-308
-399
-42

query I rowsort
SELECT - cor0.col0 - - 51 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1100
1400
4100

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

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

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

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

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

query I rowsort
SELECT cor0.col0 * 44 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4004
4048
660

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 83 + + 51 FROM tab1 GROUP BY tab1.col1
----
134
134
134

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 28 * - 49 col1 FROM tab2 AS cor0 GROUP BY col0
----
-1372
-1372
-1372

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

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

query I rowsort
SELECT DISTINCT - 67 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1474
1876
5494

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-555
SELECT ALL + col1 + 89 DIV cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
46
58

skipif mysql # not compatible
query I rowsort label-555
SELECT ALL + col1 + 89 / cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
46
58

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - - 64 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1664
2752
5312

query I rowsort
SELECT DISTINCT + + ( 19 ) FROM tab2 GROUP BY tab2.col1
----
19

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

query I rowsort
SELECT + NULLIF ( 89, tab1.col2 ) FROM tab1 GROUP BY col2
----
89
89
89

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

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 * 54 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2430
-3834
-432

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

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

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

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

query I rowsort
SELECT DISTINCT tab0.col2 * 97 - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
2304
3648
7584

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

query I rowsort
SELECT DISTINCT - tab2.col0 * - 38 FROM tab2 GROUP BY tab2.col0
----
3458
3496
570

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

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

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

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

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

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

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

query I rowsort
SELECT + cor0.col0 * - 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1476
-396
-504

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - NULLIF ( cor0.col2, col1 ) + + 24 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-34
-55
-63

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

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

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

query I rowsort
SELECT 26 * 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1846
1846
1846

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

query I rowsort
SELECT + 99 + 79 * cor0.col2 FROM tab0 cor0 GROUP BY col2
----
1995
3101
6340

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * + 1 + 0 * + 3 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

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

query I rowsort
SELECT ALL - 23 + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-106
-49
-66

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

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

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

query I rowsort
SELECT 13 + col2 FROM tab1 GROUP BY tab1.col2
----
21
58
84

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

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

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

query I rowsort
SELECT DISTINCT tab0.col0 + 55 FROM tab0 GROUP BY tab0.col0
----
138
81
98

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-655
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-655
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT DISTINCT tab2.col0 * 30 - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
2639
2668
435

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

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NOT NULL
----
24
38
79

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-663
SELECT DISTINCT col0 - 23 DIV - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
23
28
82

skipif mysql # not compatible
query I rowsort label-663
SELECT DISTINCT col0 - 23 / - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
23
28
82

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-667
SELECT DISTINCT 71 DIV 54 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-667
SELECT DISTINCT 71 / 54 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

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

query I rowsort
SELECT - 67 * + cor0.col0 + 98 FROM tab0 cor0 GROUP BY cor0.col0
----
-1644
-2783
-5463

query I rowsort
SELECT cor0.col1 * + cor0.col2 + 49 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2427
4710
5356

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 * - 89 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5162
-7031
-7743

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 + + 97 * + 66 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
6426
6440
6481

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

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

query I rowsort
SELECT DISTINCT - - tab1.col0 - 54 AS col1 FROM tab1 GROUP BY tab1.col0
----
-26
-32
28

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

onlyif mysql # DIV for integer division: 
query I rowsort label-700
SELECT + 88 DIV cor0.col0 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
66

skipif mysql # not compatible
query I rowsort label-700
SELECT + 88 / cor0.col0 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
66

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

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

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

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

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

query I rowsort
SELECT + - COALESCE ( - 37, tab2.col0 + + 58, - tab2.col0 - + 74 ) FROM tab2 GROUP BY tab2.col0
----
37
37
37

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

query I rowsort
SELECT 81 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
125
138
87

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

query I rowsort
SELECT + + 96 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-2496
-4128
-7968

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-711
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-711
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY col1
----
NULL

query I rowsort
SELECT ALL 83 + 88 FROM tab1 GROUP BY col0
----
171
171
171

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-719
SELECT + 91 DIV - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-15
-2

skipif mysql # not compatible
query I rowsort label-719
SELECT + 91 / - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-15
-2

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 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 ALL - cor0.col1 * col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

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

query I rowsort
SELECT DISTINCT 32 + tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
257
8313
8496

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

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

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

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

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

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

query I rowsort
SELECT ALL + 49 + + col0 * col0 FROM tab2 GROUP BY tab2.col0
----
274
8330
8513

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-742
SELECT 90 / + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
1
11
2

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

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

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

query I rowsort
SELECT + - 6 * + 15 FROM tab0 GROUP BY tab0.col0
----
-90
-90
-90

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 + - 78 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1759
-3559
-3799

query I rowsort
SELECT ALL cor0.col1 + - NULLIF ( cor0.col1 - 60, + cor0.col1 / 66 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT cor0.col1 + cor0.col1 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
3540
3782

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

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

query I rowsort
SELECT cor0.col0 + 79 FROM tab2 AS cor0 GROUP BY cor0.col0
----
170
171
94

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - + 80 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-125
-151
-88

query I rowsort
SELECT 15 * - tab0.col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1162
-364
-602

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 60 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
3480
4740
5220

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * + 37 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1634
3154
988

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 20 * - col2 col2 FROM tab2 GROUP BY tab2.col2
----
1160
1580
1740

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

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

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

query I rowsort
SELECT - 96 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4320
-6816
-768

query I rowsort
SELECT DISTINCT + col0 * + 62 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1586
2623
5063

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

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

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

query I rowsort
SELECT + 73 * - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1606
-2044
-5986

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * 91 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2184
3458
7189

query I rowsort
SELECT DISTINCT - 91 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-20
-46
-83

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

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

query I rowsort
SELECT ALL + 49 + + 6 FROM tab1 GROUP BY tab1.col0
----
55
55
55

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

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

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

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

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

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

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

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 + - ( - 12 ) FROM tab2 GROUP BY tab2.col1
----
12
12
12

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

query I rowsort
SELECT DISTINCT cor0.col0 - 98 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-6
-7
-83

query I rowsort
SELECT NULLIF ( - col1, col1 ) FROM tab1 GROUP BY col1
----
-44
-57
-6

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

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

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

query I rowsort
SELECT + 17 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
1547
1564
255

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

query I rowsort
SELECT + cor0.col1 + + 74 * col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3075
4425
4575

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

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

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

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

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

query I rowsort
SELECT 0 * - 14 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
0
0
0

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

query I rowsort
SELECT DISTINCT + - tab0.col2 + - 13 FROM tab0 GROUP BY tab0.col2
----
-37
-51
-92

query I rowsort
SELECT DISTINCT + tab0.col1 * 3 FROM tab0 GROUP BY col1
----
0
243

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

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

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

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

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

query I rowsort
SELECT - - tab0.col0 - + 56 AS col2 FROM tab0 GROUP BY tab0.col0
----
-13
-30
27

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-838
SELECT tab2.col0 DIV tab2.col0 - 79 * - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1186
7190
7269

skipif mysql # not compatible
query I rowsort label-838
SELECT tab2.col0 / tab2.col0 - 79 * - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1186
7190
7269

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

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

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

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

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

query I rowsort
SELECT + tab0.col2 * 70 AS col2 FROM tab0 GROUP BY col2
----
1680
2660
5530

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

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

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

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

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

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

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

query I rowsort
SELECT + 93 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
108
184
185

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

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

query I rowsort
SELECT + + 39 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1092
3198
858

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + + 7 * 28 FROM tab2 GROUP BY tab2.col2
----
196
196
196

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

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

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

query I rowsort
SELECT DISTINCT - tab0.col0 * - 37 FROM tab0 GROUP BY tab0.col0
----
1591
3071
962

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

query I rowsort
SELECT DISTINCT 30 + - 47 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-17

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-875
SELECT + cor0.col1 DIV + col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
42
60
62

skipif mysql # not compatible
query I rowsort label-875
SELECT + cor0.col1 / + col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
42
60
62

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

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

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

query I rowsort
SELECT - - 65 + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
109
122
71

query I rowsort
SELECT ALL + cor0.col2 * + 60 + 39 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
2739
4299
519

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

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

query I rowsort
SELECT ALL + CASE tab2.col0 WHEN tab2.col0 THEN NULL WHEN - 25 THEN NULL ELSE + col0 END AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 24 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1416
1464
984

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

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

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

query I rowsort
SELECT - 81 + tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-2
-43
-57

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

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

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

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

query I rowsort
SELECT DISTINCT - 77 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-16
-18
-36

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

query I rowsort
SELECT DISTINCT + 26 * + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
2054
624
988

query I rowsort
SELECT tab1.col1 * + 82 FROM tab1 GROUP BY tab1.col1
----
3608
4674
492

onlyif mysql # DIV for integer division: 
query I rowsort label-895
SELECT ALL + tab2.col2 DIV tab2.col2 + 43 AS col1 FROM tab2 GROUP BY tab2.col2
----
44
44
44

skipif mysql # not compatible
query I rowsort label-895
SELECT ALL + tab2.col2 / tab2.col2 + 43 AS col1 FROM tab2 GROUP BY tab2.col2
----
44
44
44

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

query I rowsort
SELECT ALL cor0.col0 * 78 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
1170
7098
7176

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

query I rowsort
SELECT ALL - 23 + cor0.col2 * 71 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1681
2675
5586

query I rowsort
SELECT cor0.col2 * - 15 FROM tab2 AS cor0 GROUP BY col2
----
-1185
-1305
-870

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

query I rowsort
SELECT + ( 85 ) + - tab1.col0 * + 65 FROM tab1 GROUP BY tab1.col0
----
-1345
-1735
-5245

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

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

query I rowsort
SELECT ALL - 62 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-106
-119
-68

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

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

query I rowsort
SELECT + 66 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col0
----
66
66
66

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

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

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.col0, cor0.col1
----
132
1596
3608

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

query I rowsort
SELECT + 51 - + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6
45
7

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-915
SELECT DISTINCT - + col2 * - CAST( 93 AS SIGNED ) col2 FROM tab2 GROUP BY tab2.col2
----
5394
7347
8091

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-915
SELECT DISTINCT - + col2 * - CAST ( 93 AS INTEGER ) col2 FROM tab2 GROUP BY tab2.col2
----
5394
7347
8091

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

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

query I rowsort
SELECT - col0 * - 13 FROM tab2 GROUP BY tab2.col0
----
1183
1196
195

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

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

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

query I rowsort
SELECT ALL - 97 + - 36 AS col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
-133
-133
-133

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-926
SELECT DISTINCT 89 DIV - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-926
SELECT DISTINCT 89 / - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-3
-4

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

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

query I rowsort
SELECT - 58 * 39 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-2183
-2224
-2238

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - tab1.col1 + + COALESCE ( 72 + tab1.col1, tab1.col1 ) * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
462
5060
7296

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + NULLIF ( - 30, 30 ) AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-30

query I rowsort
SELECT + + 72 * + 60 FROM tab2 GROUP BY tab2.col2
----
4320
4320
4320

query I rowsort
SELECT ALL tab0.col0 + 61 AS col2 FROM tab0 GROUP BY tab0.col0
----
104
144
87

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

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

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

query I rowsort
SELECT DISTINCT + tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) NOT BETWEEN - col0 / tab2.col0 AND ( NULL )
----

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

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

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

query I rowsort
SELECT ALL cor0.col2 * + 42 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
1008
1596
3318

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

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

query I rowsort
SELECT DISTINCT 64 * - 58 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3712

query I rowsort
SELECT ALL - 76 + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-19
-32
-70

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

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

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

query I rowsort
SELECT + 41 + - 58 FROM tab2 GROUP BY tab2.col2
----
-17
-17
-17

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

query I rowsort
SELECT ALL - 73 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-15
14
6

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

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

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

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

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

query I rowsort
SELECT tab0.col1 + 41 * - 51 AS col1 FROM tab0 GROUP BY tab0.col1
----
-2010
-2091

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 46 * 77 AS col1 FROM tab2 GROUP BY tab2.col0
----
3542
3542
3542

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

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

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

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

query I rowsort
SELECT 62 * 2 FROM tab2 GROUP BY tab2.col2
----
124
124
124

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

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

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

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

query I rowsort
SELECT DISTINCT + col0 + 83 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
109
126
166

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

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

query I rowsort
SELECT DISTINCT 70 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
2870
4130
4270

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 * cor0.col2 + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
3915
6177
696

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

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

query I rowsort
SELECT DISTINCT - 61 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-23
-37
18

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

query I rowsort
SELECT ALL + 75 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1950
3225
6225

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

query I rowsort
SELECT - 25 + + cor0.col2 * - 62 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-3621
-4923
-5419

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

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

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

query I rowsort
SELECT - col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT - 10 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT - 89 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-89

query I rowsort
SELECT + col0 + - col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT 31 AS col1 FROM tab2 GROUP BY tab2.col2
----
31
31
31

query I rowsort
SELECT + tab1.col2 - - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1019
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1019
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

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-1021
SELECT ALL - 45 DIV col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1021
SELECT ALL - 45 / col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL ( + col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 * + 61 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4941

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col2 + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2508
-3080
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - 19 FROM tab2 GROUP BY tab2.col1
----
-19

query I rowsort
SELECT + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-1028
SELECT 95 DIV - 3 FROM tab0 GROUP BY tab0.col1
----
-31
-31

skipif mysql # not compatible
query I rowsort label-1028
SELECT 95 / - 3 FROM tab0 GROUP BY tab0.col1
----
-31
-31

query I rowsort
SELECT 67 FROM tab2 GROUP BY tab2.col1
----
67
67
67

query I rowsort
SELECT - 86 * 22 AS col1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-1892
-1892
-1892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT + 13 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-1033
SELECT cor0.col1 DIV 77 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1033
SELECT cor0.col1 / 77 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 81 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 14 + - 90 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-76

query I rowsort
SELECT ALL tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT + 61 AS col0 FROM tab0 GROUP BY tab0.col1
----
61
61

query I rowsort
SELECT ALL cor0.col0 + + 24 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
106
46
52

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) IN ( - cor0.col0 )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-1040
SELECT + 17 + - tab0.col0 DIV tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
16
16
16

skipif mysql # not compatible
query I rowsort label-1040
SELECT + 17 + - tab0.col0 / tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
16
16
16

query I rowsort
SELECT cor0.col1 - cor0.col1 * + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

onlyif mysql # DIV for integer division: 
query I rowsort label-1042
SELECT - 24 + 34 DIV - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-24
-24
-29

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1042
SELECT - 24 + 34 / - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-24
-24
-29

onlyif mysql # DIV for integer division: 
query I rowsort label-1043
SELECT DISTINCT 30 DIV tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-1043
SELECT DISTINCT 30 / tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
1

query I rowsort
SELECT - cor1.col1 * - 25 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
1025
1475
1525

onlyif mysql # DIV for integer division: 
query I rowsort label-1045
SELECT DISTINCT - 72 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-1045
SELECT DISTINCT - 72 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
2
3

query I rowsort
SELECT DISTINCT - - 95 AS col2 FROM tab2 GROUP BY tab2.col2
----
95

query I rowsort
SELECT ALL + 40 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT ALL - + tab1.col1 * + 7 AS col0 FROM tab1 GROUP BY tab1.col1
----
-308
-399
-42

query I rowsort
SELECT DISTINCT - + 49 AS col1 FROM tab2 GROUP BY tab2.col0
----
-49

query I rowsort
SELECT + 46 FROM tab0 cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT + cor0.col1 + + ( 16 ) FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
57
75
77

query I rowsort
SELECT + tab0.col2 * - 54 FROM tab0 GROUP BY tab0.col2
----
-1296
-2052
-4266

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
16

query I rowsort
SELECT DISTINCT CASE - cor0.col0 WHEN + cor0.col0 THEN - cor0.col0 ELSE NULL END * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-1057
SELECT - 15 DIV col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-1057
SELECT - 15 / col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ( col0 ) * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ( + cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - tab0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 41 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
41
41

query I rowsort
SELECT - 73 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-73
-73
-73

query I rowsort
SELECT ALL tab0.col0 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - + 24 AS col2 FROM tab0 GROUP BY tab0.col1
----
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-1068
SELECT DISTINCT + + tab2.col1 DIV 74 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-1068
SELECT DISTINCT + + tab2.col1 / 74 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL - ( - cor0.col1 ) * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
0
0
6561

query I rowsort
SELECT ALL 24 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT ALL col0 - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT NULLIF ( tab2.col0, tab2.col0 + + tab2.col0 ) * 6 - + col0 FROM tab2 GROUP BY col0
----
455
460
75

query I rowsort
SELECT ALL - + 20 + tab2.col0 FROM tab2 GROUP BY col0
----
-5
71
72

query I rowsort
SELECT ALL - - ( tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - + 46 AS col0 FROM tab2 GROUP BY tab2.col2
----
-46
-46
-46

onlyif mysql # DIV for integer division: 
query I rowsort label-1076
SELECT + cor0.col1 + + NULLIF ( + cor0.col1 + + cor0.col1, - cor0.col2 ) DIV - 76 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
40
58
60

skipif mysql # not compatible
query I rowsort label-1076
SELECT + cor0.col1 + + NULLIF ( + cor0.col1 + + cor0.col1, - cor0.col2 ) / - 76 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
40
58
60

query I rowsort
SELECT 91 * + cor0.col0 - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
2340
3870
7470

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-1290
-5244
-7098

query I rowsort
SELECT + + ( - 74 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
-74
-74
-74

query I rowsort
SELECT - cor0.col0 + + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ( - 61 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - - col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 83 FROM tab2 cor0 GROUP BY col2
----
83
83
83

query I rowsort
SELECT ALL - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT + tab0.col1 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT - 37 + - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-124
-95

query I rowsort
SELECT ALL cor0.col1 + ( 40 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
46
84
97

query I rowsort
SELECT ALL cor0.col1 * - ( + cor0.col1 ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - 47 * 68 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3196

query I rowsort
SELECT - 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

query I rowsort
SELECT ALL 78 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0

query I rowsort
SELECT ALL + 80 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3520
-4560
-480

query I rowsort
SELECT cor0.col1 + - 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-17
-19
-37

query I rowsort
SELECT ALL 54 FROM tab0 GROUP BY tab0.col0
----
54
54
54

query I rowsort
SELECT + + 99 FROM tab1 GROUP BY tab1.col0
----
99
99
99

query I rowsort
SELECT + + col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 + cor0.col2 * + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
3306
6162
7482

query I rowsort
SELECT + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL < ( NULL )
----

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT ALL 74 + col0 FROM tab1 cor0 GROUP BY cor0.col0
----
102
156
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT tab2.col0 * 51 AS col1 FROM tab2 GROUP BY tab2.col0
----
4641
4692
765

query I rowsort
SELECT 34 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
105
42
79

query I rowsort
SELECT + - 5 FROM tab0 GROUP BY tab0.col0
----
-5
-5
-5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1111
SELECT ALL cor0.col2 * + 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-1111
SELECT ALL cor0.col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ( 45 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

onlyif mysql # DIV for integer division: 
query I rowsort label-1113
SELECT - - tab2.col1 DIV tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1113
SELECT - - tab2.col1 / tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT + + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 70 FROM tab2 cor0 GROUP BY col1
----
70
70
70

query I rowsort
SELECT 50 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
50
50
50

query I rowsort
SELECT - 2 - tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1683
-3483
-3723

query I rowsort
SELECT cor0.col0 + + cor0.col0 * 8 FROM tab0 cor0 GROUP BY cor0.col0
----
234
387
747

query I rowsort
SELECT + tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT 41 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
41

query I rowsort
SELECT - tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT cor0.col0 + cor0.col0 * + 60 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1586
2623
5063

query I rowsort
SELECT DISTINCT + 16 FROM tab2 GROUP BY tab2.col0
----
16

query I rowsort
SELECT DISTINCT + 11 * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-638
-869
-957

query I rowsort
SELECT ALL + 68 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col2, cor0.col2
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT + 58 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
58
58

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 23 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT ALL - 32 * 30 FROM tab2 GROUP BY tab2.col1
----
-960
-960
-960

query I rowsort
SELECT ALL 12 FROM tab0 GROUP BY tab0.col1
----
12
12

query I rowsort
SELECT - + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, col0
----
0
81

query I rowsort
SELECT DISTINCT + 1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-1137
SELECT ALL 97 DIV + 57 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1137
SELECT ALL 97 / + 57 AS col2 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT ALL + 18 FROM tab0 GROUP BY tab0.col0
----
18
18
18

query I rowsort
SELECT DISTINCT + - 0 FROM tab0 GROUP BY col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 47 col0 FROM tab1 GROUP BY tab1.col1
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 35 col1 FROM tab0 cor0 GROUP BY col0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-3483
0

query I rowsort
SELECT - 60 AS col2 FROM tab2 GROUP BY tab2.col0
----
-60
-60
-60

query I rowsort
SELECT + 24 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1968
528
672

query I rowsort
SELECT + + ( - tab0.col1 ) + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT - 78 FROM tab0 GROUP BY tab0.col0
----
-78

query I rowsort
SELECT DISTINCT 27 AS col0 FROM tab1 GROUP BY tab1.col0
----
27

query I rowsort
SELECT + 89 FROM tab1 GROUP BY tab1.col1
----
89
89
89

query I rowsort
SELECT DISTINCT - tab2.col2 * + tab2.col2 + 85 FROM tab2 GROUP BY tab2.col2
----
-3279
-6156
-7484

query I rowsort
SELECT DISTINCT + 12 AS col0 FROM tab2 GROUP BY tab2.col2
----
12

query I rowsort
SELECT DISTINCT + 67 FROM tab1 GROUP BY col1
----
67

query I rowsort
SELECT cor0.col0 + + 56 FROM tab0 AS cor0 GROUP BY col0
----
139
82
99

query I rowsort
SELECT - - 36 * 60 AS col1 FROM tab0 GROUP BY tab0.col0
----
2160
2160
2160

query I rowsort
SELECT 58 AS col2 FROM tab2 GROUP BY tab2.col0
----
58
58
58

query I rowsort
SELECT - 37 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1591
-3071
-962

query I rowsort
SELECT ALL 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
48
48

query I rowsort
SELECT cor0.col2 * + 65 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
2925
4615
520

query I rowsort
SELECT COALESCE ( cor0.col2, cor0.col2 * + 28 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT - 96 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-96
-96
-96

query I rowsort
SELECT col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1162
SELECT tab2.col2 * - CAST( 16 AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
-1264
-1392
-928

skipif mysql # not compatible
query I rowsort label-1162
SELECT tab2.col2 * - CAST ( 16 AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
-1264
-1392
-928

query I rowsort
SELECT - 88 AS col0 FROM tab2 GROUP BY tab2.col1
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-1164
SELECT ALL tab0.col2 DIV + 97 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1164
SELECT ALL tab0.col2 / + 97 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL 19 FROM tab2 GROUP BY tab2.col1
----
19
19
19

query I rowsort
SELECT CASE - col2 WHEN cor0.col2 THEN 37 * 7 ELSE NULL END AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 37 AS col1 FROM tab0 GROUP BY tab0.col2
----
37
37
37

query I rowsort
SELECT ALL 56 FROM tab0 GROUP BY tab0.col2
----
56
56
56

query I rowsort
SELECT ALL - - 4 AS col0 FROM tab1 GROUP BY tab1.col1
----
4
4
4

onlyif mysql # DIV for integer division: 
query I rowsort label-1170
SELECT 99 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-1170
SELECT 99 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1
2
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1171
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1171
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - - 84 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
142
163
171

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 + - cor0.col1 * - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6636
75

query I rowsort
SELECT ALL 97 - col0 * 18 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1397
-371
-677

query I rowsort
SELECT cor0.col2 * 13 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1106
1218
812

query I rowsort
SELECT DISTINCT - 18 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-1458
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 + - 29 col1 FROM tab1 GROUP BY tab1.col1
----
-35
-73
-86

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT 31 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
31
31

query I rowsort
SELECT ALL - 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT ALL - cor0.col1 * + 96 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-7695
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-92

query I rowsort
SELECT 6 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
6
6
6

query I rowsort
SELECT - + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT 6 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
6
6
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1190
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1190
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 29 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT - 58 FROM tab1 cor0 GROUP BY col2
----
-58

query I rowsort
SELECT ALL 74 AS col2 FROM tab1 GROUP BY tab1.col1
----
74
74
74

query I rowsort
SELECT + + 41 AS col1 FROM tab0 GROUP BY tab0.col1
----
41
41

onlyif mysql # DIV for integer division: 
query I rowsort label-1195
SELECT - col0 DIV 33 AS col2 FROM tab2 GROUP BY col0
----
-2
-2
0

skipif mysql # not compatible
query I rowsort label-1195
SELECT - col0 / 33 AS col2 FROM tab2 GROUP BY col0
----
-2
-2
0

query I rowsort
SELECT - tab1.col1 * - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

onlyif mysql # DIV for integer division: 
query I rowsort label-1197
SELECT ALL + cor0.col0 + + cor0.col0 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16
92
93

skipif mysql # not compatible
query I rowsort label-1197
SELECT ALL + cor0.col0 + + cor0.col0 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16
92
93

query I rowsort
SELECT DISTINCT tab0.col2 + - 22 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1817
552
874

query I rowsort
SELECT DISTINCT 83 + - 7 AS col1 FROM tab1 GROUP BY tab1.col0
----
76

query I rowsort
SELECT + 74 * tab0.col0 - - 52 AS col0 FROM tab0 GROUP BY tab0.col0
----
1976
3234
6194

query I rowsort
SELECT 67 FROM tab0 GROUP BY tab0.col0
----
67
67
67

query I rowsort
SELECT 84 AS col1 FROM tab2 GROUP BY tab2.col0
----
84
84
84

query I rowsort
SELECT 59 AS col0 FROM tab1 GROUP BY tab1.col2
----
59
59
59

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
22
22

onlyif mysql # DIV for integer division: 
query I rowsort label-1206
SELECT DISTINCT - tab1.col1 DIV 23 FROM tab1 GROUP BY col1
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1206
SELECT DISTINCT - tab1.col1 / 23 FROM tab1 GROUP BY col1
----
-1
-2
0

query I rowsort
SELECT NULLIF ( tab2.col1, col1 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab2.col0 * - 56 FROM tab2 GROUP BY tab2.col0
----
-5096
-5152
-840

query I rowsort
SELECT - col1 + + col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
17
20
26

query I rowsort
SELECT DISTINCT cor1.col2 * cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - - 46 FROM tab2 GROUP BY col0
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 30 col1 FROM tab1 GROUP BY tab1.col1
----
30
30
30

query I rowsort
SELECT ALL tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL + - 44 AS col0 FROM tab0 GROUP BY tab0.col2
----
-44
-44
-44

query I rowsort
SELECT ALL + tab2.col2 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL + 54 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT - + 50 AS col0 FROM tab1 GROUP BY tab1.col2
----
-50

query I rowsort
SELECT + - 12 AS col0 FROM tab0 GROUP BY tab0.col0
----
-12
-12
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - col0 * col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-1221
SELECT DISTINCT - 49 DIV 99 FROM tab1 GROUP BY tab1.col2
----
0

skipif mysql # not compatible
query I rowsort label-1221
SELECT DISTINCT - 49 / 99 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT DISTINCT + 80 FROM tab0 GROUP BY tab0.col1
----
80

query I rowsort
SELECT ALL - 57 AS col2 FROM tab1 GROUP BY tab1.col1
----
-57
-57
-57

query I rowsort
SELECT ALL + 23 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT + ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL NOT IN ( cor0.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 + - tab2.col1 col0 FROM tab2 GROUP BY col1
----
0

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
87

query I rowsort
SELECT DISTINCT - 93 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-93

query I rowsort
SELECT - tab2.col0 + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

onlyif mysql # DIV for integer division: 
query I rowsort label-1233
SELECT DISTINCT 98 DIV - cor0.col0 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-1
-2
-3

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1233
SELECT DISTINCT 98 / - cor0.col0 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-1
-2
-3

query I rowsort
SELECT ALL - 82 AS col1 FROM tab2 GROUP BY tab2.col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 1 + 56 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
57

query I rowsort
SELECT ALL 1 FROM tab0 GROUP BY tab0.col1
----
1
1

query I rowsort
SELECT 99 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
99
99
99

query I rowsort
SELECT ALL 20 AS col2 FROM tab1 GROUP BY tab1.col1
----
20
20
20

query I rowsort
SELECT + 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT DISTINCT 72 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
72

query I rowsort
SELECT + 85 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2040
3230
6715

query I rowsort
SELECT DISTINCT + 6 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
486

query I rowsort
SELECT DISTINCT - cor0.col1 + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT + - 5 AS col2 FROM tab1 GROUP BY tab1.col0
----
-5

query I rowsort
SELECT 21 FROM tab2 GROUP BY tab2.col2
----
21
21
21

query I rowsort
SELECT ALL 60 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
60
60

query I rowsort
SELECT DISTINCT + 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
59

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col2, cor0.col0, cor0.col0
----
45
71
8

query I rowsort
SELECT - tab0.col1 + - col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6642
0

query I rowsort
SELECT tab0.col1 * + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 27 FROM tab2 GROUP BY col2
----
27

query I rowsort
SELECT ALL + - 11 + 22 FROM tab2 GROUP BY tab2.col2
----
11
11
11

query I rowsort
SELECT ALL tab0.col2 + + 50 FROM tab0 GROUP BY tab0.col2
----
129
74
88

query I rowsort
SELECT DISTINCT 11 AS col1 FROM tab1 GROUP BY col1
----
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
52

query I rowsort
SELECT DISTINCT - 26 + - cor0.col1 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
-67
-85
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 60 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
60
60
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1258
SELECT - CAST( NULL AS SIGNED ) col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1258
SELECT - CAST ( NULL AS INTEGER ) col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT - tab2.col2 * + 74 FROM tab2 GROUP BY tab2.col2
----
-4292
-5846
-6438

query I rowsort
SELECT ALL 83 FROM tab1 GROUP BY tab1.col0
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-1261
SELECT ALL col0 DIV 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1261
SELECT ALL col0 / 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT DISTINCT - ( - 61 ) FROM tab0 cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT ALL 75 FROM tab1 AS cor0 GROUP BY col2
----
75
75
75

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-11
-14
17

onlyif mysql # DIV for integer division: 
query I rowsort label-1265
SELECT tab0.col0 DIV 27 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
44
86

skipif mysql # not compatible
query I rowsort label-1265
SELECT tab0.col0 / 27 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
44
86

query I rowsort
SELECT ALL cor0.col0 FROM tab0 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 DISTINCT - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + COALESCE ( + tab0.col1, tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 48 FROM tab1 GROUP BY tab1.col1
----
48
48
48

query I rowsort
SELECT + 23 AS col1 FROM tab0 GROUP BY tab0.col1
----
23
23

query I rowsort
SELECT DISTINCT - col1 * + cor0.col2 + CASE + 18 WHEN cor0.col1 THEN NULL ELSE + cor0.col1 END * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4059
-8142
-9028

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
96
96

query I rowsort
SELECT ALL 34 FROM tab0 AS cor0 GROUP BY cor0.col1
----
34
34

query I rowsort
SELECT - 69 AS col0 FROM tab0 GROUP BY tab0.col2
----
-69
-69
-69

query I rowsort
SELECT ALL 61 AS col1 FROM tab1 GROUP BY tab1.col0
----
61
61
61

query I rowsort
SELECT ALL + + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 * - 40 FROM tab1 AS cor0 GROUP BY col0
----
-1092
-3198
-858

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT - ( 44 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-44
-44
-44

onlyif mysql # DIV for integer division: 
query I rowsort label-1280
SELECT DISTINCT - tab2.col2 DIV - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-1280
SELECT DISTINCT - tab2.col2 / - tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT DISTINCT 24 FROM tab0 AS cor0 GROUP BY col1
----
24

query I rowsort
SELECT ALL - 39 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-39
-39
-39

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1260
-176
-5822

query I rowsort
SELECT ALL cor1.col1 * cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
6561

query I rowsort
SELECT DISTINCT + + tab0.col0 + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT ALL + - 9 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT ALL + - col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 95 + tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-24
-50
-87

query I rowsort
SELECT DISTINCT 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27

query I rowsort
SELECT tab2.col0 + 40 FROM tab2 GROUP BY tab2.col0
----
131
132
55

query I rowsort
SELECT DISTINCT - 92 + - col2 FROM tab1 GROUP BY tab1.col2
----
-100
-137
-163

query I rowsort
SELECT - 44 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1
-18
39

query I rowsort
SELECT + 93 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
93
93
93

onlyif mysql # DIV for integer division: 
query I rowsort label-1294
SELECT col1 DIV + col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1294
SELECT col1 / + col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
0
0
1

query I rowsort
SELECT 98 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
156
177
185

query I rowsort
SELECT DISTINCT - 81 FROM tab1 GROUP BY tab1.col1
----
-81

query I rowsort
SELECT - 7 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

onlyif mysql # DIV for integer division: 
query I rowsort label-1298
SELECT ALL - + 91 DIV + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-1
-15
-2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1298
SELECT ALL - + 91 / + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-1
-15
-2

query I rowsort
SELECT DISTINCT - 5 FROM tab2 GROUP BY tab2.col0
----
-5

query I rowsort
SELECT + tab2.col0 AS col0 FROM tab2 GROUP BY col0 HAVING NULL IS NULL OR NOT ( NULL ) < NULL
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col0 + - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 * - col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-7290
0

query I rowsort
SELECT ( - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + col0 + - 64 FROM tab0 GROUP BY tab0.col0
----
-21
-38
19

query I rowsort
SELECT ALL + - tab2.col0 + + ( 76 ) FROM tab2 GROUP BY tab2.col0
----
-15
-16
61

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1307
SELECT ALL + tab1.col1 DIV tab1.col1 + 19 FROM tab1 GROUP BY tab1.col1
----
20
20
20

skipif mysql # not compatible
query I rowsort label-1307
SELECT ALL + tab1.col1 / tab1.col1 + 19 FROM tab1 GROUP BY tab1.col1
----
20
20
20

onlyif mysql # DIV for integer division: 
query I rowsort label-1308
SELECT DISTINCT + + COALESCE ( + 8, tab0.col0, COALESCE ( tab0.col0, tab0.col1, - tab0.col2 * tab0.col2 ) * - tab0.col1 + tab0.col2, 34 ) DIV 29 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-1308
SELECT DISTINCT + + COALESCE ( + 8, tab0.col0, COALESCE ( tab0.col0, tab0.col1, - tab0.col2 * tab0.col2 ) * - tab0.col1 + tab0.col2, 34 ) / 29 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT + 69 * + tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
2870
4130
4270

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT ALL cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - NULLIF ( tab2.col1, + tab2.col1 + + col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - 31 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-31
-31
-31

query I rowsort
SELECT + 23 AS col2 FROM tab2 GROUP BY tab2.col2
----
23
23
23

query I rowsort
SELECT + 45 AS col1 FROM tab0 GROUP BY tab0.col2
----
45
45
45

query I rowsort
SELECT ALL - cor0.col1 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0
0

query I rowsort
SELECT 61 FROM tab0 GROUP BY tab0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT - 58 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-20
-34
21

query I rowsort
SELECT DISTINCT - - 33 FROM tab2 GROUP BY tab2.col0
----
33

onlyif mysql # DIV for integer division: 
query I rowsort label-1320
SELECT DISTINCT 65 + + 27 DIV col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
65
66

skipif mysql # not compatible
query I rowsort label-1320
SELECT DISTINCT 65 + + 27 / col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
65
66

query I rowsort
SELECT ALL - cor0.col2 + + 67 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-12
29
43

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
118
122
82

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1032
-2054
-3154

query I rowsort
SELECT ALL + 67 + 34 FROM tab1 GROUP BY col0
----
101
101
101

query I rowsort
SELECT ALL 17 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 col1 FROM tab2 GROUP BY tab2.col2
----
-26
-26
-26

query I rowsort
SELECT - + col2 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
132
1596
3608

onlyif mysql # DIV for integer division: 
query I rowsort label-1330
SELECT 54 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
0
1
9

skipif mysql # not compatible
query I rowsort label-1330
SELECT 54 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
0
1
9

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT ALL - cor0.col2 * - ( 52 * - 36 ) - cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-154129
-45504
-72580

query I rowsort
SELECT ALL - - COALESCE ( - tab1.col1, + 18 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + + tab1.col2 + - 94 * - tab1.col2 FROM tab1 GROUP BY col2
----
4275
6745
760

onlyif mysql # DIV for integer division: 
query I rowsort label-1335
SELECT - - col2 DIV + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1335
SELECT - - col2 / + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-1336
SELECT DISTINCT 99 DIV + 89 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-1336
SELECT DISTINCT 99 / + 89 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT + ( - 9 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 41 col2 FROM tab0 GROUP BY tab0.col0
----
41

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col0
----
0
0
81

query I rowsort
SELECT - ( 55 ) + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-27
-33
27

query I rowsort
SELECT - 74 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT - 80 + 70 AS col1 FROM tab1 GROUP BY tab1.col0
----
-10
-10
-10

query I rowsort
SELECT - + 82 AS col2 FROM tab2 GROUP BY tab2.col2
----
-82
-82
-82

query I rowsort
SELECT 5 FROM tab2 AS cor0 GROUP BY col2
----
5
5
5

query I rowsort
SELECT DISTINCT 36 FROM tab0 GROUP BY tab0.col1
----
36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( tab0.col1, 80, - tab0.col0 ) FROM tab0 GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 col1 FROM tab1 GROUP BY tab1.col1
----
51

onlyif mysql # DIV for integer division: 
query I rowsort label-1348
SELECT tab0.col2 DIV + 94 col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1348
SELECT tab0.col2 / + 94 col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT - col2 IS NOT NULL
----

query I rowsort
SELECT ALL - COALESCE ( - 6, + cor0.col2 ) * 11 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
66
66
66

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1351
SELECT CAST( NULL AS SIGNED ) + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1351
SELECT CAST ( NULL AS INTEGER ) + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 25 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT tab2.col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1354
SELECT tab2.col1 DIV 2 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
61
88
91

skipif mysql # not compatible
query I rowsort label-1354
SELECT tab2.col1 / 2 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
61
88
91

onlyif mysql # DIV for integer division: 
query I rowsort label-1355
SELECT cor0.col2 DIV - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1355
SELECT cor0.col2 / - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col0 * 34 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2788
748
952

query I rowsort
SELECT DISTINCT 42 FROM tab2 AS cor0 GROUP BY cor0.col0
----
42

query I rowsort
SELECT DISTINCT - 28 - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-111
-54
-71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1359
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1359
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL - 53 AS col0 FROM tab2 GROUP BY tab2.col2
----
-53
-53
-53

query I rowsort
SELECT ALL 75 FROM tab2 cor0 GROUP BY cor0.col1
----
75
75
75

query I rowsort
SELECT - 49 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-49
-49
-49

query I rowsort
SELECT tab1.col2 * - 90 AS col1 FROM tab1 GROUP BY tab1.col2
----
-4050
-6390
-720

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 68 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 82 FROM tab2 cor0 GROUP BY cor0.col0
----
-82
-82
-82

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL tab2.col2 + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + + 14 FROM tab2 GROUP BY tab2.col2
----
14
14
14

query I rowsort
SELECT - col0 - - cor0.col0 * + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
462
6642
756

query I rowsort
SELECT - 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-5
-5
-5

query I rowsort
SELECT ALL - 71 + - 4 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-75
-75
-75

query I rowsort
SELECT - tab0.col2 * + 64 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1536
-2432
-5056

query I rowsort
SELECT DISTINCT cor0.col2 * + 52 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2340
3692
416

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1376
SELECT DISTINCT + - tab0.col1 + CAST( + tab0.col1 AS SIGNED ) * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6480

skipif mysql # not compatible
query I rowsort label-1376
SELECT DISTINCT + - tab0.col1 + CAST ( + tab0.col1 AS INTEGER ) * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6480

query I rowsort
SELECT - 87 FROM tab1 GROUP BY tab1.col1
----
-87
-87
-87

query I rowsort
SELECT - - col1 - - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL - 71 * + col0 FROM tab1 GROUP BY tab1.col0
----
-1562
-1988
-5822

query I rowsort
SELECT 35 FROM tab0 GROUP BY tab0.col1
----
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * tab2.col2 col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL >= NULL
----

query I rowsort
SELECT 14 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 * - tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - cor0.col0 - cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-133
-150
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-1386
SELECT ALL ( 61 ) DIV - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1386
SELECT ALL ( 61 ) / - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT - 79 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-79
-79
-79

query I rowsort
SELECT + col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ( 66 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT DISTINCT + 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
24

query I rowsort
SELECT + 61 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
61
61
61

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT - 1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab0 GROUP BY tab0.col2
----
-16

query I rowsort
SELECT ALL - 53 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-53
-53

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1398
SELECT ALL CAST( NULL AS SIGNED ) + - 56 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1398
SELECT ALL CAST ( NULL AS INTEGER ) + - 56 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 74 FROM tab0 GROUP BY tab0.col2
----
74
74
74

query I rowsort
SELECT ALL - + 69 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-3036
-3933
-414

query I rowsort
SELECT DISTINCT - 97 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-97

query I rowsort
SELECT DISTINCT - cor0.col0 + - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to c3fce74ead130ec1d9dde8274d706e34

query I rowsort
SELECT tab0.col1 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1405
SELECT DISTINCT + 18 DIV - col0 AS col0 FROM tab0 GROUP BY col0
----
0

skipif mysql # not compatible
query I rowsort label-1405
SELECT DISTINCT + 18 / - col0 AS col0 FROM tab0 GROUP BY col0
----
0

query I rowsort
SELECT ALL + tab0.col2 * + col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1482
600
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 74 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT DISTINCT cor0.col2 * NULLIF ( 92, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
2208
3496
7268

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0

query I rowsort
SELECT - 7 * cor0.col0 + + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-103
-277
-543

query I rowsort
SELECT DISTINCT - + 99 AS col2 FROM tab2 GROUP BY tab2.col1
----
-99

query I rowsort
SELECT + 41 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
41
41
41

query I rowsort
SELECT ALL - + 15 AS col1 FROM tab0 GROUP BY tab0.col2
----
-15
-15
-15

query I rowsort
SELECT ALL col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT ( COALESCE ( col1, + cor0.col1 ) ) * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + 14 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1274
1288
210

query I rowsort
SELECT - cor0.col0 * 57 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-1482
-2451
-4731

query I rowsort
SELECT ALL 54 * + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3132
4266
4698

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1420
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-1420
SELECT ALL - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 70 AS col0 FROM tab2 GROUP BY tab2.col1
----
-70
-70
-70

query I rowsort
SELECT ALL + + 62 * + col1 FROM tab2 GROUP BY col1
----
2542
3658
3782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 55 col2 FROM tab0 GROUP BY tab0.col2
----
55

query I rowsort
SELECT DISTINCT - + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 73 + + tab2.col0 * 73 FROM tab2 GROUP BY tab2.col0
----
1168
6716
6789

query I rowsort
SELECT ALL 18 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
7
7
7

query I rowsort
SELECT DISTINCT - 37 * - 12 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
444

query I rowsort
SELECT DISTINCT - + 53 FROM tab0 GROUP BY tab0.col1
----
-53

onlyif mysql # DIV for integer division: 
query I rowsort label-1430
SELECT ALL - cor0.col2 DIV 64 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1430
SELECT ALL - cor0.col2 / 64 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
0

query I rowsort
SELECT ALL - 96 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT - cor0.col1 * - 60 FROM tab1 AS cor0 GROUP BY col1, col2
----
2640
3420
360

query I rowsort
SELECT cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 95 + + 58 AS col2 FROM tab0 GROUP BY tab0.col0
----
153

query I rowsort
SELECT DISTINCT - 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-40

query I rowsort
SELECT + 1 - - cor1.col1 * cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col1
----
1937
3250
37

query I rowsort
SELECT DISTINCT + - 40 AS col1 FROM tab2 GROUP BY tab2.col1
----
-40

query I rowsort
SELECT DISTINCT cor0.col0 + 2 FROM tab1 AS cor0 GROUP BY col0
----
24
30
84

query I rowsort
SELECT 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT + cor0.col0 * 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1144
1456
4264

query I rowsort
SELECT cor1.col2 FROM tab2 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT col0 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + 94 AS col0 FROM tab2 GROUP BY tab2.col1
----
94
94
94

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0, col0
----
15
91
92

query I rowsort
SELECT ALL ( + 8 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT + 57 AS col2 FROM tab2 GROUP BY tab2.col2
----
57
57
57

query I rowsort
SELECT - 52 FROM tab1 GROUP BY tab1.col1
----
-52
-52
-52

query I rowsort
SELECT + + tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT - 30 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1230
-1770
-1830

query I rowsort
SELECT 91 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
117
134
174

query I rowsort
SELECT DISTINCT - cor1.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2, cor0.col0, cor1.col0
----
-1365
-1380
-225
-8281
-8372
-8464

onlyif mysql # DIV for integer division: 
query I rowsort label-1453
SELECT + tab0.col0 + - 78 DIV 40 AS col0 FROM tab0 GROUP BY tab0.col0
----
25
42
82

skipif mysql # not compatible
query I rowsort label-1453
SELECT + tab0.col0 + - 78 / 40 AS col0 FROM tab0 GROUP BY tab0.col0
----
25
42
82

query I rowsort
SELECT - 3 FROM tab1 cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT - cor0.col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-132
-1596
-3608

query I rowsort
SELECT DISTINCT + - tab1.col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 col2 FROM tab0 GROUP BY tab0.col2
----
23
23
23

query I rowsort
SELECT DISTINCT COALESCE ( 23, + 58 ) * - col2 FROM tab1 GROUP BY tab1.col2
----
-1035
-1633
-184

query I rowsort
SELECT DISTINCT + + 7 FROM tab2 GROUP BY tab2.col2
----
7

query I rowsort
SELECT + NULLIF ( cor0.col1, col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 * 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
104
585
923

query I rowsort
SELECT ALL + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT 22 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
1782

query I rowsort
SELECT ALL - + ( + tab1.col1 ) + tab1.col1 * ( - 93 ) FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-4136
-5358
-564

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT ALL - - col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL - tab1.col0 * - 26 AS col1 FROM tab1 GROUP BY tab1.col0
----
2132
572
728

query I rowsort
SELECT ALL 67 FROM tab2 AS cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT + 65 FROM tab1 AS cor0 GROUP BY cor0.col2
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 75 + cor0.col2 col2 FROM tab2 cor0 GROUP BY col2
----
-17
12
4

query I rowsort
SELECT + 97 FROM tab0 GROUP BY tab0.col0
----
97
97
97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1475
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1475
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 * tab2.col2 + + 39 FROM tab2 GROUP BY tab2.col2
----
3403
6280
7608

query I rowsort
SELECT DISTINCT 74 * cor0.col1 - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
2976
4287
4427

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
118
122
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1479
SELECT DISTINCT cor0.col0 * - cor0.col2 + CAST( NULL AS SIGNED ) / + 79 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1479
SELECT DISTINCT cor0.col0 * - cor0.col2 + CAST ( NULL AS INTEGER ) / + 79 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT - ( 52 ) AS col2 FROM tab2 GROUP BY col0
----
-52

query I rowsort
SELECT + ( col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col0 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT ALL + 4 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
4
4
4

query I rowsort
SELECT - col2 + 3 FROM tab0 AS cor0 GROUP BY col2
----
-21
-35
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 55 col0 FROM tab2 GROUP BY tab2.col0
----
-55
-55
-55

query I rowsort
SELECT 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT col1 + - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 57 FROM tab0 GROUP BY tab0.col0
----
57
57
57

query I rowsort
SELECT 40 AS col0 FROM tab1 GROUP BY tab1.col0
----
40
40
40

query I rowsort
SELECT DISTINCT + tab0.col0 - 53 AS col0 FROM tab0 GROUP BY tab0.col0
----
-10
-27
30

onlyif mysql # DIV for integer division: 
query I rowsort label-1492
SELECT ALL tab2.col2 DIV + 4 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
108
72
98

skipif mysql # not compatible
query I rowsort label-1492
SELECT ALL tab2.col2 / + 4 + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
108
72
98

query I rowsort
SELECT DISTINCT + 39 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
39

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1494
SELECT - col0 * - CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1494
SELECT - col0 * - CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 * + col0 col0 FROM tab0 GROUP BY tab0.col0
----
1222
2021
3901

query I rowsort
SELECT ALL + 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 53 col1 FROM tab1 GROUP BY tab1.col0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT 22 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-16
-2
-57

query I rowsort
SELECT DISTINCT 13 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
13

query I rowsort
SELECT - - 35 + 50 AS col2 FROM tab2 GROUP BY tab2.col2
----
85
85
85

query I rowsort
SELECT DISTINCT + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 86 FROM tab0 GROUP BY tab0.col2
----
86
86
86

query I rowsort
SELECT ALL + - CASE + 1 WHEN + col2 + + tab1.col2 THEN 65 END FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 98 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
98
98

query I rowsort
SELECT ALL - - tab2.col0 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - ( 65 ) FROM tab2 GROUP BY tab2.col1
----
-65
-65
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 30 col2 FROM tab0 GROUP BY tab0.col0
----
-30
-30
-30

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - NULLIF ( + COALESCE ( + 89, + tab1.col0, - tab1.col1 ), 76 ) FROM tab1 GROUP BY tab1.col0
----
-89
-89
-89

query I rowsort
SELECT - 83 FROM tab1 GROUP BY tab1.col0
----
-83
-83
-83

query I rowsort
SELECT 76 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1976
-3268
-6308

query I rowsort
SELECT cor0.col2 * ( + cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col1 * 93 + + cor0.col1 FROM tab0 cor0 GROUP BY col2, col1
----
0
0
7614

query I rowsort
SELECT DISTINCT + cor0.col0 + - col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT ALL 5 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
5
5

query I rowsort
SELECT 3 AS col0 FROM tab0 GROUP BY tab0.col0
----
3
3
3

query I rowsort
SELECT 85 FROM tab1 GROUP BY tab1.col0
----
85
85
85

query I rowsort
SELECT DISTINCT 88 * col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
2112
3344
6952

query I rowsort
SELECT col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT - 38 * - cor0.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 DISTINCT 68 col0 FROM tab0 GROUP BY tab0.col0
----
68

query I rowsort
SELECT + 33 AS col1 FROM tab2 GROUP BY tab2.col1
----
33
33
33

query I rowsort
SELECT - 30 FROM tab0 cor0 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT 96 AS col2 FROM tab2 GROUP BY tab2.col1
----
96

onlyif mysql # DIV for integer division: 
query I rowsort label-1525
SELECT DISTINCT 49 DIV - 89 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-1525
SELECT DISTINCT 49 / - 89 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab2 cor0 GROUP BY col1
----
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 col0 FROM tab0 AS cor0 GROUP BY col1
----
89
89

query I rowsort
SELECT + 35 + tab0.col2 * col2 FROM tab0 GROUP BY tab0.col2
----
1479
611
6276

query I rowsort
SELECT 90 * 60 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
5400
5400
5400

query I rowsort
SELECT DISTINCT 96 FROM tab1 GROUP BY tab1.col1
----
96

query I rowsort
SELECT DISTINCT - - ( + tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + ( tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + tab0.col1 AS col1 FROM tab0 WHERE NOT NULL NOT IN ( - tab0.col2 ) GROUP BY col1
----

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT - cor0.col1 - + 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-115
-133
-135

query I rowsort
SELECT DISTINCT - col0 - - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1539
SELECT ALL 62 DIV + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1539
SELECT ALL 62 / + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1540
SELECT DISTINCT + CAST( - 34 AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
-34

skipif mysql # not compatible
query I rowsort label-1540
SELECT DISTINCT + CAST ( - 34 AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
-34

query I rowsort
SELECT DISTINCT - 98 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-98

query I rowsort
SELECT - + 1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-1
-1

query I rowsort
SELECT + + 96 + 43 AS col2 FROM tab0 GROUP BY col0
----
139
139
139

query I rowsort
SELECT - 50 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-50
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 48 col1 FROM tab0 GROUP BY col0
----
-48
-48
-48

query I rowsort
SELECT + 50 FROM tab1 GROUP BY tab1.col0
----
50
50
50

query I rowsort
SELECT ALL ( NULLIF ( - tab1.col0, tab1.col0 ) ) AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT tab0.col0 + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL + col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-1550
SELECT ALL tab1.col0 DIV - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1550
SELECT ALL tab1.col0 / - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + tab2.col1 AS col1 FROM tab2 WHERE ( NULL ) NOT IN ( - tab2.col1 + col2 ) GROUP BY tab2.col1
----

query I rowsort
SELECT + 62 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT ALL + 55 FROM tab2 GROUP BY tab2.col0
----
55
55
55

query I rowsort
SELECT + 35 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
1505
2905
910

onlyif mysql # DIV for integer division: 
query I rowsort label-1555
SELECT + 96 DIV + cor0.col0 FROM tab0 cor0 GROUP BY col0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1555
SELECT + 96 / + cor0.col0 FROM tab0 cor0 GROUP BY col0
----
1
2
3

query I rowsort
SELECT ALL - 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-9
-9

onlyif mysql # DIV for integer division: 
query I rowsort label-1557
SELECT DISTINCT cor0.col2 DIV NULLIF ( 25, cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2
3

skipif mysql # not compatible
query I rowsort label-1557
SELECT DISTINCT cor0.col2 / NULLIF ( 25, cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2
3

query I rowsort
SELECT DISTINCT - tab2.col1 * 72 AS col0 FROM tab2 GROUP BY tab2.col1
----
-2952
-4248
-4392

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + - 95 FROM tab1 GROUP BY tab1.col2
----
-95
-95
-95

query I rowsort
SELECT ALL - tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL + tab0.col0 + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + - 43 * col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1118
-1849
-3569

query I rowsort
SELECT ALL + 97 AS col2 FROM tab0 GROUP BY tab0.col0
----
97
97
97

query I rowsort
SELECT 3 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3
3
3

query I rowsort
SELECT cor0.col2 - cor0.col1 * - col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
2436
4740
5394

query I rowsort
SELECT 49 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
49
49
49

query I rowsort
SELECT + 2 AS col1 FROM tab2 GROUP BY tab2.col2
----
2
2
2

query I rowsort
SELECT ALL 77 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6237
0

query I rowsort
SELECT ALL + 97 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
97
97
97

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

query I rowsort
SELECT + + 22 - - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
113
114
37

query I rowsort
SELECT - + 99 AS col2 FROM tab1 GROUP BY tab1.col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT - + 91 + - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-106
-182
-183

query I rowsort
SELECT ALL - - 50 FROM tab0 GROUP BY tab0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
46

query I rowsort
SELECT DISTINCT + - 96 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-2112
-2688
-7872

query I rowsort
SELECT ALL - 93 FROM tab2 GROUP BY tab2.col0
----
-93
-93
-93

onlyif mysql # DIV for integer division: 
query I rowsort label-1579
SELECT ALL tab0.col0 DIV tab0.col0 - - 19 FROM tab0 GROUP BY tab0.col0
----
20
20
20

skipif mysql # not compatible
query I rowsort label-1579
SELECT ALL tab0.col0 / tab0.col0 - - 19 FROM tab0 GROUP BY tab0.col0
----
20
20
20

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL 66 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
66
66
66

query I rowsort
SELECT ALL 71 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col2, cor1.col1
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT - ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - 20 AS col0 FROM tab1 GROUP BY tab1.col0
----
-20
-20
-20

query I rowsort
SELECT + 13 AS col1 FROM tab1 GROUP BY tab1.col1
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-1586
SELECT 80 DIV 1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
161
80

skipif mysql # not compatible
query I rowsort label-1586
SELECT 80 / 1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
161
80

query I rowsort
SELECT DISTINCT - 2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2

query I rowsort
SELECT ALL - 42 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-42
-42
-42

query I rowsort
SELECT - col0 + 87 FROM tab2 GROUP BY tab2.col0
----
-4
-5
72

query I rowsort
SELECT ALL + col0 * + tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT + cor0.col2 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 80 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-80
-80
-80

query I rowsort
SELECT DISTINCT 67 * + 52 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3484

query I rowsort
SELECT ALL + 97 FROM tab2 GROUP BY col0
----
97
97
97

query I rowsort
SELECT 19 AS col1 FROM tab2 GROUP BY tab2.col1
----
19
19
19

query I rowsort
SELECT DISTINCT cor0.col1 + col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT DISTINCT - 82 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 31 col1 FROM tab2 GROUP BY tab2.col2
----
31
31
31

query I rowsort
SELECT ALL - 11 FROM tab1 cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT + - 68 * tab1.col0 FROM tab1 GROUP BY col0
----
-1496
-1904
-5576

query I rowsort
SELECT DISTINCT - 40 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
19
21

query I rowsort
SELECT col0 + col0 AS col2 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT tab2.col0 + 21 AS col2 FROM tab2 GROUP BY tab2.col0
----
112
113
36

query I rowsort
SELECT ALL - 22 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-22
-22
-22

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT + 3 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
243

query I rowsort
SELECT - tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT ALL ( 82 ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
82
82
82

query I rowsort
SELECT ALL + + tab2.col1 + - 31 * 52 AS col0 FROM tab2 GROUP BY col1
----
-1551
-1553
-1571

query I rowsort
SELECT ALL ( - 81 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-81
-81
-81

query I rowsort
SELECT DISTINCT - 11 AS col2 FROM tab0 GROUP BY col1
----
-11

query I rowsort
SELECT - ( 57 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-57
-57
-57

query I rowsort
SELECT 59 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
59
59

query I rowsort
SELECT + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) <= ( NULL )
----

query I rowsort
SELECT + 69 FROM tab2 GROUP BY col0
----
69
69
69

query I rowsort
SELECT + 10 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-450
-710
-80

query I rowsort
SELECT - cor0.col0 + + 84 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-7
-8
69

query I rowsort
SELECT cor0.col0 + 49 * cor0.col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
4550
4600
750

query I rowsort
SELECT ( cor0.col1 ) FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + 92 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
92
92
92

query I rowsort
SELECT + 44 AS col1 FROM tab2 GROUP BY col0
----
44
44
44

query I rowsort
SELECT DISTINCT cor0.col2 + - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + 65 * - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1560
-2470
-5135

query I rowsort
SELECT DISTINCT - 78 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-78

query I rowsort
SELECT ALL - 58 FROM tab0 cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT col1 - col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - tab1.col0 + 97 FROM tab1 GROUP BY tab1.col0
----
15
69
75

query I rowsort
SELECT - + 77 * - tab0.col0 + + tab0.col0 * + tab0.col0 FROM tab0 GROUP BY col0
----
13280
2678
5160

query I rowsort
SELECT DISTINCT - 97 FROM tab1 GROUP BY tab1.col2
----
-97

query I rowsort
SELECT - - tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 * 52 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2288
2964
312

query I rowsort
SELECT DISTINCT - ( 34 ) * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1496
-1938
-204

query I rowsort
SELECT DISTINCT - 47 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1128
-1786
-3713

query I rowsort
SELECT - col0 + 27 AS col2 FROM tab0 GROUP BY tab0.col0
----
-16
-56
1

query I rowsort
SELECT - - 61 FROM tab2 GROUP BY col0
----
61
61
61

query I rowsort
SELECT - col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL + 9 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT ALL + tab2.col1 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 18 col0 FROM tab2 GROUP BY col2
----
18
18
18

query I rowsort
SELECT 31 FROM tab0 GROUP BY tab0.col1
----
31
31

query I rowsort
SELECT + 12 AS col1 FROM tab1 GROUP BY tab1.col1
----
12
12
12

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-1936
-3249
-36

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 * + 9 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
621
621

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 + + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40
78
91

query I rowsort
SELECT ALL - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY col2
----
-142
-16
-90

query I rowsort
SELECT DISTINCT + cor0.col1 * 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2376
3078
324

query I rowsort
SELECT - 33 AS col1 FROM tab1 GROUP BY tab1.col0
----
-33
-33
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 83 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83

query I rowsort
SELECT DISTINCT + 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT + 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT ALL - 78 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-78
-78
-78

query I rowsort
SELECT - col2 + - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT ALL 3 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
3
3
3

query I rowsort
SELECT tab2.col1 * - tab2.col1 AS col0 FROM tab2 WHERE NOT + tab2.col1 + + tab2.col0 IN ( tab2.col0 ) GROUP BY tab2.col1 HAVING NOT col1 = NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 col2 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor1.col0
----
9 values hashing to 4fe903723f7427a19598c1293ff90703

query I rowsort
SELECT - 16 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-16
-16
-16

query I rowsort
SELECT 48 FROM tab0 GROUP BY tab0.col2
----
48
48
48

query I rowsort
SELECT ALL + ( - cor0.col0 ) + - cor0.col0 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-3864
-5460
-930

query I rowsort
SELECT - 60 FROM tab1 GROUP BY tab1.col0
----
-60
-60
-60

query I rowsort
SELECT 99 FROM tab0 GROUP BY tab0.col2
----
99
99
99

query I rowsort
SELECT ALL + cor0.col0 * + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT - 81 AS col0 FROM tab2 GROUP BY tab2.col1
----
-81
-81
-81

query I rowsort
SELECT ALL ( - cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 89, - col2 * col1 - ( - col1 ) ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-89
-89
-89

query I rowsort
SELECT tab2.col2 + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 83 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
83
83
83

query I rowsort
SELECT ALL + + 31 AS col1 FROM tab0 GROUP BY tab0.col2
----
31
31
31

query I rowsort
SELECT ( 58 ) FROM tab2 AS cor0 GROUP BY col1
----
58
58
58

query I rowsort
SELECT - 13 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-13
-13
-13

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1678
SELECT CAST( 56 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56
56
56

skipif mysql # not compatible
query I rowsort label-1678
SELECT CAST ( 56 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT + 5 FROM tab1 GROUP BY tab1.col1
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 1 col2 FROM tab0 GROUP BY tab0.col1
----
1
1

query I rowsort
SELECT - 82 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, - cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 78 AS col2 FROM tab2 GROUP BY tab2.col1
----
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 - + cor0.col0 * cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-1118
-2140
-3240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 93 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-93
-93
-93

query I rowsort
SELECT + 79 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
160
79

query I rowsort
SELECT ALL 62 FROM tab0 GROUP BY tab0.col1
----
62
62

query I rowsort
SELECT ALL - + 69 AS col1 FROM tab2 GROUP BY tab2.col1
----
-69
-69
-69

query I rowsort
SELECT ALL + + 5 AS col2 FROM tab1 GROUP BY tab1.col2
----
5
5
5

query I rowsort
SELECT + cor0.col0 + cor0.col0 * 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2548
2576
420

query I rowsort
SELECT - 42 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1722
-2478
-2562

query I rowsort
SELECT - 36 FROM tab0 GROUP BY tab0.col0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT - 95 - + 99 FROM tab1 GROUP BY tab1.col0
----
-194

query I rowsort
SELECT DISTINCT ( COALESCE ( + tab2.col0, + tab2.col0 + tab2.col0 ) ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( - 27 ) col0 FROM tab1 GROUP BY tab1.col1
----
27

query I rowsort
SELECT - 83 FROM tab2 AS cor0 GROUP BY col1
----
-83
-83
-83

query I rowsort
SELECT 69 * cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
2829
4071
4209

query I rowsort
SELECT + tab0.col1 * 71 FROM tab0 GROUP BY tab0.col1
----
0
5751

query I rowsort
SELECT + + tab1.col1 * 84 AS col2 FROM tab1 GROUP BY tab1.col1
----
3696
4788
504

query I rowsort
SELECT + - tab2.col2 * + 0 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT - tab1.col0 * + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-1703
SELECT + cor0.col0 DIV 75 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1703
SELECT + cor0.col0 / 75 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
0
0
1

query I rowsort
SELECT - + tab0.col1 + + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + - 96 AS col1 FROM tab1 GROUP BY tab1.col0
----
-96
-96
-96

query I rowsort
SELECT ALL + tab1.col0 * - 33 FROM tab1 GROUP BY tab1.col0
----
-2706
-726
-924

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL 4 AS col1 FROM tab1 GROUP BY tab1.col1
----
4
4
4

query I rowsort
SELECT DISTINCT + 53 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
136
79
96

query I rowsort
SELECT 47 - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-24
2
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 + + col2 * + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
2043
5059
82

query I rowsort
SELECT DISTINCT + - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + ( + cor0.col1 ) * col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT - 43 AS col1 FROM tab2 GROUP BY tab2.col0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-22
-28
-82

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 61 FROM tab1 cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT - col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, col1
----
-41
-59
-61

query I rowsort
SELECT ALL + + 23 FROM tab0 GROUP BY tab0.col1
----
23
23

query I rowsort
SELECT ALL + 3 AS col1 FROM tab2 GROUP BY tab2.col1
----
3
3
3

query I rowsort
SELECT + 76 FROM tab1 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-1724
SELECT + tab0.col2 DIV 51 FROM tab0 GROUP BY tab0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1724
SELECT + tab0.col2 / 51 FROM tab0 GROUP BY tab0.col2
----
0
0
1

query I rowsort
SELECT - 90 * 74 FROM tab1 GROUP BY tab1.col1
----
-6660
-6660
-6660

query I rowsort
SELECT + 77 - 88 * + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-3531
-5115
-5291

query I rowsort
SELECT ( + 5 ) FROM tab1 GROUP BY tab1.col1
----
5
5
5

query I rowsort
SELECT ALL + 66 AS col2 FROM tab0 GROUP BY tab0.col2
----
66
66
66

query I rowsort
SELECT ALL - 97 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-97
-97
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-1730
SELECT + COALESCE ( + 4, - cor0.col0, cor1.col0 DIV + cor1.col2 - cor0.col1 DIV cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
4
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-1730
SELECT + COALESCE ( + 4, - cor0.col0, cor1.col0 / + cor1.col2 - cor0.col1 / cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
4
4

query I rowsort
SELECT ALL + 45 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL - cor0.col2 * ( 25 ) + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1080
-1704
-192

query I rowsort
SELECT 49 + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
132
75
92

query I rowsort
SELECT ALL - 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
58
79
87

query I rowsort
SELECT DISTINCT 23 FROM tab1 GROUP BY tab1.col1
----
23

query I rowsort
SELECT DISTINCT - col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 73 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT DISTINCT + 30 * 44 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
1320

query I rowsort
SELECT DISTINCT 76 FROM tab0 AS cor0 GROUP BY col2
----
76

query I rowsort
SELECT - - tab0.col2 + col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT - cor0.col0 + + cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-83
6518

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
182
184
30

query I rowsort
SELECT ALL - - 57 FROM tab0 GROUP BY tab0.col2
----
57
57
57

query I rowsort
SELECT DISTINCT - + 26 * cor0.col2 AS col2 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
-1170
-1846
-208

query I rowsort
SELECT tab0.col1 * col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 * tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
3977
5723
5917

query I rowsort
SELECT - - col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + 72 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT ALL 63 + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
145
85
91

query I rowsort
SELECT DISTINCT - 14 AS col1 FROM tab2 GROUP BY tab2.col2
----
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( 37 ) col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
-37
-37
-37

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - tab2.col0 AS col1 FROM tab2 WHERE NOT NULL = NULL GROUP BY tab2.col0
----

query I rowsort
SELECT ALL col2 AS col2 FROM tab1 WHERE ( + col0 + - col0 ) = NULL GROUP BY tab1.col2
----

query I rowsort
SELECT col0 FROM tab0 GROUP BY tab0.col0 HAVING ( NULL ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + tab2.col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL 22 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
22
22

query I rowsort
SELECT DISTINCT + 7 AS col2 FROM tab1 GROUP BY tab1.col2
----
7

query I rowsort
SELECT + + tab2.col2 + + col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT + 42 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
42
42
42

query I rowsort
SELECT DISTINCT 90 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
90

query I rowsort
SELECT - 50 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-50
-50
-50

query I rowsort
SELECT DISTINCT cor0.col1 * + 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
4860

query I rowsort
SELECT ALL cor0.col0 * 22 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1
----
2002
2024
330

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab2 GROUP BY tab2.col1
----
41

query I rowsort
SELECT ALL - - 35 * 62 FROM tab0 GROUP BY tab0.col0
----
2170
2170
2170

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 61 * - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3538
4819
5307

query I rowsort
SELECT DISTINCT - col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 59 col2 FROM tab0 GROUP BY col1
----
-59

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-1775
SELECT ALL tab1.col2 DIV col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1775
SELECT ALL tab1.col2 / col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1776
SELECT CASE + tab2.col1 WHEN + CAST( NULL AS SIGNED ) THEN - COALESCE ( + 5, tab2.col0 ) END FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-1776
SELECT CASE + tab2.col1 WHEN + CAST ( NULL AS INTEGER ) THEN - COALESCE ( + 5, tab2.col0 ) END FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 37 FROM tab2 AS cor0 GROUP BY col1
----
37
37
37

query I rowsort
SELECT 71 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + cor0.col0 * ( 0 ) 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 DISTINCT + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + - 82 * 72 AS col1 FROM tab0 GROUP BY tab0.col1
----
-5904
-5904

query I rowsort
SELECT - 46 * 71 FROM tab2 GROUP BY tab2.col2
----
-3266
-3266
-3266

query I rowsort
SELECT ALL - + ( - 61 ) AS col1 FROM tab1 GROUP BY col0
----
61
61
61

query I rowsort
SELECT + 56 AS col1 FROM tab2 GROUP BY tab2.col1
----
56
56
56

query I rowsort
SELECT DISTINCT + 68 FROM tab1 cor0 GROUP BY cor0.col0
----
68

query I rowsort
SELECT 39 FROM tab2 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT + 38 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
38
38
38

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1788
SELECT - col0 * CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1788
SELECT - col0 * CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1789
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1789
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT + cor0.col0 * cor0.col0 + - 58 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1791
618
6831

query I rowsort
SELECT ALL + 45 FROM tab1 GROUP BY tab1.col2
----
45
45
45

query I rowsort
SELECT DISTINCT + ( 76 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
76

query I rowsort
SELECT ( - 71 ) FROM tab1 GROUP BY tab1.col2
----
-71
-71
-71

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT + 49 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
49
49
49

query I rowsort
SELECT + 45 + 26 AS col0 FROM tab1 GROUP BY tab1.col0
----
71
71
71

query I rowsort
SELECT + 98 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT DISTINCT + - NULLIF ( 44, tab2.col0 ) * + 52 AS col0 FROM tab2 GROUP BY tab2.col0
----
-2288

query I rowsort
SELECT - tab2.col0 - - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT cor0.col2 + - col2 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + + tab1.col2 * + 37 FROM tab1 GROUP BY tab1.col2
----
1665
2627
296

query I rowsort
SELECT + cor0.col1 * ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + - 11 FROM tab0 GROUP BY tab0.col2
----
-11
-11
-11

query I rowsort
SELECT ALL - cor0.col1 + NULLIF ( cor0.col1 + - cor0.col1, cor0.col1 * cor0.col1 ) * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - tab2.col2 - + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col2 * 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-2262
-3081
-3393

query I rowsort
SELECT DISTINCT + - tab0.col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL - 63 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
-63
-63

query I rowsort
SELECT + 34 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2754
0

query I rowsort
SELECT + cor0.col0 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
133
150
76

onlyif mysql # DIV for integer division: 
query I rowsort label-1814
SELECT + 10 DIV - 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1814
SELECT + 10 / - 6 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - 2 FROM tab2 GROUP BY col1
----
-2
-2
-2

query I rowsort
SELECT ALL - 42 AS col1 FROM tab2 GROUP BY tab2.col2
----
-42
-42
-42

query I rowsort
SELECT 18 * + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1044
1422
1566

query I rowsort
SELECT ALL + - 25 AS col1 FROM tab2 GROUP BY tab2.col0
----
-25
-25
-25

query I rowsort
SELECT + col2 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT + 94 FROM tab0 cor0 GROUP BY cor0.col2
----
94

query I rowsort
SELECT + tab0.col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - 38 - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-117
-125
-96

query I rowsort
SELECT - 76 FROM tab1 GROUP BY col0
----
-76
-76
-76

query I rowsort
SELECT DISTINCT + + 96 + + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
120
134
175

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT ALL + tab1.col0 * - 2 AS col2 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT ALL + tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL + + 64 FROM tab2 GROUP BY tab2.col2
----
64
64
64

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
133
150
76

query I rowsort
SELECT DISTINCT 41 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41

query I rowsort
SELECT ALL 42 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + ( cor0.col1 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - 7 FROM tab0 GROUP BY tab0.col0
----
-7

query I rowsort
SELECT - 44 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2, cor0.col0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT + 47 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
130
73
90

query I rowsort
SELECT DISTINCT - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT - tab0.col2 * + tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1482
-600
-6320

query I rowsort
SELECT + 51 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
51
51
51

onlyif mysql # DIV for integer division: 
query I rowsort label-1840
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-1840
SELECT + cor0.col1 / ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + 74 FROM tab1 GROUP BY tab1.col0
----
74

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
-24
-38
-79

query I rowsort
SELECT ALL - + 28 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-20
17
43

query I rowsort
SELECT - 25 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT - + tab1.col2 * 90 AS col2 FROM tab1 GROUP BY col2
----
-4050
-6390
-720

query I rowsort
SELECT ALL - tab1.col0 * col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NULL
----
-26
-43
-83

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT cor0.col2 + 40 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
119
127
98

query I rowsort
SELECT ALL 40 AS col0 FROM tab1, tab1 cor0 GROUP BY tab1.col1
----
40
40
40

query I rowsort
SELECT DISTINCT - - ( + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + 13 AS col0 FROM tab1 GROUP BY col2
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-1854
SELECT cor0.col1 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1854
SELECT cor0.col1 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
1

query I rowsort
SELECT + 97 * - 87 - + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-8497
-8518
-8526

query I rowsort
SELECT + ( 19 ) * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1558
-418
-532

query I rowsort
SELECT DISTINCT 38 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3458
3496
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT + ( cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - + ( 80 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT cor0.col1 * - 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-3168
-4104
-432

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1722
3540
3782

query I rowsort
SELECT ALL + 29 FROM tab0 AS cor0 GROUP BY cor0.col1
----
29
29

query I rowsort
SELECT + 20 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col2
----
20
20
20

query I rowsort
SELECT ALL 55 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
55
55
55

query I rowsort
SELECT + 57 AS col2 FROM tab0 GROUP BY tab0.col0
----
57
57
57

query I rowsort
SELECT DISTINCT + 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
35

query I rowsort
SELECT ALL - 50 FROM tab0 AS cor0 GROUP BY col2
----
-50
-50
-50

onlyif mysql # DIV for integer division: 
query I rowsort label-1869
SELECT - 22 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1869
SELECT - 22 / cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT + 50 FROM tab1 GROUP BY tab1.col2
----
50
50
50

query I rowsort
SELECT + 77 FROM tab0 GROUP BY tab0.col2
----
77
77
77

onlyif mysql # DIV for integer division: 
query I rowsort label-1872
SELECT DISTINCT - 38 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-1872
SELECT DISTINCT - 38 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1873
SELECT DISTINCT + cor0.col0 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-1873
SELECT DISTINCT + cor0.col0 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

query I rowsort
SELECT DISTINCT - + 31 AS col2 FROM tab0 GROUP BY tab0.col2
----
-31

query I rowsort
SELECT ALL + + ( + tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 45 * - 23 AS col0 FROM tab2 GROUP BY tab2.col0
----
1035

onlyif mysql # DIV for integer division: 
query I rowsort label-1877
SELECT DISTINCT + 71 DIV + 10 AS col2 FROM tab0 GROUP BY tab0.col2
----
7

skipif mysql # not compatible
query I rowsort label-1877
SELECT DISTINCT + 71 / + 10 AS col2 FROM tab0 GROUP BY tab0.col2
----
7

query I rowsort
SELECT ALL + 26 * + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
2366
2392
390

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col1 ) - cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT + col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - cor0.col2 * - 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1296
2052
4266

query I rowsort
SELECT DISTINCT tab0.col1 + tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL <= - col1
----

query I rowsort
SELECT DISTINCT + - col1 * tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT 4 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
34
34
34

onlyif mysql # DIV for integer division: 
query I rowsort label-1886
SELECT 8 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1886
SELECT 8 / - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 32 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT - NULLIF ( - 30, tab0.col1 ) + + 42 AS col0 FROM tab0 GROUP BY tab0.col1
----
72
72

query I rowsort
SELECT DISTINCT 92 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
92

query I rowsort
SELECT ALL 46 * col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
0
0
3726

query I rowsort
SELECT 57 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
112
126
167

query I rowsort
SELECT DISTINCT 66 AS col2 FROM tab0 GROUP BY tab0.col0
----
66

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-1894
SELECT COALESCE ( col0, + cor0.col0 DIV + CAST( NULL AS SIGNED ) ) - - 25 * - 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-243
-297
-303

skipif mysql # not compatible
query I rowsort label-1894
SELECT COALESCE ( col0, + cor0.col0 / + CAST ( NULL AS INTEGER ) ) - - 25 * - 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-243
-297
-303

onlyif mysql # DIV for integer division: 
query I rowsort label-1895
SELECT - 74 DIV - 93 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-1895
SELECT - 74 / - 93 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT 40 + 55 AS col2 FROM tab1 GROUP BY tab1.col1
----
95
95
95

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 36, cor0.col1 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT DISTINCT - + tab2.col2 + - 38 * col2 FROM tab2 GROUP BY tab2.col2
----
-2262
-3081
-3393

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 col0 FROM tab0 GROUP BY tab0.col2
----
-76
-76
-76

query I rowsort
SELECT + ( tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1901
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1901
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1902
SELECT DISTINCT - tab1.col0 DIV + 57 + 87 FROM tab1 GROUP BY tab1.col0
----
86
87

skipif mysql # not compatible
query I rowsort label-1902
SELECT DISTINCT - tab1.col0 / + 57 + 87 FROM tab1 GROUP BY tab1.col0
----
86
87

query I rowsort
SELECT ALL + ( tab1.col0 ) * - 40 FROM tab1 GROUP BY tab1.col0
----
-1120
-3280
-880

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
47

query I rowsort
SELECT DISTINCT - 16 FROM tab2 GROUP BY tab2.col0
----
-16

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1906
SELECT + + CAST( NULL AS SIGNED ) + 56 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1906
SELECT + + CAST ( NULL AS INTEGER ) + 56 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT - 38 + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
20
41
49

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1909
SELECT DISTINCT CAST( NULL AS SIGNED ) + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-1909
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-1911
SELECT col1 DIV + 43 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1911
SELECT col1 / + 43 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
0
0
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1912
SELECT + tab2.col2 - + CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1912
SELECT + tab2.col2 - + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 * 60 col2 FROM tab0 GROUP BY tab0.col2
----
1440
2280
4740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1916
SELECT + tab2.col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1916
SELECT + tab2.col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-1917
SELECT - cor0.col1 DIV - 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1917
SELECT - cor0.col1 / - 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col1 col2 FROM tab0 GROUP BY col1
----
-81
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1921
SELECT DISTINCT CAST( NULL AS SIGNED ) + 69 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1921
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 69 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT + + 87 FROM tab2 GROUP BY col0
----
87
87
87

query I rowsort
SELECT ALL + 63 FROM tab0 AS cor0 GROUP BY col2
----
63
63
63

query I rowsort
SELECT DISTINCT cor0.col2 + - col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-1925
SELECT DISTINCT - COALESCE ( 94, tab1.col0 DIV - tab1.col0 ) FROM tab1 GROUP BY tab1.col2
----
-94

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-1925
SELECT DISTINCT - COALESCE ( 94, tab1.col0 / - tab1.col0 ) FROM tab1 GROUP BY tab1.col2
----
-94

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + + col1 AS col0 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + 15 * + cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
704
912
96

query I rowsort
SELECT ALL 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15
15

query I rowsort
SELECT cor0.col0 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-53
19
45

query I rowsort
SELECT DISTINCT - + 26 FROM tab1 GROUP BY tab1.col1
----
-26

query I rowsort
SELECT + cor0.col1 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-38
-79
57

query I rowsort
SELECT DISTINCT - 78 FROM tab2 GROUP BY tab2.col0
----
-78

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 60 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT ALL + 49 FROM tab2 GROUP BY tab2.col1
----
49
49
49

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 ALL + 51 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1122
-1428
-4182

query I rowsort
SELECT + 72 * + 22 FROM tab2 GROUP BY col2
----
1584
1584
1584

query I rowsort
SELECT + ( tab0.col0 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 17 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17
17

query I rowsort
SELECT + 93 FROM tab0 cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT DISTINCT - 84 AS col1 FROM tab1 GROUP BY tab1.col2
----
-84

query I rowsort
SELECT DISTINCT - tab2.col2 * tab2.col2 FROM tab2 WHERE - tab2.col2 * - tab2.col1 + + tab2.col1 IS NULL GROUP BY tab2.col2 HAVING NOT tab2.col2 IS NULL
----

query I rowsort
SELECT DISTINCT tab1.col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT 6 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT ALL + 40 * cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
1120
3280
880

query I rowsort
SELECT DISTINCT - - ( - tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 24 FROM tab1 GROUP BY tab1.col0
----
24
24
24

query I rowsort
SELECT ALL 95 AS col1 FROM tab2 GROUP BY col2
----
95
95
95

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 - 65 FROM tab0 AS cor0 GROUP BY col0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT - 40 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-40

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT ALL - + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 97 FROM tab2 GROUP BY tab2.col2
----
-97
-97
-97

query I rowsort
SELECT ( + 21 ) + - cor0.col2 * + ( + cor0.col2 * - cor0.col2 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
195133
493060
658524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col2
----
44
57
6

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 47 FROM tab2 GROUP BY tab2.col0
----
47
47
47

query I rowsort
SELECT DISTINCT 94 * - col2 AS col1 FROM tab2 GROUP BY col2
----
-5452
-7426
-8178

query I rowsort
SELECT ALL 84 * - 29 FROM tab1 GROUP BY col2
----
-2436
-2436
-2436

query I rowsort
SELECT DISTINCT + 83 + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
128
154
91

query I rowsort
SELECT - 18 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1026
-108
-792

onlyif mysql # DIV for integer division: 
query I rowsort label-1970
SELECT + tab0.col2 + - COALESCE ( 1, + tab0.col0 * - tab0.col1, col2 * tab0.col0 + + tab0.col0 DIV tab0.col1 ) * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-1970
SELECT + tab0.col2 + - COALESCE ( 1, + tab0.col0 * - tab0.col1, col2 * tab0.col0 + + tab0.col0 / tab0.col1 ) * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT tab0.col1 FROM tab0 WHERE NULL > NULL GROUP BY tab0.col1
----

query I rowsort
SELECT + tab0.col1 * - 3 AS col1 FROM tab0 GROUP BY tab0.col1
----
-243
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IN ( tab1.col2 )
----

query I rowsort
SELECT DISTINCT + cor0.col0 + - 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-43
-49
11

query I rowsort
SELECT ALL col1 * + 44 FROM tab0 GROUP BY tab0.col1
----
0
3564

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
1944

query I rowsort
SELECT + 54 FROM tab0 GROUP BY tab0.col2
----
54
54
54

query I rowsort
SELECT ALL + 26 FROM tab2 GROUP BY tab2.col2
----
26
26
26

query I rowsort
SELECT ( 86 ) * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3870
6106
688

query I rowsort
SELECT 90 + 70 * col2 FROM tab2 GROUP BY tab2.col2
----
4150
5620
6180

query I rowsort
SELECT ( + cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT NULLIF ( cor0.col1, cor0.col1 ) * 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col2 FROM tab0 GROUP BY tab0.col1
----
86
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1984
SELECT CAST( NULL AS SIGNED ) * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1984
SELECT CAST ( NULL AS INTEGER ) * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab2.col1 * - 98 FROM tab2 GROUP BY tab2.col1
----
-4018
-5782
-5978

query I rowsort
SELECT ALL + + tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + 20 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 54 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - - 70 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1820
3010
5810

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1992
SELECT ALL col0 * CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1992
SELECT ALL col0 * CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-80

query I rowsort
SELECT ALL - tab2.col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + 8 FROM tab2 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT - - col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 30 AS col0 FROM tab2 GROUP BY tab2.col2
----
30

query I rowsort
SELECT DISTINCT + - tab0.col0 - - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT + 89 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
134
160
97

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - tab2.col2 + COALESCE ( + 94, - tab2.col0 - tab2.col2, + tab2.col1, - col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
15
36
7

query I rowsort
SELECT DISTINCT 56 AS col2 FROM tab0 GROUP BY tab0.col1
----
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2002
SELECT - CAST( 18 AS SIGNED ) * 30 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-540
-540
-540

skipif mysql # not compatible
query I rowsort label-2002
SELECT - CAST ( 18 AS INTEGER ) * 30 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-540
-540
-540

query I rowsort
SELECT ALL - CASE 9 WHEN - cor0.col1 THEN cor0.col1 WHEN - cor0.col0 THEN 43 * cor0.col0 WHEN + 67 THEN NULL END * + cor0.col0 - + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 34 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
34

onlyif mysql # DIV for integer division: 
query I rowsort label-2005
SELECT ALL tab1.col1 + ( tab1.col1 ) DIV + col1 FROM tab1 GROUP BY tab1.col1
----
45
58
7

skipif mysql # not compatible
query I rowsort label-2005
SELECT ALL tab1.col1 + ( tab1.col1 ) / + col1 FROM tab1 GROUP BY tab1.col1
----
45
58
7

query I rowsort
SELECT DISTINCT 26 * cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
2054
624
988

query I rowsort
SELECT DISTINCT ( + 0 ) FROM tab1 GROUP BY tab1.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 16 col1 FROM tab1 GROUP BY tab1.col0
----
16
16
16

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

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 ALL + tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT - - 20 AS col2 FROM tab1 GROUP BY tab1.col2
----
20
20
20

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( 62, tab1.col1 * + tab1.col1 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
62
62
62

query I rowsort
SELECT DISTINCT + + 5 + 36 FROM tab1 GROUP BY tab1.col0
----
41

query I rowsort
SELECT DISTINCT - 49 + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-34
42
43

query I rowsort
SELECT - + 68 FROM tab0 GROUP BY tab0.col1
----
-68
-68

query I rowsort
SELECT - + 24 FROM tab1 GROUP BY tab1.col1
----
-24
-24
-24

query I rowsort
SELECT DISTINCT 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2019
SELECT + tab1.col2 - tab1.col2 DIV 59 FROM tab1 GROUP BY tab1.col2
----
45
70
8

skipif mysql # not compatible
query I rowsort label-2019
SELECT + tab1.col2 - tab1.col2 / 59 FROM tab1 GROUP BY tab1.col2
----
45
70
8

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col1 * - 47 FROM tab1 AS cor0 GROUP BY col1
----
2068
2679
282

query I rowsort
SELECT DISTINCT + + 74 FROM tab1 GROUP BY tab1.col0
----
74

query I rowsort
SELECT DISTINCT 17 FROM tab0 AS cor0 GROUP BY col0
----
17

query I rowsort
SELECT ALL cor0.col2 * + cor0.col0 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
1392
5394
7268

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT 2 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
114
12
88

query I rowsort
SELECT ALL cor0.col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT cor0.col0 + 76 FROM tab0 AS cor0 GROUP BY col0
----
102
119
159

query I rowsort
SELECT DISTINCT 3 FROM tab2 GROUP BY tab2.col2
----
3

query I rowsort
SELECT - 96 FROM tab0 GROUP BY col0
----
-96
-96
-96

query I rowsort
SELECT ALL - 61 AS col1 FROM tab0 GROUP BY col0
----
-61
-61
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-2033
SELECT DISTINCT - 63 DIV tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-4
0

skipif mysql # not compatible
query I rowsort label-2033
SELECT DISTINCT - 63 / tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-4
0

query I rowsort
SELECT DISTINCT + 11 AS col2 FROM tab0 GROUP BY tab0.col2
----
11

query I rowsort
SELECT DISTINCT cor0.col2 + col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
105
38
79

query I rowsort
SELECT DISTINCT - 18 * - 37 AS col0 FROM tab0 GROUP BY tab0.col0
----
666

onlyif mysql # DIV for integer division: 
query I rowsort label-2037
SELECT DISTINCT + + 22 DIV tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-2037
SELECT DISTINCT + + 22 / tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0
1

query I rowsort
SELECT ALL - col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6561
0

query I rowsort
SELECT ALL 52 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
52
52
52

query I rowsort
SELECT ALL tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT col1 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NULL
----
-44
-57
-6

query I rowsort
SELECT ALL - col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL <> NULL
----

query I rowsort
SELECT DISTINCT + 80 * - col2 FROM tab2 GROUP BY col2
----
-4640
-6320
-6960

query I rowsort
SELECT + 39 FROM tab0 GROUP BY tab0.col2
----
39
39
39

query I rowsort
SELECT DISTINCT 8 FROM tab2 GROUP BY col1
----
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - 18 AS col0 FROM tab0 cor0 GROUP BY col2
----
-18
-18
-18

query I rowsort
SELECT DISTINCT 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24

query I rowsort
SELECT - 11 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-11
-11
-11

query I rowsort
SELECT DISTINCT 26 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26

query I rowsort
SELECT + + 50 FROM tab1 GROUP BY tab1.col1
----
50
50
50

query I rowsort
SELECT DISTINCT ( 32 ) FROM tab2 GROUP BY tab2.col0
----
32

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + 26 FROM tab1 GROUP BY tab1.col2
----
26
26
26

onlyif mysql # DIV for integer division: 
query I rowsort label-2057
SELECT ALL tab1.col0 DIV tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2057
SELECT ALL tab1.col0 / tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - 40 + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-16
-2
39

query I rowsort
SELECT ALL 90 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT + 74 + + cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
138
2099
5115

query I rowsort
SELECT tab1.col1 - 93 AS col1 FROM tab1 GROUP BY tab1.col1
----
-36
-49
-87

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2064
SELECT DISTINCT cor0.col0 DIV 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-2064
SELECT DISTINCT cor0.col0 / 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT 52 * - tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-2091
-3009
-3111

query I rowsort
SELECT DISTINCT - 22 AS col2 FROM tab2 GROUP BY tab2.col2
----
-22

onlyif mysql # DIV for integer division: 
query I rowsort label-2067
SELECT + col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2067
SELECT + col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT 80 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 83 ) col2 FROM tab0 cor0 GROUP BY col1
----
83
83

query I rowsort
SELECT DISTINCT + 16 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
16

query I rowsort
SELECT + + 46 AS col2 FROM tab2 GROUP BY tab2.col0
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - NULLIF ( 83, - tab0.col0 ) * + 3 + 86 * tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
1987
3449
6889

query I rowsort
SELECT 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT + ( tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 27 FROM tab2 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
64

query I rowsort
SELECT ALL col2 + 55 FROM tab0 AS cor0 GROUP BY cor0.col1, col1, cor0.col2
----
134
79
93

query I rowsort
SELECT - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT 53 FROM tab0 cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT 47 * + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
2726
3713
4089

query I rowsort
SELECT ALL - - tab2.col1 * col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT + cor0.col2 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT ALL tab2.col1 * - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + cor0.col2 * cor0.col2 + 43 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1487
619
6284

query I rowsort
SELECT 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 6 - + tab2.col2 * tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-3370
-6247
-7575

query I rowsort
SELECT ALL - 68 AS col1 FROM tab2 GROUP BY col0
----
-68
-68
-68

query I rowsort
SELECT ALL - 46 FROM tab0 GROUP BY tab0.col2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT + 75 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT + tab1.col0 * 28 AS col2 FROM tab1 GROUP BY tab1.col0
----
2296
616
784

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT col0 + COALESCE ( 51, tab2.col2 * tab2.col1, - 35 * - tab2.col0 + tab2.col1 ) FROM tab2 GROUP BY tab2.col0
----
142
143
66

query I rowsort
SELECT + + tab1.col1 + 62 FROM tab1 GROUP BY tab1.col1
----
106
119
68

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
57

query I rowsort
SELECT + col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + + tab0.col2 - 70 AS col0 FROM tab0 GROUP BY tab0.col2
----
-32
-46
9

query I rowsort
SELECT DISTINCT - tab1.col2 + 18 AS col1 FROM tab1 GROUP BY col2
----
-27
-53
10

query I rowsort
SELECT ALL cor0.col1 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-2565
-3124
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 94 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
94

query I rowsort
SELECT ALL - tab1.col0 * + col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + 29 AS col1 FROM tab2 GROUP BY col0
----
29
29
29

query I rowsort
SELECT - tab1.col1 * + 80 FROM tab1 GROUP BY tab1.col1
----
-3520
-4560
-480

query I rowsort
SELECT DISTINCT - - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL 63 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
63
63
63

query I rowsort
SELECT DISTINCT - tab2.col0 + tab2.col0 * 84 AS col2 FROM tab2 GROUP BY tab2.col0
----
1245
7553
7636

query I rowsort
SELECT ALL + - 20 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-26
-64
-77

query I rowsort
SELECT + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL + 4 FROM tab2 GROUP BY tab2.col0
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 col1 FROM tab2 GROUP BY col1
----
-98

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - - COALESCE ( 27, tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
27
27
27

query I rowsort
SELECT + 79 AS col2 FROM tab1 GROUP BY tab1.col1
----
79
79
79

query I rowsort
SELECT - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - tab2.col2 AS col1 FROM tab2 WHERE NULL IS NULL GROUP BY tab2.col2 HAVING NOT NULL = NULL
----

query I rowsort
SELECT - cor0.col1 + - ( cor0.col1 + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-123
-177
-183

query I rowsort
SELECT 30 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 50 col0 FROM tab1 GROUP BY tab1.col1
----
50

query I rowsort
SELECT 98 FROM tab0 AS cor0 GROUP BY col1
----
98
98

query I rowsort
SELECT DISTINCT col1 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT - 64 AS col2 FROM tab0 GROUP BY tab0.col2
----
-64

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + ( - cor0.col0 ) * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
1260
176
5822

query I rowsort
SELECT - 76 - tab2.col0 * + ( + tab2.col0 * + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-3451
-753647
-778764

query I rowsort
SELECT + 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1406
552
6162

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
3483

query I rowsort
SELECT ALL CASE tab2.col2 WHEN 44 THEN tab2.col2 * tab2.col2 WHEN - tab2.col2 * - 8 THEN NULL END AS col1 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 84 AS col0 FROM tab0 GROUP BY tab0.col1
----
84

query I rowsort
SELECT - 71 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-71
-71

query I rowsort
SELECT ALL 22 FROM tab2 GROUP BY tab2.col2
----
22
22
22

query I rowsort
SELECT 20 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT + - 72 + - tab0.col0 * + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1921
-6961
-748

query I rowsort
SELECT DISTINCT + - 95 FROM tab2 GROUP BY tab2.col1
----
-95

query I rowsort
SELECT DISTINCT - + 14 FROM tab1 GROUP BY col2
----
-14

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-225
-8281
-8464

query I rowsort
SELECT ALL - 3 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT cor0.col0 - + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + + 63 AS col0 FROM tab0 GROUP BY tab0.col2
----
63
63
63

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT DISTINCT + 64 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
64

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 14 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-14
-14
-14

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-2144
SELECT DISTINCT + cor0.col1 DIV + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
0
3

skipif mysql # not compatible
query I rowsort label-2144
SELECT DISTINCT + cor0.col1 / + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
0
3

query I rowsort
SELECT 59 * + 67 FROM tab0 AS cor0 GROUP BY col1
----
3953
3953

query I rowsort
SELECT ALL + + 64 AS col2 FROM tab1 GROUP BY tab1.col1
----
64
64
64

query I rowsort
SELECT DISTINCT 31 FROM tab2 GROUP BY col1
----
31

query I rowsort
SELECT ALL + 42 FROM tab0 GROUP BY col1
----
42
42

query I rowsort
SELECT + 0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL - 1 * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - tab2.col2 * + 19 AS col1 FROM tab2 GROUP BY tab2.col2
----
-1102
-1501
-1653

onlyif mysql # DIV for integer division: 
query I rowsort label-2153
SELECT 71 + col1 DIV - col0 AS col0 FROM tab0 AS cor0 GROUP BY col2, col0, cor0.col1
----
70
71
71

skipif mysql # not compatible
query I rowsort label-2153
SELECT 71 + col1 / - col0 AS col0 FROM tab0 AS cor0 GROUP BY col2, col0, cor0.col1
----
70
71
71

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2028
3071
989

query I rowsort
SELECT - cor0.col0 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1260
-176
-5822

query I rowsort
SELECT - 72 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-72
-72
-72

query I rowsort
SELECT - + tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL 44 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT + 88 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
88
88
88

query I rowsort
SELECT ALL ( tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 83 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-83

query I rowsort
SELECT + 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
48
48

onlyif mysql # DIV for integer division: 
query I rowsort label-2164
SELECT + tab2.col1 DIV col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2164
SELECT + tab2.col1 / col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT cor0.col1 + + 1 FROM tab1 AS cor0 GROUP BY col1
----
45
58
7

onlyif mysql # DIV for integer division: 
query I rowsort label-2166
SELECT 93 DIV + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2166
SELECT 93 / + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1
2
3

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 * COALESCE ( - 65, cor0.col1 * + ( - cor0.col1 * cor0.col2 ) + cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
-1408
-1792
-5248

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 + + 59 - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
103
116
65

query I rowsort
SELECT DISTINCT - tab1.col0 * 63 FROM tab1 GROUP BY tab1.col0
----
-1386
-1764
-5166

onlyif mysql # DIV for integer division: 
query I rowsort label-2171
SELECT - + tab0.col0 - tab0.col0 DIV - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-25
-42
-82

skipif mysql # not compatible
query I rowsort label-2171
SELECT - + tab0.col0 - tab0.col0 / - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-25
-42
-82

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 * col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT ALL + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col2 + + cor0.col1 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1968
38
79

query I rowsort
SELECT + 89 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
28
30
48

query I rowsort
SELECT 44 FROM tab0 AS cor0 GROUP BY col2
----
44
44
44

query I rowsort
SELECT cor0.col1 * 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3402

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2179
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2179
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 36 FROM tab2 GROUP BY tab2.col1
----
-36
-36
-36

query I rowsort
SELECT ALL 86 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
86
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + tab2.col2 * - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 10 col2 FROM tab0 GROUP BY tab0.col2
----
-10

query I rowsort
SELECT + 86 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1290
7826
7912

onlyif mysql # DIV for integer division: 
query I rowsort label-2186
SELECT cor0.col2 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-2186
SELECT cor0.col2 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
3

query I rowsort
SELECT ALL 49 FROM tab2 GROUP BY col0
----
49
49
49

query I rowsort
SELECT - + 44 + col1 FROM tab2 GROUP BY tab2.col1
----
-3
15
17

query I rowsort
SELECT DISTINCT + 52 + tab2.col2 * - ( - 78 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
4576
6214
6838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
14
14
14

query I rowsort
SELECT ALL - 55 AS col1 FROM tab0 GROUP BY tab0.col0
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
61
61
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2193
SELECT - 16 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2193
SELECT - 16 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT DISTINCT 87 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
113
130
170

query I rowsort
SELECT ALL + + col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 86 FROM tab1 AS cor0 GROUP BY col0
----
86
86
86

query I rowsort
SELECT - 10 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0, cor0.col1
----
-10
-10
-10

query I rowsort
SELECT ALL 31 * - 23 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-713
-713
-713

query I rowsort
SELECT col1 * - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-6561
0
0

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT ALL - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 37 * - 30 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-1110

query I rowsort
SELECT DISTINCT + + tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + 68 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
68
68
68

query I rowsort
SELECT COALESCE ( + ( cor0.col1 ), - cor0.col2 + - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT 97 * + 55 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
5274
5276
5294

query I rowsort
SELECT DISTINCT + + 98 * 41 FROM tab0 GROUP BY col1
----
4018

query I rowsort
SELECT - tab1.col0 * col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-2211
SELECT + tab1.col0 + tab1.col0 DIV 97 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-2211
SELECT + tab1.col0 + tab1.col0 / 97 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-87
-87
-87

query I rowsort
SELECT DISTINCT 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43

query I rowsort
SELECT DISTINCT - 21 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
1218
1659
1827

onlyif mysql # DIV for integer division: 
query I rowsort label-2215
SELECT cor0.col1 DIV - 78 + + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
80

skipif mysql # not compatible
query I rowsort label-2215
SELECT cor0.col1 / - 78 + + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
80

query I rowsort
SELECT - + 49 AS col1 FROM tab2 GROUP BY tab2.col1
----
-49
-49
-49

query I rowsort
SELECT + + 76 FROM tab2 GROUP BY tab2.col1
----
76
76
76

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

query I rowsort
SELECT DISTINCT - 8 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-8

query I rowsort
SELECT DISTINCT + 0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT ALL 28 AS col2 FROM tab1 GROUP BY tab1.col0
----
28
28
28

query I rowsort
SELECT DISTINCT + 96 FROM tab1 GROUP BY tab1.col2
----
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 * tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
2730
2760
450

query I rowsort
SELECT DISTINCT - - 43 FROM tab2 GROUP BY tab2.col0
----
43

query I rowsort
SELECT DISTINCT + 61 AS col2 FROM tab2 GROUP BY tab2.col0
----
61

query I rowsort
SELECT - 83 * - 25 AS col2 FROM tab1 GROUP BY tab1.col2
----
2075
2075
2075

query I rowsort
SELECT - 55 FROM tab2 GROUP BY tab2.col2
----
-55
-55
-55

query I rowsort
SELECT - 38 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
20
41
49

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab0 cor0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 99 col1 FROM tab2 GROUP BY tab2.col1
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 60 - + 72 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-12

query I rowsort
SELECT ALL tab2.col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - - tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col0 + 9 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-176
-224
-656

query I rowsort
SELECT ALL - 59 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-59
-59
-59

query I rowsort
SELECT ALL 34 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT DISTINCT + 29 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29

query I rowsort
SELECT 32 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 77 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-10
-2
19

onlyif mysql # DIV for integer division: 
query I rowsort label-2243
SELECT - 1 * 61 + cor0.col2 DIV - col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-61
-61
-62

skipif mysql # not compatible
query I rowsort label-2243
SELECT - 1 * 61 + cor0.col2 / - col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-61
-61
-62

query I rowsort
SELECT DISTINCT + 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 51 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT - 88 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-88
-88
-88

query I rowsort
SELECT - 68 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-68
-68
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 35 * cor0.col1 - + 52 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1488
158
1943

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col0, cor0.col2
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT cor0.col1 + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT tab1.col0 * + 89 AS col2 FROM tab1 GROUP BY tab1.col0
----
1958
2492
7298

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2258
SELECT + + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2258
SELECT + + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 96 AS col0 FROM tab1 GROUP BY tab1.col1
----
96
96
96

query I rowsort
SELECT DISTINCT 46 AS col1 FROM tab1 GROUP BY tab1.col2
----
46

query I rowsort
SELECT ALL - + 51 FROM tab2 GROUP BY tab2.col2
----
-51
-51
-51

query I rowsort
SELECT ALL + 93 - - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
115
121
175

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING - col2 IS NULL
----

query I rowsort
SELECT tab2.col2 * - tab2.col2 AS col1 FROM tab2 WHERE NULL = + tab2.col0 GROUP BY col2 HAVING NOT - col2 IS NULL
----

query I rowsort
SELECT ALL + 57 FROM tab0 GROUP BY tab0.col2
----
57
57
57

query I rowsort
SELECT tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 * + 55 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
2296
3304
3416

query I rowsort
SELECT - 34 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-117
-60
-77

query I rowsort
SELECT + - tab2.col2 * - 77 FROM tab2 GROUP BY tab2.col2
----
4466
6083
6699

query I rowsort
SELECT DISTINCT 68 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1496
1904
5576

query I rowsort
SELECT + 99 * 51 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5049
5049
5049

query I rowsort
SELECT - 80 + + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-35
-72
-9

query I rowsort
SELECT ALL 63 - - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
121
142
150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 1 col1 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - col0 - tab1.col0 AS col0 FROM tab1 GROUP BY col0 HAVING ( NULL ) IS NULL
----
-164
-44
-56

query I rowsort
SELECT - tab1.col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT + tab2.col2 AS col0 FROM tab2 WHERE NOT ( tab2.col0 / + tab2.col0 ) = NULL GROUP BY col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT ALL + col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL BETWEEN NULL AND col2
----

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - - 78 AS col1 FROM tab0 GROUP BY tab0.col0
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - 76 - - 9 FROM tab1 GROUP BY tab1.col2
----
-67
-67
-67

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - 21 * - cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1491
168
945

query I rowsort
SELECT ALL + 43 FROM tab1 cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT 66 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6006
6072
990

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN ( - tab1.col1 / + tab1.col1 ) AND + tab1.col0 GROUP BY tab1.col1
----

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col2 + - 3 FROM tab2 cor0 GROUP BY cor0.col2
----
55
76
84

query I rowsort
SELECT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING - tab2.col1 IS NULL
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2294
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2294
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT + 35 FROM tab1 AS cor0 GROUP BY col2
----
35

query I rowsort
SELECT + 74 AS col2 FROM tab2 GROUP BY tab2.col2
----
74
74
74

query I rowsort
SELECT 70 AS col2 FROM tab0 GROUP BY tab0.col2
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 col0 FROM tab1 GROUP BY tab1.col2
----
53
53
53

query I rowsort
SELECT ALL tab1.col0 * + col0 + tab1.col0 AS col1 FROM tab1 WHERE NOT col2 + col1 BETWEEN ( NULL ) AND + tab1.col1 GROUP BY col0 HAVING NOT NULL IN ( + tab1.col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 + col2 col0 FROM tab2 GROUP BY tab2.col2 HAVING tab2.col2 / col2 <= NULL
----

query I rowsort
SELECT 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
93
93
93

query I rowsort
SELECT ALL - 76 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-120
-133
-82

query I rowsort
SELECT + 80 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + ( - 55 ) * + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1320
-2090
-4345

onlyif mysql # DIV for integer division: 
query I rowsort label-2306
SELECT - tab2.col1 DIV - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2306
SELECT - tab2.col1 / - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT - tab2.col2 - - tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
0
0
0

query I rowsort
SELECT DISTINCT 60 FROM tab0 AS cor0 GROUP BY cor0.col2
----
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2309
SELECT - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2309
SELECT - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 94 FROM tab1 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT ALL 33 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2673

query I rowsort
SELECT ALL - 7 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-13
-51
-64

query I rowsort
SELECT - - 85 * 51 FROM tab2 GROUP BY tab2.col1
----
4335
4335
4335

query I rowsort
SELECT 56 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT - 41 - col2 FROM tab1 GROUP BY tab1.col2
----
-112
-49
-86

query I rowsort
SELECT DISTINCT 27 AS col2 FROM tab0 GROUP BY tab0.col2
----
27

query I rowsort
SELECT ALL - 40 FROM tab2 GROUP BY tab2.col2
----
-40
-40
-40

query I rowsort
SELECT tab1.col1 - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING ( NULL ) IN ( tab1.col1 )
----

query I rowsort
SELECT DISTINCT col1 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-32
-51
46

query I rowsort
SELECT 45 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT col0 AS col2 FROM tab0 GROUP BY col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT 50 AS col1 FROM tab2 GROUP BY tab2.col2
----
50
50
50

query I rowsort
SELECT 33 FROM tab2 GROUP BY tab2.col2
----
33
33
33

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 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 - + 52 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-135
-78
-95

query I rowsort
SELECT + + col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT - 4 FROM tab0 cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT ALL 75 + + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
103
157
97

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
118
122
82

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 WHERE NOT NULL IS NULL GROUP BY tab1.col2
----

query I rowsort
SELECT DISTINCT 84 FROM tab0 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT - tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING ( NULL ) > NULL
----

query I rowsort
SELECT DISTINCT + 0 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT DISTINCT + 25 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
25

query I rowsort
SELECT DISTINCT + 90 * 78 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7020

query I rowsort
SELECT DISTINCT + 94 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
94

query I rowsort
SELECT 23 * 74 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1702
1702
1702

query I rowsort
SELECT DISTINCT tab2.col0 * - ( - 1 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 94 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
94
94
94

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.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) IS NULL
----
58
79
87

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 WHERE NULL IS NOT NULL GROUP BY tab0.col0
----

query I rowsort
SELECT tab2.col1 - tab2.col1 FROM tab2 WHERE NOT NULL IS NOT NULL GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - 28 * - cor0.col2 - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1566
2133
2349

query I rowsort
SELECT DISTINCT - + tab0.col0 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT - 82 + - tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
-173
-174
-97

query I rowsort
SELECT ALL 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 AS cor0 WHERE col1 NOT IN ( + cor0.col2 ) GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2 HAVING ( NULL ) NOT IN ( cor0.col2 )
----

query I rowsort
SELECT col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) IS NOT NULL
----
45
71
8

query I rowsort
SELECT ALL - 46 FROM tab0 GROUP BY tab0.col0
----
-46
-46
-46

query I rowsort
SELECT ALL - tab0.col0 AS col0 FROM tab0 WHERE tab0.col0 * + tab0.col2 IS NOT NULL AND NOT tab0.col1 NOT IN ( tab0.col2 ) GROUP BY tab0.col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + tab0.col2 - - 60 AS col0 FROM tab0 GROUP BY tab0.col2
----
139
84
98

query I rowsort
SELECT 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
60
60

query I rowsort
SELECT ALL + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 12 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - ( ( col1 ) ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1, col1
----
-44
-57
-6

query I rowsort
SELECT ALL 74 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
1776
2812
5846

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0 HAVING NOT col2 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT - 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-9

query I rowsort
SELECT ALL - col2 * tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 75 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT - 42 AS col0 FROM tab1 GROUP BY col2
----
-42
-42
-42

query I rowsort
SELECT - 6 * 7 FROM tab1 GROUP BY col1
----
-42
-42
-42

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL <> NULL
----

query I rowsort
SELECT ALL tab1.col2 * 86 FROM tab1 GROUP BY tab1.col2
----
3870
6106
688

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + 51 + + cor0.col1 * + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2429
4712
5358

query I rowsort
SELECT ALL - + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( tab1.col1 ) IS NULL
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 66 col2 FROM tab1 GROUP BY tab1.col2
----
66

query I rowsort
SELECT DISTINCT 1 * - cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2380
SELECT ALL cor0.col0 DIV 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2380
SELECT ALL cor0.col0 / 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT DISTINCT 23 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2383
SELECT cor0.col1 * cor0.col1 + - CAST( 71 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-35
1865
3178

skipif mysql # not compatible
query I rowsort label-2383
SELECT cor0.col1 * cor0.col1 + - CAST ( 71 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-35
1865
3178

query I rowsort
SELECT ALL 80 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

query I rowsort
SELECT 72 AS col1 FROM tab0 GROUP BY col2
----
72
72
72

query I rowsort
SELECT DISTINCT - 49 * 38 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
-1862

query I rowsort
SELECT ALL - 8 FROM tab2 AS cor0 GROUP BY col2
----
-8
-8
-8

query I rowsort
SELECT DISTINCT + tab0.col0 FROM tab0 WHERE col1 IS NULL GROUP BY col0 HAVING ( tab0.col0 ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IN ( tab0.col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT 88 AS col2 FROM tab1 GROUP BY tab1.col2
----
88
88
88

query I rowsort
SELECT DISTINCT cor1.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col0 * - 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2090
-2660
-7790

query I rowsort
SELECT ALL + 16 + + col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
61
87

query I rowsort
SELECT - 42 + - tab0.col1 FROM tab0 GROUP BY col1
----
-123
-42

query I rowsort
SELECT DISTINCT - ( 27 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-27

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IN ( cor0.col2 )
----

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) NOT BETWEEN ( NULL ) AND NULL
----

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 - - 96 FROM tab1 GROUP BY tab1.col1
----
96
96
96

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT - 14 + cor0.col0 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, col0
----
-1863
-690
-6903

query I rowsort
SELECT - 81 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4698
6399
7047

query I rowsort
SELECT ALL 99 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT ALL 67 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
112
138
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 + + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1722
3540
3782

query I rowsort
SELECT DISTINCT - tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - 86 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-86
-86
-86

query I rowsort
SELECT DISTINCT 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6
6
6

query I rowsort
SELECT DISTINCT 29 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
29

query I rowsort
SELECT DISTINCT - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 25 FROM tab0 AS cor0 GROUP BY col2
----
25
25
25

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL NULLIF ( + cor0.col1, + cor0.col1 ) AS col2 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 ALL cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + + 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
122
143
151

query I rowsort
SELECT ALL + cor0.col2 * 88 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2112
3344
6952

query I rowsort
SELECT 29 + - 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + 9 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
67
88
96

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2426
SELECT ALL cor0.col0 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2426
SELECT ALL cor0.col0 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2427
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2427
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 58 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab2 cor0 WHERE NULL IS NOT NULL GROUP BY cor0.col1
----

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT 27 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
27
27
27

query I rowsort
SELECT ALL + ( + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 22 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22

onlyif mysql # DIV for integer division: 
query I rowsort label-2435
SELECT cor0.col2 + cor0.col2 DIV cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-2435
SELECT cor0.col2 + cor0.col2 / cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
59
80
88

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, col2
----
-2520
-3053
-40

onlyif mysql # DIV for integer division: 
query I rowsort label-2438
SELECT DISTINCT 66 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-2438
SELECT DISTINCT 66 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-2440
SELECT DISTINCT 23 + cor0.col0 DIV 27 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
24
26

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2440
SELECT DISTINCT 23 + cor0.col0 / 27 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
24
26

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 98, - col2, - cor0.col0 ) + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
124
141
181

query I rowsort
SELECT cor0.col1 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-38
-79
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 * tab1.col1 col0 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) NOT IN ( tab1.col1 )
----

query I rowsort
SELECT + tab0.col1 FROM tab0 WHERE NOT ( col2 ) IS NOT NULL GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col2, col0
----
0

query I rowsort
SELECT + 34 FROM tab1 cor0 GROUP BY cor0.col0, col0
----
34
34
34

query I rowsort
SELECT DISTINCT 60 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
60

onlyif mysql # DIV for integer division: 
query I rowsort label-2448
SELECT DISTINCT ( COALESCE ( 14, col0 DIV + cor0.col2 ) ) DIV cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2448
SELECT DISTINCT ( COALESCE ( 14, col0 / + cor0.col2 ) ) / cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - - 56 AS col0 FROM tab1 GROUP BY tab1.col1
----
56
56
56

query I rowsort
SELECT + + 3 + 73 FROM tab2 GROUP BY tab2.col0
----
76
76
76

query I rowsort
SELECT - 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-40
-40
-40

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL + 24 * - 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2064
-2064
-2064

query I rowsort
SELECT ALL + 7 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
22
98
99

onlyif mysql # DIV for integer division: 
query I rowsort label-2455
SELECT ALL cor0.col0 DIV 81 + - 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-93
-94
-94

skipif mysql # not compatible
query I rowsort label-2455
SELECT ALL cor0.col0 / 81 + - 94 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-93
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 * 25 + tab1.col0 col2 FROM tab1 GROUP BY col0
----
2132
572
728

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 - - tab0.col0 col0 FROM tab0 GROUP BY col0 HAVING NOT ( NULL ) NOT BETWEEN tab0.col0 AND NULL
----

query I rowsort
SELECT - 70 * tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1518
-1932
-5658

query I rowsort
SELECT 53 AS col1 FROM tab2 GROUP BY tab2.col2
----
53
53
53

query I rowsort
SELECT + tab0.col2 - + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL - - 30 AS col0 FROM tab1 GROUP BY col2
----
30
30
30

query I rowsort
SELECT - 43 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-43
-43
-43

onlyif mysql # DIV for integer division: 
query I rowsort label-2464
SELECT 56 DIV + 52 + - col1 FROM tab2 GROUP BY tab2.col1
----
-40
-58
-60

skipif mysql # not compatible
query I rowsort label-2464
SELECT 56 / + 52 + - col1 FROM tab2 GROUP BY tab2.col1
----
-40
-58
-60

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2 HAVING col1 IS NULL AND NULL IN ( cor0.col2 )
----

query I rowsort
SELECT ALL tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
0
0
0

query I rowsort
SELECT - col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-6561
0
0

query I rowsort
SELECT 43 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
43
43
43

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 27 FROM tab1 GROUP BY tab1.col2
----
27
27
27

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT - 4 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
0
81

query I rowsort
SELECT 55 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
55
55
55

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT + - tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 20 FROM tab1 GROUP BY tab1.col1
----
20
20
20

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 - col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2 WHERE NOT + tab2.col2 < NULL GROUP BY tab2.col2
----

query I rowsort
SELECT - tab2.col2 FROM tab2 WHERE NOT NULL IS NOT NULL GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT - tab1.col2 - + tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 * col2 col0 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) NOT IN ( - tab1.col2 )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-2490
SELECT ALL + cor0.col2 DIV + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2490
SELECT ALL + cor0.col2 / + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 col0 FROM tab2 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 35 FROM tab1 AS cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT DISTINCT - 30 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-30

query I rowsort
SELECT DISTINCT col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NOT NULL
----
1681
3481
3721

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
-81
0

query I rowsort
SELECT DISTINCT - 23 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23

query I rowsort
SELECT - + 6 AS col0 FROM tab2 GROUP BY tab2.col0
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 0 * - 90 + tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT - 4 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4
-4

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + + COALESCE ( - 81, tab0.col1 ) * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-2106
-3483
-6723

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING ( NULL ) IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-2504
SELECT ALL col0 DIV - 86 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2504
SELECT ALL col0 / - 86 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2505
SELECT DISTINCT 63 DIV 65 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-2505
SELECT DISTINCT 63 / 65 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT + ( cor0.col0 ) + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ALL + 12 FROM tab1 GROUP BY tab1.col0
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 48 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
48
48
48

query I rowsort
SELECT 17 FROM tab1 cor0 GROUP BY col2
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2512
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2512
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab0.col1 * - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT - 51 FROM tab2 GROUP BY col1
----
-51
-51
-51

query I rowsort
SELECT DISTINCT 41 AS col1 FROM tab1 GROUP BY tab1.col2
----
41

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL cor1.col1 + cor1.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + cor0.col1 * COALESCE ( 69, - cor0.col1 + + cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5589

query I rowsort
SELECT - 51 FROM tab0 GROUP BY tab0.col0
----
-51
-51
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 50 AS col2 FROM tab2 GROUP BY tab2.col1
----
-50
-50
-50

query I rowsort
SELECT 13 FROM tab0 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT - 61 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT ALL 69 FROM tab0 GROUP BY tab0.col2
----
69
69
69

query I rowsort
SELECT + tab1.col2 + - 98 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-4365
-6887
-776

query I rowsort
SELECT DISTINCT + 64 * - tab2.col1 FROM tab2 GROUP BY col1
----
-2624
-3776
-3904

query I rowsort
SELECT DISTINCT 95 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
16
57
71

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL NOT IN ( + cor0.col1 )
----

query I rowsort
SELECT DISTINCT - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT + tab0.col1 = + tab0.col1
----

query I rowsort
SELECT - - ( - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2533
SELECT - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2533
SELECT - CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( - 18, cor0.col1 * + cor0.col0, - cor0.col1 * cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-18
-18

query I rowsort
SELECT 4 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2
-40
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT 28 * + 52 FROM tab0 cor0 GROUP BY cor0.col1
----
1456
1456

query I rowsort
SELECT ALL + 9 FROM tab0 AS cor0 GROUP BY cor0.col1
----
9
9

query I rowsort
SELECT + 63 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2
22
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2540
SELECT ALL + CAST( NULL AS SIGNED ) * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2540
SELECT ALL + CAST ( NULL AS INTEGER ) * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 5 + + 82 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
87
87
87

query I rowsort
SELECT - 34 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-34
-34
-34

query I rowsort
SELECT + 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
48
48

query I rowsort
SELECT ALL + 20 AS col2 FROM tab1 GROUP BY col1
----
20
20
20

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 88 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT DISTINCT + 64 FROM tab0 GROUP BY tab0.col1
----
64

query I rowsort
SELECT ALL + 63 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
121
142
150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) NOT IN ( cor0.col0 )
----

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0 WHERE NOT - tab0.col1 / tab0.col2 IS NOT NULL GROUP BY tab0.col2
----

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 ALL - 95 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3895
5605
5795

query I rowsort
SELECT ( 95 ) * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
1425
8645
8740

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 + + col0 AS col0 FROM tab2 AS cor0 WHERE ( NULL ) IS NULL GROUP BY cor0.col0
----
240
8372
8556

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

query I rowsort
SELECT ALL - 5 AS col0 FROM tab0 GROUP BY col1
----
-5
-5

query I rowsort
SELECT DISTINCT + 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
38

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 - - tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT - col2 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
-45
-71
-8

query I rowsort
SELECT cor0.col2 * - cor0.col2 + 93 * + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1562
2160
680

query I rowsort
SELECT 23 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
1863

query I rowsort
SELECT ALL tab1.col1 AS col2 FROM tab1 GROUP BY col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - 68 FROM tab2 GROUP BY tab2.col2
----
-68
-68
-68

query I rowsort
SELECT cor0.col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
158
48
76

query I rowsort
SELECT tab0.col1 FROM tab0 WHERE ( - tab0.col1 ) >= tab0.col0 + tab0.col2 GROUP BY tab0.col1
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2570
SELECT - ( - 43 ) * + tab2.col1 + + tab2.col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2570
SELECT - ( - 43 ) * + tab2.col1 + + tab2.col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 74 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-74
-74
-74

query I rowsort
SELECT + 76 FROM tab2 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT DISTINCT - 3 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3

query I rowsort
SELECT - 80 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-106
-123
-163

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 43 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
43

query I rowsort
SELECT DISTINCT 9 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
9

query I rowsort
SELECT 52 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
52
52

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT + - 94 FROM tab0 GROUP BY tab0.col1
----
-94

query I rowsort
SELECT ALL + 46 + 32 AS col1 FROM tab0 GROUP BY tab0.col1
----
78
78

query I rowsort
SELECT col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 84 FROM tab1 GROUP BY tab1.col2
----
-84
-84
-84

query I rowsort
SELECT ALL + 75 FROM tab2 GROUP BY col2
----
75
75
75

query I rowsort
SELECT - 5 AS col1 FROM tab0 GROUP BY tab0.col0
----
-5
-5
-5

query I rowsort
SELECT 90 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5220
7110
7830

query I rowsort
SELECT - + cor0.col0 * 76 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-1672
-2128
-6232

query I rowsort
SELECT DISTINCT cor0.col0 * - col0 + + 28 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-456
-6696
-756

query I rowsort
SELECT ALL + col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-70

query I rowsort
SELECT ALL - tab1.col2 * - tab1.col2 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 90 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
90

query I rowsort
SELECT ALL cor0.col0 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2600
SELECT CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2600
SELECT CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 41 - + 32 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-73
-73
-73

query I rowsort
SELECT ALL tab0.col2 * 74 AS col1 FROM tab0 GROUP BY tab0.col2
----
1776
2812
5846

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 + + 77 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-355
2205
440

query I rowsort
SELECT DISTINCT - - tab0.col0 + tab0.col0 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT DISTINCT 78 FROM tab0 cor0 GROUP BY col1
----
78

query I rowsort
SELECT ALL cor0.col1 * 58 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2378
3422
3538

query I rowsort
SELECT DISTINCT + - tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2608
SELECT - - CAST( NULL AS DECIMAL ) AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2608
SELECT - - CAST ( NULL AS REAL ) AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT tab1.col1 * + 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
3608
4674
492

query I rowsort
SELECT - 22 * + 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1144
-1144
-1144

query I rowsort
SELECT ALL cor0.col0 * col0 + cor0.col0 * + 85 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13694
2354
3164

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + cor0.col0 * + cor0.col0 + - 61 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
1788
615
6828

query I rowsort
SELECT ALL - 55 * + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5005
-5060
-825

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
-1444
-576
-6241

query I rowsort
SELECT ALL tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - tab1.col0 ) col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-2618
SELECT 53 DIV 79 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2618
SELECT 53 / 79 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT - 83 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-4814
-6557
-7221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 98 col2 FROM tab1 GROUP BY col1
----
-98
-98
-98

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 + - ( - 80 + + cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-426
-6726
-732

query I rowsort
SELECT DISTINCT - 15 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-102
-73
-94

query I rowsort
SELECT ( + 29 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
29
29
29

query I rowsort
SELECT - col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT ALL ( - tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT 54 FROM tab2 GROUP BY tab2.col2
----
54
54
54

query I rowsort
SELECT DISTINCT - 58 FROM tab2 GROUP BY tab2.col0
----
-58

query I rowsort
SELECT CASE 80 WHEN cor0.col0 THEN NULL WHEN + ( col0 ) THEN - cor0.col0 END + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 76 + + cor0.col2 * 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4158
5691
6275

query I rowsort
SELECT tab0.col1 * + tab0.col1 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6480

query I rowsort
SELECT DISTINCT cor0.col2 + + ( + cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT 70 - + 16 FROM tab0 AS cor0 GROUP BY cor0.col1
----
54
54

query I rowsort
SELECT 14 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1106
1218
812

query I rowsort
SELECT + - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + ( 59 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
59

query I rowsort
SELECT DISTINCT + 80 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
80

query I rowsort
SELECT ALL - tab2.col1 * col1 + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1640
-3422
-3660

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE NULL <> ( - col2 ) GROUP BY tab0.col2 HAVING + tab0.col2 + col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-2641
SELECT + col0 DIV 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
3
6

skipif mysql # not compatible
query I rowsort label-2641
SELECT + col0 / 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
3
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2642
SELECT ALL + CAST( NULL AS SIGNED ) * + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2642
SELECT ALL + CAST ( NULL AS INTEGER ) * + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 84 AS col0 FROM tab0 GROUP BY tab0.col1
----
84
84

query I rowsort
SELECT DISTINCT + 28 FROM tab2 GROUP BY tab2.col2
----
28

query I rowsort
SELECT ALL - - 71 AS col2 FROM tab2 GROUP BY tab2.col2
----
71
71
71

query I rowsort
SELECT ALL ( COALESCE ( 45, + col0 ) ) * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
4095
4140
675

query I rowsort
SELECT + 78 + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-4
50
56

query I rowsort
SELECT ALL + col1 FROM tab0 GROUP BY col1 HAVING NOT NULL NOT IN ( + tab0.col1 * + tab0.col1 )
----

query I rowsort
SELECT NULLIF ( - col2, + cor0.col2 ) * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 56 FROM tab0 AS cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT DISTINCT + cor0.col0 - 8 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
14
20
74

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2652
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2652
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - 64 FROM tab2 GROUP BY tab2.col2
----
-64
-64
-64

query I rowsort
SELECT DISTINCT + 97 FROM tab0 cor0 GROUP BY cor0.col0
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 17 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-17
-17
-17

query I rowsort
SELECT ALL + 22 + + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1871
6911
698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 39 + - cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-4
-44
13

onlyif mysql # DIV for integer division: 
query I rowsort label-2658
SELECT ALL 56 + col2 DIV + col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
57
57
57

skipif mysql # not compatible
query I rowsort label-2658
SELECT ALL 56 + col2 / + col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT ALL 39 - 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT + col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - 14 FROM tab0 cor0 GROUP BY cor0.col1
----
-14
-14

query I rowsort
SELECT ALL - 85 * + tab2.col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4988
-6794
-7482

query I rowsort
SELECT - - tab1.col1 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - 22 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-22
-22

query I rowsort
SELECT ALL - 52 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-26
-9
31

query I rowsort
SELECT 63 * + 75 + - cor0.col1 * 85 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-120
4215
985

query I rowsort
SELECT - - tab2.col2 + + col2 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT ALL 28 AS col0 FROM tab2 GROUP BY tab2.col0
----
28
28
28

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IN ( col0 )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-2674
SELECT DISTINCT + 17 DIV tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-2674
SELECT DISTINCT + 17 / tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
1

query I rowsort
SELECT ALL 99 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
4356
5643
594

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT 55 - tab1.col0 FROM tab1 GROUP BY col0
----
-27
27
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 0 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT DISTINCT - 2 + 47 AS col0 FROM tab2 GROUP BY tab2.col2
----
45

query I rowsort
SELECT ( col1 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 75 FROM tab0 GROUP BY tab0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT - 89 FROM tab2 AS cor0 GROUP BY col1
----
-89

query I rowsort
SELECT 4 FROM tab1 GROUP BY tab1.col0
----
4
4
4

query I rowsort
SELECT 53 FROM tab0 GROUP BY tab0.col2
----
53
53
53

query I rowsort
SELECT col1 * 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
2565
270

query I rowsort
SELECT - - 15 FROM tab1 GROUP BY tab1.col2
----
15
15
15

query I rowsort
SELECT DISTINCT + 33 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-46
-5
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 10 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-10
-10
-10

query I rowsort
SELECT cor0.col1 + 24 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
30
68
81

query I rowsort
SELECT ALL + 22 FROM tab1 GROUP BY tab1.col1
----
22
22
22

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
142
16
90

query I rowsort
SELECT 84 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3
26
5

query I rowsort
SELECT cor0.col1 * 32 + - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
1271
1829
1891

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 97, + tab2.col0 * - tab2.col1 + + tab2.col0 ) * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
5626
7663
8439

query I rowsort
SELECT 91 FROM tab2 GROUP BY tab2.col1
----
91
91
91

query I rowsort
SELECT ALL - ( + tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 * - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1980
-3306
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 12 + 59 col1 FROM tab1 AS cor0 GROUP BY col2
----
71
71
71

query I rowsort
SELECT + 40 AS col1 FROM tab0 GROUP BY tab0.col0
----
40
40
40

query I rowsort
SELECT + 35 FROM tab2 GROUP BY tab2.col0
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col0 * 7 FROM tab0 cor0 GROUP BY cor0.col0
----
182
301
581

query I rowsort
SELECT ALL - + 65 AS col1 FROM tab2 GROUP BY tab2.col1
----
-65
-65
-65

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-44
-57
-6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL col0 * - tab1.col0 + + COALESCE ( 12, col2 * + tab1.col0 ) * - 27 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1108
-7048
-808

query I rowsort
SELECT ALL 25 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
104
49
63

query I rowsort
SELECT ALL + 60 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-19
-27
2

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-33

onlyif mysql # DIV for integer division: 
query I rowsort label-2711
SELECT ALL tab0.col2 DIV tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2711
SELECT ALL tab0.col2 / tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col0 + + 82 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
54
60

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT - 67 + - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-108
-126
-128

query I rowsort
SELECT - + col1 * 96 FROM tab0 GROUP BY col1
----
-7776
0

query I rowsort
SELECT ALL - - 86 FROM tab2 GROUP BY tab2.col0
----
86
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-2717
SELECT + tab0.col2 DIV tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NULL
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2717
SELECT + tab0.col2 / tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NULL
----
1
1
1

query I rowsort
SELECT DISTINCT + 57 * + 5 + - tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-7996
-8179
60

query I rowsort
SELECT - 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
-15
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col2 FROM tab1 GROUP BY col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-2721
SELECT DISTINCT 93 DIV cor0.col1 - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-1934
-21
-3248

skipif mysql # not compatible
query I rowsort label-2721
SELECT DISTINCT 93 / cor0.col1 - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-1934
-21
-3248

onlyif mysql # DIV for integer division: 
query I rowsort label-2722
SELECT DISTINCT - tab1.col0 - - col0 DIV tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-21
-27
-81

skipif mysql # not compatible
query I rowsort label-2722
SELECT DISTINCT - tab1.col0 - - col0 / tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-21
-27
-81

query I rowsort
SELECT ALL + 84 AS col1 FROM tab2 GROUP BY tab2.col0
----
84
84
84

query I rowsort
SELECT tab0.col2 * - tab0.col2 AS col0 FROM tab0 WHERE NULL > NULL GROUP BY tab0.col2 HAVING ( NULL ) NOT IN ( col2 )
----

query I rowsort
SELECT 73 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
73
73
73

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2726
SELECT DISTINCT - CAST( NULL AS SIGNED ) + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2726
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 43 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
43
43

query I rowsort
SELECT ALL 47 FROM tab2 AS cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT tab2.col1 * tab2.col1 AS col1 FROM tab2 GROUP BY col1 HAVING ( - tab2.col1 + tab2.col1 ) IS NOT NULL
----
1681
3481
3721

query I rowsort
SELECT ALL 37 * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2, cor0.col1
----
1665
2627
296

query I rowsort
SELECT 93 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
4185
6603
744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT - - tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col2 * - 22 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1738
528
836

query I rowsort
SELECT - + ( + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2736
SELECT ALL CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2736
SELECT ALL CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 28 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2296
-616
-784

query I rowsort
SELECT ALL + ( + col0 ) FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - NULLIF ( + 29, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-29
-29
-29

query I rowsort
SELECT ALL - 5 + cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-489
-6729
-789

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 21 - - 53 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT ALL + cor0.col2 * col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
1305
5336
7189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 1 col1 FROM tab1 AS cor0 GROUP BY col0
----
-1

query I rowsort
SELECT DISTINCT 14 * 60 FROM tab0 GROUP BY tab0.col2
----
840

query I rowsort
SELECT DISTINCT 75 AS col0 FROM tab0 GROUP BY tab0.col1
----
75

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab0 GROUP BY tab0.col2
----
89

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor1.col1 * + cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
114
12
88

query I rowsort
SELECT - 97 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
-97
-97
-97

query I rowsort
SELECT col2 + - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-11
-14
17

query I rowsort
SELECT DISTINCT 84 AS col1 FROM tab2 GROUP BY tab2.col1
----
84

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
81

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2756
SELECT ALL + + CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2756
SELECT ALL + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 99 FROM tab2 GROUP BY tab2.col1
----
99

query I rowsort
SELECT + tab2.col1 + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT 46 - 84 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-38
-38
-38

query I rowsort
SELECT DISTINCT NULLIF ( 33, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
33

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2761
SELECT ALL + CAST( ( + 37 ) AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
37
37
37

skipif mysql # not compatible
query I rowsort label-2761
SELECT ALL + CAST ( ( + 37 ) AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING col1 IS NULL
----

query I rowsort
SELECT DISTINCT 39 * cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1599
2301
2379

onlyif mysql # DIV for integer division: 
query I rowsort label-2765
SELECT ALL 60 DIV 35 - - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
44
84

skipif mysql # not compatible
query I rowsort label-2765
SELECT ALL 60 / 35 - - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
44
84

query I rowsort
SELECT ALL + 27 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT DISTINCT 2 + - 55 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1208
-1538
-4508

query I rowsort
SELECT 21 FROM tab0 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT DISTINCT + tab1.col1 - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 3 FROM tab0 GROUP BY col1
----
-3
-3

query I rowsort
SELECT - - tab2.col1 + + 7 FROM tab2 GROUP BY col1
----
48
66
68

query I rowsort
SELECT ALL + 0 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL col2 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

onlyif mysql # DIV for integer division: 
query I rowsort label-2775
SELECT - - tab1.col2 DIV + col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2775
SELECT - - tab1.col2 / + col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2776
SELECT DISTINCT - 58 DIV - 42 AS col2 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
query I rowsort label-2776
SELECT DISTINCT - 58 / - 42 AS col2 FROM tab2 GROUP BY tab2.col1
----
1

query I rowsort
SELECT + 26 FROM tab0 GROUP BY tab0.col2
----
26
26
26

query I rowsort
SELECT NULLIF ( 31, tab1.col1 + + tab1.col1 ) AS col2 FROM tab1 GROUP BY col1
----
31
31
31

query I rowsort
SELECT - 58 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-58
-58

onlyif mysql # DIV for integer division: 
query I rowsort label-2780
SELECT ALL cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2780
SELECT ALL cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - 98 * + cor0.col1 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-4241
-5541
-580

query I rowsort
SELECT DISTINCT - 53 + + 12 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-41

query I rowsort
SELECT - 61 FROM tab0 GROUP BY tab0.col1
----
-61
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-2784
SELECT - 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-2784
SELECT - cor0.col2 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - - tab0.col2 * tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT ALL + 5 + tab1.col1 * col1 FROM tab1 GROUP BY tab1.col1
----
1941
3254
41

query I rowsort
SELECT DISTINCT + 93 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2789
SELECT + tab0.col1 + 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-2789
SELECT + tab0.col1 + CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-2791
SELECT ALL + - tab1.col1 DIV 10 AS col0 FROM tab1 GROUP BY tab1.col1
----
-4
-5
0

skipif mysql # not compatible
query I rowsort label-2791
SELECT ALL + - tab1.col1 / 10 AS col0 FROM tab1 GROUP BY tab1.col1
----
-4
-5
0

query I rowsort
SELECT DISTINCT + + 56 FROM tab2 GROUP BY tab2.col0
----
56

query I rowsort
SELECT + 32 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32
32

query I rowsort
SELECT ALL 32 AS col0 FROM tab0 GROUP BY col1
----
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 21 - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-37
-58
-66

query I rowsort
SELECT DISTINCT + 47 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47

query I rowsort
SELECT - - tab2.col2 * - tab2.col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2798
SELECT ALL cor0.col0 - + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2798
SELECT ALL cor0.col0 - + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 3 FROM tab1 GROUP BY tab1.col2
----
3
3
3

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 NULLIF ( - cor0.col2, 30 * cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
225
8281
8464

query I rowsort
SELECT + 69 * 62 AS col1 FROM tab2 GROUP BY tab2.col2
----
4278
4278
4278

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
10

query I rowsort
SELECT - 56 + + tab2.col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3308
6185
7513

query I rowsort
SELECT ALL + cor0.col0 * 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1161
2241
702

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL 71 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
71
71
71

query I rowsort
SELECT + 42 AS col1 FROM tab2 GROUP BY tab2.col0
----
42
42
42

query I rowsort
SELECT 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15
15

onlyif mysql # DIV for integer division: 
query I rowsort label-2811
SELECT DISTINCT tab0.col2 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1

skipif mysql # not compatible
query I rowsort label-2811
SELECT DISTINCT tab0.col2 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 23 FROM tab0 GROUP BY tab0.col0
----
23
23
23

query I rowsort
SELECT ALL col2 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 * tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - 46 AS col1 FROM tab0 GROUP BY tab0.col2
----
-46
-46
-46

query I rowsort
SELECT + cor0.col1 + - cor0.col1 * col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-6480
0
0

query I rowsort
SELECT DISTINCT + + col1 + - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT ALL - 65 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-65
-65
-65

query I rowsort
SELECT - tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING col2 * + tab1.col2 IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 14 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT 39 FROM tab0 GROUP BY tab0.col2
----
39
39
39

query I rowsort
SELECT + 50 * - col1 FROM tab1 GROUP BY tab1.col1
----
-2200
-2850
-300

onlyif mysql # DIV for integer division: 
query I rowsort label-2824
SELECT DISTINCT cor0.col2 * 91 + cor0.col2 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2, cor0.col1
----
5278
7189
7922

skipif mysql # not compatible
query I rowsort label-2824
SELECT DISTINCT cor0.col2 * 91 + cor0.col2 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2, cor0.col1
----
5278
7189
7922

query I rowsort
SELECT DISTINCT - 97 AS col1 FROM tab0 GROUP BY tab0.col0
----
-97

query I rowsort
SELECT ALL - tab0.col1 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-162
0

query I rowsort
SELECT ALL - 90 FROM tab2 GROUP BY tab2.col1
----
-90
-90
-90

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL 40 + tab2.col1 FROM tab2 GROUP BY col1
----
101
81
99

query I rowsort
SELECT ALL + 95 FROM tab2 GROUP BY tab2.col0
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-2831
SELECT ALL 25 DIV cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
38
79

skipif mysql # not compatible
query I rowsort label-2831
SELECT ALL 25 / cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-2832
SELECT - COALESCE ( - 37, cor0.col0 DIV 63 + + cor0.col0 ) DIV col2 + cor0.col2 * 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1845
2911
332

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2832
SELECT - COALESCE ( - 37, cor0.col0 / 63 + + cor0.col0 ) / col2 + cor0.col2 * 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1845
2911
332

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
81

query I rowsort
SELECT + 51 AS col2 FROM tab1 GROUP BY tab1.col0
----
51
51
51

query I rowsort
SELECT ALL 52 * 40 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
2080
2080
2080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 4 col2 FROM tab2 GROUP BY tab2.col1
----
4

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 22, tab0.col1 ) FROM tab0 GROUP BY col0
----
-22
-22
-22

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT ALL 57 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1368
2166
4503

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2840
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2840
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col0
----
NULL

query I rowsort
SELECT ALL tab1.col0 + 93 AS col1 FROM tab1 GROUP BY col0
----
115
121
175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + tab1.col2 * 14 FROM tab1 GROUP BY tab1.col2
----
112
630
994

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT - - cor0.col0 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 + - 18 * - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2, col1
----
1697
331

query I rowsort
SELECT ALL + 50 AS col1 FROM tab0 GROUP BY tab0.col0
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-2848
SELECT ALL + tab1.col0 DIV + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2848
SELECT ALL + tab1.col0 / + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
1
1
1

query I rowsort
SELECT ALL + col1 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
-2
-27
12

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT 37 - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-42
13

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - 81 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-81

query I rowsort
SELECT DISTINCT 53 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 93 + - 5 * cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-112
-202
-212

query I rowsort
SELECT ALL - 48 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-2112
-2736
-288

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19

query I rowsort
SELECT DISTINCT - 77 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-77

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 14, tab2.col2 * + tab2.col0, - 45 ) FROM tab2 GROUP BY tab2.col0
----
14
14
14

query I rowsort
SELECT ALL 71 AS col1 FROM tab0 GROUP BY col2
----
71
71
71

query I rowsort
SELECT ALL - - 3 FROM tab0 GROUP BY tab0.col2
----
3
3
3

query I rowsort
SELECT ALL - tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + - 81 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT cor0.col0 - col0 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-210
-8190
-8372

query I rowsort
SELECT cor0.col0 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT - + 0 - cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + 66 AS col2 FROM tab0 GROUP BY tab0.col2
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT cor0.col2 * - ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2378
-4661
-5307

query I rowsort
SELECT cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT 16 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1328
416
688

query I rowsort
SELECT + 69 + - 14 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1079
-239
-323

query I rowsort
SELECT - 27 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-27
-27

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT - 21 FROM tab0 GROUP BY tab0.col2
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 col2 FROM tab1 GROUP BY tab1.col2
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 85 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT DISTINCT + 84 FROM tab0 cor0 GROUP BY col1, cor0.col1
----
84

query I rowsort
SELECT DISTINCT - 1 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-1

query I rowsort
SELECT + 17 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
17
17
17

query I rowsort
SELECT 67 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
67
67
67

query I rowsort
SELECT - 18 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-18
-18
-18

query I rowsort
SELECT ALL 48 FROM tab0 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT + tab2.col1 * - col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2890
SELECT DISTINCT CAST( NULL AS SIGNED ) / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2890
SELECT DISTINCT CAST ( NULL AS INTEGER ) / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT - cor0.col2 * + cor0.col2 - - ( + cor0.col2 ) AS col1 FROM tab1 cor0 GROUP BY col2
----
-1980
-4970
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + COALESCE ( 55, - cor0.col2 ) col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
55
55

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 71, tab2.col0 ) FROM tab2 GROUP BY tab2.col1
----
-71
-71
-71

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2894
SELECT DISTINCT CAST( NULL AS DECIMAL ) col0 FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2894
SELECT DISTINCT CAST ( NULL AS REAL ) col0 FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT DISTINCT - + 83 FROM tab1 GROUP BY tab1.col1
----
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-2896
SELECT - ( 37 ) DIV cor0.col0 - 66 * 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3828
-3829
-3829

skipif mysql # not compatible
query I rowsort label-2896
SELECT - ( 37 ) / cor0.col0 - 66 * 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3828
-3829
-3829

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab1.col0 * + COALESCE ( - 94, tab1.col1 * + tab1.col2 ) col1 FROM tab1 GROUP BY tab1.col0
----
-2068
-2632
-7708

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - col1 + + COALESCE ( 31, tab0.col0, tab0.col0 ) FROM tab0 GROUP BY tab0.col1
----
-50
31

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + 23 FROM tab2 GROUP BY tab2.col0
----
23
23
23

query I rowsort
SELECT ALL + 56 AS col2 FROM tab2 GROUP BY tab2.col0
----
56
56
56

query I rowsort
SELECT - + 22 FROM tab1 GROUP BY tab1.col1
----
-22
-22
-22

onlyif mysql # DIV for integer division: 
query I rowsort label-2904
SELECT COALESCE ( + 59, tab2.col2 DIV + tab2.col1 ) FROM tab2 GROUP BY col0
----
59
59
59

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2904
SELECT COALESCE ( + 59, tab2.col2 / + tab2.col1 ) FROM tab2 GROUP BY col0
----
59
59
59

query I rowsort
SELECT - tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT 7 FROM tab1 cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT DISTINCT + - 92 AS col1 FROM tab2 GROUP BY col0
----
-92

query I rowsort
SELECT DISTINCT + 86 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-1290
-7826
-7912

query I rowsort
SELECT ALL - 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-42
-42
-42

onlyif mysql # DIV for integer division: 
query I rowsort label-2910
SELECT cor0.col2 DIV - 4 FROM tab0 cor0 GROUP BY cor0.col2
----
-19
-6
-9

skipif mysql # not compatible
query I rowsort label-2910
SELECT cor0.col2 / - 4 FROM tab0 cor0 GROUP BY cor0.col2
----
-19
-6
-9

query I rowsort
SELECT + tab1.col0 * - 81 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1782
-2268
-6642

query I rowsort
SELECT ALL cor0.col0 * 15 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1230
330
420

query I rowsort
SELECT ( + cor0.col0 ) AS 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 - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 col1 FROM tab0 GROUP BY tab0.col2
----
22
22
22

query I rowsort
SELECT + 18 FROM tab0 GROUP BY tab0.col2
----
18
18
18

query I rowsort
SELECT DISTINCT 32 FROM tab2 GROUP BY tab2.col1
----
32

query I rowsort
SELECT DISTINCT - 84 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-84

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2920
SELECT - CAST( NULL AS DECIMAL ) + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2920
SELECT - CAST ( NULL AS REAL ) + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2923
SELECT cor0.col0 DIV - 43 + + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
81

skipif mysql # not compatible
query I rowsort label-2923
SELECT cor0.col0 / - 43 + + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + cor0.col1 + + col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2610
3195
56

query I rowsort
SELECT - 91 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT + 16 FROM tab0 AS cor0 GROUP BY cor0.col1
----
16

query I rowsort
SELECT ALL 34 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT ALL 98 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4312
5586
588

onlyif mysql # DIV for integer division: 
query I rowsort label-2929
SELECT COALESCE ( - 84, cor0.col2, 78 DIV cor0.col0 + + col0 ) * + cor0.col2 + 21 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4851
-6615
-7287

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-2929
SELECT COALESCE ( - 84, cor0.col2, 78 / cor0.col0 + + col0 ) * + cor0.col2 + 21 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4851
-6615
-7287

query I rowsort
SELECT + 65 AS col1 FROM tab2 GROUP BY tab2.col0
----
65
65
65

query I rowsort
SELECT + 91 + + 89 AS col2 FROM tab2 GROUP BY tab2.col0
----
180
180
180

query I rowsort
SELECT ALL 33 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 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 - cor1.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
-26
-43
-83

query I rowsort
SELECT + + tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + 8 * tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
464
632
696

query I rowsort
SELECT - 58 FROM tab2 cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT tab1.col0 * - 83 + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1804
-2296
-6724

query I rowsort
SELECT ALL - 88 FROM tab2 GROUP BY tab2.col0
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-2940
SELECT + cor0.col0 DIV col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2940
SELECT + cor0.col0 / col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
1
1

query I rowsort
SELECT DISTINCT - 98 FROM tab1 GROUP BY col1
----
-98

query I rowsort
SELECT - 87 + - 51 FROM tab1 GROUP BY col2
----
-138
-138
-138

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 15 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1215

query I rowsort
SELECT 44 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, col1
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - 32 FROM tab1 GROUP BY tab1.col2
----
-32
-32
-32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2948
SELECT DISTINCT CAST( NULL AS SIGNED ) / 44 FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2948
SELECT DISTINCT CAST ( NULL AS INTEGER ) / 44 FROM tab2 GROUP BY tab2.col1
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2949
SELECT tab1.col2 DIV tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2949
SELECT tab1.col2 / tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
1
1
1

query I rowsort
SELECT tab2.col0 AS col1 FROM tab2 WHERE ( tab2.col2 ) >= - tab2.col2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2952
SELECT ALL - + CASE - tab2.col0 WHEN tab2.col0 THEN + CAST( NULL AS SIGNED ) * col0 WHEN col0 * tab2.col0 THEN tab2.col0 / col0 END FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2952
SELECT ALL - + CASE - tab2.col0 WHEN tab2.col0 THEN + CAST ( NULL AS INTEGER ) * col0 WHEN col0 * tab2.col0 THEN tab2.col0 / col0 END FROM tab2 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 63 * tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
1638
2709
5229

query I rowsort
SELECT DISTINCT + 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2958
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2958
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT ( 72 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
72

query I rowsort
SELECT - 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-59
-59
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 74 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-74

query I rowsort
SELECT 52 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - - 95 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
1425
8645
8740

query I rowsort
SELECT tab2.col2 FROM tab2 WHERE NULL = + tab2.col2 * - col2 GROUP BY col2
----

query I rowsort
SELECT tab2.col1 + col1 FROM tab2 GROUP BY col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 69, - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-69
-69
-69

query I rowsort
SELECT - tab2.col0 + ( 17 ) FROM tab2 GROUP BY tab2.col0
----
-74
-75
2

query I rowsort
SELECT ALL ( - cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 58, cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
58

query I rowsort
SELECT DISTINCT + tab1.col0 + - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT DISTINCT 82 FROM tab2 GROUP BY tab2.col1
----
82

query I rowsort
SELECT DISTINCT + 64 AS col1 FROM tab0 GROUP BY tab0.col1
----
64

query I rowsort
SELECT ALL - ( + 40 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
-40
-40
-40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2976
SELECT ALL CAST( NULL AS SIGNED ) * 60 col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2976
SELECT ALL CAST ( NULL AS INTEGER ) * 60 col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 32 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-32
-32
-32

query I rowsort
SELECT 95 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-2979
SELECT DISTINCT 31 DIV + 50 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

skipif mysql # not compatible
query I rowsort label-2979
SELECT DISTINCT 31 / + 50 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

onlyif mysql # DIV for integer division: 
query I rowsort label-2981
SELECT + col2 DIV 59 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2981
SELECT + col2 / 59 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-2982
SELECT - cor0.col2 * 56 + 60 DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3247
-4424
-4872

skipif mysql # not compatible
query I rowsort label-2982
SELECT - cor0.col2 * 56 + 60 / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3247
-4424
-4872

query I rowsort
SELECT - + 64 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-64
-64
-64

query I rowsort
SELECT 62 FROM tab2 GROUP BY tab2.col2
----
62
62
62

query I rowsort
SELECT 64 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT 98 + - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
15
55
72

query I rowsort
SELECT ALL ( + 36 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * - col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1260
-176
-5822

query I rowsort
SELECT ALL - - 21 FROM tab2 GROUP BY tab2.col0
----
21
21
21

query I rowsort
SELECT + + tab0.col1 + tab0.col1 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT 0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 9 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-234
-387
-747

query I rowsort
SELECT DISTINCT + 37 AS col2 FROM tab0 GROUP BY tab0.col1
----
37

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2994
SELECT ALL - + CAST( NULL AS SIGNED ) + + 36 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2994
SELECT ALL - + CAST ( NULL AS INTEGER ) + + 36 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 59 FROM tab1 GROUP BY tab1.col0
----
59

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2996
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2996
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT + 96 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
96

query I rowsort
SELECT - 85 AS col2 FROM tab2 GROUP BY tab2.col1
----
-85
-85
-85

query I rowsort
SELECT + 36 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL > ( NULL )
----

query I rowsort
SELECT tab1.col0 * - tab1.col0 AS col2 FROM tab1 WHERE - tab1.col2 - tab1.col2 NOT IN ( tab1.col1 ) GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col2, col0
----
484
6724
784

query I rowsort
SELECT + cor0.col2 + 38 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
117
125
96

query I rowsort
SELECT - + tab2.col0 - col0 * - 37 AS col0 FROM tab2 GROUP BY tab2.col0
----
3276
3312
540

query I rowsort
SELECT DISTINCT 25 AS col1 FROM tab2 cor0 GROUP BY col1
----
25

query I rowsort
SELECT - 75 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT DISTINCT + 91 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
91

query I rowsort
SELECT + 24 FROM tab2 GROUP BY tab2.col2
----
24
24
24

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col1, col2
----
58
79
87

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
0
0
81

query I rowsort
SELECT + 75 AS col2 FROM tab0 GROUP BY col0
----
75
75
75

query I rowsort
SELECT DISTINCT - + 24 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-3013
SELECT + cor0.col2 DIV 47 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3013
SELECT + cor0.col2 / 47 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + 5 FROM tab1 GROUP BY tab1.col0
----
5
5
5

query I rowsort
SELECT + 28 FROM tab2 GROUP BY tab2.col0
----
28
28
28

query I rowsort
SELECT - tab2.col2 + 70 FROM tab2 GROUP BY tab2.col2
----
-17
-9
12

query I rowsort
SELECT ALL col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT ALL col0 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

onlyif mysql # DIV for integer division: 
query I rowsort label-3019
SELECT ALL cor0.col2 DIV + 89 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3019
SELECT ALL cor0.col2 / + 89 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IN ( col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + + 50 col0 FROM tab1 GROUP BY col2
----
-21
42
5

query I rowsort
SELECT - 55 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-40
36
37

query I rowsort
SELECT ALL - 50 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2200
-2850
-300

query I rowsort
SELECT + tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

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 DISTINCT - 48 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-48

query I rowsort
SELECT ALL - col1 + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6480

query I rowsort
SELECT ALL - 26 FROM tab0 GROUP BY tab0.col1
----
-26
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * 99 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-2376
-3762
-7821

query I rowsort
SELECT 38 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2204
3002
3306

query I rowsort
SELECT - 62 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-5642
-5704
-930

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 75 FROM tab1 cor0 GROUP BY cor0.col0
----
-75

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + 77 * - col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1700
-2213
-6358

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-3037
SELECT 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-3037
SELECT cor0.col1 / + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT col0 * + 91 FROM tab1 GROUP BY tab1.col0
----
2002
2548
7462

query I rowsort
SELECT DISTINCT + cor0.col1 - + 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
3
5

query I rowsort
SELECT ALL + 96 + + tab2.col1 FROM tab2 GROUP BY col1
----
137
155
157

query I rowsort
SELECT DISTINCT - 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-94

onlyif mysql # DIV for integer division: 
query I rowsort label-3042
SELECT col1 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3042
SELECT col1 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT - 37 * 13 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-481
-481
-481

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 33 col0 FROM tab2 GROUP BY tab2.col0
----
-33
-33
-33

query I rowsort
SELECT + + 97 FROM tab1 GROUP BY tab1.col0
----
97
97
97

onlyif mysql # DIV for integer division: 
query I rowsort label-3046
SELECT ALL ( - 75 ) DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-3046
SELECT ALL ( - 75 ) / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-5
0
0

query I rowsort
SELECT - ( 52 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3048
SELECT CAST( NULL AS SIGNED ) + 72 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3048
SELECT CAST ( NULL AS INTEGER ) + 72 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 28 FROM tab0 AS cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT DISTINCT + 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
32

query I rowsort
SELECT - + 13 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
13
30
70

query I rowsort
SELECT DISTINCT + - 63 AS col1 FROM tab0 GROUP BY col0
----
-63

onlyif mysql # DIV for integer division: 
query I rowsort label-3053
SELECT - 22 DIV - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3053
SELECT - 22 / - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - 76 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
3344
4332
456

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NOT NULL
----
44
57
6

query I rowsort
SELECT 69 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
107
148
93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3057
SELECT ALL + CAST( + 78 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
78
78
78

skipif mysql # not compatible
query I rowsort label-3057
SELECT ALL + CAST ( + 78 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
78
78
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3058
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-3058
SELECT + + CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL + 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL NOT IN ( col0 * tab2.col0 )
----

query I rowsort
SELECT ALL - ( 4 ) FROM tab2 cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT 23 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT DISTINCT - 37 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-37

query I rowsort
SELECT - 89 * col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-4005
-6319
-712

query I rowsort
SELECT 1 * + col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 73 FROM tab1 GROUP BY col1
----
-73
-73
-73

query I rowsort
SELECT ALL - 1 FROM tab0 GROUP BY tab0.col1
----
-1
-1

query I rowsort
SELECT DISTINCT 45 AS col0 FROM tab0 cor0 GROUP BY col1
----
45

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 ALL 50 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
50
50
50

query I rowsort
SELECT DISTINCT + - 11 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-264
-418
-869

query I rowsort
SELECT cor0.col1 + - 52 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-46
-8
5

query I rowsort
SELECT 50 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
50
50

query I rowsort
SELECT DISTINCT 23 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
23

query I rowsort
SELECT ALL + 42 FROM tab2 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL 1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + col1 * 24 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1056
1368
144

query I rowsort
SELECT ALL + 76 FROM tab1 GROUP BY tab1.col1
----
76
76
76

query I rowsort
SELECT DISTINCT + 6 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
6

query I rowsort
SELECT ALL 45 FROM tab2 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT + + 92 AS col0 FROM tab2 GROUP BY tab2.col2
----
92
92
92

query I rowsort
SELECT + 36 FROM tab0 GROUP BY col1
----
36
36

query I rowsort
SELECT ALL - ( 90 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col0 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL > NULL
----

query I rowsort
SELECT ALL + tab2.col2 * + tab2.col2 AS col0 FROM tab2 GROUP BY col2 HAVING NOT tab2.col2 <> NULL
----

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL - tab1.col1 * col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL 55 FROM tab1 AS cor0 GROUP BY cor0.col1
----
55
55
55

query I rowsort
SELECT ALL - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col1
----
-45
-71
-8

query I rowsort
SELECT - cor0.col1 + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - + 79 AS col2 FROM tab2 GROUP BY tab2.col1
----
-79
-79
-79

query I rowsort
SELECT + col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + CASE 98 WHEN cor0.col0 THEN col0 END FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3097
SELECT ALL 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-3097
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 18 FROM tab1 GROUP BY tab1.col1
----
-18
-18
-18

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 30 FROM tab2 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT - 70 AS col1 FROM tab1 GROUP BY col2
----
-70
-70
-70

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, col1
----
58
79
87

query I rowsort
SELECT + 41 FROM tab2 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT + 83 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1992
-3154
-6557

query I rowsort
SELECT ALL + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 40 FROM tab0 cor0 GROUP BY cor0.col0
----
40

query I rowsort
SELECT ALL + 54 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col1 - 57 AS col2 FROM tab1 GROUP BY tab1.col1
----
-21
1879
3192

query I rowsort
SELECT 69 AS col1 FROM tab0 cor0 GROUP BY col2
----
69
69
69

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3111
SELECT - - CAST( NULL AS SIGNED ) col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3111
SELECT - - CAST ( NULL AS INTEGER ) col1 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - tab1.col1 - - col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
166
52
86

query I rowsort
SELECT + 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
61
61
61

query I rowsort
SELECT DISTINCT + 14 AS col1 FROM tab0 GROUP BY tab0.col0
----
14

query I rowsort
SELECT DISTINCT + 55 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3
-3
-3

query I rowsort
SELECT - + tab0.col1 + col1 FROM tab0 GROUP BY tab0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3120
SELECT + tab2.col1 * tab2.col1 + tab2.col1 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1680
3480
3720

skipif mysql # not compatible
query I rowsort label-3120
SELECT + tab2.col1 * tab2.col1 + tab2.col1 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1680
3480
3720

query I rowsort
SELECT ALL - 78 FROM tab0 GROUP BY tab0.col0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 col2 FROM tab1 GROUP BY col0
----
33
33
33

query I rowsort
SELECT DISTINCT + 69 FROM tab0 AS cor0 GROUP BY col0
----
69

query I rowsort
SELECT DISTINCT + 31 FROM tab1 AS cor0 GROUP BY cor0.col0
----
31

query I rowsort
SELECT - 68 + - 52 * + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
-2408
-3760
-484

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1, col2
----
24
38
79

query I rowsort
SELECT ALL 5 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT DISTINCT + tab0.col2 * - 86 FROM tab0 GROUP BY tab0.col2
----
-2064
-3268
-6794

query I rowsort
SELECT + 59 * 28 AS col0 FROM tab2 GROUP BY tab2.col0
----
1652
1652
1652

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( tab0.col1, - 16, + col0 ) FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3131
SELECT cor0.col1 * NULLIF ( cor0.col1 DIV + cor0.col1, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-3131
SELECT cor0.col1 * NULLIF ( cor0.col1 / + cor0.col1, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 12 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-12
-12
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * 75 col2 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
3375
5325
600

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT - - 40 FROM tab0 GROUP BY tab0.col0
----
40
40
40

query I rowsort
SELECT ALL 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT ALL ( cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - - 48 FROM tab2 GROUP BY tab2.col0
----
48
48
48

query I rowsort
SELECT ALL 32 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32
32

query I rowsort
SELECT - 48 AS col1 FROM tab0 GROUP BY col0
----
-48
-48
-48

query I rowsort
SELECT DISTINCT 29 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1276
1653
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 col2 FROM tab1 GROUP BY tab1.col0 HAVING NOT ( NULL ) > NULL
----

query I rowsort
SELECT DISTINCT - cor0.col0 * - 90 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1350
8190
8280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT DISTINCT col0 - - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT 19 * 1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT + cor0.col1 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + 91 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
149
170
178

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 51 + + 81 FROM tab1 AS cor0 GROUP BY cor0.col1
----
132

query I rowsort
SELECT DISTINCT 84 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
84

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col0 * - COALESCE ( - 38, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1064
3116
836

query I rowsort
SELECT - 29 + 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - 0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

query I rowsort
SELECT + 14 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-112
-630
-994

query I rowsort
SELECT + ( tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 62 FROM tab2 GROUP BY tab2.col0
----
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT - 7 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

query I rowsort
SELECT DISTINCT - 98 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-98

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 24, - tab2.col1, + tab2.col0 * 28 + + tab2.col1 * tab2.col0 ) FROM tab2 GROUP BY tab2.col2
----
24
24
24

query I rowsort
SELECT DISTINCT - + 7 FROM tab1 GROUP BY tab1.col1
----
-7

query I rowsort
SELECT - - tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT - - 79 FROM tab0 GROUP BY tab0.col0
----
79

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT + cor0.col0 * 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1820
1840
300

query I rowsort
SELECT DISTINCT - 50 FROM tab1 GROUP BY tab1.col1
----
-50

query I rowsort
SELECT 40 + cor0.col2 * + 15 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1225
400
610

query I rowsort
SELECT 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77
77

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3174
SELECT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3174
SELECT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT tab2.col1 FROM tab2 WHERE ( + tab2.col2 ) NOT IN ( - tab2.col1 ) GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-39

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 DISTINCT cor0.col2 + 11 * 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
756
793
819

query I rowsort
SELECT + - 53 AS col2 FROM tab1 GROUP BY tab1.col0
----
-53
-53
-53

query I rowsort
SELECT + + 3 * ( 81 ) FROM tab2 GROUP BY tab2.col1
----
243
243
243

query I rowsort
SELECT DISTINCT + tab0.col2 + ( 3 ) FROM tab0 GROUP BY tab0.col2
----
27
41
82

query I rowsort
SELECT DISTINCT + 33 FROM tab1 GROUP BY col0
----
33

query I rowsort
SELECT ( - cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
95
95
95

onlyif mysql # DIV for integer division: 
query I rowsort label-3186
SELECT tab2.col1 DIV + 47 FROM tab2 GROUP BY tab2.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3186
SELECT tab2.col1 / + 47 FROM tab2 GROUP BY tab2.col1
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - 29 + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1248
-2015
-226

onlyif mysql # DIV for integer division: 
query I rowsort label-3188
SELECT ALL 32 DIV + col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3188
SELECT ALL 32 / + col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT ALL + 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT - cor0.col2 * cor0.col0 + 31 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
-1274
-5305
-7158

onlyif mysql # DIV for integer division: 
query I rowsort label-3191
SELECT + tab1.col2 + - 3 DIV - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

skipif mysql # not compatible
query I rowsort label-3191
SELECT + tab1.col2 + - 3 / - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL 97 - - 95 FROM tab2 AS cor0 GROUP BY cor0.col0
----
192
192
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 37 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 43 * col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1763
2537
2623

query I rowsort
SELECT ALL - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 HAVING + col2 IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 82 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-82

query I rowsort
SELECT + 17 * - cor0.col2 + 31 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-105
-1176
-734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
24
38
79

query I rowsort
SELECT col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 + 22 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
104
44
50

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3201
SELECT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3201
SELECT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 49 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2205
3479
392

query I rowsort
SELECT DISTINCT + 65 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
21
59
8

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
-15
-91
-92

query I rowsort
SELECT - + 57 AS col0 FROM tab2 GROUP BY tab2.col2
----
-57
-57
-57

query I rowsort
SELECT ALL 78 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT + 24 * 90 + + cor0.col0 * + 0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2160
2160
2160

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 GROUP BY col1, cor0.col0, cor0.col0
----
-81
0
0

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
0
81

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 - + tab2.col0 * - 11 FROM tab2 GROUP BY col0
----
1001
1012
165

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3213
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3213
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col0 * - 64 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1664
-2752
-5312

onlyif mysql # DIV for integer division: 
query I rowsort label-3216
SELECT 50 + + cor0.col2 DIV 39 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50
50
52

skipif mysql # not compatible
query I rowsort label-3216
SELECT 50 + + cor0.col2 / 39 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50
50
52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3217
SELECT + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3217
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 88 + + 7 FROM tab2 GROUP BY tab2.col0
----
-81
-81
-81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3219
SELECT DISTINCT - CAST( 59 AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-59

skipif mysql # not compatible
query I rowsort label-3219
SELECT DISTINCT - CAST ( 59 AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-59

query I rowsort
SELECT DISTINCT 9 FROM tab0 AS cor0 GROUP BY cor0.col0
----
9

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, col1
----
0
0
81

query I rowsort
SELECT ALL - 68 AS col0 FROM tab1 GROUP BY tab1.col1
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL 92 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
92
92
92

query I rowsort
SELECT DISTINCT 52 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52

query I rowsort
SELECT - cor0.col0 * + cor0.col1 + col0 AS col1 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
-3440
26
83

query I rowsort
SELECT DISTINCT - 58 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-102
-115
-64

query I rowsort
SELECT ALL + 57 AS col2 FROM tab0 GROUP BY tab0.col1
----
57
57

query I rowsort
SELECT ALL + 0 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT ALL 54 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-5
-7
13

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3232
SELECT CASE - cor0.col0 WHEN CAST( NULL AS SIGNED ) THEN + cor0.col2 / - cor0.col1 END col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3232
SELECT CASE - cor0.col0 WHEN CAST ( NULL AS INTEGER ) THEN + cor0.col2 / - cor0.col1 END col2 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT 29 FROM tab1 GROUP BY tab1.col1
----
29
29
29

onlyif mysql # DIV for integer division: 
query I rowsort label-3235
SELECT + tab1.col1 DIV tab1.col1 col1 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-3235
SELECT + tab1.col1 / tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT + + col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + 26 AS col1 FROM tab0 GROUP BY col2
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + 22 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
44
50

query I rowsort
SELECT col0 * cor0.col0 + + 14 * + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1012
2185
7225

query I rowsort
SELECT ALL cor0.col2 * 99 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4455
7029
792

query I rowsort
SELECT ALL + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-3243
SELECT DISTINCT col2 DIV - 6 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-1
-11
-7

skipif mysql # not compatible
query I rowsort label-3243
SELECT DISTINCT col2 / - 6 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-1
-11
-7

query I rowsort
SELECT cor0.col0 * - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT + - 3 AS col2 FROM tab1 GROUP BY tab1.col0
----
-3
-3
-3

query I rowsort
SELECT + 6 FROM tab0 GROUP BY tab0.col0
----
6
6
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col1 + COALESCE ( - 50, cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-6
7

query I rowsort
SELECT ALL cor0.col2 + - 86 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3825
-6035
-680

query I rowsort
SELECT DISTINCT 88 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
88

query I rowsort
SELECT DISTINCT + tab0.col2 * tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT 85 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
85
85
85

query I rowsort
SELECT - + col0 * 26 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-2214
-594
-756

query I rowsort
SELECT - tab2.col2 * - 65 FROM tab2 GROUP BY tab2.col2
----
3770
5135
5655

query I rowsort
SELECT ALL col0 + + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col0 + 35 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
1631
167
3643

query I rowsort
SELECT DISTINCT - cor0.col1 + col1 * - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
-1722
-3540
-3782

query I rowsort
SELECT DISTINCT tab1.col2 + - tab1.col2 * - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
2070
5112
72

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 58 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
149
150
73

query I rowsort
SELECT DISTINCT 78 + - cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-3
78

query I rowsort
SELECT + 2 FROM tab2 GROUP BY col0
----
2
2
2

query I rowsort
SELECT ALL ( 45 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT cor0.col0 * - 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2460
-660
-840

query I rowsort
SELECT DISTINCT + 11 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 68 col2 FROM tab0 GROUP BY col0
----
-68

query I rowsort
SELECT + tab2.col0 - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT + tab1.col0 + + tab1.col0 * 56 FROM tab1 GROUP BY tab1.col0
----
1254
1596
4674

query I rowsort
SELECT - + 32 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
-32
-32
-32

query I rowsort
SELECT + - 93 AS col0 FROM tab0 GROUP BY col2
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col1 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 28 AS col2 FROM tab2 cor0 GROUP BY col2
----
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 col2 FROM tab0 GROUP BY tab0.col2
----
20
20
20

query I rowsort
SELECT - - 92 AS col2 FROM tab2 GROUP BY tab2.col2
----
92
92
92

query I rowsort
SELECT cor0.col1 - 37 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-31
20
7

query I rowsort
SELECT DISTINCT + 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
84

query I rowsort
SELECT DISTINCT + 72 FROM tab0 GROUP BY tab0.col0
----
72

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-118
-122
-82

query I rowsort
SELECT tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
158
48
76

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + - COALESCE ( + 43, tab0.col1 ) * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1118
1849
3569

query I rowsort
SELECT ALL - 15 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-15
-15
-15

query I rowsort
SELECT 62 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
62
62
62

query I rowsort
SELECT tab0.col2 * + 1 - 60 FROM tab0 GROUP BY tab0.col2
----
-22
-36
19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3286
SELECT DISTINCT CAST( NULL AS SIGNED ) + - 12 AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3286
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - 12 AS col0 FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL - + 97 * + col2 FROM tab1 GROUP BY tab1.col2
----
-4365
-6887
-776

query I rowsort
SELECT ALL + col1 + - 47 FROM tab0 GROUP BY tab0.col1
----
-47
34

query I rowsort
SELECT DISTINCT tab1.col1 * - 34 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1496
-1938
-204

query I rowsort
SELECT cor0.col1 * - 75 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6075
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
21
21
21

onlyif mysql # DIV for integer division: 
query I rowsort label-3292
SELECT 79 DIV - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3292
SELECT 79 / - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-2
-3

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3293
SELECT - CAST( NULL AS DECIMAL ) + 99 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3293
SELECT - CAST ( NULL AS REAL ) + 99 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL CASE - 27 WHEN + col2 THEN 80 + cor0.col2 END AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3295
SELECT ALL + CAST( - 62 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-62
-62
-62

skipif mysql # not compatible
query I rowsort label-3295
SELECT ALL + CAST ( - 62 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-62
-62
-62

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3296
SELECT CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3296
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-3297
SELECT ALL - - 65 DIV tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-3297
SELECT ALL - - 65 / tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
0
0
4

query I rowsort
SELECT ALL - 6 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
132
168
492

query I rowsort
SELECT + - 17 + + 40 FROM tab2 GROUP BY col1
----
23
23
23

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-3302
SELECT tab1.col1 DIV - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3302
SELECT tab1.col1 / - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - col1 * + 58 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2378
-3422
-3538

query I rowsort
SELECT + + 68 + + 28 FROM tab2 GROUP BY col1
----
96
96
96

query I rowsort
SELECT ALL + 42 FROM tab0 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT NULLIF ( - cor0.col0, cor0.col0 / + COALESCE ( 79, col0, cor0.col0 * + 59 + cor0.col0 ) ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 19 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
19
19
19

query I rowsort
SELECT + 18 AS col2 FROM tab2 GROUP BY tab2.col2
----
18
18
18

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING col2 IS NOT NULL
----
58
79
87

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 ALL 61 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT ALL - 10 + + cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1839
666
6879

query I rowsort
SELECT ALL + + col1 + + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT DISTINCT - 68 - + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-111
-151
-94

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( - 26, - cor0.col2 * cor0.col0, + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 64 * 13 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-832

query I rowsort
SELECT DISTINCT - 33 FROM tab0 GROUP BY tab0.col1
----
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
17
17
17

onlyif mysql # DIV for integer division: 
query I rowsort label-3320
SELECT ALL ( 7 ) DIV tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3320
SELECT ALL ( 7 ) / tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT - - 4 * 13 FROM tab2 GROUP BY tab2.col2
----
52
52
52

query I rowsort
SELECT cor0.col0 * 79 + - 7 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2047
3390
6550

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 19 col0 FROM tab2 GROUP BY tab2.col1
----
-19
-19
-19

query I rowsort
SELECT + 6 * 81 AS col2 FROM tab0 GROUP BY tab0.col1
----
486
486

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3325
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3325
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 94 AS col2 FROM tab1 GROUP BY tab1.col0
----
-94
-94
-94

query I rowsort
SELECT 46 * col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1012
1288
3772

query I rowsort
SELECT DISTINCT - 92 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-92

query I rowsort
SELECT 38 + + 65 AS col2 FROM tab1 GROUP BY tab1.col1
----
103
103
103

query I rowsort
SELECT 33 FROM tab2 GROUP BY tab2.col0
----
33
33
33

query I rowsort
SELECT ALL - tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT 85 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1275
7735
7820

query I rowsort
SELECT + 71 AS col2 FROM tab2 GROUP BY tab2.col1
----
71
71
71

query I rowsort
SELECT - 26 * 97 FROM tab2 GROUP BY tab2.col0
----
-2522
-2522
-2522

query I rowsort
SELECT + COALESCE ( + 18, + tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
18
18
18

query I rowsort
SELECT - 96 AS col1 FROM tab1 GROUP BY tab1.col0
----
-96
-96
-96

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL > NULL
----

query I rowsort
SELECT ALL cor0.col2 + - 83 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-12
-38
-75

query I rowsort
SELECT DISTINCT - 52 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-52

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
89

query I rowsort
SELECT 13 FROM tab0 AS cor0 GROUP BY col1
----
13
13

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
0
81

query I rowsort
SELECT ALL - 10 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0, col1
----
-10
-10
-10

query I rowsort
SELECT 7 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
567

query I rowsort
SELECT 61 FROM tab2 GROUP BY tab2.col1
----
61
61
61

query I rowsort
SELECT + 30 AS col2 FROM tab0 GROUP BY tab0.col1
----
30
30

query I rowsort
SELECT DISTINCT 44 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
44

query I rowsort
SELECT 5 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
5
5
5

query I rowsort
SELECT col2 * + col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT ALL + cor0.col0 * - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
-58
-79
-87

query I rowsort
SELECT - cor0.col1 + + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
495
6241

query I rowsort
SELECT DISTINCT + 54 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
54

query I rowsort
SELECT - tab0.col1 + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL - 97 * cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-1455
-8827
-8924

query I rowsort
SELECT 32 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - NULLIF ( - 35, - cor0.col1 + + 56 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
35
35
35

query I rowsort
SELECT - col1 * - tab1.col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1892
30
3192

query I rowsort
SELECT ALL 79 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
79
79
79

query I rowsort
SELECT ALL 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-26
-26
-26

query I rowsort
SELECT + - tab2.col0 * 94 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1410
-8554
-8648

onlyif mysql # DIV for integer division: 
query I rowsort label-3364
SELECT ALL - col2 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3364
SELECT ALL - col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT DISTINCT 68 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3060
4828
544

query I rowsort
SELECT - 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-59
-59
-59

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - 43 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3913
3956
645

query I rowsort
SELECT ALL 49 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
49
49
49

query I rowsort
SELECT - col2 FROM tab0 WHERE NOT tab0.col1 * tab0.col1 + - col1 IS NOT NULL GROUP BY tab0.col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 78 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
78

query I rowsort
SELECT DISTINCT + + 75 FROM tab0 GROUP BY tab0.col1
----
75

query I rowsort
SELECT + - tab1.col2 + - 72 FROM tab1 GROUP BY tab1.col2
----
-117
-143
-80

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 86 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
86
86
86

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 73 col1 FROM tab1 GROUP BY tab1.col0
----
-73

query I rowsort
SELECT - 72 FROM tab2 cor0 GROUP BY cor0.col1
----
-72
-72
-72

onlyif mysql # DIV for integer division: 
query I rowsort label-3382
SELECT 21 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3382
SELECT 21 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - 52 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-52
-52
29

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT + 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col0 FROM tab0 GROUP BY tab0.col2
----
28
28
28

query I rowsort
SELECT - 7 AS col0 FROM tab0 GROUP BY tab0.col2
----
-7
-7
-7

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - cor0.col0 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT + cor0.col0 + - 10 FROM tab1 AS cor0 GROUP BY cor0.col0
----
12
18
72

query I rowsort
SELECT cor0.col2 + - 24 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1035
-1633
-184

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-3393
SELECT DISTINCT - 86 DIV + 7 AS col0 FROM tab0 GROUP BY col1
----
-12

skipif mysql # not compatible
query I rowsort label-3393
SELECT DISTINCT - 86 / + 7 AS col0 FROM tab0 GROUP BY col1
----
-12

query I rowsort
SELECT - 25 AS col2 FROM tab2 GROUP BY tab2.col1
----
-25
-25
-25

query I rowsort
SELECT + ( + cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT cor0.col1 - - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + 31 * 70 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2170
2170
2170

query I rowsort
SELECT ALL + tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NOT NULL
----
1681
3481
3721

query I rowsort
SELECT - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col2 * 77 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
3465
5467
616

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT cor0.col1 + - 43 * + cor0.col2 FROM tab1 cor0 GROUP BY col1, cor0.col2
----
-1878
-3009
-338

query I rowsort
SELECT ALL - 38 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2204
-3002
-3306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-91
-91
-91

query I rowsort
SELECT + ( + 41 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 48 * cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3888
0

query I rowsort
SELECT ALL - 21 + 98 * col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-21
7917

onlyif mysql # DIV for integer division: 
query I rowsort label-3409
SELECT ALL cor0.col1 DIV - 62 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3409
SELECT ALL cor0.col1 / - 62 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3410
SELECT CAST( NULL AS SIGNED ) col2 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-3410
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 83 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-83
-83
-83

query I rowsort
SELECT ALL tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT cor0.col1 - cor0.col1 * - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
0
6642

query I rowsort
SELECT DISTINCT 79 AS col2 FROM tab0 GROUP BY tab0.col2
----
79

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col2, - col2 ) + 40 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
111
48
85

query I rowsort
SELECT 31 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
31
31
31

query I rowsort
SELECT DISTINCT 23 AS col0 FROM tab1 GROUP BY tab1.col0
----
23

onlyif mysql # DIV for integer division: 
query I rowsort label-3418
SELECT DISTINCT + - 37 DIV col0 + 94 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1412
-8554
-8648

skipif mysql # not compatible
query I rowsort label-3418
SELECT DISTINCT + - 37 / col0 + 94 * - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1412
-8554
-8648

query I rowsort
SELECT DISTINCT + ( + 31 ) FROM tab0 GROUP BY tab0.col1
----
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 78 col0 FROM tab2 GROUP BY col2
----
78
78
78

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col1
----
58
79
87

query I rowsort
SELECT + cor0.col2 * + 46 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2668
3634
4002

query I rowsort
SELECT DISTINCT 6 AS col1 FROM tab1 cor0 GROUP BY col0
----
6

query I rowsort
SELECT 35 FROM tab1 GROUP BY tab1.col2
----
35
35
35

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + ( - 52 ) FROM tab2 cor0 GROUP BY cor0.col2
----
-52

query I rowsort
SELECT + ( - 3 ) FROM tab2 GROUP BY tab2.col0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT + ( col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col1 * 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
4374

query I rowsort
SELECT ALL 44 FROM tab0 cor0 GROUP BY cor0.col0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NOT NULL
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 49 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-49

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + 86 AS col0 FROM tab0 GROUP BY col1
----
86
86

query I rowsort
SELECT DISTINCT 58 FROM tab2 AS cor0 GROUP BY col0
----
58

onlyif mysql # DIV for integer division: 
query I rowsort label-3437
SELECT ALL 19 DIV - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3437
SELECT ALL 19 / - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 14 FROM tab0 GROUP BY tab0.col1
----
-14
-14

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT DISTINCT + 66 + + cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col2
----
104
145
90

query I rowsort
SELECT - col0 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3444
SELECT + cor0.col1 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3444
SELECT + cor0.col1 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL tab1.col0 - - 43 AS col0 FROM tab1 GROUP BY tab1.col0
----
125
65
71

query I rowsort
SELECT + 36 - 63 * - 57 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
3627
3627
3627

query I rowsort
SELECT DISTINCT 75 AS col2 FROM tab2 GROUP BY tab2.col2
----
75

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 93, - cor0.col2, cor0.col0 * + 12 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT ALL 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT DISTINCT 38 FROM tab0 GROUP BY tab0.col0
----
38

query I rowsort
SELECT + 46 + 73 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
119
119
119

query I rowsort
SELECT ALL + cor0.col2 * - 83 FROM tab0 AS cor0 GROUP BY col2
----
-1992
-3154
-6557

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
164
44
56

query I rowsort
SELECT ALL tab2.col0 * 66 AS col0 FROM tab2 GROUP BY col0
----
6006
6072
990

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3455
SELECT cor0.col2 + - col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3455
SELECT cor0.col2 + - col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 39 FROM tab0 cor0 GROUP BY col1
----
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col1 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT - + 74 FROM tab2 GROUP BY tab2.col1
----
-74
-74
-74

query I rowsort
SELECT + tab1.col2 AS col0 FROM tab1 GROUP BY col2 HAVING NULL IN ( + tab1.col2 )
----

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
-24
-38
-79

query I rowsort
SELECT ALL + tab0.col2 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + 91 * - 83 AS col0 FROM tab2 GROUP BY tab2.col0
----
-7553
-7553
-7553

query I rowsort
SELECT - - 47 * + col1 FROM tab2 GROUP BY col1
----
1927
2773
2867

onlyif mysql # DIV for integer division: 
query I rowsort label-3465
SELECT DISTINCT cor0.col0 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
1

skipif mysql # not compatible
query I rowsort label-3465
SELECT DISTINCT cor0.col0 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
73

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
15
91
92

query I rowsort
SELECT - 46 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-46
-46
-46

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT 23 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
1863

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 67 col1 FROM tab2 GROUP BY tab2.col1
----
67
67
67

query I rowsort
SELECT 27 * + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1215
1917
216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 54 col1 FROM tab1 GROUP BY tab1.col0
----
-54

query I rowsort
SELECT DISTINCT - 19 AS col0 FROM tab1 GROUP BY tab1.col2
----
-19

query I rowsort
SELECT + 77 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
103
120
160

query I rowsort
SELECT + - 71 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-162
-163
-86

query I rowsort
SELECT + + 27 FROM tab1 GROUP BY tab1.col2
----
27
27
27

query I rowsort
SELECT + 36 FROM tab1 GROUP BY tab1.col2
----
36
36
36

query I rowsort
SELECT + 70 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1680
-2660
-5530

onlyif mysql # DIV for integer division: 
query I rowsort label-3480
SELECT DISTINCT - 53 DIV + cor0.col2 - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif mysql # not compatible
query I rowsort label-3480
SELECT DISTINCT - 53 / + cor0.col2 - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - + 12 AS col0 FROM tab1 GROUP BY tab1.col2
----
-12

query I rowsort
SELECT ( - 96 ) FROM tab0 GROUP BY tab0.col1
----
-96
-96

query I rowsort
SELECT + col1 + - col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 65 + col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
146
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-3485
SELECT ALL COALESCE ( - cor0.col0, cor0.col0, + 88 DIV + 43 ) AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

skipif mysql # not compatible
query I rowsort label-3485
SELECT ALL COALESCE ( - cor0.col0, cor0.col0, + 88 / + 43 ) AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT + 96 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
96
96
96

query I rowsort
SELECT ALL - 84 + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-2
-56
-62

query I rowsort
SELECT - + col0 * tab2.col0 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 5 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
63
84
92

query I rowsort
SELECT - 98 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5684
-7742
-8526

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 60 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1440
2280
4740

query I rowsort
SELECT + ( + 99 ) FROM tab2 AS cor0 GROUP BY col1
----
99
99
99

query I rowsort
SELECT ALL 77 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT DISTINCT + 34 FROM tab1 AS cor0 GROUP BY cor0.col2
----
34

query I rowsort
SELECT DISTINCT + - col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - col0 * 24 FROM tab0 GROUP BY tab0.col0
----
-1032
-1992
-624

query I rowsort
SELECT ALL 42 * + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1092
1806
3486

query I rowsort
SELECT DISTINCT - 73 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-73

query I rowsort
SELECT ALL ( 9 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 23 * 44 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1012
1012
1012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * 16 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-656
-944
-976

query I rowsort
SELECT DISTINCT + 80 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT DISTINCT + 82 FROM tab2 AS cor0 GROUP BY cor0.col1
----
82

query I rowsort
SELECT ALL + - tab1.col2 + 16 FROM tab1 GROUP BY tab1.col2
----
-29
-55
8

query I rowsort
SELECT ALL + 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
58
58

query I rowsort
SELECT ALL - - 4 * - 95 FROM tab2 GROUP BY tab2.col1
----
-380
-380
-380

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL + + 41 * col2 FROM tab0 GROUP BY tab0.col2
----
1558
3239
984

query I rowsort
SELECT ALL 75 + - 97 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT col2 * col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT 70 FROM tab0 GROUP BY tab0.col0
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 60 * tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
2700
4260
480

query I rowsort
SELECT DISTINCT + 86 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1892
2408
7052

query I rowsort
SELECT col1 + 16 * 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
105
123
125

query I rowsort
SELECT DISTINCT + 69 * - col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1794
-2967
-5727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 17 - - col0 col1 FROM tab2 GROUP BY tab2.col0
----
-2
74
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT + 5 * 82 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
410
410
410

query I rowsort
SELECT DISTINCT + tab1.col2 * 23 AS col2 FROM tab1 GROUP BY tab1.col2
----
1035
1633
184

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ( - 41 ) + col2 FROM tab0 GROUP BY col2
----
-17
-3
38

query I rowsort
SELECT + tab1.col1 FROM tab1 WHERE ( col1 ) IN ( tab1.col0 ) GROUP BY tab1.col1
----

onlyif mysql # DIV for integer division: 
query I rowsort label-3526
SELECT DISTINCT + col1 DIV 57 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-3526
SELECT DISTINCT + col1 / 57 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1

query I rowsort
SELECT DISTINCT + tab0.col0 * tab0.col0 + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
1892
6972
702

query I rowsort
SELECT DISTINCT - 31 AS col2 FROM tab1 GROUP BY tab1.col0
----
-31

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3530
SELECT - ( cor0.col1 ) DIV cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3530
SELECT - ( cor0.col1 ) / cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT - tab0.col2 - 27 AS col2 FROM tab0 GROUP BY tab0.col2
----
-106
-51
-65

query I rowsort
SELECT + 2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2
2
2

query I rowsort
SELECT ALL - col1 + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 83, col1 + - tab0.col2 ) + 37 AS col0 FROM tab0 GROUP BY tab0.col1
----
120

query I rowsort
SELECT - ( + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + 94 * + 24 AS col2 FROM tab2 GROUP BY tab2.col1
----
2256
2256
2256

query I rowsort
SELECT DISTINCT + 21 FROM tab1 AS cor0 GROUP BY cor0.col1
----
21

query I rowsort
SELECT 32 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-3539
SELECT + tab2.col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3539
SELECT + tab2.col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT ALL - 9 FROM tab0 GROUP BY tab0.col2
----
-9
-9
-9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3541
SELECT ALL + CAST( NULL AS SIGNED ) * 68 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3541
SELECT ALL + CAST ( NULL AS INTEGER ) * 68 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 67 FROM tab0 GROUP BY tab0.col2
----
67
67
67

query I rowsort
SELECT cor0.col1 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - 94 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-12
-66
-72

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 - 18 * 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-1008
-1008
-1008

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3548
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3548
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 55 col0 FROM tab1 GROUP BY tab1.col2
----
55

query I rowsort
SELECT DISTINCT + 64 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
64

query I rowsort
SELECT + 42 * 47 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1974
1974

query I rowsort
SELECT DISTINCT 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + - col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
17
20
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 + + col1 col2 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT 25 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL + 46 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-3557
SELECT ALL - + 1 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3557
SELECT ALL - + 1 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL 31 FROM tab0 cor0 GROUP BY col0
----
31
31
31

query I rowsort
SELECT DISTINCT + 75 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
101
118
158

query I rowsort
SELECT DISTINCT - 38 FROM tab2 GROUP BY tab2.col1
----
-38

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + - 50 FROM tab1 GROUP BY tab1.col1
----
-50
-50
-50

query I rowsort
SELECT ALL + - NULLIF ( 92, - tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-92
-92
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 21 + + 23 col2 FROM tab0 cor0 GROUP BY col0
----
44
44
44

query I rowsort
SELECT ALL - 68 FROM tab1 GROUP BY tab1.col2
----
-68
-68
-68

query I rowsort
SELECT ALL cor0.col0 * - 37 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1036
-3034
-814

query I rowsort
SELECT 63 - 4 * + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
-109
-269
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT ALL - 61 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT DISTINCT - + 27 FROM tab2 GROUP BY tab2.col0
----
-27

query I rowsort
SELECT DISTINCT 55 FROM tab2 GROUP BY tab2.col0
----
55

query I rowsort
SELECT DISTINCT tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT + tab0.col0 IS NOT NULL
----

query I rowsort
SELECT + ( - col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor1.col0 + + cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
164
44
56

query I rowsort
SELECT ALL + 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT ALL 3 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
132
171
18

query I rowsort
SELECT - 91 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-91
-91
-91

query I rowsort
SELECT + 59 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
59
59
59

onlyif mysql # DIV for integer division: 
query I rowsort label-3583
SELECT DISTINCT + tab2.col2 DIV - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3583
SELECT DISTINCT + tab2.col2 / - tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
-1

query I rowsort
SELECT 60 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
60
60
60

query I rowsort
SELECT DISTINCT + 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
48

query I rowsort
SELECT - 13 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
2
78
79

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 36 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1476
2124
2196

query I rowsort
SELECT + + 82 AS col0 FROM tab1 GROUP BY tab1.col2
----
82
82
82

query I rowsort
SELECT DISTINCT + 83 AS col2 FROM tab0 GROUP BY col0
----
83

query I rowsort
SELECT ALL - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - 10 + col1 FROM tab2 GROUP BY tab2.col1
----
31
49
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-3594
SELECT DISTINCT - cor0.col2 DIV cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3594
SELECT DISTINCT - cor0.col2 / cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + + COALESCE ( - 48, - tab1.col0 * 90 + tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col2
----
-48
-48
-48

query I rowsort
SELECT ALL 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT DISTINCT 93 FROM tab2 AS cor0 GROUP BY cor0.col2
----
93

query I rowsort
SELECT DISTINCT 93 FROM tab2 GROUP BY tab2.col1
----
93

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
0
0
0

query I rowsort
SELECT 31 * col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1271
1829
1891

query I rowsort
SELECT DISTINCT - - 75 AS col1 FROM tab0 GROUP BY tab0.col0
----
75

query I rowsort
SELECT - 55 FROM tab0 GROUP BY tab0.col0
----
-55
-55
-55

onlyif mysql # DIV for integer division: 
query I rowsort label-3603
SELECT col2 DIV + 59 + cor0.col1 * 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1804
2597
2685

skipif mysql # not compatible
query I rowsort label-3603
SELECT col2 / + 59 + cor0.col1 * 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1804
2597
2685

query I rowsort
SELECT - - 79 FROM tab0 GROUP BY tab0.col1
----
79
79

query I rowsort
SELECT 74 FROM tab0 GROUP BY tab0.col1
----
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( + col2 ) col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 81 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
81

query I rowsort
SELECT DISTINCT + 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4

query I rowsort
SELECT DISTINCT + tab2.col0 - - 29 AS col0 FROM tab2 GROUP BY col0
----
120
121
44

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab2.col1 col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 91 * - 64 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5824

query I rowsort
SELECT DISTINCT - 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-3

query I rowsort
SELECT 2 + - 3 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT ALL - ( - cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 54 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col0
----
-54

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1008
1975
3116

query I rowsort
SELECT + - 10 FROM tab1 GROUP BY tab1.col1
----
-10
-10
-10

query I rowsort
SELECT DISTINCT 70 FROM tab2 GROUP BY tab2.col1
----
70

query I rowsort
SELECT ALL + 67 FROM tab2 GROUP BY tab2.col1
----
67
67
67

query I rowsort
SELECT - - 14 FROM tab2 GROUP BY tab2.col2
----
14
14
14

query I rowsort
SELECT - 2 FROM tab1 GROUP BY tab1.col1
----
-2
-2
-2

query I rowsort
SELECT ALL 79 AS col1 FROM tab2 GROUP BY col2
----
79
79
79

query I rowsort
SELECT ALL + 4 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT cor0.col1 - 21 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-21
60

query I rowsort
SELECT - - 97 FROM tab0 GROUP BY tab0.col1
----
97
97

query I rowsort
SELECT DISTINCT 14 FROM tab1 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NULL
----
0
81

query I rowsort
SELECT - 34 FROM tab1 GROUP BY col1
----
-34
-34
-34

query I rowsort
SELECT + cor0.col1 + - 55 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-11
-49
2

query I rowsort
SELECT ALL + 26 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
26
26
26

query I rowsort
SELECT 77 * - 77 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-5929
-5929
-5929

query I rowsort
SELECT ALL + 57 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
57
57
57

query I rowsort
SELECT DISTINCT - tab2.col1 * + tab2.col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - 46 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-31
45
46

query I rowsort
SELECT 83 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL >= ( NULL )
----

query I rowsort
SELECT DISTINCT + 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT ALL - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT - cor0.col0 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0, cor0.col1
----
-26
-83
38

query I rowsort
SELECT DISTINCT 41 * - 6 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-246

query I rowsort
SELECT cor0.col1 + cor0.col2 * - cor0.col1 FROM tab0 cor0 GROUP BY col2, cor0.col1, cor0.col0
----
-1863
0
0

query I rowsort
SELECT ALL 14 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT - 16 FROM tab1 GROUP BY tab1.col0
----
-16
-16
-16

query I rowsort
SELECT ( + 75 ) + 0 FROM tab2 GROUP BY tab2.col0
----
75
75
75

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col1 + 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
120
133
82

query I rowsort
SELECT cor0.col2 + col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT - 62 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT ALL tab1.col0 + tab1.col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT - 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-3653
SELECT - tab0.col2 * tab0.col2 + - tab0.col2 DIV tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1445
-577
-6242

skipif mysql # not compatible
query I rowsort label-3653
SELECT - tab0.col2 * tab0.col2 + - tab0.col2 / tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1445
-577
-6242

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 84 col0 FROM tab2 GROUP BY tab2.col1
----
84
84
84

query I rowsort
SELECT DISTINCT - 8 AS col1 FROM tab1 GROUP BY tab1.col2
----
-8

query I rowsort
SELECT + col2 + + 19 AS col0 FROM tab1 GROUP BY tab1.col2
----
27
64
90

query I rowsort
SELECT DISTINCT + 4 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4

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 ALL + 15 FROM tab1 GROUP BY tab1.col0
----
15
15
15

query I rowsort
SELECT ALL - cor0.col1 * - 10 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
810

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3661
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3661
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col1
----
NULL

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT - ( + 72 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 72 col0 FROM tab0 GROUP BY tab0.col2
----
72

query I rowsort
SELECT ALL - tab0.col0 * tab0.col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - - COALESCE ( - tab2.col1, - tab2.col1 ) * + 38 - - ( 68 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
-1490
-2174
-2250

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

onlyif mysql # DIV for integer division: 
query I rowsort label-3668
SELECT DISTINCT - tab2.col0 DIV - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1

skipif mysql # not compatible
query I rowsort label-3668
SELECT DISTINCT - tab2.col0 / - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1

query I rowsort
SELECT DISTINCT col2 * 8 FROM tab2 AS cor0 GROUP BY cor0.col2
----
464
632
696

query I rowsort
SELECT + - col0 - + tab0.col0 FROM tab0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT + 45 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT 3 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
60
9

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 ALL 41 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT 93 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT DISTINCT + 27 FROM tab1 GROUP BY tab1.col0
----
27

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT DISTINCT + tab1.col2 * col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 68, + cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-68

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0

query I rowsort
SELECT + + 27 AS col1 FROM tab0 GROUP BY tab0.col1
----
27
27

query I rowsort
SELECT ALL + 51 + - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
51
6612

query I rowsort
SELECT ALL - 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT ALL - 61 + + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-18
-35
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT - 22 * - 12 FROM tab1 AS cor0 GROUP BY cor0.col0
----
264
264
264

query I rowsort
SELECT + cor0.col2 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
91

query I rowsort
SELECT ( - 93 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 85 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
3825
6035
680

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
-81
0
0

query I rowsort
SELECT cor0.col0 * + 22 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1826
572
946

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT COALESCE ( + cor0.col0, + ( - cor0.col0 ) ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 7 FROM tab0 AS cor0 GROUP BY cor0.col0
----
7

query I rowsort
SELECT ALL + - 20 + 45 FROM tab1 GROUP BY tab1.col0
----
25
25
25

query I rowsort
SELECT DISTINCT 52 FROM tab1 cor0 GROUP BY col1
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 FROM tab1 cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT + 4 FROM tab2 GROUP BY tab2.col0
----
4
4
4

query I rowsort
SELECT ALL tab1.col1 * + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - 87 AS col2 FROM tab1 GROUP BY tab1.col2
----
-87
-87
-87

query I rowsort
SELECT + + 31 * + 98 AS col2 FROM tab2 GROUP BY tab2.col2
----
3038
3038
3038

query I rowsort
SELECT DISTINCT COALESCE ( - cor0.col2, cor0.col2, + cor0.col2 ) - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col2
----
-142
-16
-90

query I rowsort
SELECT DISTINCT 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
60

query I rowsort
SELECT - - tab2.col0 + + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT cor0.col0 * + 77 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
2002
3311
6391

query I rowsort
SELECT DISTINCT - - col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL 6 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
6
6
6

query I rowsort
SELECT ALL 41 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col0
----
41
41
41

query I rowsort
SELECT DISTINCT 15 AS col1 FROM tab2 GROUP BY col2
----
15

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 79 * - 67 FROM tab1 GROUP BY tab1.col0
----
-5293
-5293
-5293

query I rowsort
SELECT + 91 * cor0.col2 - + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4050
6390
720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 74 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4292
5846
6438

query I rowsort
SELECT ALL 95 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT ALL tab0.col1 + 45 FROM tab0 GROUP BY tab0.col1
----
126
45

query I rowsort
SELECT DISTINCT + 52 FROM tab2 GROUP BY tab2.col1
----
52

query I rowsort
SELECT ALL - tab0.col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT - cor0.col0 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-83
38

query I rowsort
SELECT ALL + 40 AS col0 FROM tab2 GROUP BY tab2.col0
----
40
40
40

query I rowsort
SELECT DISTINCT + 86 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86

query I rowsort
SELECT ALL - 38 FROM tab0 GROUP BY tab0.col1
----
-38
-38

query I rowsort
SELECT ALL 14 FROM tab2 AS cor0 GROUP BY cor0.col0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 85 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL >= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT - 44 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
98

query I rowsort
SELECT + 81 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
81
81

query I rowsort
SELECT + col2 * - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT ALL 39 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
39
39
39

query I rowsort
SELECT ALL + tab2.col1 FROM tab2 WHERE NOT col1 * tab2.col0 IS NULL GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - + 60 FROM tab0 GROUP BY tab0.col1
----
-60

query I rowsort
SELECT - 71 FROM tab2 GROUP BY tab2.col1
----
-71
-71
-71

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT + 8 AS col0 FROM tab2 GROUP BY col2
----
8
8
8

query I rowsort
SELECT + tab1.col2 * + col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2070
5112
72

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab0 GROUP BY tab0.col0
----
64

query I rowsort
SELECT 76 * tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
4350
5925
6525

query I rowsort
SELECT DISTINCT + 66 AS col1 FROM tab2 GROUP BY tab2.col1
----
66

query I rowsort
SELECT DISTINCT - ( - 70 ) AS col0 FROM tab0 GROUP BY col2
----
70

query I rowsort
SELECT ALL 58 + - 38 FROM tab0 AS cor0 GROUP BY cor0.col1
----
20
20

query I rowsort
SELECT DISTINCT - 67 FROM tab0 GROUP BY tab0.col1
----
-67

query I rowsort
SELECT + - 54 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-137
-80
-97

query I rowsort
SELECT DISTINCT + col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + tab2.col1 + - tab2.col1 FROM tab2 GROUP BY col1
----
0

query I rowsort
SELECT ALL 81 + 57 FROM tab1 GROUP BY tab1.col0
----
138
138
138

query I rowsort
SELECT 31 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
31
31
31

query I rowsort
SELECT - + tab1.col1 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT - col2 FROM tab1 cor0 GROUP BY cor0.col2 HAVING NULL IN ( cor0.col2 + - cor0.col2 / cor0.col2 )
----

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 67 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT - 70 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-70
-70
-70

query I rowsort
SELECT 69 FROM tab1 AS cor0 GROUP BY col0
----
69
69
69

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
5
5
5

query I rowsort
SELECT - 4 AS col0 FROM tab2 GROUP BY tab2.col0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 WHERE NOT ( NULL ) IN ( cor0.col2 ) GROUP BY cor0.col1
----

query I rowsort
SELECT ALL - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NULL
----
-24
-38
-79

query I rowsort
SELECT - 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-35
-35

query I rowsort
SELECT - 75 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6075
0

query I rowsort
SELECT DISTINCT + - 47 AS col0 FROM tab1 GROUP BY tab1.col1
----
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 36 col0 FROM tab2 GROUP BY tab2.col2
----
36

query I rowsort
SELECT 29 FROM tab2 AS cor0 GROUP BY col2
----
29
29
29

query I rowsort
SELECT ALL - cor0.col0 * + 68 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1474
-1876
-5494

query I rowsort
SELECT 84 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT + + 95 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
110
186
187

query I rowsort
SELECT ALL + - 75 FROM tab2 GROUP BY col1
----
-75
-75
-75

query I rowsort
SELECT DISTINCT - 88 + ( + col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-73
3
4

query I rowsort
SELECT 79 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
124
150
87

query I rowsort
SELECT ALL 24 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1968
528
672

query I rowsort
SELECT ALL + 2 FROM tab1 GROUP BY tab1.col1
----
2
2
2

query I rowsort
SELECT DISTINCT 23 + + ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
114
115
38

query I rowsort
SELECT DISTINCT - + ( - 28 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
28

query I rowsort
SELECT ALL 28 FROM tab0 GROUP BY col0
----
28
28
28

query I rowsort
SELECT - tab2.col1 AS col2 FROM tab2 WHERE NOT NULL NOT IN ( + tab2.col0 ) GROUP BY tab2.col1
----

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 43 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT + + 49 FROM tab1 GROUP BY tab1.col1
----
49
49
49

query I rowsort
SELECT ALL - 59 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-59
-59
-59

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, col2
----
44
57
6

query I rowsort
SELECT - 50 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-50
-50
-50

query I rowsort
SELECT 58 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5278
5336
870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT tab1.col1 + - 92 FROM tab1 GROUP BY tab1.col1
----
-35
-48
-86

query I rowsort
SELECT - + tab2.col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 80 FROM tab0 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT ALL - 40 FROM tab2 GROUP BY tab2.col0
----
-40
-40
-40

query I rowsort
SELECT cor0.col1 + - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 + 91 FROM tab2 AS cor0 GROUP BY col2
----
149
170
178

query I rowsort
SELECT ALL - + 22 FROM tab2 GROUP BY tab2.col2
----
-22
-22
-22

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 89 - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-147
-168
-176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT - tab0.col1 FROM tab0 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NOT NULL
----
45
71
8

query I rowsort
SELECT DISTINCT - 19 AS col0 FROM tab1 GROUP BY tab1.col0
----
-19

query I rowsort
SELECT + 56 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
56
56
56

query I rowsort
SELECT - 13 FROM tab0 GROUP BY tab0.col1
----
-13
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 79 col2 FROM tab1 GROUP BY tab1.col1
----
-79

query I rowsort
SELECT ALL 97 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT DISTINCT 17 + 74 FROM tab1 GROUP BY tab1.col2
----
91

query I rowsort
SELECT cor0.col1 + 2 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
43
61
63

query I rowsort
SELECT 73 FROM tab0 GROUP BY tab0.col0
----
73
73
73

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT tab1.col0 + - col0 FROM tab1 GROUP BY col0 HAVING NOT ( tab1.col0 ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT + 69 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
69

query I rowsort
SELECT + - 99 * tab0.col0 FROM tab0 GROUP BY col0
----
-2574
-4257
-8217

query I rowsort
SELECT DISTINCT 3 FROM tab2 cor0 GROUP BY col0
----
3

query I rowsort
SELECT + 29 FROM tab1 AS cor0 GROUP BY cor0.col1
----
29
29
29

query I rowsort
SELECT DISTINCT - + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - + tab0.col2 + - 73 AS col1 FROM tab0 GROUP BY col2
----
-111
-152
-97

onlyif mysql # DIV for integer division: 
query I rowsort label-3820
SELECT + cor0.col1 DIV - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3820
SELECT + cor0.col1 / - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT 19 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1577
-494
-817

query I rowsort
SELECT + cor0.col1 * 68 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2788
4012
4148

query I rowsort
SELECT + 85 AS col2 FROM tab0 GROUP BY tab0.col1
----
85
85

query I rowsort
SELECT ALL 77 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
77
77
77

query I rowsort
SELECT + - ( 33 ) FROM tab1 GROUP BY tab1.col0
----
-33
-33
-33

query I rowsort
SELECT ALL + 92 FROM tab0 GROUP BY tab0.col0
----
92
92
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3827
SELECT - - CAST( NULL AS SIGNED ) + + 8 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3827
SELECT - - CAST ( NULL AS INTEGER ) + + 8 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 84 + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
142
163
171

query I rowsort
SELECT 16 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
16
16
16

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 19 AS col1 FROM tab1 GROUP BY tab1.col0
----
-19

query I rowsort
SELECT ALL - 37 FROM tab1 GROUP BY tab1.col0
----
-37
-37
-37

query I rowsort
SELECT ALL + 39 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
39
39
39

query I rowsort
SELECT DISTINCT tab1.col0 FROM tab1 WHERE NOT ( NULL ) BETWEEN NULL AND col1 GROUP BY tab1.col0
----

query I rowsort
SELECT ALL tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT tab2.col0 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL 63 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
63
63
63

query I rowsort
SELECT ALL 79 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT DISTINCT - CASE + cor0.col0 WHEN cor0.col2 + cor0.col0 THEN NULL WHEN cor0.col2 * 44 THEN cor0.col0 ELSE NULL END AS col0 FROM tab0 cor0 GROUP BY cor0.col0, col2, cor0.col2
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3839
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-3839
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT + - 94 + + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-23
-49
-86

query I rowsort
SELECT + 10 FROM tab1 GROUP BY tab1.col2
----
10
10
10

query I rowsort
SELECT - 32 + + cor0.col1 * - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1968
-3281
-68

query I rowsort
SELECT ALL + col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 69 + 94 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
163
163

query I rowsort
SELECT + 26 FROM tab2 GROUP BY tab2.col1
----
26
26
26

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3846
SELECT + 3 - - tab1.col1 * - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3846
SELECT + 3 - - tab1.col1 * - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 51 FROM tab2 GROUP BY tab2.col2
----
-51
-51
-51

query I rowsort
SELECT + cor0.col0 * - 31 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2542
-682
-868

query I rowsort
SELECT ALL + 50 FROM tab1 cor0 GROUP BY cor0.col1
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 58 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
58

query I rowsort
SELECT ALL - 12 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-12
-12
-12

query I rowsort
SELECT - - 54 FROM tab0 GROUP BY tab0.col0
----
54
54
54

query I rowsort
SELECT ALL 72 * + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
1080
6552
6624

query I rowsort
SELECT + + 45 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
116
53
90

query I rowsort
SELECT 80 AS col0 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT 91 * 23 + - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
2012
2093

query I rowsort
SELECT DISTINCT + 37 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
37

query I rowsort
SELECT ALL 7 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
7
7
7

query I rowsort
SELECT ALL col2 + + 36 FROM tab2 AS cor0 GROUP BY col2
----
115
123
94

query I rowsort
SELECT ALL + 93 FROM tab2 GROUP BY col0
----
93
93
93

query I rowsort
SELECT - + 16 * + 55 FROM tab1 GROUP BY tab1.col0
----
-880
-880
-880

query I rowsort
SELECT 21 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
21
21

query I rowsort
SELECT + tab2.col2 + col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

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 DISTINCT - 0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL + + 26 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
26
26

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 56, + tab0.col1 * - tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
56
56
56

query I rowsort
SELECT 43 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT DISTINCT 6 - 59 FROM tab1 GROUP BY col1
----
-53

query I rowsort
SELECT 85 FROM tab2 AS cor0 GROUP BY col1
----
85
85
85

query I rowsort
SELECT DISTINCT + 55 AS col2 FROM tab2 GROUP BY tab2.col1
----
55

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3422
6320
7656

query I rowsort
SELECT 41 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
41
41
41

query I rowsort
SELECT DISTINCT - col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-81
0

query I rowsort
SELECT ALL + + 26 FROM tab2 GROUP BY tab2.col0
----
26
26
26

query I rowsort
SELECT ALL + tab1.col2 + - tab1.col2 FROM tab1 GROUP BY col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3878
SELECT DISTINCT cor1.col2 DIV - 11 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-5
-7

skipif mysql # not compatible
query I rowsort label-3878
SELECT DISTINCT cor1.col2 / - 11 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-5
-7

query I rowsort
SELECT ALL - 60 FROM tab1 GROUP BY col1
----
-60
-60
-60

query I rowsort
SELECT 98 AS col1 FROM tab2 GROUP BY tab2.col2
----
98
98
98

query I rowsort
SELECT DISTINCT - 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-97

query I rowsort
SELECT ALL - tab2.col1 * + col1 + 0 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - ( - 32 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
32

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3884
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3884
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + tab0.col2 * col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT ALL 74 * 36 + - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
2582
2636
2642

query I rowsort
SELECT + - 46 * col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-3726
0

query I rowsort
SELECT ALL - - col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT 33 * 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2310

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 50 col0 FROM tab2 GROUP BY tab2.col1
----
-50
-50
-50

query I rowsort
SELECT - 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-52
-52
-52

query I rowsort
SELECT + tab1.col2 - + 96 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-4275
-6745
-760

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL >= NULL
----

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col2
----
45
71
8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3897
SELECT DISTINCT + cor0.col1 + CAST( NULL AS DECIMAL ) * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3897
SELECT DISTINCT + cor0.col1 + CAST ( NULL AS REAL ) * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
NULL

query I rowsort
SELECT - tab1.col0 * - 16 FROM tab1 GROUP BY tab1.col0
----
1312
352
448

query I rowsort
SELECT 92 FROM tab2 cor0 GROUP BY cor0.col1
----
92
92
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3900
SELECT DISTINCT - 99 - 2 DIV col0 FROM tab2 GROUP BY tab2.col0
----
-99

skipif mysql # not compatible
query I rowsort label-3900
SELECT DISTINCT - 99 - 2 / col0 FROM tab2 GROUP BY tab2.col0
----
-99

query I rowsort
SELECT + - 25 AS col0 FROM tab0 GROUP BY tab0.col1
----
-25
-25

query I rowsort
SELECT 79 FROM tab2 cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT DISTINCT + 0 FROM tab2 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IN ( tab2.col1 )
----

query I rowsort
SELECT ALL tab2.col1 AS col0 FROM tab2 GROUP BY col1 HAVING NULL BETWEEN ( NULL ) AND col1
----

query I rowsort
SELECT DISTINCT + + 19 FROM tab2 GROUP BY tab2.col1
----
19

onlyif mysql # DIV for integer division: 
query I rowsort label-3909
SELECT ALL + tab0.col2 DIV 27 + tab0.col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
24
39
81

skipif mysql # not compatible
query I rowsort label-3909
SELECT ALL + tab0.col2 / 27 + tab0.col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
24
39
81

onlyif mysql # DIV for integer division: 
query I rowsort label-3910
SELECT ALL cor0.col2 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3910
SELECT ALL cor0.col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - 58 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-58
-58
-58

query I rowsort
SELECT + 74 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-4292
-5846
-6438

query I rowsort
SELECT ALL - 21 AS col0 FROM tab0 GROUP BY tab0.col2
----
-21
-21
-21

query I rowsort
SELECT ALL - 67 FROM tab2 GROUP BY tab2.col2
----
-67
-67
-67

query I rowsort
SELECT ALL - 56 FROM tab1 GROUP BY tab1.col0
----
-56
-56
-56

query I rowsort
SELECT 23 * + 71 FROM tab1 GROUP BY tab1.col2
----
1633
1633
1633

query I rowsort
SELECT DISTINCT tab1.col2 - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT ALL - 43 FROM tab1 GROUP BY tab1.col2
----
-43
-43
-43

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
43

query I rowsort
SELECT ALL cor0.col0 * + col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + - tab2.col1 - 95 FROM tab2 GROUP BY col1
----
-136
-154
-156

query I rowsort
SELECT - - tab2.col1 * 1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 9 FROM tab0 GROUP BY tab0.col2
----
-9

query I rowsort
SELECT ALL - 78 * + 30 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2340
-2340
-2340

query I rowsort
SELECT 97 FROM tab2 GROUP BY tab2.col0
----
97
97
97

query I rowsort
SELECT + ( 64 ) FROM tab2 GROUP BY tab2.col2
----
64
64
64

query I rowsort
SELECT DISTINCT + - ( 87 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-87

query I rowsort
SELECT DISTINCT - 60 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-60

query I rowsort
SELECT ALL - 13 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-13
-13
-13

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT 54 AS col2 FROM tab2 GROUP BY tab2.col2
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 col2 FROM tab2 GROUP BY tab2.col2
----
57
57
57

query I rowsort
SELECT ALL + 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
59
59
59

query I rowsort
SELECT col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 4 * 0 col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
0
0
0

query I rowsort
SELECT ALL - 11 FROM tab0 GROUP BY tab0.col2
----
-11
-11
-11

query I rowsort
SELECT cor0.col0 * + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + 10 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
10
10
10

query I rowsort
SELECT ALL + 26 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT + 62 FROM tab0 AS cor0 GROUP BY col2
----
62

query I rowsort
SELECT cor0.col0 * ( cor0.col1 ) + col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
26
3526
83

query I rowsort
SELECT - cor0.col0 * 70 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1050
-6370
-6440

query I rowsort
SELECT - 34 * - cor0.col0 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2744
742
895

query I rowsort
SELECT - 96 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-96
-96
-96

query I rowsort
SELECT ALL - + 54 FROM tab2 GROUP BY tab2.col2
----
-54
-54
-54

query I rowsort
SELECT - 67 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-52
24
25

query I rowsort
SELECT DISTINCT 52 FROM tab0 GROUP BY tab0.col2
----
52

query I rowsort
SELECT ALL 31 AS col0 FROM tab2 cor0 GROUP BY col2
----
31
31
31

query I rowsort
SELECT 58 FROM tab0 AS cor0 GROUP BY col2
----
58
58
58

query I rowsort
SELECT 0 FROM tab0 GROUP BY tab0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3955
SELECT + tab2.col1 DIV + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3955
SELECT + tab2.col1 / + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3956
SELECT ALL cor0.col0 DIV + 38 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-42
-81

skipif mysql # not compatible
query I rowsort label-3956
SELECT ALL cor0.col0 / + 38 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-42
-81

query I rowsort
SELECT + 25 FROM tab1 GROUP BY col1
----
25
25
25

query I rowsort
SELECT DISTINCT + 91 AS col0 FROM tab2, tab1 cor0 GROUP BY tab2.col1
----
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3959
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * - 60 FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3959
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * - 60 FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT 75 FROM tab2 AS cor0 GROUP BY col1
----
75
75
75

query I rowsort
SELECT - - 81 AS col2 FROM tab1 GROUP BY tab1.col0
----
81
81
81

query I rowsort
SELECT ALL + 39 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
39
39
39

query I rowsort
SELECT DISTINCT 77 AS col0 FROM tab0 GROUP BY col2
----
77

query I rowsort
SELECT ALL + + 88 FROM tab2 GROUP BY tab2.col0
----
88
88
88

query I rowsort
SELECT DISTINCT - - tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - col2 * - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT tab0.col1 - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 63 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
63

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL < NULL
----

query I rowsort
SELECT 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT 19 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2, cor1.col2
----
19
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-3972
SELECT DISTINCT - 51 DIV - cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3972
SELECT DISTINCT - 51 / - cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL + 85 FROM tab2 AS cor0 GROUP BY col1
----
85
85
85

query I rowsort
SELECT ALL - 66 * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
5346

query I rowsort
SELECT DISTINCT + 87 AS col0 FROM tab2 GROUP BY tab2.col0
----
87

query I rowsort
SELECT + 22 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1254
132
968

query I rowsort
SELECT ALL - ( - 4 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT 85 - - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
143
164
172

query I rowsort
SELECT DISTINCT + 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT 35 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-48
-8
9

query I rowsort
SELECT 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

query I rowsort
SELECT DISTINCT 91 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
91

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, col1
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab0 GROUP BY tab0.col2
----
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 39 * col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1755
2769
312

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 72 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
-38
26
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3992
SELECT + 25 DIV 79 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3992
SELECT + 25 / 79 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + + ( tab0.col2 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab2.col2 * + 36 FROM tab2 GROUP BY tab2.col2
----
2088
2844
3132

query I rowsort
SELECT cor0.col2 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
105
121
67

query I rowsort
SELECT + 76 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
76
76
76

query I rowsort
SELECT ALL + tab0.col0 * - 25 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1075
-2075
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * 16 col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
1312
352
448

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 + ( tab2.col1 ) * - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - 50 FROM tab1 AS cor0 GROUP BY col2
----
-50
-50
-50

query I rowsort
SELECT ALL 24 - 23 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
27
27
27

query I rowsort
SELECT - 8 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
176
224
656

query I rowsort
SELECT DISTINCT 6 AS col0 FROM tab0 GROUP BY tab0.col1
----
6

query I rowsort
SELECT 26 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-18
-31
20

query I rowsort
SELECT + tab1.col0 * + col0 AS col2 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT - 70 AS col2 FROM tab0 GROUP BY tab0.col2
----
-70
-70
-70

query I rowsort
SELECT - 43 FROM tab1 GROUP BY tab1.col2
----
-43
-43
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col2 FROM tab1 GROUP BY tab1.col2
----
49
49
49

query I rowsort
SELECT - 54 FROM tab1 GROUP BY tab1.col1
----
-54
-54
-54

query I rowsort
SELECT DISTINCT - - 25 FROM tab2 GROUP BY tab2.col0
----
25

query I rowsort
SELECT ALL + 67 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
67
67
67

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 DISTINCT 33 * 36 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
1188

query I rowsort
SELECT DISTINCT + 15 FROM tab1 GROUP BY tab1.col2
----
15

query I rowsort
SELECT tab2.col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL - 26 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-26
-26
-26

query I rowsort
SELECT + col0 + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL - col0 * cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * + col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT ALL - 89 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-89
-89
-89

query I rowsort
SELECT 91 + + 54 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1313
-2231
-4391

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT + - col1 AS col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL - COALESCE ( + 91, + 40, + tab1.col1 ) - 8 AS col1 FROM tab1 GROUP BY tab1.col1
----
-99
-99
-99

query I rowsort
SELECT - 57 FROM tab0 GROUP BY tab0.col0
----
-57
-57
-57

query I rowsort
SELECT + 65 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
65
65
65

query I rowsort
SELECT ALL NULLIF ( 89, cor0.col1 / 61 ) + + 54 FROM tab1 cor0 GROUP BY col1
----
143
143
143

query I rowsort
SELECT DISTINCT - tab0.col1 + 52 AS col2 FROM tab0 GROUP BY tab0.col1
----
-29
52

query I rowsort
SELECT DISTINCT - tab2.col0 FROM tab2 WHERE NOT NULL <> - col2 GROUP BY tab2.col0
----

query I rowsort
SELECT DISTINCT + tab0.col0 AS col0 FROM tab0 WHERE NULL IS NOT NULL GROUP BY tab0.col0
----

query I rowsort
SELECT col1 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4037
SELECT DISTINCT + CAST( + 16 AS SIGNED ) * - cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1328
-416
-688

skipif mysql # not compatible
query I rowsort label-4037
SELECT DISTINCT + CAST ( + 16 AS INTEGER ) * - cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-1328
-416
-688

query I rowsort
SELECT DISTINCT CASE 13 WHEN 62 THEN NULL ELSE + cor0.col1 END AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - 30 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-30
-30
-30

query I rowsort
SELECT DISTINCT - - 39 FROM tab1 GROUP BY tab1.col1
----
39

query I rowsort
SELECT - 34 AS col2 FROM tab2 GROUP BY tab2.col1
----
-34
-34
-34

query I rowsort
SELECT - 60 AS col1 FROM tab2 GROUP BY tab2.col0
----
-60
-60
-60

query I rowsort
SELECT + ( 15 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT + 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + + tab1.col0 * tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - cor0.col0 + + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT - ( 67 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-67
-67

query I rowsort
SELECT + 52 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2340
3692
416

query I rowsort
SELECT ALL - 95 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-95
-95
-95

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) > - col2
----

query I rowsort
SELECT col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL >= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 col0 FROM tab1 GROUP BY tab1.col1
----
48
48
48

query I rowsort
SELECT - 49 AS col1 FROM tab0 GROUP BY tab0.col0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + 63 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
106
146
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 34 + + 21 col2 FROM tab0 GROUP BY col1
----
55
55

query I rowsort
SELECT - 54 AS col2 FROM tab0 GROUP BY tab0.col1
----
-54
-54

query I rowsort
SELECT 29 FROM tab2 GROUP BY tab2.col0
----
29
29
29

query I rowsort
SELECT ALL - 12 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-12
-12
-12

query I rowsort
SELECT ALL 50 FROM tab1 cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT ALL - tab0.col1 * 30 FROM tab0 GROUP BY tab0.col1
----
-2430
0

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 DISTINCT + tab2.col2 col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
158
48
76

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4066
SELECT DISTINCT CAST( NULL AS SIGNED ) * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4066
SELECT DISTINCT CAST ( NULL AS INTEGER ) * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 40 * - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1760
-2280
-240

query I rowsort
SELECT ALL + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING + tab1.col0 IS NULL
----

query I rowsort
SELECT + col1 FROM tab0 WHERE NULL NOT IN ( tab0.col2 / - col0 ) GROUP BY tab0.col1
----

query I rowsort
SELECT ALL - 94 AS col1 FROM tab2 GROUP BY tab2.col2
----
-94
-94
-94

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT ALL + 61 AS col0 FROM tab2 GROUP BY tab2.col2
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 39 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-39

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 94 * + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
3854
5546
5734

query I rowsort
SELECT ALL cor1.col1 + 88 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
169
88

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4079
SELECT - 29 * + cor0.col2 - + CAST( NULL AS DECIMAL ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4079
SELECT - 29 * + cor0.col2 - + CAST ( NULL AS REAL ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + ( - 30 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
-30
-30
-30

query I rowsort
SELECT DISTINCT - cor0.col2 + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT + - tab0.col2 + 53 FROM tab0 GROUP BY col2
----
-26
15
29

query I rowsort
SELECT ALL + col1 AS col0 FROM tab0 AS cor0 GROUP BY col2, col1
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4085
SELECT cor0.col1 DIV 65 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4085
SELECT cor0.col1 / 65 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT + - NULLIF ( - 34, + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
34
34
34

query I rowsort
SELECT DISTINCT - 37 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-37

onlyif mysql # DIV for integer division: 
query I rowsort label-4088
SELECT 43 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-4088
SELECT 43 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7
0
0

query I rowsort
SELECT - 97 * cor0.col1 + + 90 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3887
-5633
-5827

query I rowsort
SELECT 11 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
11
11
11

query I rowsort
SELECT ALL 74 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
112
153
98

query I rowsort
SELECT 55 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
134
79
93

query I rowsort
SELECT 49 FROM tab1 cor0 GROUP BY col2
----
49
49
49

query I rowsort
SELECT DISTINCT - 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-95

query I rowsort
SELECT DISTINCT - tab0.col2 * - 28 AS col1 FROM tab0 GROUP BY tab0.col2
----
1064
2212
672

query I rowsort
SELECT DISTINCT - - 54 AS col2 FROM tab2 GROUP BY tab2.col2
----
54

query I rowsort
SELECT DISTINCT ( col2 ) FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + tab1.col0 * - tab1.col0 AS col1 FROM tab1 GROUP BY col0 HAVING tab1.col0 IS NOT NULL
----
-484
-6724
-784

query I rowsort
SELECT ALL tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 75 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 32 + + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
103
40
77

query I rowsort
SELECT DISTINCT tab0.col2 - 19 AS col2 FROM tab0 GROUP BY tab0.col2
----
19
5
60

query I rowsort
SELECT 55 FROM tab0 GROUP BY col0
----
55
55
55

query I rowsort
SELECT 3 FROM tab1 cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT - col1 + - NULLIF ( + 40, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-101
-81
-99

query I rowsort
SELECT - 15 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
23
64
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL NOT IN ( tab0.col1 )
----

query I rowsort
SELECT ALL + 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

query I rowsort
SELECT - cor0.col2 * 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-4365
-6887
-776

query I rowsort
SELECT - 71 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-71
-71
-71

query I rowsort
SELECT 55 - tab1.col2 * 55 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2420
-385
-3850

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

query I rowsort
SELECT + 34 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1530
-2414
-272

query I rowsort
SELECT cor0.col0 * 33 FROM tab2 cor0 GROUP BY cor0.col0
----
3003
3036
495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 14 col1 FROM tab0 GROUP BY tab0.col1
----
-14
-14

query I rowsort
SELECT DISTINCT 59 FROM tab0 AS cor0 GROUP BY col0
----
59

query I rowsort
SELECT + 58 * 19 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1102
1102
1102

query I rowsort
SELECT - 22 FROM tab0 GROUP BY tab0.col0
----
-22
-22
-22

query I rowsort
SELECT - + 73 * + tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-3240
-5112
-576

query I rowsort
SELECT - 17 FROM tab2 GROUP BY tab2.col2
----
-17
-17
-17

query I rowsort
SELECT ALL - 34 * - col1 + + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
1435
2065
2135

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4123
SELECT - col0 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4123
SELECT - col0 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 29 + - 36 AS col2 FROM tab1 GROUP BY tab1.col2
----
-7
-7
-7

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 92, cor0.col2, + 19 * cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-92
-92
-92

query I rowsort
SELECT ALL cor0.col0 + - cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-29
16
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 * + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
1638
1656
270

query I rowsort
SELECT 8 AS col2 FROM tab1 GROUP BY tab1.col2
----
8
8
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4129
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4129
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT 13 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
13
13
13

query I rowsort
SELECT DISTINCT cor0.col1 * - 8 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-648
0

query I rowsort
SELECT + 31 FROM tab2 AS cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT + - 90 FROM tab2 GROUP BY tab2.col0
----
-90

query I rowsort
SELECT ALL - cor0.col0 * cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1892
-6972
-702

query I rowsort
SELECT - + 72 FROM tab0 GROUP BY col2
----
-72
-72
-72

query I rowsort
SELECT cor0.col1 - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT - 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-85

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 19, + cor0.col0 - col2, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-19
-19
-19

query I rowsort
SELECT - 1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT tab0.col0 * + tab0.col0 AS col2 FROM tab0 WHERE NULL IS NOT NULL GROUP BY tab0.col0 HAVING NOT ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + + 35 FROM tab2 GROUP BY tab2.col1
----
35
35
35

query I rowsort
SELECT - 98 AS col0 FROM tab1 GROUP BY tab1.col1
----
-98
-98
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 col1 FROM tab1 GROUP BY tab1.col0
----
-67
-67
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * cor0.col0 - - 13 col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
3785
5382
928

query I rowsort
SELECT + 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-4146
SELECT DISTINCT col0 DIV tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
16
92
93

skipif mysql # not compatible
query I rowsort label-4146
SELECT DISTINCT col0 / tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
16
92
93

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-4148
SELECT - cor0.col2 DIV - cor0.col2 + cor0.col2 FROM tab1 AS cor0 WHERE NOT ( + col2 ) IS NULL GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
46
72
9

skipif mysql # not compatible
query I rowsort label-4148
SELECT - cor0.col2 / - cor0.col2 + cor0.col2 FROM tab1 AS cor0 WHERE NOT ( + col2 ) IS NULL GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
46
72
9

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 HAVING tab1.col2 IS NOT NULL
----
45
71
8

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL - 16 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-16
-16
-16

query I rowsort
SELECT DISTINCT 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
30

query I rowsort
SELECT + - 67 - - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-24
-41
16

query I rowsort
SELECT ( 21 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
21
21
21

query I rowsort
SELECT + - 70 AS col2 FROM tab1 GROUP BY tab1.col0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT 10 * col0 + + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
242
308
902

query I rowsort
SELECT DISTINCT 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT + 26 FROM tab0 cor0 GROUP BY col2, cor0.col1
----
26
26
26

query I rowsort
SELECT DISTINCT - 71 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-71

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
116
158
174

query I rowsort
SELECT + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - ( 91 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-20
-46
-83

query I rowsort
SELECT DISTINCT + 10 AS col0 FROM tab0 GROUP BY tab0.col1
----
10

query I rowsort
SELECT ALL - 48 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
22
28
82

query I rowsort
SELECT 95 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
95
95
95

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4167
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4167
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab0.col0 + 31 FROM tab0 GROUP BY tab0.col0
----
114
57
74

query I rowsort
SELECT DISTINCT - 68 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-68

query I rowsort
SELECT DISTINCT - 66 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-66

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT cor1.col2 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - tab2.col2 * - 45 FROM tab2 GROUP BY col2
----
2610
3555
3915

query I rowsort
SELECT DISTINCT ( + col1 ) FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT DISTINCT - - tab2.col2 + - col2 AS col0 FROM tab2 GROUP BY col2
----
0

query I rowsort
SELECT ALL 10 AS col1 FROM tab1 GROUP BY col0
----
10
10
10

query I rowsort
SELECT DISTINCT + 77 FROM tab0 GROUP BY tab0.col2
----
77

query I rowsort
SELECT tab2.col1 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT - + 64 FROM tab1 GROUP BY tab1.col2
----
-64
-64
-64

query I rowsort
SELECT + + 35 FROM tab1 GROUP BY tab1.col2
----
35
35
35

query I rowsort
SELECT ALL 82 FROM tab0 GROUP BY tab0.col2
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 + + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
100
71
92

query I rowsort
SELECT + - 37 AS col2 FROM tab0 GROUP BY tab0.col1
----
-37
-37

query I rowsort
SELECT DISTINCT - NULLIF ( - cor0.col1, - cor0.col0 - - 20 ) * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
-3483
0

query I rowsort
SELECT ALL + 25 - - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
66
84
86

onlyif mysql # DIV for integer division: 
query I rowsort label-4187
SELECT ALL + col2 DIV + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4187
SELECT ALL + col2 / + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT ALL 87 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3828
-4959
-522

query I rowsort
SELECT + + 3 AS col1 FROM tab2 GROUP BY tab2.col1
----
3
3
3

query I rowsort
SELECT 57 FROM tab0 GROUP BY tab0.col1
----
57
57

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4191
SELECT + CAST( NULL AS SIGNED ) / - 14 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4191
SELECT + CAST ( NULL AS INTEGER ) / - 14 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + + tab1.col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 71 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT DISTINCT + + 76 FROM tab1 GROUP BY tab1.col2
----
76

query I rowsort
SELECT ALL - 11 * 23 FROM tab0 GROUP BY col2
----
-253
-253
-253

query I rowsort
SELECT - + 43 FROM tab2 GROUP BY tab2.col1
----
-43
-43
-43

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 92 FROM tab1 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT + 7 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT DISTINCT - ( - 26 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 43 col1 FROM tab2 GROUP BY tab2.col2
----
43
43
43

query I rowsort
SELECT 12 FROM tab1 GROUP BY tab1.col2
----
12
12
12

query I rowsort
SELECT ALL NULLIF ( 1, 88 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT - COALESCE ( 89, + cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-89
-89
-89

query I rowsort
SELECT 7 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT 68 + 63 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
131

query I rowsort
SELECT ALL 71 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71
71
71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4209
SELECT - cor0.col1 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4209
SELECT - cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

query I rowsort
SELECT + + tab1.col1 - 16 FROM tab1 GROUP BY tab1.col1
----
-10
28
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 8 col1 FROM tab2 GROUP BY tab2.col2
----
-8
-8
-8

query I rowsort
SELECT DISTINCT cor0.col0 * + 4 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
112
328
88

query I rowsort
SELECT ALL + 30 + - 57 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT ALL - 56 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1456
-2408
-4648

query I rowsort
SELECT ALL - 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14
-14

query I rowsort
SELECT ALL - 43 FROM tab2 GROUP BY tab2.col0
----
-43
-43
-43

query I rowsort
SELECT ALL 57 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1254
1596
4674

query I rowsort
SELECT 14 * cor0.col1 - ( + 19 ) FROM tab1 AS cor0 GROUP BY col1
----
597
65
779

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 3 - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-78
3

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2 HAVING NOT + col2 > NULL AND NOT ( NULL ) IS NOT NULL
----

query I rowsort
SELECT 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT + 50 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-4224
SELECT ALL tab1.col2 DIV - tab1.col2 FROM tab1 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4224
SELECT ALL tab1.col2 / - tab1.col2 FROM tab1 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
1892
6972
702

query I rowsort
SELECT 9 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT DISTINCT - 9 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-9

query I rowsort
SELECT 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT - 49 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-49
-49
-49

query I rowsort
SELECT - 21 FROM tab1 GROUP BY tab1.col0
----
-21
-21
-21

query I rowsort
SELECT - 89 FROM tab1 AS cor0 GROUP BY col2
----
-89
-89
-89

onlyif mysql # DIV for integer division: 
query I rowsort label-4232
SELECT ALL tab1.col1 DIV tab1.col1 FROM tab1 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4232
SELECT ALL tab1.col1 / tab1.col1 FROM tab1 GROUP BY col1
----
1
1
1

query I rowsort
SELECT 85 - 82 FROM tab1 GROUP BY tab1.col1
----
3
3
3

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4234
SELECT ALL CAST( 76 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
76
76
76

skipif mysql # not compatible
query I rowsort label-4234
SELECT ALL CAST ( 76 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL 21 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT - 36 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1008
-2952
-792

query I rowsort
SELECT - 31 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-31
-31
-31

query I rowsort
SELECT ALL + col0 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4240
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4240
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 59 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
59
59
59

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4244
SELECT + + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4244
SELECT + + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 45 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-45
-45
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
70
70
70

query I rowsort
SELECT ALL + cor0.col0 - cor0.col0 * 32 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-2542
-682
-868

query I rowsort
SELECT + 7 * 8 FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT DISTINCT - 51 * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2295
-3621
-408

query I rowsort
SELECT - cor0.col0 * - 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2046
2604
7626

query I rowsort
SELECT ALL - + 54 + - 34 FROM tab0 GROUP BY tab0.col1
----
-88
-88

query I rowsort
SELECT ALL + 79 FROM tab2 AS cor0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT - cor0.col2 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-153
-30
-73

query I rowsort
SELECT 9 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
9
9
9

query I rowsort
SELECT DISTINCT + col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 70 FROM tab2 cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 37 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
37
37
37

query I rowsort
SELECT - 45 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-30
46
47

query I rowsort
SELECT - tab1.col1 - - 33 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1408
1824
192

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col1 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 28 col2 FROM tab0 GROUP BY col0
----
28
28
28

query I rowsort
SELECT ALL 92 FROM tab0 AS cor0 GROUP BY cor0.col1
----
92
92

query I rowsort
SELECT + cor0.col0 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1849
676
6889

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT + tab2.col1 * ( + 37 ) AS col1 FROM tab2 GROUP BY tab2.col1
----
1517
2183
2257

query I rowsort
SELECT - tab1.col1 + - tab1.col1 FROM tab1 GROUP BY col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT 17 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17

query I rowsort
SELECT + 67 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT ALL + cor0.col1 * - ( 50 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2050
-2950
-3050

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - - 55 AS col0 FROM tab0 GROUP BY tab0.col1
----
55

query I rowsort
SELECT ALL col1 * cor0.col1 + cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3362
6962
7442

query I rowsort
SELECT DISTINCT - 80 FROM tab2 GROUP BY tab2.col2
----
-80

query I rowsort
SELECT ALL + 27 AS col2 FROM tab2 GROUP BY tab2.col1
----
27
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-4278
SELECT ALL tab0.col1 DIV 96 - col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

skipif mysql # not compatible
query I rowsort label-4278
SELECT ALL tab0.col1 / 96 - col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT NULLIF ( cor0.col0, + 79 ) * + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
3772
5369
915

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT ALL tab2.col1 * tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1722
3540
3782

query I rowsort
SELECT - col1 + - col1 FROM tab2 GROUP BY col1
----
-118
-122
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 + 27 col1 FROM tab0 GROUP BY tab0.col2
----
75
75
75

query I rowsort
SELECT 31 FROM tab0 GROUP BY tab0.col2
----
31
31
31

query I rowsort
SELECT ( 93 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
93
93
93

query I rowsort
SELECT DISTINCT + NULLIF ( - 64, cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-64

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 + + 11 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3375
6252
7580

query I rowsort
SELECT - + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4290
SELECT - CAST( 12 AS SIGNED ) + 94 col2 FROM tab0 GROUP BY tab0.col2
----
82
82
82

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4290
SELECT - CAST ( 12 AS INTEGER ) + 94 col2 FROM tab0 GROUP BY tab0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT tab1.col0 * - 82 FROM tab1 GROUP BY col0
----
-1804
-2296
-6724

query I rowsort
SELECT ALL - 47 * - col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1128
1786
3713

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * 31 + - cor0.col2 * 85 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-5909
-657
-707

query I rowsort
SELECT 98 FROM tab0 GROUP BY tab0.col0
----
98
98
98

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
59

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-26
-43
-83

query I rowsort
SELECT ALL - 46 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

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 ALL tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IN ( tab2.col0 )
----

query I rowsort
SELECT col1 AS col0 FROM tab0 WHERE - col2 < NULL GROUP BY tab0.col1 HAVING NULL IS NULL
----

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - tab2.col1 * - tab2.col1 + + 4 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1845
3717
3965

query I rowsort
SELECT cor0.col0 + - 97 FROM tab2 cor0 GROUP BY cor0.col0
----
-5
-6
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4305
SELECT DISTINCT + cor0.col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4305
SELECT DISTINCT + cor0.col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT - 69 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-69

query I rowsort
SELECT - 41 * tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-1681
-2419
-2501

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-4309
SELECT ALL + 92 DIV 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2
2
2

skipif mysql # not compatible
query I rowsort label-4309
SELECT ALL + 92 / 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2
2
2

query I rowsort
SELECT + 36 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
36
36
36

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-4312
SELECT - cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4312
SELECT - cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
58
79
87

query I rowsort
SELECT + + tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

query I rowsort
SELECT 82 FROM tab1 GROUP BY tab1.col0
----
82
82
82

query I rowsort
SELECT + 28 AS col0 FROM tab0 GROUP BY tab0.col2
----
28
28
28

onlyif mysql # DIV for integer division: 
query I rowsort label-4318
SELECT ALL NULLIF ( cor0.col2, + 63 ) DIV 79 + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
80
88

skipif mysql # not compatible
query I rowsort label-4318
SELECT ALL NULLIF ( cor0.col2, + 63 ) / 79 + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
80
88

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 65 - 52 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-117

query I rowsort
SELECT DISTINCT 46 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-12
-33
-41

query I rowsort
SELECT ALL 30 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-61
-62
15

query I rowsort
SELECT ALL - - tab1.col2 + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - cor0.col1 ) * cor0.col1 + - 3 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3
-3
-6564

query I rowsort
SELECT ALL + 5 AS col1 FROM tab1 GROUP BY tab1.col1
----
5
5
5

query I rowsort
SELECT tab0.col1 AS col0 FROM tab0 GROUP BY col1 HAVING NOT - tab0.col1 IS NULL
----
0
81

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT ALL - ( cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - cor0.col2 * - 6 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
144
228
474

query I rowsort
SELECT DISTINCT + 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
51

query I rowsort
SELECT - 39 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-39
-39
-39

query I rowsort
SELECT col0 + 54 FROM tab2 GROUP BY tab2.col0
----
145
146
69

query I rowsort
SELECT ( + 10 ) FROM tab2 GROUP BY tab2.col2
----
10
10
10

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.col0 * 27 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1161
2241
702

query I rowsort
SELECT ALL - 26 + - 32 AS col2 FROM tab1 GROUP BY tab1.col0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT + 22 * 86 AS col1 FROM tab2 GROUP BY col1
----
1892

query I rowsort
SELECT DISTINCT 28 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
28

query I rowsort
SELECT DISTINCT + + 43 AS col1 FROM tab1 GROUP BY tab1.col1
----
43

query I rowsort
SELECT DISTINCT 73 FROM tab0 GROUP BY col1
----
73

query I rowsort
SELECT - + 95 FROM tab2 GROUP BY tab2.col2
----
-95
-95
-95

query I rowsort
SELECT ALL 48 FROM tab0 GROUP BY tab0.col0
----
48
48
48

query I rowsort
SELECT DISTINCT + 7 AS col2 FROM tab2 GROUP BY tab2.col0
----
7

onlyif mysql # DIV for integer division: 
query I rowsort label-4344
SELECT DISTINCT cor0.col0 DIV - cor0.col1 + 16 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-705
-912
-99

skipif mysql # not compatible
query I rowsort label-4344
SELECT DISTINCT cor0.col0 / - cor0.col1 + 16 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-705
-912
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab2 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col0 HAVING NULL > NULL
----

query I rowsort
SELECT DISTINCT - 24 FROM tab0 GROUP BY tab0.col1
----
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT 96 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT ALL - 36 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-36
-36
-36

query I rowsort
SELECT + cor0.col2 * cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2070
5112
72

query I rowsort
SELECT + 28 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-1624
-2212
-2436

query I rowsort
SELECT DISTINCT - tab2.col1 - - 65 AS col2 FROM tab2 GROUP BY tab2.col1
----
24
4
6

query I rowsort
SELECT DISTINCT - 39 AS col1 FROM tab1 GROUP BY tab1.col0
----
-39

query I rowsort
SELECT DISTINCT - + 75 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1125
6825
6900

query I rowsort
SELECT ALL - col1 * tab0.col1 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL = ( NULL )
----

query I rowsort
SELECT - 4 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT + cor0.col1 * 21 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1701

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col1 * + ( 35 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1435
2065
2135

query I rowsort
SELECT 97 * - cor0.col2 + - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-5667
-7722
-8500

query I rowsort
SELECT - 78 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 89 col0 FROM tab2 GROUP BY tab2.col0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - col0 * - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT - 63 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-63
-63

query I rowsort
SELECT DISTINCT 8 FROM tab1 GROUP BY tab1.col2
----
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 16 col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * + tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL - 82 AS col2 FROM tab2 GROUP BY tab2.col1
----
-82
-82
-82

query I rowsort
SELECT DISTINCT 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT DISTINCT col2 * 63 FROM tab1 cor0 GROUP BY col2
----
2835
4473
504

query I rowsort
SELECT 56 AS col0 FROM tab0 GROUP BY tab0.col2
----
56
56
56

query I rowsort
SELECT 38 FROM tab1 GROUP BY tab1.col2
----
38
38
38

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT 43 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 66 col2 FROM tab0 GROUP BY tab0.col0
----
-66

query I rowsort
SELECT ALL + - 96 + 95 FROM tab2 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT - 35 AS col0 FROM tab0 GROUP BY tab0.col2
----
-35
-35
-35

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT + 11 FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT ALL 31 FROM tab2 cor0 GROUP BY cor0.col1
----
31
31
31

query I rowsort
SELECT ALL + 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT ALL + - 31 AS col0 FROM tab0 GROUP BY col1
----
-31
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 16 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT ALL + 44 * 43 + cor0.col1 * + 80 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2372
5412
6452

query I rowsort
SELECT 0 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4395
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4395
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 - - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT + cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

query I rowsort
SELECT + 33 AS col2 FROM tab0 GROUP BY tab0.col0
----
33
33
33

query I rowsort
SELECT ALL - 9 FROM tab0 cor0 GROUP BY cor0.col1
----
-9
-9

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 8 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-8

query I rowsort
SELECT DISTINCT 49 AS col2 FROM tab1 GROUP BY tab1.col1
----
49

query I rowsort
SELECT ALL + 13 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
13
94

query I rowsort
SELECT ALL NULLIF ( 79, cor0.col0 + + cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
79
79
79

query I rowsort
SELECT ALL + tab1.col2 * 11 AS col2 FROM tab1 GROUP BY tab1.col2
----
495
781
88

query I rowsort
SELECT DISTINCT + - 12 FROM tab2 GROUP BY tab2.col2
----
-12

query I rowsort
SELECT + 40 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
3640
3680
600

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 0, cor0.col1 - ( + 72 ) ) FROM tab0 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + 81 + 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
157
157
157

query I rowsort
SELECT + cor0.col0 * 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1155
7007
7084

query I rowsort
SELECT DISTINCT - - 53 * - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-2173
-3127
-3233

query I rowsort
SELECT ALL - 96 AS col1 FROM tab0 GROUP BY col2
----
-96
-96
-96

query I rowsort
SELECT ALL - 24 FROM tab0 GROUP BY tab0.col0
----
-24
-24
-24

query I rowsort
SELECT ALL - 39 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-39
-39
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2, col2
----
158
48
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4417
SELECT - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4417
SELECT - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86
86

query I rowsort
SELECT ALL ( + cor1.col2 ) * - cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col0
----
-3364
-6241
-7569

query I rowsort
SELECT - 47 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-47
-47
-47

query I rowsort
SELECT DISTINCT + 77 FROM tab0 AS cor0 GROUP BY cor0.col0
----
77

query I rowsort
SELECT DISTINCT 21 + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
102
21

query I rowsort
SELECT DISTINCT - NULLIF ( + col0, cor0.col0 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL - 17 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + 19 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
19

query I rowsort
SELECT DISTINCT + 10 AS col1 FROM tab2 GROUP BY tab2.col0
----
10

query I rowsort
SELECT DISTINCT 88 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
88

query I rowsort
SELECT 13 FROM tab0 GROUP BY col2
----
13
13
13

query I rowsort
SELECT ALL - tab1.col2 + + tab1.col2 * - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-2070
-5112
-72

query I rowsort
SELECT + 35 FROM tab2 GROUP BY tab2.col1
----
35
35
35

query I rowsort
SELECT 55 - 85 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
-30
-30
-30

query I rowsort
SELECT tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NULL
----
22
28
82

query I rowsort
SELECT ALL + 9 - - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
67
88
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT + 12 FROM tab2 AS cor0 GROUP BY col0
----
12
12
12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4436
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4436
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - ( 65 ) FROM tab1 GROUP BY tab1.col1
----
65
65
65

query I rowsort
SELECT ALL - 22 * - cor0.col0 + + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2081
2082
417

query I rowsort
SELECT DISTINCT - NULLIF ( - cor0.col2, - col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + ( - COALESCE ( 89, cor0.col1, - 97 ) ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-89
-89
-89

query I rowsort
SELECT - - 68 AS col1 FROM tab1 GROUP BY tab1.col0
----
68
68
68

query I rowsort
SELECT DISTINCT + 23 FROM tab1 GROUP BY col0
----
23

query I rowsort
SELECT ALL - 35 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-35
-35
-35

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( + 43, - cor0.col1 + + cor0.col2, + cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col0, col0
----
-43
-43
-43

query I rowsort
SELECT ALL - 36 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1548
-2988
-936

onlyif mysql # DIV for integer division: 
query I rowsort label-4446
SELECT ALL tab2.col2 DIV 63 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4446
SELECT ALL tab2.col2 / 63 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
1
1

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 ALL - - 26 AS col0 FROM tab1 GROUP BY tab1.col1
----
26
26
26

query I rowsort
SELECT cor0.col1 + + 50 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2244
2907
306

query I rowsort
SELECT ALL - 46 + 70 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
24
24

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
47

query I rowsort
SELECT 62 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
62
62

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT + cor0.col1 * - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-6561
0
0

query I rowsort
SELECT tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING tab2.col1 IS NOT NULL
----
41
59
61

query I rowsort
SELECT ALL - cor0.col1 - - cor0.col1 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1892
30
3192

query I rowsort
SELECT 32 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
32
32
32

query I rowsort
SELECT + 67 AS col1 FROM tab1 GROUP BY col0
----
67
67
67

query I rowsort
SELECT DISTINCT + 80 FROM tab0 GROUP BY tab0.col2
----
80

query I rowsort
SELECT DISTINCT - col1 * 2 AS col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT + 79 FROM tab1 GROUP BY tab1.col0
----
79

query I rowsort
SELECT DISTINCT 55 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
55

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-210
-8190
-8372

query I rowsort
SELECT - + 51 FROM tab2 GROUP BY tab2.col0
----
-51
-51
-51

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT tab0.col1 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + 18 FROM tab2 GROUP BY tab2.col1
----
18
18
18

query I rowsort
SELECT ALL - 77 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
1694
2156
6314

query I rowsort
SELECT + 43 AS col2 FROM tab0 GROUP BY tab0.col2
----
43
43
43

query I rowsort
SELECT DISTINCT + 4 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19
95
96

query I rowsort
SELECT ALL - 31 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-31
-31
-31

query I rowsort
SELECT + 44 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
44
44

query I rowsort
SELECT + 74 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT - 63 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-63
-63
-63

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 36 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3276
3312
540

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 col0 FROM tab2 GROUP BY tab2.col2
----
34
34
34

query I rowsort
SELECT 2 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-22
-36
-77

query I rowsort
SELECT + - 65 AS col0 FROM tab0 GROUP BY tab0.col1
----
-65
-65

query I rowsort
SELECT + 42 * + 74 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3108
3108
3108

query I rowsort
SELECT 49 + - tab1.col0 * + 83 FROM tab1 GROUP BY tab1.col0
----
-1777
-2275
-6757

query I rowsort
SELECT ALL + - 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 + 99 col1 FROM tab0 GROUP BY tab0.col0
----
99
99
99

query I rowsort
SELECT DISTINCT + 66 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
66

query I rowsort
SELECT + - tab2.col2 * - col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 28 FROM tab2 AS cor0 GROUP BY col2
----
28
28
28

query I rowsort
SELECT 94 * 39 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3666
3666
3666

query I rowsort
SELECT + tab2.col1 FROM tab2 WHERE NULL IS NOT NULL GROUP BY col1
----

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT DISTINCT 38 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
3458
3496
570

query I rowsort
SELECT - tab1.col0 AS col2 FROM tab1 WHERE + tab1.col0 IN ( - tab1.col0 - tab1.col2 ) AND - tab1.col0 * tab1.col0 IN ( + tab1.col1 ) GROUP BY col0
----

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 78, + col1, tab1.col0 + NULLIF ( + tab1.col2 + + tab1.col2, + tab1.col0 ) ) AS col1 FROM tab1 GROUP BY tab1.col0
----
78
78
78

query I rowsort
SELECT + cor1.col1 * - 11 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor1.col0
----
-891
0
0

query I rowsort
SELECT DISTINCT + + 29 FROM tab2 GROUP BY tab2.col1
----
29

query I rowsort
SELECT DISTINCT + - 9 AS col0 FROM tab1 GROUP BY col0
----
-9

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4498
SELECT - CAST( tab2.col1 AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-4498
SELECT - CAST ( tab2.col1 AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 50, - tab0.col0 ) FROM tab0 GROUP BY tab0.col2
----
50
50
50

query I rowsort
SELECT + - 11 AS col1 FROM tab1 GROUP BY tab1.col1
----
-11
-11
-11

query I rowsort
SELECT 16 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
42
59
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col0 + NULLIF ( cor0.col0, 22 ) * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
240
8372
8556

query I rowsort
SELECT DISTINCT + + 3 FROM tab0 GROUP BY tab0.col2
----
3

query I rowsort
SELECT ALL - 46 FROM tab1 cor0 GROUP BY cor0.col1
----
-46
-46
-46

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4507
SELECT + CAST( NULL AS SIGNED ) / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4507
SELECT + CAST ( NULL AS INTEGER ) / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab0 GROUP BY tab0.col2
----
51

query I rowsort
SELECT DISTINCT + tab2.col1 * 0 FROM tab2 GROUP BY tab2.col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4511
SELECT ALL col2 DIV col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4511
SELECT ALL col2 / col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
1
1

query I rowsort
SELECT cor0.col2 * col2 FROM tab1 cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT ALL - 71 * - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
1846
3053
5893

query I rowsort
SELECT DISTINCT - 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-27

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 51 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
51
51
51

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
41
59
61

query I rowsort
SELECT + + 71 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
129
150
158

query I rowsort
SELECT 64 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1
----
64
64
64

query I rowsort
SELECT 34 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
34
34
34

onlyif mysql # DIV for integer division: 
query I rowsort label-4521
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-4521
SELECT - cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT 13 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT ALL COALESCE ( cor0.col1, cor0.col1 ) FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 72 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-72

query I rowsort
SELECT - 88 AS col1 FROM tab0 GROUP BY tab0.col0
----
-88
-88
-88

query I rowsort
SELECT + + 37 AS col0 FROM tab1 GROUP BY tab1.col2
----
37
37
37

query I rowsort
SELECT 95 * 2 FROM tab1 GROUP BY tab1.col2
----
190
190
190

query I rowsort
SELECT col1 * + 48 FROM tab1 GROUP BY tab1.col1
----
2112
2736
288

query I rowsort
SELECT 83 + - 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT DISTINCT cor0.col2 * 76 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1800
2850
5925

query I rowsort
SELECT DISTINCT - 14 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-14

query I rowsort
SELECT ALL 49 * - 40 AS col0 FROM tab2 GROUP BY tab2.col0
----
-1960
-1960
-1960

query I rowsort
SELECT ALL + 47 FROM tab1 AS cor0 GROUP BY col1
----
47
47
47

query I rowsort
SELECT ALL 1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
1
1
1

query I rowsort
SELECT ALL - + 83 AS col0 FROM tab0 GROUP BY tab0.col2
----
-83
-83
-83

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
45
71
8

query I rowsort
SELECT cor0.col1 * 45 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
2565
270

onlyif mysql # DIV for integer division: 
query I rowsort label-4538
SELECT + tab1.col0 + tab1.col0 DIV 83 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-4538
SELECT + tab1.col0 + tab1.col0 / 83 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + + tab2.col0 + - 79 * 93 FROM tab2 GROUP BY col0
----
-7255
-7256
-7332

query I rowsort
SELECT 38 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
38
38
38

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 96, + cor0.col1 * 72 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT ALL + 19 FROM tab0 GROUP BY tab0.col0
----
19
19
19

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + tab0.col1 + 50 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
4131

query I rowsort
SELECT ALL 31 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-4546
SELECT ALL - cor0.col0 - cor0.col0 DIV + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-16
-92
-93

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4546
SELECT ALL - cor0.col0 - cor0.col0 / + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-16
-92
-93

query I rowsort
SELECT ALL + + col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL - - 37 AS col1 FROM tab1 GROUP BY tab1.col0
----
37
37
37

query I rowsort
SELECT ALL + cor0.col0 * 29 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
2639
2668
435

query I rowsort
SELECT ALL 38 AS col1 FROM tab1 GROUP BY tab1.col0
----
38
38
38

query I rowsort
SELECT ALL 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col1 + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - col2 / cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - col0 * - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL NOT IN ( + col0 )
----

query I rowsort
SELECT DISTINCT tab1.col1 + tab1.col1 * + tab1.col1 AS col1 FROM tab1 WHERE tab1.col0 IN ( - tab1.col0 ) GROUP BY tab1.col1
----

query I rowsort
SELECT ALL + 75 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT 35 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35

query I rowsort
SELECT ALL - 43 FROM tab2 cor0 GROUP BY cor0.col2
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 61 AS col0 FROM tab1 GROUP BY tab1.col0
----
61

query I rowsort
SELECT + + tab1.col2 - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + + 65 AS col2 FROM tab2 GROUP BY tab2.col2
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * 71 col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
3195
5041
568

query I rowsort
SELECT cor1.col0 + cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - 18 - + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-101
-44
-61

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + 82 FROM tab2 GROUP BY tab2.col0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT + 53 FROM tab1 AS cor0 GROUP BY cor0.col1
----
53
53
53

query I rowsort
SELECT - + 61 AS col1 FROM tab2 GROUP BY tab2.col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1640
3422
3660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 67 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
3015
4757
536

query I rowsort
SELECT DISTINCT - 11 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-11

query I rowsort
SELECT + - 26 FROM tab0 GROUP BY tab0.col1
----
-26
-26

query I rowsort
SELECT 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
73
73
73

query I rowsort
SELECT ALL + tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + - 30 FROM tab1 GROUP BY tab1.col1
----
-30
-30
-30

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 DISTINCT + 97 AS col2 FROM tab2 GROUP BY tab2.col2
----
97

query I rowsort
SELECT + col1 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + 22 FROM tab2 GROUP BY col0
----
22

query I rowsort
SELECT ALL 26 + - 68 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1606
-2558
-5346

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab0 GROUP BY col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-4589
SELECT ALL + 23 DIV + 53 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4589
SELECT ALL + 23 / + 53 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL + tab0.col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-4591
SELECT - col1 DIV - ( 86 ) FROM tab1 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4591
SELECT - col1 / - ( 86 ) FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL 60 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT 29 FROM tab2 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT + tab0.col1 AS col0 FROM tab0 WHERE NOT + col1 IS NULL GROUP BY tab0.col1 HAVING tab0.col1 < NULL
----

query I rowsort
SELECT ALL + tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NULL
----
41
59
61

query I rowsort
SELECT - 21 FROM tab1 GROUP BY col0
----
-21
-21
-21

query I rowsort
SELECT tab2.col0 + + 91 FROM tab2 GROUP BY col0
----
106
182
183

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 col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col0, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4600
SELECT 32 DIV + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4600
SELECT 32 / + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
0
0
0

query I rowsort
SELECT - - 7 AS col2 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT - 80 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-80
-80
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 27 + 0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT 41 FROM tab2 AS cor0 GROUP BY cor0.col0
----
41
41
41

onlyif mysql # DIV for integer division: 
query I rowsort label-4605
SELECT DISTINCT col0 DIV + cor0.col0 + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
16
92
93

skipif mysql # not compatible
query I rowsort label-4605
SELECT DISTINCT col0 / + cor0.col0 + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
16
92
93

onlyif mysql # DIV for integer division: 
query I rowsort label-4606
SELECT - 70 DIV 20 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
38
56
58

skipif mysql # not compatible
query I rowsort label-4606
SELECT - 70 / 20 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
38
56
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL 10 * + 1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col2
----
-81
0
0

query I rowsort
SELECT ALL + 34 AS col2 FROM tab1 GROUP BY tab1.col2
----
34
34
34

query I rowsort
SELECT ALL - 55 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-55
-55

query I rowsort
SELECT DISTINCT 27 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
27

query I rowsort
SELECT 83 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1245
7553
7636

query I rowsort
SELECT DISTINCT + + 1 * + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - - 82 AS col0 FROM tab2 GROUP BY col2
----
82
82
82

query I rowsort
SELECT DISTINCT 46 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
2024
2622
276

query I rowsort
SELECT DISTINCT - col1 * 30 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2430
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 - - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT CASE cor0.col0 WHEN col1 THEN + 30 + 23 END / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 77 AS col0 FROM tab0 GROUP BY tab0.col1
----
-77
-77

query I rowsort
SELECT ALL 51 FROM tab0 GROUP BY tab0.col2
----
51
51
51

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0 WHERE NOT NULL >= NULL GROUP BY tab0.col2
----

query I rowsort
SELECT - 33 FROM tab1 GROUP BY tab1.col0
----
-33
-33
-33

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
-1980
-3306
-42

query I rowsort
SELECT ALL + cor0.col0 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1305
5336
7189

query I rowsort
SELECT + 43 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
43
43
43

query I rowsort
SELECT DISTINCT - 83 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-83

query I rowsort
SELECT + + tab1.col2 + 99 FROM tab1 GROUP BY tab1.col2
----
107
144
170

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1 HAVING NOT + col1 IS NULL
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 27 FROM tab0 AS cor0 GROUP BY col2
----
27

query I rowsort
SELECT DISTINCT + 43 AS col1 FROM tab0 GROUP BY tab0.col0
----
43

query I rowsort
SELECT ALL + 61 FROM tab0 GROUP BY tab0.col0
----
61
61
61

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT ( NULL ) >= NULL
----

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-132
-1596
-3608

query I rowsort
SELECT ALL NULLIF ( cor0.col2, cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - 23 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1357
-1403
-943

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
17
20
26

onlyif mysql # DIV for integer division: 
query I rowsort label-4639
SELECT cor0.col0 DIV ( 14 ) col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
3
5

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4639
SELECT cor0.col0 / ( 14 ) col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1
3
5

query I rowsort
SELECT + - 43 FROM tab2 GROUP BY tab2.col0
----
-43
-43
-43

query I rowsort
SELECT - - 65 AS col0 FROM tab1 GROUP BY tab1.col0
----
65
65
65

query I rowsort
SELECT - 94 + tab1.col0 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-578
-6818
-878

query I rowsort
SELECT - 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-83
-83
-83

query I rowsort
SELECT + 21 FROM tab0 GROUP BY tab0.col2
----
21
21
21

query I rowsort
SELECT 73 * 45 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3285
3285
3285

query I rowsort
SELECT + cor0.col0 * - CASE - 52 WHEN cor0.col1 * cor0.col1 THEN - cor0.col2 ELSE NULL END AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT NULLIF ( - cor0.col2, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 89 + - col2 AS col0 FROM tab2 GROUP BY col2
----
10
2
31

query I rowsort
SELECT DISTINCT + - 13 + + 84 FROM tab1 GROUP BY col1
----
71

query I rowsort
SELECT - 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-24
-24
-24

query I rowsort
SELECT ALL col1 + + 46 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
105
107
87

query I rowsort
SELECT ALL - 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT ALL - 59 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-59
-59
-59

query I rowsort
SELECT 69 + + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
150
69

query I rowsort
SELECT ALL + 1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL 46 * - 51 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2346
-2346
-2346

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 50, cor0.col0, - cor0.col2 * + ( cor0.col0 * cor0.col1 ) + - 86 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-50
-50
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL cor0.col2 + + 26 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
34
71
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT + + tab2.col2 - 75 AS col2 FROM tab2 GROUP BY col2
----
-17
12
4

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL 83 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT 51 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
108
57
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-9
-9
-9

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) < NULL
----

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT + 38 AS col0 FROM tab0 GROUP BY tab0.col2
----
38
38
38

query I rowsort
SELECT ALL - tab0.col1 * + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT 75 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
75

query I rowsort
SELECT 41 FROM tab1 AS cor0 GROUP BY col1, col1
----
41
41
41

query I rowsort
SELECT ALL + + 83 AS col2 FROM tab1 GROUP BY col1
----
83
83
83

query I rowsort
SELECT + + 1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT ALL + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 * + 73 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
511
511
511

query I rowsort
SELECT DISTINCT + - tab1.col0 + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT - 3 - tab1.col0 * + 15 FROM tab1 GROUP BY tab1.col0
----
-1233
-333
-423

query I rowsort
SELECT ALL 56 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT + 37 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
92

query I rowsort
SELECT ALL + + 15 AS col2 FROM tab0 GROUP BY tab0.col1
----
15
15

query I rowsort
SELECT - + tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL - tab2.col0 * tab2.col0 + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

query I rowsort
SELECT 99 AS col1 FROM tab0 GROUP BY tab0.col2
----
99
99
99

query I rowsort
SELECT DISTINCT 75 FROM tab1 GROUP BY tab1.col2
----
75

query I rowsort
SELECT DISTINCT + 82 FROM tab2 AS cor0 GROUP BY col0
----
82

query I rowsort
SELECT 72 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
72
72
72

query I rowsort
SELECT - CASE + cor0.col1 WHEN - cor0.col1 * 83 THEN NULL WHEN cor0.col2 THEN NULL ELSE + col1 END FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-4692
SELECT ALL + cor0.col2 DIV - cor0.col2 + + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-4692
SELECT ALL + cor0.col2 / - cor0.col2 + + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
57
78
86

query I rowsort
SELECT + 46 + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
107
87

query I rowsort
SELECT ALL + tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL NOT BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT tab0.col1 + tab0.col1 FROM tab0 GROUP BY col1 HAVING NOT NULL <= NULL
----

query I rowsort
SELECT ALL tab0.col0 FROM tab0 GROUP BY col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT 67 - + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
-12
-20
9

query I rowsort
SELECT 75 FROM tab1 cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT - - tab0.col2 - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL 1 FROM tab0 cor0 GROUP BY cor0.col1
----
1
1

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 - cor0.col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
-124
-1551
-3537

query I rowsort
SELECT tab2.col2 FROM tab2 WHERE NOT + col2 * tab2.col1 < ( NULL ) GROUP BY tab2.col2
----

onlyif mysql # DIV for integer division: 
query I rowsort label-4705
SELECT - 22 DIV 40 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
0

skipif mysql # not compatible
query I rowsort label-4705
SELECT - 22 / 40 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT DISTINCT - + col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY col0, col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-4708
SELECT - 4 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4708
SELECT - 4 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4709
SELECT DISTINCT - CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4709
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
NULL

query I rowsort
SELECT DISTINCT + - 64 AS col0 FROM tab1 GROUP BY tab1.col2
----
-64

query I rowsort
SELECT ALL + - 42 + 52 FROM tab0 GROUP BY tab0.col2
----
10
10
10

query I rowsort
SELECT - + 82 FROM tab0 GROUP BY tab0.col0
----
-82
-82
-82

query I rowsort
SELECT 67 FROM tab0 AS cor0 GROUP BY col0
----
67
67
67

query I rowsort
SELECT ( tab1.col0 ) AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + - 36 * + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-3276
-3312
-540

query I rowsort
SELECT - 46 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-46
-46
-46

onlyif mysql # DIV for integer division: 
query I rowsort label-4717
SELECT DISTINCT - tab0.col2 DIV tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-4717
SELECT DISTINCT - tab0.col2 / tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4718
SELECT + tab2.col1 / CAST( NULL AS SIGNED ) - 80 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4718
SELECT + tab2.col1 / CAST ( NULL AS INTEGER ) - 80 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT ALL tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

query I rowsort
SELECT tab1.col0 FROM tab1 WHERE NOT col1 IN ( tab1.col0 / tab1.col2 ) GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - - 17 + + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
100
43
60

query I rowsort
SELECT ALL - 49 FROM tab2 GROUP BY tab2.col0
----
-49
-49
-49

query I rowsort
SELECT ALL + ( tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 49 FROM tab2 AS cor0 GROUP BY col0
----
49
49
49

query I rowsort
SELECT - 25 * - 86 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
2150
2150
2150

query I rowsort
SELECT ALL 31 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
31
31

query I rowsort
SELECT ALL - 11 * col1 FROM tab1 GROUP BY tab1.col1
----
-484
-627
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-4731
SELECT DISTINCT tab1.col2 DIV - col2 FROM tab1 GROUP BY tab1.col2
----
-1

skipif mysql # not compatible
query I rowsort label-4731
SELECT DISTINCT tab1.col2 / - col2 FROM tab1 GROUP BY tab1.col2
----
-1

query I rowsort
SELECT ALL - - tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-4733
SELECT DISTINCT + 53 DIV tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
0
1
6

skipif mysql # not compatible
query I rowsort label-4733
SELECT DISTINCT + 53 / tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
0
1
6

query I rowsort
SELECT + 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT ALL - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 17 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT DISTINCT + 4 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
4

query I rowsort
SELECT 11 FROM tab1 cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT ALL + 15 FROM tab2 GROUP BY tab2.col2
----
15
15
15

query I rowsort
SELECT + - 18 FROM tab0 GROUP BY tab0.col2
----
-18
-18
-18

query I rowsort
SELECT ALL + + 47 FROM tab1 GROUP BY col2
----
47
47
47

query I rowsort
SELECT + col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 43 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT ALL + 65 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
65
65
65

query I rowsort
SELECT ALL - + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 9 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
9

query I rowsort
SELECT DISTINCT - 10 * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-220
-280
-820

query I rowsort
SELECT 71 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT + 46 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-33
22
8

query I rowsort
SELECT DISTINCT 29 FROM tab1 GROUP BY tab1.col2
----
29

query I rowsort
SELECT DISTINCT - 89 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-89

query I rowsort
SELECT ALL - - 92 FROM tab0 GROUP BY tab0.col2
----
92
92
92

query I rowsort
SELECT - 32 FROM tab1 GROUP BY tab1.col0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col1, - cor0.col1 ) FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT DISTINCT - tab2.col0 + + 45 AS col1 FROM tab2 GROUP BY col0
----
-46
-47
30

query I rowsort
SELECT DISTINCT - 68 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-68

query I rowsort
SELECT + 19 FROM tab0 cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
1305
5336
7189

query I rowsort
SELECT 65 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT 86 * + 44 FROM tab1 GROUP BY tab1.col0
----
3784

query I rowsort
SELECT DISTINCT 8 FROM tab1 AS cor0 GROUP BY cor0.col1
----
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT + 99 * - 32 AS col0 FROM tab1 GROUP BY tab1.col1
----
-3168
-3168
-3168

query I rowsort
SELECT DISTINCT - + 46 AS col2 FROM tab1 GROUP BY tab1.col0
----
-46

query I rowsort
SELECT DISTINCT 74 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 59 col1 FROM tab2 GROUP BY tab2.col2
----
59
59
59

query I rowsort
SELECT - cor0.col2 * 99 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-4455
-7029
-792

query I rowsort
SELECT DISTINCT + 79 AS col2 FROM tab0 GROUP BY tab0.col1
----
79

query I rowsort
SELECT 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
52
52
52

query I rowsort
SELECT + - 30 AS col2 FROM tab1 GROUP BY tab1.col0
----
-30
-30
-30

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1444
-576
-6241

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT cor0.col1 + - 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-24
14
27

query I rowsort
SELECT - - 90 FROM tab0 GROUP BY tab0.col1
----
90
90

query I rowsort
SELECT 62 FROM tab1 cor0 GROUP BY cor0.col2
----
62
62
62

query I rowsort
SELECT ALL 41 AS col0 FROM tab2 GROUP BY tab2.col2
----
41
41
41

query I rowsort
SELECT DISTINCT tab2.col2 - tab2.col2 FROM tab2 GROUP BY col2
----
0

query I rowsort
SELECT DISTINCT - 82 FROM tab2 AS cor0 GROUP BY col0
----
-82

query I rowsort
SELECT - - tab2.col2 * - tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3422
-6320
-7656

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1 GROUP BY col1 HAVING NULL <= NULL
----

query I rowsort
SELECT DISTINCT tab2.col2 FROM tab2 WHERE NULL = NULL GROUP BY tab2.col2 HAVING ( NULL ) IN ( - tab2.col2 )
----

query I rowsort
SELECT DISTINCT - + 38 AS col2 FROM tab0 GROUP BY tab0.col1
----
-38

query I rowsort
SELECT DISTINCT - 53 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 93 col1 FROM tab1 GROUP BY tab1.col2
----
93
93
93

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4786
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab1 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-4786
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 GROUP BY col0
----
NULL

query I rowsort
SELECT DISTINCT - 21 * + 21 + tab0.col0 FROM tab0 GROUP BY col0
----
-358
-398
-415

query I rowsort
SELECT + 97 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
2134
2716
7954

query I rowsort
SELECT ALL 51 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT - 22 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-22
-22
-22

query I rowsort
SELECT cor0.col1 + + 25 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
31
69
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - 72 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT ALL + tab0.col2 - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - - 36 AS col1 FROM tab0 GROUP BY tab0.col1
----
36
36

query I rowsort
SELECT 50 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT ALL 95 FROM tab0 GROUP BY tab0.col2
----
95
95
95

query I rowsort
SELECT + 45 FROM tab0 GROUP BY col0
----
45
45
45

onlyif mysql # DIV for integer division: 
query I rowsort label-4799
SELECT DISTINCT + cor0.col1 DIV + 60 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-80
0

skipif mysql # not compatible
query I rowsort label-4799
SELECT DISTINCT + cor0.col1 / + 60 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-80
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 46 ) col2 FROM tab0 GROUP BY tab0.col2
----
-46
-46
-46

query I rowsort
SELECT ALL - 93 FROM tab2 cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT ALL col0 + - cor0.col1 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3440
26
83

query I rowsort
SELECT 88 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
88
88
88

query I rowsort
SELECT - - 24 FROM tab0 GROUP BY col2
----
24
24
24

query I rowsort
SELECT DISTINCT + tab0.col1 - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT ALL tab0.col1 + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT cor0.col2 * - cor0.col2 + + NULLIF ( - cor0.col2, + col2 ) * 15 FROM tab1 AS cor0 GROUP BY col2
----
-184
-2700
-6106

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 59 col1 FROM tab2 GROUP BY tab2.col2
----
59

query I rowsort
SELECT - 52 AS col0 FROM tab2 GROUP BY tab2.col2
----
-52
-52
-52

query I rowsort
SELECT tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT - + tab2.col1 - - col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL - 59 AS col1 FROM tab0 GROUP BY tab0.col1
----
-59
-59

query I rowsort
SELECT + 0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT - 47 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
-47

query I rowsort
SELECT ALL 56 AS col0 FROM tab0 GROUP BY tab0.col1
----
56
56

query I rowsort
SELECT ALL - col1 AS col1 FROM tab2 WHERE - tab2.col2 * + tab2.col0 NOT BETWEEN NULL AND NULL GROUP BY tab2.col1
----

query I rowsort
SELECT ALL 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
57
57

query I rowsort
SELECT col2 AS col1 FROM tab2 AS cor0 GROUP BY col2 HAVING - col2 IS NOT NULL
----
58
79
87

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 HAVING NULL IS NULL
----
45
71
8

query I rowsort
SELECT ALL - cor0.col0 * 89 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-1335
-8099
-8188

query I rowsort
SELECT ALL 69 * col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1656
2622
5451

query I rowsort
SELECT 66 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
66
66
66

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4823
SELECT ALL - COALESCE ( + 13, - tab0.col1 + + ( col2 + - tab0.col1 ) ) - - CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4823
SELECT ALL - COALESCE ( + 13, - tab0.col1 + + ( col2 + - tab0.col1 ) ) - - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - 0 FROM tab0 GROUP BY tab0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor1.col2 col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - - tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL + 18 + 26 FROM tab2 GROUP BY col1
----
44
44
44

query I rowsort
SELECT 82 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT tab0.col0 + + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col1
----
45
45
71
71
8
8

query I rowsort
SELECT - + 32 FROM tab1 GROUP BY tab1.col1
----
-32
-32
-32

query I rowsort
SELECT ALL 1 * - cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 12 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1044
696
948

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 60 col0 FROM tab2 AS cor0 GROUP BY col1
----
60

query I rowsort
SELECT ALL - 28 FROM tab2 AS cor0 GROUP BY col1
----
-28
-28
-28

query I rowsort
SELECT ( - col1 ) * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT DISTINCT + 19 AS col0 FROM tab1 GROUP BY tab1.col0
----
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + 79 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
79
79
79

query I rowsort
SELECT - 33 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-116
-59
-76

query I rowsort
SELECT ALL - - 55 AS col2 FROM tab1 GROUP BY tab1.col2
----
55
55
55

query I rowsort
SELECT ALL tab2.col1 + 64 AS col2 FROM tab2 GROUP BY tab2.col1
----
105
123
125

query I rowsort
SELECT cor0.col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1 WHERE NOT ( NULL ) <> NULL GROUP BY tab1.col1
----

query I rowsort
SELECT DISTINCT tab0.col1 + col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL - 75 FROM tab0 GROUP BY tab0.col1
----
-75
-75

query I rowsort
SELECT cor0.col1 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
133
150
76

query I rowsort
SELECT DISTINCT 62 AS col0 FROM tab2 GROUP BY tab2.col1
----
62

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( - 25, - tab1.col2 ) * tab1.col1 + 61 FROM tab1 GROUP BY tab1.col1
----
1161
1486
211

query I rowsort
SELECT 55 AS col0 FROM tab1 GROUP BY tab1.col1
----
55
55
55

onlyif mysql # DIV for integer division: 
query I rowsort label-4853
SELECT ALL 28 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4853
SELECT ALL 28 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT 15 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
15
15

query I rowsort
SELECT tab0.col1 FROM tab0 WHERE ( - tab0.col2 ) NOT BETWEEN tab0.col2 AND - tab0.col1 - tab0.col1 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 40 - - 10 FROM tab1 GROUP BY tab1.col0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL 78 FROM tab0 AS cor0 GROUP BY cor0.col1
----
78
78

query I rowsort
SELECT ALL + 22 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1298
-1342
-902

query I rowsort
SELECT 66 * - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1584
-2508
-5214

query I rowsort
SELECT + 54 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2430
3834
432

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4862
SELECT CAST( + col0 AS SIGNED ) col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4862
SELECT CAST ( + col0 AS INTEGER ) col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 66 FROM tab2 cor0 GROUP BY cor0.col1
----
66

query I rowsort
SELECT ALL + NULLIF ( - 75, tab1.col0 ) AS col2 FROM tab1 GROUP BY col0
----
-75
-75
-75

query I rowsort
SELECT cor0.col2 + - cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2070
5112
72

onlyif mysql # DIV for integer division: 
query I rowsort label-4866
SELECT 17 DIV 86 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4866
SELECT 17 / 86 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL + 96 * col1 FROM tab1 cor0 GROUP BY cor0.col1
----
4224
5472
576

query I rowsort
SELECT ALL 93 FROM tab2 GROUP BY tab2.col0
----
93
93
93

query I rowsort
SELECT - - 41 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
120
65
79

query I rowsort
SELECT + 58 FROM tab1 GROUP BY tab1.col0
----
58
58
58

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4872
SELECT - tab1.col2 DIV 42 + tab1.col2 * 62 FROM tab1 GROUP BY tab1.col2
----
2789
4401
496

skipif mysql # not compatible
query I rowsort label-4872
SELECT - tab1.col2 / 42 + tab1.col2 * 62 FROM tab1 GROUP BY tab1.col2
----
2789
4401
496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 71 col2 FROM tab0 GROUP BY tab0.col2
----
-71
-71
-71

onlyif mysql # DIV for integer division: 
query I rowsort label-4874
SELECT + cor0.col0 DIV cor0.col1 + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
43
60
61

skipif mysql # not compatible
query I rowsort label-4874
SELECT + cor0.col0 / cor0.col1 + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
43
60
61

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 ALL + tab0.col2 FROM tab0 WHERE NULL IN ( - tab0.col0 ) GROUP BY col2
----

query I rowsort
SELECT - 68 + + 64 AS col1 FROM tab0 GROUP BY tab0.col1
----
-4
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 40 col0 FROM tab1 GROUP BY tab1.col1
----
40
40
40

query I rowsort
SELECT - 14 AS col2 FROM tab2 GROUP BY tab2.col1
----
-14
-14
-14

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4882
SELECT ALL - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4882
SELECT ALL - CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - + 26 * + 55 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1430
-1430
-1430

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4884
SELECT + CAST( 2 AS SIGNED ) col1 FROM tab2 GROUP BY tab2.col2
----
2
2
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4884
SELECT + CAST ( 2 AS INTEGER ) col1 FROM tab2 GROUP BY tab2.col2
----
2
2
2

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL < NULL
----

query I rowsort
SELECT 11 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT ALL - - 53 + 19 AS col1 FROM tab0 GROUP BY tab0.col0
----
72
72
72

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
52

query I rowsort
SELECT DISTINCT 88 FROM tab1 AS cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT DISTINCT col2 FROM tab2 cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) = ( NULL )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-4891
SELECT DISTINCT + tab0.col0 DIV - 94 FROM tab0 GROUP BY tab0.col0
----
0

skipif mysql # not compatible
query I rowsort label-4891
SELECT DISTINCT + tab0.col0 / - 94 FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 + 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
48
61

query I rowsort
SELECT + tab1.col0 - + ( - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT + 84 FROM tab1 cor0 GROUP BY cor0.col0
----
84
84
84

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4896
SELECT DISTINCT + + col2 / CAST( NULL AS SIGNED ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-4896
SELECT DISTINCT + + col2 / CAST ( NULL AS INTEGER ) AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4897
SELECT DISTINCT - CAST( NULL AS SIGNED ) + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-4897
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT DISTINCT + 17 FROM tab2 GROUP BY tab2.col1
----
17

query I rowsort
SELECT DISTINCT 67 FROM tab0 AS cor0 GROUP BY cor0.col0
----
67

query I rowsort
SELECT DISTINCT + 48 FROM tab1 AS cor0 GROUP BY cor0.col0
----
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 col0 FROM tab0 GROUP BY tab0.col1
----
51

query I rowsort
SELECT + 58 FROM tab0 GROUP BY tab0.col0
----
58
58
58

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NULL
----
114
12
88

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0 HAVING NULL <= NULL
----

query I rowsort
SELECT tab0.col1 - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + 73 AS col2 FROM tab1 GROUP BY tab1.col1
----
73
73
73

query I rowsort
SELECT DISTINCT - - 76 FROM tab1 GROUP BY tab1.col2
----
76

query I rowsort
SELECT + 0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 93 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT DISTINCT + ( - cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - + 26 FROM tab2 GROUP BY col0
----
-26

query I rowsort
SELECT DISTINCT + - 90 * tab2.col0 FROM tab2 GROUP BY col0
----
-1350
-8190
-8280

query I rowsort
SELECT + 44 + - ( cor0.col2 - - cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-114
-32
-4

onlyif mysql # DIV for integer division: 
query I rowsort label-4914
SELECT ALL - cor0.col0 DIV - 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4914
SELECT ALL - cor0.col0 / - 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT ALL + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 11 + - 62 FROM tab2 GROUP BY tab2.col0
----
-51
-51
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - cor0.col0 - 44 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-126
-66
-72

query I rowsort
SELECT 88 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7128

query I rowsort
SELECT - 53 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-53
-53
-53

query I rowsort
SELECT - - 35 AS col0 FROM tab1 GROUP BY tab1.col0
----
35
35
35

query I rowsort
SELECT tab0.col2 * ( col2 ) FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT 95 AS col2 FROM tab1 GROUP BY tab1.col2
----
95
95
95

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN NULL AND NULL GROUP BY tab1.col1 HAVING ( NULL ) NOT BETWEEN ( + col1 * tab1.col1 ) AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 39 * + tab0.col0 + - 83 col1 FROM tab0 GROUP BY tab0.col0
----
-1097
-1760
-3320

query I rowsort
SELECT DISTINCT 4 FROM tab0 cor0 GROUP BY cor0.col0
----
4

query I rowsort
SELECT 17 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, col1, cor0.col2
----
1003
1037
697

query I rowsort
SELECT 20 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT cor0.col2 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT ALL ( cor0.col2 ) * + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - cor0.col0 * 24 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1032
-1992
-624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - 9 + 5 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT 12 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
12
12
12

query I rowsort
SELECT ALL + 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL 50 * + 88 AS col1 FROM tab1 GROUP BY tab1.col0
----
4400
4400
4400

query I rowsort
SELECT ALL - 43 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-43
-43
-43

query I rowsort
SELECT ALL - 17 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-17
-17
-17

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + 44 AS col1 FROM tab0 GROUP BY tab0.col1
----
44
44

query I rowsort
SELECT + 45 AS col0 FROM tab2 GROUP BY tab2.col0
----
45
45
45

onlyif mysql # DIV for integer division: 
query I rowsort label-4943
SELECT 7 DIV cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4943
SELECT 7 / cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4944
SELECT - + col2 * CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4944
SELECT - + col2 * CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT - 41 FROM tab2 GROUP BY tab2.col0
----
-41
-41
-41

query I rowsort
SELECT ( 28 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
28
28
28

query I rowsort
SELECT - 60 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, col2, cor0.col0
----
-60
-60
-60

query I rowsort
SELECT ALL - COALESCE ( + 68, cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col0
----
-68
-68
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
95

query I rowsort
SELECT - 88 + 47 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-41
-41
-41

query I rowsort
SELECT 4 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT 1 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT - 59 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-59

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4955
SELECT ALL - CAST( - 95 AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2
----
95
95
95

skipif mysql # not compatible
query I rowsort label-4955
SELECT ALL - CAST ( - 95 AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT cor0.col1 - cor0.col1 * + 37 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1476
-2124
-2196

query I rowsort
SELECT ALL - + 95 * col0 AS col1 FROM tab2 GROUP BY col0
----
-1425
-8645
-8740

query I rowsort
SELECT - ( + 83 ) FROM tab2 GROUP BY tab2.col2
----
-83
-83
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-4959
SELECT DISTINCT + col0 DIV cor0.col0 col1 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4959
SELECT DISTINCT + col0 / cor0.col0 col1 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
1

query I rowsort
SELECT DISTINCT + 22 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
22

query I rowsort
SELECT DISTINCT cor0.col1 * 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
486

query I rowsort
SELECT ALL + - 81 FROM tab0 GROUP BY col1
----
-81
-81

query I rowsort
SELECT DISTINCT - tab0.col2 - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

query I rowsort
SELECT - + 24 AS col0 FROM tab1 GROUP BY col1
----
-24
-24
-24

query I rowsort
SELECT + cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + 14 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
14
14
14

query I rowsort
SELECT + + 76 FROM tab2 GROUP BY col0
----
76
76
76

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 45, cor0.col1, - cor0.col2 * CASE cor0.col2 WHEN - cor0.col2 + + cor0.col2 THEN cor0.col0 WHEN cor0.col0 + + cor0.col1 THEN cor0.col2 + + cor0.col2 END ) * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
1080
1710
3555

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
58
79
87

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 tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT - 97 AS col0 FROM tab2 GROUP BY tab2.col1
----
-97

query I rowsort
SELECT ALL - - ( + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 15 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
15
15
15

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT 85 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT 46 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1104
1748
3634

query I rowsort
SELECT ALL - + tab0.col1 * - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT 30 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
30
30
30

query I rowsort
SELECT - tab1.col2 * + 46 FROM tab1 GROUP BY tab1.col2
----
-2070
-3266
-368

query I rowsort
SELECT + 74 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
74
74
74

query I rowsort
SELECT DISTINCT - 42 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-27
49
50

query I rowsort
SELECT tab1.col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT DISTINCT 64 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
107
147
90

query I rowsort
SELECT ALL cor0.col2 + - 58 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-13
-50
13

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 30 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT + cor0.col2 - 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-26
11
37

query I rowsort
SELECT - cor0.col1 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT - 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-60
-60
-60

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + col2 + + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT 12 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col2
----
12
12
12

query I rowsort
SELECT cor0.col2 * 78 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1872
2964
6162

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col2 * 91 FROM tab2 cor0 GROUP BY cor0.col2
----
5278
7189
7917

query I rowsort
SELECT DISTINCT - + 92 FROM tab0 GROUP BY tab0.col0
----
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 col1 FROM tab0 AS cor0 GROUP BY col0
----
83
83
83

query I rowsort
SELECT ALL + + tab0.col0 * - tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 20, cor0.col2, + ( - COALESCE ( cor0.col1, + cor0.col1, + cor0.col0 ) ) + + 56, + cor0.col0 + col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

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 + 34 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1496
1938
204

onlyif mysql # DIV for integer division: 
query I rowsort label-5009
SELECT DISTINCT - 38 DIV 55 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5009
SELECT DISTINCT - 38 / 55 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
0

query I rowsort
SELECT ALL - 99 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT + 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
41

query I rowsort
SELECT DISTINCT - tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT NULLIF ( col1, cor0.col1 ) + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 45 FROM tab1 AS cor0 GROUP BY col1
----
45
45
45

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
91

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5016
SELECT + CASE 74 WHEN cor0.col0 THEN NULL WHEN - CAST( NULL AS DECIMAL ) * + COALESCE ( 45, + cor0.col2 / - col2 + cor0.col1 ) THEN col0 END FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5016
SELECT + CASE 74 WHEN cor0.col0 THEN NULL WHEN - CAST ( NULL AS REAL ) * + COALESCE ( 45, + cor0.col2 / - col2 + cor0.col1 ) THEN col0 END FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5017
SELECT DISTINCT ( 88 ) DIV + col1 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
46
58

skipif mysql # not compatible
query I rowsort label-5017
SELECT DISTINCT ( 88 ) / + col1 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
46
58

query I rowsort
SELECT ALL + 60 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
60
60
60

query I rowsort
SELECT 58 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
58
58
58

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5020
SELECT DISTINCT - + CAST( NULL AS SIGNED ) - 88 FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5020
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) - 88 FROM tab1 GROUP BY tab1.col1
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5021
SELECT 10 DIV 57 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5021
SELECT 10 / 57 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + - 8 AS col1 FROM tab0 GROUP BY tab0.col1
----
-8
-8

query I rowsort
SELECT - 50 FROM tab1 cor0 GROUP BY cor0.col1
----
-50
-50
-50

query I rowsort
SELECT ALL + 8 FROM tab0 GROUP BY tab0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT 19 * - 6 FROM tab0 GROUP BY tab0.col1
----
-114

query I rowsort
SELECT DISTINCT 90 AS col1 FROM tab0 GROUP BY col0
----
90

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 DISTINCT + NULLIF ( + cor0.col0, cor0.col2 + col0 ) - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
0

query I rowsort
SELECT ALL 14 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
14
14
14

query I rowsort
SELECT DISTINCT + 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 46 * 47 col1 FROM tab1 GROUP BY tab1.col0
----
-2162
-2162
-2162

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5032
SELECT CAST( 40 AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40
40
40

skipif mysql # not compatible
query I rowsort label-5032
SELECT CAST ( 40 AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40
40
40

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
----
118
122
82

onlyif mysql # DIV for integer division: 
query I rowsort label-5034
SELECT cor0.col1 DIV + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5034
SELECT cor0.col1 / + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
0

query I rowsort
SELECT ALL - 55 FROM tab1 GROUP BY tab1.col0
----
-55
-55
-55

query I rowsort
SELECT ALL col1 - + tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL >= ( NULL )
----

query I rowsort
SELECT ALL - 16 + + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
12
6
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 3 col0 FROM tab2 GROUP BY tab2.col0
----
3
3
3

query I rowsort
SELECT ALL - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT tab1.col0 + - 32 FROM tab1 GROUP BY tab1.col0
----
-10
-4
50

query I rowsort
SELECT DISTINCT - 98 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-98

query I rowsort
SELECT DISTINCT - 83 FROM tab1 GROUP BY tab1.col1
----
-83

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 95 FROM tab1 AS cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT DISTINCT 5 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
5

query I rowsort
SELECT DISTINCT + 3 FROM tab1 cor0 GROUP BY cor0.col2
----
3

query I rowsort
SELECT ALL 39 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
39
39
39

query I rowsort
SELECT 1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 col1 FROM tab2 GROUP BY tab2.col0
----
20
20
20

query I rowsort
SELECT DISTINCT cor0.col2 + + 4 FROM tab1 AS cor0 GROUP BY cor0.col2
----
12
49
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 98 col2 FROM tab1 AS cor0 GROUP BY col0
----
98
98
98

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT cor0.col2 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

onlyif mysql # DIV for integer division: 
query I rowsort label-5055
SELECT ALL - + NULLIF ( tab0.col1, + 29 DIV - 88 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
NULL

skipif mysql # not compatible
query I rowsort label-5055
SELECT ALL - + NULLIF ( tab0.col1, + 29 / - 88 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
NULL

query I rowsort
SELECT + 52 FROM tab0 AS cor0 GROUP BY cor0.col1
----
52
52

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( - 67, - cor0.col2 * - cor0.col0 ) FROM tab2 cor0 GROUP BY col0
----
-67
-67
-67

query I rowsort
SELECT - 63 * 34 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2142
-2142
-2142

query I rowsort
SELECT DISTINCT + + 76 FROM tab0 GROUP BY tab0.col0
----
76

query I rowsort
SELECT DISTINCT - 29 AS col2 FROM tab0 GROUP BY tab0.col1
----
-29

query I rowsort
SELECT - col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - 60 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-60
-60
-60

query I rowsort
SELECT ALL - 36 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-36
-36
-36

query I rowsort
SELECT ALL - 30 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-2460
-660
-840

query I rowsort
SELECT + 27 FROM tab1 GROUP BY tab1.col0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + ( 44 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
44
44
44

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 79 FROM tab0 GROUP BY tab0.col1
----
79

query I rowsort
SELECT - cor0.col0 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NULL
----
-166
-52
-86

query I rowsort
SELECT ALL 86 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
86
86
86

query I rowsort
SELECT ALL cor0.col1 + - 27 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-21
17
30

query I rowsort
SELECT DISTINCT - 44 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-44

query I rowsort
SELECT + 21 FROM tab2 AS cor0 GROUP BY col1
----
21
21
21

query I rowsort
SELECT + ( + tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT tab0.col2 AS col1 FROM tab0 WHERE NOT ( - tab0.col0 ) IN ( tab0.col2 * - tab0.col1 ) GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1 WHERE + tab1.col1 < col1 + tab1.col2 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 91 - - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
113
119
173

query I rowsort
SELECT 6 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT + 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT - 62 * - cor0.col0 - cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
3242
6590
7853

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5085
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5085
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING ( NULL ) IS NULL
----
0
81

query I rowsort
SELECT tab2.col1 - - 19 AS col2 FROM tab2 GROUP BY tab2.col1
----
60
78
80

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 + 98 + 55 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
153

query I rowsort
SELECT ALL + col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
166
52
86

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col2 FROM tab1 cor0 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT DISTINCT - 38 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-38

query I rowsort
SELECT 22 + + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
66
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT ALL + 26 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
26
26
26

query I rowsort
SELECT 4 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT ALL - ( 39 ) AS col1 FROM tab0 GROUP BY col0
----
-39
-39
-39

query I rowsort
SELECT - 32 FROM tab2 GROUP BY tab2.col0
----
-32
-32
-32

query I rowsort
SELECT ALL 8 FROM tab1 GROUP BY tab1.col2
----
8
8
8

query I rowsort
SELECT COALESCE ( tab0.col1, - tab0.col1 ) * 34 FROM tab0 GROUP BY tab0.col1
----
0
2754

query I rowsort
SELECT ALL + + tab2.col2 + 90 FROM tab2 GROUP BY tab2.col2
----
148
169
177

query I rowsort
SELECT DISTINCT - 43 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1032
-1634
-3397

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5106
SELECT ALL + tab1.col0 + - CAST( NULL AS SIGNED ) * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5106
SELECT ALL + tab1.col0 + - CAST ( NULL AS INTEGER ) * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT 47 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
47

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT col2 - - 96 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
104
141
167

query I rowsort
SELECT ALL 69 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
69
69
69

query I rowsort
SELECT ALL + col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 24 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
24
24

query I rowsort
SELECT ALL 71 FROM tab2 GROUP BY tab2.col1
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + 89 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
89
89
89

query I rowsort
SELECT + cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - - 45 * + 98 FROM tab2 GROUP BY tab2.col2
----
4410

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5119
SELECT + CAST( NULL AS SIGNED ) col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5119
SELECT + CAST ( NULL AS INTEGER ) col2 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-53
19
45

query I rowsort
SELECT 98 * cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2352
3724
7742

query I rowsort
SELECT DISTINCT + 49 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
49

query I rowsort
SELECT + tab1.col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT ALL cor0.col2 - - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT - col2 * + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT ( 16 ) AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
16

onlyif mysql # DIV for integer division: 
query I rowsort label-5128
SELECT DISTINCT + - tab0.col0 * tab0.col0 + + 17 DIV 74 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

skipif mysql # not compatible
query I rowsort label-5128
SELECT DISTINCT + - tab0.col0 * tab0.col0 + + 17 / 74 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col1 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
102
115
14

query I rowsort
SELECT + 33 - tab0.col1 FROM tab0 GROUP BY col1
----
-48
33

query I rowsort
SELECT DISTINCT + 58 * + 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3770

query I rowsort
SELECT DISTINCT 58 + + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
101
141
84

query I rowsort
SELECT ALL + + 12 AS col0 FROM tab2 GROUP BY tab2.col2
----
12
12
12

query I rowsort
SELECT + + 44 FROM tab0 GROUP BY tab0.col2
----
44
44
44

query I rowsort
SELECT + + 38 * + col2 FROM tab2 GROUP BY tab2.col2
----
2204
3002
3306

query I rowsort
SELECT + - 73 FROM tab1 GROUP BY tab1.col1
----
-73
-73
-73

onlyif mysql # DIV for integer division: 
query I rowsort label-5137
SELECT DISTINCT + tab2.col1 DIV - 30 col0 FROM tab2 GROUP BY tab2.col1
----
-1
-2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5137
SELECT DISTINCT + tab2.col1 / - 30 col0 FROM tab2 GROUP BY tab2.col1
----
-1
-2

query I rowsort
SELECT ALL 32 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1312
1888
1952

query I rowsort
SELECT ALL 82 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
127
153
90

query I rowsort
SELECT ALL + 54 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1296
2052
4266

query I rowsort
SELECT ALL - 78 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-78
-78
-78

query I rowsort
SELECT tab2.col2 * tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT - 89 FROM tab0 GROUP BY col0
----
-89
-89
-89

query I rowsort
SELECT + 10 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
10
10
10

query I rowsort
SELECT ALL + 46 AS col2 FROM tab0 GROUP BY tab0.col0
----
46
46
46

query I rowsort
SELECT ALL - tab2.col0 - - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT - - 58 AS col1 FROM tab1 GROUP BY tab1.col1
----
58
58
58

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, col1
----
-81
0

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT - + col2 * - 8 AS col2 FROM tab2 GROUP BY tab2.col2
----
464
632
696

query I rowsort
SELECT + 29 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL cor0.col0 + - ( 44 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-16
-22
38

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
24
38
79

query I rowsort
SELECT tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-26
-43
-83

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT - col2 IS NULL
----
24
38
79

query I rowsort
SELECT DISTINCT + - tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL - cor0.col2 * - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - 8 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-8
-8

query I rowsort
SELECT 46 FROM tab0 GROUP BY col0
----
46
46
46

query I rowsort
SELECT DISTINCT + + 52 FROM tab1 GROUP BY tab1.col2
----
52

query I rowsort
SELECT ALL 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
56
56
56

query I rowsort
SELECT ALL + 16 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT ALL 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48
48
48

onlyif mysql # DIV for integer division: 
query I rowsort label-5167
SELECT - cor0.col1 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5167
SELECT - cor0.col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT + 36 * + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1584
2052
216

query I rowsort
SELECT - cor0.col0 + ( 88 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
60
66

query I rowsort
SELECT ALL - + 39 AS col2 FROM tab0 GROUP BY tab0.col1
----
-39
-39

query I rowsort
SELECT - cor0.col1 * + 91 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3731
-5369
-5551

query I rowsort
SELECT + 42 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42
42
42

onlyif mysql # DIV for integer division: 
query I rowsort label-5173
SELECT + 46 DIV cor0.col0 col2 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-5173
SELECT + 46 / cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
3

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT ALL 78 AS col0 FROM tab1 GROUP BY tab1.col0
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 16 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
16
16
16

onlyif mysql # DIV for integer division: 
query I rowsort label-5177
SELECT ALL - 21 DIV 11 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5177
SELECT ALL - 21 / 11 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-5178
SELECT ALL + - tab2.col1 DIV - tab2.col1 FROM tab2 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5178
SELECT ALL + - tab2.col1 / - tab2.col1 FROM tab2 GROUP BY col1
----
1
1
1

query I rowsort
SELECT + 46 + + 79 * cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
4628
6287
6919

query I rowsort
SELECT DISTINCT - 98 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2352
-3724
-7742

query I rowsort
SELECT ALL + col1 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NULL
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col1 + + col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

query I rowsort
SELECT - col2 * tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - 65 FROM tab2 GROUP BY tab2.col1
----
-65
-65
-65

query I rowsort
SELECT cor0.col1 * cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6642

query I rowsort
SELECT - cor0.col0 * - col0 + 35 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
260
8316
8499

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
3364
6241
7569

query I rowsort
SELECT + 13 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
13
13

onlyif mysql # DIV for integer division: 
query I rowsort label-5190
SELECT ALL cor0.col0 DIV 61 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5190
SELECT ALL cor0.col0 / 61 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab2.col2 col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + 70 FROM tab0 AS cor0 GROUP BY cor0.col1
----
70
70

query I rowsort
SELECT ALL - 24 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1944
0

query I rowsort
SELECT COALESCE ( - cor0.col2, cor0.col2 ) FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT - 83 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-83
-83
-83

query I rowsort
SELECT ALL + 82 AS col1 FROM tab2 GROUP BY col2
----
82
82
82

query I rowsort
SELECT tab2.col1 + + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT 94 * - 35 FROM tab0 cor0 GROUP BY col2
----
-3290
-3290
-3290

query I rowsort
SELECT 88 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
112
126
167

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT tab0.col2 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - ( 98 ) * 1 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-98
-98
-98

query I rowsort
SELECT ALL - 12 FROM tab0 GROUP BY col0
----
-12
-12
-12

query I rowsort
SELECT ALL - + 8 * - tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
522
711
783

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5206
SELECT DISTINCT CAST( NULL AS DECIMAL ) + - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5206
SELECT DISTINCT CAST ( NULL AS REAL ) + - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT 55 FROM tab2 AS cor0 GROUP BY cor0.col1
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT 81 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
81
81
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5210
SELECT ALL CAST( NULL AS SIGNED ) * + COALESCE ( - col0, 38, + 23 * + cor0.col0 ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5210
SELECT ALL CAST ( NULL AS INTEGER ) * + COALESCE ( - col0, 38, + 23 * + cor0.col0 ) FROM tab0 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 79 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3555
-5609
-632

query I rowsort
SELECT DISTINCT - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT + 37 + + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
116
61
75

query I rowsort
SELECT - 20 * + 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-180
-180
-180

query I rowsort
SELECT ALL 27 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
33
71
84

query I rowsort
SELECT DISTINCT 75 * 13 + + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
1013
1054
999

query I rowsort
SELECT DISTINCT - tab2.col2 * tab2.col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL tab1.col2 AS col0 FROM tab1 WHERE + col2 IS NOT NULL GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 + 10 col1 FROM tab0 GROUP BY tab0.col1
----
11
11

query I rowsort
SELECT ALL + 14 AS col1 FROM tab1 GROUP BY tab1.col1
----
14
14
14

query I rowsort
SELECT 62 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
62
62
62

query I rowsort
SELECT DISTINCT + 3 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
18
94
95

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + 93 + 72 FROM tab1 AS cor0 GROUP BY cor0.col1
----
165
165
165

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 DISTINCT - ( 15 ) AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor0.col0, cor1.col2
----
-15

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
26
43
83

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL cor0.col1 * 20 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1180
1220
820

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 13 FROM tab0 AS cor0 GROUP BY col0
----
13

query I rowsort
SELECT - 45 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-45
-45
-45

query I rowsort
SELECT DISTINCT + 6 FROM tab1 GROUP BY col1
----
6

query I rowsort
SELECT - cor0.col0 + 68 * 36 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2356
2357
2433

query I rowsort
SELECT - 70 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-70
-70

query I rowsort
SELECT DISTINCT - cor0.col0 + - 82 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-104
-110
-164

query I rowsort
SELECT DISTINCT - tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL 21 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT ALL 95 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
95
95
95

query I rowsort
SELECT ALL tab1.col0 + - 95 * - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
2112
2688
7872

query I rowsort
SELECT DISTINCT 96 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
120
134
175

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 11 FROM tab2 GROUP BY tab2.col0
----
11

onlyif mysql # DIV for integer division: 
query I rowsort label-5244
SELECT + 34 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
5

skipif mysql # not compatible
query I rowsort label-5244
SELECT + 34 / cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
5

query I rowsort
SELECT 1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 64 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
64
64
64

query I rowsort
SELECT ALL - tab2.col1 * + 34 FROM tab2 GROUP BY tab2.col1
----
-1394
-2006
-2074

query I rowsort
SELECT - 55 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT DISTINCT + cor0.col0 * 12 + - cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1333
-364
-5893

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - cor0.col1 - cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1930
-676
-6889

query I rowsort
SELECT + + col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + + 76 AS col1 FROM tab1 GROUP BY tab1.col2
----
76
76
76

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.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL - col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT + 38 + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
117
125
96

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT DISTINCT + 16 FROM tab2 GROUP BY tab2.col2
----
16

query I rowsort
SELECT ALL - 51 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-51
-51
-51

query I rowsort
SELECT tab2.col1 - + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - 71 + col1 FROM tab0 GROUP BY tab0.col1
----
-71
10

query I rowsort
SELECT + 43 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
126
69
86

query I rowsort
SELECT ALL - tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IS NOT NULL OR NOT ( tab2.col0 ) IS NOT NULL
----

query I rowsort
SELECT - 32 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-1440
-2272
-256

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 27 col1 FROM tab1 GROUP BY tab1.col2
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 58 + cor0.col2 * cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
3422
6299
7627

query I rowsort
SELECT 72 + 65 FROM tab0 AS cor0 GROUP BY cor0.col2
----
137
137
137

query I rowsort
SELECT + tab1.col1 - + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col0 FROM tab1 AS cor0 GROUP BY col2
----
44
44
44

query I rowsort
SELECT 50 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT - 23 AS col1 FROM tab2 GROUP BY tab2.col2
----
-23

query I rowsort
SELECT DISTINCT tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IN ( + tab0.col2 )
----

query I rowsort
SELECT + tab0.col2 * - tab0.col2 FROM tab0 WHERE NOT NULL IS NULL GROUP BY tab0.col2
----

query I rowsort
SELECT ALL - - 37 AS col2 FROM tab0 GROUP BY tab0.col0
----
37
37
37

query I rowsort
SELECT ALL 34 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
40
78
91

query I rowsort
SELECT DISTINCT 7 + 43 FROM tab1 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT - tab0.col1 - + tab0.col1 FROM tab0 GROUP BY col1
----
-162
0

query I rowsort
SELECT 45 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4095
4140
675

query I rowsort
SELECT - tab2.col1 * - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT cor0.col0 + 46 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
128
68
74

query I rowsort
SELECT ALL - 71 FROM tab0 GROUP BY tab0.col1
----
-71
-71

query I rowsort
SELECT - cor0.col1 * 11 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-484
-627
-66

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5287
SELECT + + CAST( - 3 AS SIGNED ) col1 FROM tab1 GROUP BY tab1.col1
----
-3
-3
-3

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5287
SELECT + + CAST ( - 3 AS INTEGER ) col1 FROM tab1 GROUP BY tab1.col1
----
-3
-3
-3

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( 60 ) col2 FROM tab0 GROUP BY col0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT col2 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 46, - tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
46
46
46

query I rowsort
SELECT ALL 11 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
11
11
11

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab1 GROUP BY tab1.col2
----
-56

query I rowsort
SELECT + - 2 AS col0 FROM tab0 GROUP BY tab0.col1
----
-2
-2

query I rowsort
SELECT - col1 AS col2 FROM tab1 WHERE NOT NULL NOT IN ( - tab1.col2 ) GROUP BY tab1.col1
----

query I rowsort
SELECT + col0 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-46
32
51

query I rowsort
SELECT ALL + col2 * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL >= ( NULL )
----

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT cor0.col1 * + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, col1
----
0
0
3483

query I rowsort
SELECT - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 92 * - 92 AS col1 FROM tab1 GROUP BY tab1.col2
----
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 56 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-56
-56
-56

query I rowsort
SELECT ALL + 19 FROM tab2 AS cor0 GROUP BY col2
----
19
19
19

onlyif mysql # DIV for integer division: 
query I rowsort label-5306
SELECT 13 DIV + 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5306
SELECT 13 / + 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5307
SELECT ALL - 8 DIV 79 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5307
SELECT ALL - 8 / 79 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 + - col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
-16
-38
29

query I rowsort
SELECT + - 97 - + 36 AS col1 FROM tab2 GROUP BY tab2.col2
----
-133
-133
-133

query I rowsort
SELECT DISTINCT + 47 - 16 AS col1 FROM tab0 GROUP BY col0
----
31

query I rowsort
SELECT ALL - 71 FROM tab2 GROUP BY tab2.col0
----
-71
-71
-71

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
142
16
90

query I rowsort
SELECT + COALESCE ( + 92, tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
92
92

query I rowsort
SELECT + tab0.col1 - 8 FROM tab0 GROUP BY tab0.col1
----
-8
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 55 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3190
4345
4785

query I rowsort
SELECT + cor0.col1 + + ( cor0.col2 ) * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
1444
6241
657

query I rowsort
SELECT DISTINCT - tab1.col0 * + 83 FROM tab1 GROUP BY tab1.col0
----
-1826
-2324
-6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col1 ) col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT - 38 FROM tab2 GROUP BY col1
----
-38
-38
-38

query I rowsort
SELECT - 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-26
-26
-26

query I rowsort
SELECT 89 + - 99 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
84
84

query I rowsort
SELECT + 96 + - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
39
52
90

query I rowsort
SELECT ALL + col2 * + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + 53 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
53

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-5328
SELECT DISTINCT + 35 DIV + 42 AS col1 FROM tab2 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-5328
SELECT DISTINCT + 35 / + 42 AS col1 FROM tab2 GROUP BY col2
----
0

query I rowsort
SELECT ALL - 46 FROM tab0 cor0 GROUP BY cor0.col1
----
-46
-46

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 + + 55 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
136
55

query I rowsort
SELECT cor0.col2 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-12
-34
72

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 38 FROM tab2 cor0 GROUP BY cor0.col1
----
38

query I rowsort
SELECT DISTINCT + - 18 FROM tab0 GROUP BY tab0.col1
----
-18

query I rowsort
SELECT 15 FROM tab1 GROUP BY tab1.col1
----
15
15
15

query I rowsort
SELECT + 39 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1014
1677
3237

query I rowsort
SELECT DISTINCT + 83 AS col0 FROM tab2 GROUP BY tab2.col1
----
83

query I rowsort
SELECT ALL + + tab1.col2 + + col2 AS col2 FROM tab1 GROUP BY col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-5340
SELECT + + 45 DIV - 34 - + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-25
-39
-80

skipif mysql # not compatible
query I rowsort label-5340
SELECT + + 45 / - 34 - + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-25
-39
-80

query I rowsort
SELECT DISTINCT 99 * tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
1485
9009
9108

query I rowsort
SELECT ALL - 96 FROM tab1 cor0 GROUP BY cor0.col1
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 22 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab2 WHERE ( tab2.col0 - + tab2.col1 ) IN ( - tab2.col2 ) GROUP BY col2
----

query I rowsort
SELECT ALL + tab2.col1 - - tab2.col1 FROM tab2 GROUP BY col1 HAVING NOT ( NULL ) IS NOT NULL
----
118
122
82

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE col1 IS NOT NULL GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 9 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
9

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 - - 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
47
64
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 + 61 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
65
65
65

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
158
48
76

query I rowsort
SELECT DISTINCT - 79 + - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-137
-158
-166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----
-15
-91
-92

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
45
71
8

query I rowsort
SELECT + cor0.col1 * 76 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6237

query I rowsort
SELECT DISTINCT + 66 FROM tab1 GROUP BY tab1.col2
----
66

query I rowsort
SELECT 82 FROM tab0 AS cor0 GROUP BY col1
----
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col2 col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - ( 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 - + tab1.col1 col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT tab1.col1 * + tab1.col1 FROM tab1 GROUP BY col1
----
1936
3249
36

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 cor0.col0 * - col0 col2 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT + ( col1 ) - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT ALL + 80 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
80
80

query I rowsort
SELECT - tab2.col0 + - col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 86 col1 FROM tab1 GROUP BY tab1.col2
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col2 FROM tab0 GROUP BY tab0.col0
----
44
44
44

query I rowsort
SELECT + 33 - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-48
33
33

query I rowsort
SELECT DISTINCT + - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5373
SELECT CAST( NULL AS SIGNED ) + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5373
SELECT CAST ( NULL AS INTEGER ) + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 71 FROM tab1 GROUP BY tab1.col2
----
71
71
71

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 AS cor0 GROUP BY col1 HAVING col1 NOT IN ( + cor0.col1 )
----

query I rowsort
SELECT + 79 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
79
79
79

query I rowsort
SELECT DISTINCT - 30 AS col0 FROM tab1 GROUP BY col1
----
-30

query I rowsort
SELECT + cor0.col0 * - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0
0

query I rowsort
SELECT ALL 6 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
348
474
522

query I rowsort
SELECT ALL cor1.col0 * - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col2
----
9 values hashing to a2be7c32c6eead144f35c7ee0fbae978

query I rowsort
SELECT - 69 AS col1 FROM tab1 GROUP BY tab1.col2
----
-69
-69
-69

query I rowsort
SELECT 54 * + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2430
3834
432

query I rowsort
SELECT + 72 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
72
72
72

query I rowsort
SELECT DISTINCT - 0 FROM tab2 GROUP BY col2
----
0

query I rowsort
SELECT - col1 - + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT ALL + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL + cor0.col0 * + ( 81 ) AS col0 FROM tab0 AS cor0 GROUP BY col0
----
2106
3483
6723

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 * + cor0.col1 + + 59 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
11340

onlyif mysql # DIV for integer division: 
query I rowsort label-5390
SELECT - tab2.col2 DIV - 54 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-5390
SELECT - tab2.col2 / - 54 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT DISTINCT tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT NULL IS NOT NULL
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT + 55 * - 1 FROM tab1 GROUP BY tab1.col0
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + COALESCE ( - 99, cor0.col2, cor0.col2 + + cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-99
-99
-99

query I rowsort
SELECT 13 + - 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-35
-35
-35

query I rowsort
SELECT ALL - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2 HAVING NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 - - tab0.col2 * - tab0.col2 col1 FROM tab0 WHERE NOT NULL NOT IN ( tab0.col0 ) GROUP BY tab0.col2
----

query I rowsort
SELECT 18 + 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT + - tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT 65 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 61 + - col0 col2 FROM tab1 GROUP BY tab1.col0
----
-143
-83
-89

query I rowsort
SELECT - 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-6
-6
-6

query I rowsort
SELECT + 62 FROM tab1 cor0 GROUP BY col2
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 + - col0 col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT ALL 71 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT + ( cor0.col1 ) FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT 73 + + 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
141
141
141

query I rowsort
SELECT DISTINCT - col1 - tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1980
-3306
-42

query I rowsort
SELECT DISTINCT + + 81 FROM tab0 GROUP BY tab0.col2
----
81

query I rowsort
SELECT DISTINCT - 59 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-59

query I rowsort
SELECT + cor0.col1 + 34 FROM tab2 AS cor0 GROUP BY cor0.col1
----
75
93
95

query I rowsort
SELECT ALL - ( + 34 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
-34
-34
-34

query I rowsort
SELECT ALL ( 55 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT - 87 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-87
-87
-87

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1, cor1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + + ( + cor0.col0 ) * cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1892
6972
702

query I rowsort
SELECT DISTINCT + 60 FROM tab0 GROUP BY tab0.col1
----
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5418
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5418
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5419
SELECT ALL + cor0.col1 + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5419
SELECT ALL + cor0.col1 + CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT ALL + cor0.col2 * + 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3645
5751
648

query I rowsort
SELECT 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
22
22
22

query I rowsort
SELECT 72 FROM tab1 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT DISTINCT - cor0.col1 * - 53 FROM tab1 AS cor0 GROUP BY col1
----
2332
3021
318

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col0 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL 20 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
20
20

query I rowsort
SELECT col1 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT 17 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT cor0.col2 * cor0.col1 + COALESCE ( cor0.col0, + 54 * cor0.col2, cor0.col2 + 99 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
2593
3206
70

query I rowsort
SELECT DISTINCT 63 * cor0.col0 + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1408
1792
5248

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
59
59
59

query I rowsort
SELECT DISTINCT + 23 FROM tab2 AS cor0 GROUP BY cor0.col1
----
23

query I rowsort
SELECT DISTINCT 68 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
68

query I rowsort
SELECT ALL - cor0.col1 + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
3323
6182
7508

query I rowsort
SELECT 5 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT ALL - 60 AS col2 FROM tab2 GROUP BY tab2.col2
----
-60
-60
-60

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT + cor0.col0 * - 20 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1660
-520
-860

query I rowsort
SELECT 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT + col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 89 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 51 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
51
51
51

query I rowsort
SELECT + 9 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-198
-252
-738

query I rowsort
SELECT ALL - 77 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-77
-77
-77

query I rowsort
SELECT tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT + 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 89 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ALL - 40 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-40
-40
-40

onlyif mysql # DIV for integer division: 
query I rowsort label-5452
SELECT DISTINCT - col2 DIV cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-5452
SELECT DISTINCT - col2 / cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT + 36 FROM tab0 AS cor0 GROUP BY cor0.col1
----
36
36

query I rowsort
SELECT DISTINCT 28 - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-13
-31
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 65 col0 FROM tab0 GROUP BY tab0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT + 10 * + 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
540

query I rowsort
SELECT ALL - tab2.col0 FROM tab2 GROUP BY col0 HAVING ( NULL ) IS NULL
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 73 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-73

query I rowsort
SELECT ALL - col2 + 80 AS col2 FROM tab1 GROUP BY col2
----
35
72
9

query I rowsort
SELECT ALL + - 32 * tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1254
-2607
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + cor0.col0 ) * - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-132
-1596
-3608

query I rowsort
SELECT - 15 FROM tab2 GROUP BY tab2.col0
----
-15
-15
-15

query I rowsort
SELECT 93 FROM tab1 GROUP BY col0
----
93
93
93

query I rowsort
SELECT ALL + cor0.col2 * - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ( 10 ) FROM tab0 AS cor0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT 66 FROM tab2 cor0 GROUP BY col0
----
66
66
66

query I rowsort
SELECT ALL 82 FROM tab0 cor0 GROUP BY cor0.col0, col0
----
82
82
82

query I rowsort
SELECT - 39 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-39
-39
-39

query I rowsort
SELECT cor0.col2 * col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col0 * + 91 FROM tab2 cor0 GROUP BY cor0.col0
----
1365
8281
8372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + + cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT - 82 - - 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-49
-49
-49

query I rowsort
SELECT - 10 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-220
-280
-820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 67 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT 25 + + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
116
117
40

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 - col2 col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL <> tab0.col2
----

query I rowsort
SELECT - 21 AS col1 FROM tab0 GROUP BY tab0.col1
----
-21
-21

query I rowsort
SELECT DISTINCT + 13 FROM tab1 AS cor0 GROUP BY cor0.col1
----
13

query I rowsort
SELECT DISTINCT - 14 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-14

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5482
SELECT CAST( NULL AS SIGNED ) + + 70 * + 87 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5482
SELECT CAST ( NULL AS INTEGER ) + + 70 * + 87 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 95 FROM tab2 GROUP BY col1
----
-95
-95
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-5484
SELECT DISTINCT + cor0.col1 DIV - cor0.col1 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
21
27
81

skipif mysql # not compatible
query I rowsort label-5484
SELECT DISTINCT + cor0.col1 / - cor0.col1 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
21
27
81

query I rowsort
SELECT ALL + 46 * + 61 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
2806
2806

query I rowsort
SELECT DISTINCT cor0.col1 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-5487
SELECT ALL cor0.col1 DIV 14 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
6
61

skipif mysql # not compatible
query I rowsort label-5487
SELECT ALL cor0.col1 / 14 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
6
61

query I rowsort
SELECT + 67 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
67
67

query I rowsort
SELECT 26 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT - - 4 + - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-4
-41
-67

query I rowsort
SELECT 91 FROM tab1 AS cor0 GROUP BY cor0.col1
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 7 col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
7

query I rowsort
SELECT ALL + + 89 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
7209

query I rowsort
SELECT DISTINCT tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NOT NULL
----
0
162

query I rowsort
SELECT + COALESCE ( ( + tab1.col1 ), + tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

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 cor0.col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) + + 13 * col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1092
1104
180

query I rowsort
SELECT DISTINCT + cor0.col0 * 7 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
105
637
644

query I rowsort
SELECT ALL tab1.col1 - + col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL - 22 FROM tab1 GROUP BY tab1.col2
----
-22
-22
-22

query I rowsort
SELECT ALL 27 FROM tab1 GROUP BY tab1.col0
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col1 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 75 FROM tab2 AS cor0 GROUP BY cor0.col1
----
75

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT + tab0.col2 * + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 84 col1 FROM tab2 GROUP BY col2
----
-84

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 80 * + col2 AS col2 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
1920
3040
6320

query I rowsort
SELECT DISTINCT 61 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
61

query I rowsort
SELECT + col2 + ( + 7 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
15
52
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5514
SELECT DISTINCT - - CAST( 47 AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
47

skipif mysql # not compatible
query I rowsort label-5514
SELECT DISTINCT - - CAST ( 47 AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
47

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - NULLIF ( - 85, 24 ) * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
3740
4845
510

query I rowsort
SELECT DISTINCT + ( + tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, col1
----
-81
0
0

query I rowsort
SELECT + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + tab1.col2 + 77 AS col1 FROM tab1 GROUP BY tab1.col2
----
122
148
85

query I rowsort
SELECT + tab1.col2 * col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col0
----
-15
-15
-91
-91
-92
-92

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col1 + 24 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
1968
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( tab1.col1 ) + + tab1.col1 col0 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT - + tab1.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 + 0 col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT 93 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
93

query I rowsort
SELECT 60 FROM tab2 GROUP BY tab2.col2
----
60
60
60

query I rowsort
SELECT 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL - col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - 64 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-64
-64
-64

query I rowsort
SELECT DISTINCT - 63 + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-107
-120
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 col0 FROM tab0 GROUP BY tab0.col0
----
77

query I rowsort
SELECT 90 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT + tab1.col2 * + tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT DISTINCT + 98 FROM tab2 GROUP BY tab2.col0
----
98

query I rowsort
SELECT tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + tab1.col1 * tab1.col1 - - 95 * 39 FROM tab1 GROUP BY col1
----
3741
5641
6954

onlyif mysql # DIV for integer division: 
query I rowsort label-5541
SELECT + 75 DIV 6 AS col0 FROM tab2 GROUP BY tab2.col0
----
12
12
12

skipif mysql # not compatible
query I rowsort label-5541
SELECT + 75 / 6 AS col0 FROM tab2 GROUP BY tab2.col0
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT ( 19 ) + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
110
111
34

query I rowsort
SELECT ( COALESCE ( cor0.col1, + 61 + - 25 ) ) + 18 * + col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1085
1481
1627

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5545
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5545
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-5546
SELECT DISTINCT + COALESCE ( 88, + tab0.col2 DIV - tab0.col1 ) FROM tab0 GROUP BY tab0.col2
----
88

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5546
SELECT DISTINCT + COALESCE ( 88, + tab0.col2 / - tab0.col1 ) FROM tab0 GROUP BY tab0.col2
----
88

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT + 57 FROM tab2 GROUP BY tab2.col0
----
57
57
57

query I rowsort
SELECT NULLIF ( - cor0.col0, - cor0.col0 + + cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - tab0.col0 AS col1 FROM tab0 WHERE tab0.col0 IS NOT NULL GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 GROUP BY col2 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT ALL 81 * - 48 + 13 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3875
-3875
-3875

query I rowsort
SELECT DISTINCT + 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
60

query I rowsort
SELECT DISTINCT tab0.col0 * 93 AS col2 FROM tab0 GROUP BY tab0.col0
----
2418
3999
7719

query I rowsort
SELECT ALL + 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
64
64
64

query I rowsort
SELECT ALL cor0.col0 * + 57 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1254
1596
4674

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-45
-71
-8

query I rowsort
SELECT + 25 FROM tab2 GROUP BY tab2.col0
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-5561
SELECT - + tab1.col0 DIV + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5561
SELECT - + tab1.col0 / + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 41 * 47 AS col2 FROM tab0 GROUP BY tab0.col2
----
1927

query I rowsort
SELECT ALL 63 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT DISTINCT cor0.col0 + + 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
139
140
63

query I rowsort
SELECT 76 FROM tab2 GROUP BY tab2.col1
----
76
76
76

query I rowsort
SELECT ALL + 79 + - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
18
20
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 72 col1 FROM tab1 AS cor0 GROUP BY col0
----
72

query I rowsort
SELECT - tab0.col0 / - tab0.col0 FROM tab0 GROUP BY col0 HAVING NULL IN ( tab0.col0 )
----

query I rowsort
SELECT DISTINCT + 80 FROM tab2 AS cor0 GROUP BY cor0.col1
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * 80 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4640
6320
6960

query I rowsort
SELECT DISTINCT - + 56 * + 47 AS col1 FROM tab2 GROUP BY tab2.col2
----
-2632

query I rowsort
SELECT DISTINCT - 46 AS col0 FROM tab1 GROUP BY tab1.col2
----
-46

query I rowsort
SELECT DISTINCT + 14 + + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
55
73
75

query I rowsort
SELECT DISTINCT - COALESCE ( tab0.col2, col2, 86 ) * col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 75 * - cor0.col2 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
3318
5281
594

query I rowsort
SELECT - cor0.col2 + cor0.col1 * + col1 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-38
-79
6537

query I rowsort
SELECT 79 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT ALL + + 49 FROM tab0 GROUP BY tab0.col2
----
49
49
49

query I rowsort
SELECT - 92 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-136
-149
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-5580
SELECT - 64 DIV - 42 + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-5580
SELECT - 64 / - 42 + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
59
80
88

query I rowsort
SELECT - 14 AS col2 FROM tab0 GROUP BY tab0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT 88 FROM tab1 GROUP BY tab1.col0
----
88

query I rowsort
SELECT cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL - 72 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-72
-72
-72

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5585
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5585
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 34 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
34

query I rowsort
SELECT ALL + 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT DISTINCT cor0.col0 * + ( - 31 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2821
-2852
-465

query I rowsort
SELECT DISTINCT + tab0.col2 + + 38 FROM tab0 GROUP BY tab0.col2
----
117
62
76

query I rowsort
SELECT 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
51
51
51

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5592
SELECT - CAST( + 20 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-5592
SELECT - CAST ( + 20 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

onlyif mysql # DIV for integer division: 
query I rowsort label-5593
SELECT DISTINCT - 3 DIV + 20 AS col0 FROM tab0 GROUP BY tab0.col2
----
0

skipif mysql # not compatible
query I rowsort label-5593
SELECT DISTINCT - 3 / + 20 AS col0 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT ALL 26 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT 67 * 58 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3886
3886
3886

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.col0 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-126
-28
-85

query I rowsort
SELECT - 16 AS col1 FROM tab2 GROUP BY tab2.col0
----
-16
-16
-16

query I rowsort
SELECT ALL + tab2.col1 * + 29 AS col2 FROM tab2 GROUP BY tab2.col1
----
1189
1711
1769

query I rowsort
SELECT 0 AS col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY col0, cor0.col0, cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - COALESCE ( 79, - tab0.col1, + 8 ) col2 FROM tab0 GROUP BY tab0.col0
----
-79
-79
-79

query I rowsort
SELECT ALL + 47 AS col1 FROM tab2 GROUP BY tab2.col2
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 11 AS col1 FROM tab0 GROUP BY tab0.col0
----
-11

query I rowsort
SELECT + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING ( NULL ) IS NULL
----
15
91
92

query I rowsort
SELECT + 93 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
93
93

query I rowsort
SELECT DISTINCT 37 - 72 AS col0 FROM tab1 GROUP BY tab1.col2
----
-35

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + + 18 FROM tab0 GROUP BY tab0.col0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + CASE cor0.col1 WHEN - cor0.col0 / - 21 THEN + cor0.col1 * cor0.col0 END col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * - ( - cor0.col2 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
1444
576
6241

query I rowsort
SELECT + tab0.col2 AS col1 FROM tab0 WHERE NOT NULL > + col2 GROUP BY col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 49 FROM tab0 AS cor0 GROUP BY cor0.col1
----
49

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col0 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + NULLIF ( 42, cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT + 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT + 96 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT ALL + - 72 AS col2 FROM tab0 GROUP BY tab0.col0
----
-72
-72
-72

query I rowsort
SELECT - 46 + - cor0.col1 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1642
-178
-3654

query I rowsort
SELECT DISTINCT 14 * + 35 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
490

onlyif mysql # DIV for integer division: 
query I rowsort label-5625
SELECT 24 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5625
SELECT 24 / cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
0
0
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5626
SELECT - cor1.col1 + CAST( NULL AS SIGNED ) FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5626
SELECT - cor1.col1 + CAST ( NULL AS INTEGER ) FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # DIV for integer division: 
query I rowsort label-5627
SELECT + 78 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
13

skipif mysql # not compatible
query I rowsort label-5627
SELECT + 78 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
13

query I rowsort
SELECT DISTINCT - - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5629
SELECT - + CAST( NULL AS SIGNED ) * + 69 + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5629
SELECT - + CAST ( NULL AS INTEGER ) * + 69 + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ( - col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - 53 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT - + 57 FROM tab1 GROUP BY tab1.col1
----
-57
-57
-57

query I rowsort
SELECT - tab1.col1 * 91 FROM tab1 GROUP BY tab1.col1
----
-4004
-5187
-546

query I rowsort
SELECT - tab0.col0 * tab0.col0 FROM tab0 WHERE NOT ( + col2 ) IS NOT NULL GROUP BY tab0.col0
----

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING - tab2.col2 IS NOT NULL
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-5637
SELECT + + 54 DIV 2 col1 FROM tab1 GROUP BY tab1.col2
----
27
27
27

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5637
SELECT + + 54 / 2 col1 FROM tab1 GROUP BY tab1.col2
----
27
27
27

query I rowsort
SELECT ALL - ( + 10 ) * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-580
-790
-870

query I rowsort
SELECT ALL 57 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57
57
57

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
126
28
85

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 * 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2378
-638
-812

query I rowsort
SELECT DISTINCT 5 + 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col0
----
47

onlyif mysql # DIV for integer division: 
query I rowsort label-5643
SELECT DISTINCT ( cor0.col0 ) DIV + cor0.col0 - ( cor0.col0 + - cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-37
30

skipif mysql # not compatible
query I rowsort label-5643
SELECT DISTINCT ( cor0.col0 ) / + cor0.col0 - ( cor0.col0 + - cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-15
-37
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + 14 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
38
52
93

query I rowsort
SELECT + 80 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
80
80
80

query I rowsort
SELECT 6 FROM tab2 AS cor0 GROUP BY cor0.col2
----
6
6
6

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 cor0.col1 + + cor0.col1 * + 79 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6480

onlyif mysql # DIV for integer division: 
query I rowsort label-5649
SELECT DISTINCT - tab1.col0 DIV + ( 15 * - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
0

skipif mysql # not compatible
query I rowsort label-5649
SELECT DISTINCT - tab1.col0 / + ( 15 * - tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT cor0.col2 * + 43 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1032
1634
3397

query I rowsort
SELECT ALL 2 FROM tab0 cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT - 79 * + 23 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-1817

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT ALL 59 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2655
-4189
-472

query I rowsort
SELECT - + 77 * 62 AS col2 FROM tab2 GROUP BY col0
----
-4774
-4774
-4774

query I rowsort
SELECT + 29 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
29
29
29

query I rowsort
SELECT tab2.col2 FROM tab2 WHERE NULL IS NULL GROUP BY tab2.col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT 97 FROM tab1 AS cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT - 65 * 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
-3185
-3185
-3185

query I rowsort
SELECT ALL - 53 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
-53
-53
-53

query I rowsort
SELECT ALL - 82 - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-140
-161
-169

query I rowsort
SELECT ALL 39 FROM tab1 GROUP BY tab1.col2
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 94 col1 FROM tab0 AS cor0 GROUP BY col2
----
94

onlyif mysql # DIV for integer division: 
query I rowsort label-5664
SELECT DISTINCT - tab1.col1 DIV - 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

skipif mysql # not compatible
query I rowsort label-5664
SELECT DISTINCT - tab1.col1 / - 82 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT ALL + 23 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 1 col2 FROM tab0 GROUP BY tab0.col0
----
-1

query I rowsort
SELECT DISTINCT 53 * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1378
2279
4399

query I rowsort
SELECT - 98 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-2156
-2744
-8036

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 33 + + 45 AS col0 FROM tab0 GROUP BY tab0.col0
----
12
12
12

query I rowsort
SELECT ALL + 97 FROM tab1 GROUP BY tab1.col1
----
97
97
97

query I rowsort
SELECT - ( cor0.col0 ) * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + 72 + + col2 FROM tab2 GROUP BY col2
----
130
151
159

onlyif mysql # DIV for integer division: 
query I rowsort label-5676
SELECT ALL + + COALESCE ( 43, tab1.col2 DIV tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
43
43
43

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5676
SELECT ALL + + COALESCE ( 43, tab1.col2 / tab1.col0 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * + col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL + col2 - + 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-27
-6
2

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col1
----
-81
-81
-81
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 44 col2 FROM tab1 AS cor0 GROUP BY col1
----
44

query I rowsort
SELECT ALL - ( - COALESCE ( + cor0.col0, + cor0.col0 + 59 ) ) FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 79 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
120
138
140

query I rowsort
SELECT ALL + tab2.col2 FROM tab2 WHERE NULL <= NULL GROUP BY tab2.col2
----

query I rowsort
SELECT ALL cor0.col0 - - COALESCE ( - 23, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
5
59

query I rowsort
SELECT ALL 71 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT tab0.col2 * - col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - col0 * + tab1.col0 FROM tab1 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
40

query I rowsort
SELECT + - 11 * 9 FROM tab2 GROUP BY tab2.col1
----
-99
-99
-99

query I rowsort
SELECT ALL tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NOT tab2.col1 NOT IN ( - tab2.col1 )
----

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 44 FROM tab2 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT ALL + 22 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22
22
22

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL cor0.col2 + COALESCE ( 65, cor0.col1, + 36 + cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
110
136
73

query I rowsort
SELECT DISTINCT + 33 AS col2 FROM tab1 GROUP BY tab1.col0
----
33

onlyif mysql # DIV for integer division: 
query I rowsort label-5700
SELECT + cor0.col0 DIV + ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5700
SELECT + cor0.col0 / + ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT ALL 11 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT DISTINCT + - 38 + - 92 AS col1 FROM tab0 GROUP BY tab0.col0
----
-130

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5703
SELECT - col2 + tab0.col2 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5703
SELECT - col2 + tab0.col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 16 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - 88 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3872
5016
528

query I rowsort
SELECT - 75 FROM tab0 GROUP BY col2
----
-75
-75
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + cor0.col1 + - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1980
-3306
-42

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + tab0.col1 AS col0 FROM tab0 GROUP BY col1 HAVING - col1 IS NULL
----

query I rowsort
SELECT DISTINCT 4 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-77
4

query I rowsort
SELECT ALL + tab0.col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 58 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
58
58

query I rowsort
SELECT - - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT - - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + 27 * 69 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1863
1863
1863

query I rowsort
SELECT 22 * - cor0.col0 + - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2093
-2116
-345

query I rowsort
SELECT DISTINCT + tab1.col1 - - 23 FROM tab1 GROUP BY col1
----
29
67
80

query I rowsort
SELECT DISTINCT + col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IN ( + tab0.col1 * - col1 )
----

query I rowsort
SELECT + 68 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
68
68
68

query I rowsort
SELECT DISTINCT - 12 AS col1 FROM tab0 GROUP BY tab0.col0
----
-12

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, col1
----
-81
0
0

query I rowsort
SELECT ALL + tab2.col1 - 75 FROM tab2 GROUP BY tab2.col1
----
-14
-16
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 24 col2 FROM tab1 GROUP BY tab1.col2
----
-24
-24
-24

query I rowsort
SELECT + col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5727
SELECT ALL + + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5727
SELECT ALL + + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - - 6 FROM tab1 GROUP BY tab1.col0
----
6
6
6

onlyif mysql # DIV for integer division: 
query I rowsort label-5729
SELECT + tab1.col2 + tab1.col2 DIV - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
44
7
70

skipif mysql # not compatible
query I rowsort label-5729
SELECT + tab1.col2 + tab1.col2 / - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
44
7
70

query I rowsort
SELECT + - 64 AS col1 FROM tab0 GROUP BY tab0.col1
----
-64
-64

query I rowsort
SELECT ALL + - 29 FROM tab2 GROUP BY tab2.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT + 57 AS col2 FROM tab0 GROUP BY tab0.col1
----
57

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT 25 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
25
25
25

query I rowsort
SELECT - 23 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23
-23
-23

query I rowsort
SELECT - tab2.col1 * - col1 AS col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - - col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 GROUP BY col2 HAVING NOT ( NULL ) IS NOT NULL
----
-45
-71
-8

query I rowsort
SELECT col2 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NULL
----
24
38
79

query I rowsort
SELECT 73 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
73
73
73

query I rowsort
SELECT ALL + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT tab0.col2 * tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT - 77 AS col1 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

query I rowsort
SELECT DISTINCT + 75 + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
120
146
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + 63 - - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
104
122
124

query I rowsort
SELECT ALL - - 76 AS col2 FROM tab0 GROUP BY tab0.col1
----
76
76

query I rowsort
SELECT - - tab1.col2 + 19 FROM tab1 GROUP BY tab1.col2
----
27
64
90

query I rowsort
SELECT DISTINCT tab0.col1 AS col2 FROM tab0 GROUP BY col1 HAVING NOT ( NULL ) <= NULL
----

query I rowsort
SELECT - - tab1.col1 + col1 FROM tab1 GROUP BY col1
----
114
12
88

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 47 FROM tab2 GROUP BY tab2.col2
----
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 34 * tab2.col0 + + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
-3003
-3036
-495

query I rowsort
SELECT DISTINCT cor0.col2 * + 69 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4002
5451
6003

query I rowsort
SELECT ALL 78 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
78
78
78

query I rowsort
SELECT ALL tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + + 1 AS col0 FROM tab2 GROUP BY col1
----
1

query I rowsort
SELECT + 88 * - 0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 82, - col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2, col1, cor0.col2, cor0.col0
----
-2378
-4661
-5307

query I rowsort
SELECT DISTINCT 81 FROM tab2 cor0 GROUP BY cor0.col1
----
81

query I rowsort
SELECT ALL - + ( - col2 ) + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-5764
SELECT DISTINCT + col1 DIV 74 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
82

skipif mysql # not compatible
query I rowsort label-5764
SELECT DISTINCT + col1 / 74 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
82

query I rowsort
SELECT DISTINCT - 23 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-23

query I rowsort
SELECT DISTINCT - 87 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-87

query I rowsort
SELECT cor0.col2 * 22 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1276
1738
1914

query I rowsort
SELECT - 1 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
27
81

query I rowsort
SELECT ALL + - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - 72 FROM tab2 GROUP BY tab2.col0
----
-72
-72
-72

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
1944

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL tab0.col2 AS col1 FROM tab0 WHERE NOT tab0.col2 IS NOT NULL GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 38 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-38
-38
-38

query I rowsort
SELECT ALL + ( 19 ) * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1083
114
836

query I rowsort
SELECT DISTINCT + 29 * + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1189
1711
1769

query I rowsort
SELECT DISTINCT + 74 FROM tab1 cor0 GROUP BY col1
----
74

query I rowsort
SELECT + + 43 + - 16 AS col2 FROM tab2 GROUP BY tab2.col0
----
27
27
27

query I rowsort
SELECT ALL + 43 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1763
2537
2623

query I rowsort
SELECT NULLIF ( cor0.col0, + cor0.col2 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL + ( 89 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ( - 69 ) + - 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-91
-91
-91

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 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
138
148
99

query I rowsort
SELECT - 52 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-52
-52

query I rowsort
SELECT 23 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - cor0.col1 * - 90 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3690
5310
5490

query I rowsort
SELECT DISTINCT 67 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
67

query I rowsort
SELECT ALL 92 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT - 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 75 * 19 col0 FROM tab0 GROUP BY tab0.col0
----
1425
1425
1425

query I rowsort
SELECT + 57 + + tab1.col1 * col1 FROM tab1 GROUP BY tab1.col1
----
1993
3306
93

query I rowsort
SELECT 68 FROM tab2 GROUP BY tab2.col1
----
68
68
68

query I rowsort
SELECT ALL + ( + cor0.col0 ) * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col1 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
102
115
14

query I rowsort
SELECT - ( 29 ) * + 80 AS col1 FROM tab0 GROUP BY tab0.col2
----
-2320
-2320
-2320

query I rowsort
SELECT - 70 * + 46 FROM tab1 GROUP BY tab1.col2
----
-3220
-3220
-3220

query I rowsort
SELECT ALL ( - tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 20 FROM tab0 GROUP BY tab0.col1
----
20
20

query I rowsort
SELECT - 85 + 49 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT 78 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
78
78
78

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col2 * + 34 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1972
2686
2958

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 - ( - 80 ) * + col1 AS col0 FROM tab0 GROUP BY col1
----
0
6480

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-26
-43
-83

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 ALL + 43 FROM tab2 GROUP BY tab2.col0
----
43
43
43

query I rowsort
SELECT DISTINCT - tab0.col1 + - tab0.col1 FROM tab0 GROUP BY col1
----
-162
0

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + - 77 AS col2 FROM tab2 GROUP BY tab2.col1
----
-77
-77
-77

query I rowsort
SELECT + 29 FROM tab0 cor0 GROUP BY cor0.col2, col1, cor0.col2, cor0.col2
----
29
29
29

query I rowsort
SELECT ALL - 1 * 13 FROM tab2 GROUP BY col2
----
-13
-13
-13

query I rowsort
SELECT ALL 21 AS col1 FROM tab0 GROUP BY tab0.col1
----
21
21

query I rowsort
SELECT - tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + 27 FROM tab1 AS cor0 GROUP BY col0, cor0.col2, cor0.col1
----
27

query I rowsort
SELECT 60 FROM tab2 GROUP BY tab2.col0
----
60
60
60

query I rowsort
SELECT ALL 58 * 18 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
1102
1123
1131

query I rowsort
SELECT - 27 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2214
594
756

query I rowsort
SELECT ALL - 64 FROM tab0 GROUP BY col1
----
-64
-64

query I rowsort
SELECT - cor0.col1 + cor0.col1 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1980
-3306
-42

onlyif mysql # DIV for integer division: 
query I rowsort label-5826
SELECT tab2.col1 DIV 71 col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5826
SELECT tab2.col1 / 71 col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + tab1.col0 * 68 FROM tab1 GROUP BY tab1.col0
----
1496
1904
5576

query I rowsort
SELECT - cor0.col2 - + ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT + 24 FROM tab0 GROUP BY tab0.col1
----
24
24

query I rowsort
SELECT - 46 FROM tab1 GROUP BY tab1.col1
----
-46
-46
-46

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 27 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
2214
594
756

query I rowsort
SELECT DISTINCT tab0.col0 * - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 21 * - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1218
-1659
-1827

query I rowsort
SELECT DISTINCT - 52 * 3 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-156

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 59, + cor0.col2, cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT 21 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT - 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT ALL 33 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-5840
SELECT + + 87 DIV tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
1
1
14

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5840
SELECT + + 87 / tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
1
1
14

query I rowsort
SELECT ALL + 31 AS col0 FROM tab1 GROUP BY tab1.col2
----
31
31
31

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5842
SELECT DISTINCT CAST( NULL AS SIGNED ) - tab0.col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5842
SELECT DISTINCT CAST ( NULL AS INTEGER ) - tab0.col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT DISTINCT - 58 AS col2 FROM tab2 GROUP BY tab2.col0
----
-58

query I rowsort
SELECT ALL - + 93 AS col2 FROM tab0 GROUP BY tab0.col2
----
-93
-93
-93

onlyif mysql # DIV for integer division: 
query I rowsort label-5845
SELECT ALL + 59 DIV - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-9

skipif mysql # not compatible
query I rowsort label-5845
SELECT ALL + 59 / - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-9

query I rowsort
SELECT ALL 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
18
18
18

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT DISTINCT - tab2.col2 - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT - 55 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1320
-2090
-4345

onlyif mysql # DIV for integer division: 
query I rowsort label-5850
SELECT + - 55 - + 38 DIV - 19 FROM tab2 GROUP BY tab2.col2
----
-53
-53
-53

skipif mysql # not compatible
query I rowsort label-5850
SELECT + - 55 - + 38 / - 19 FROM tab2 GROUP BY tab2.col2
----
-53
-53
-53

query I rowsort
SELECT DISTINCT 52 + col2 FROM tab0 cor0 GROUP BY cor0.col2
----
131
76
90

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + + 78 AS col0 FROM tab0 GROUP BY tab0.col0
----
78
78
78

query I rowsort
SELECT ALL - 54 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-54
-54
-54

query I rowsort
SELECT + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL NOT IN ( tab0.col2 )
----

query I rowsort
SELECT cor0.col1 * col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-5857
SELECT DISTINCT - 79 + cor0.col0 DIV - cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-80

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5857
SELECT DISTINCT - 79 + cor0.col0 / - cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-80

query I rowsort
SELECT + 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
65
65
65

query I rowsort
SELECT + - tab2.col2 + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5860
SELECT DISTINCT + 42 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-5860
SELECT DISTINCT + 42 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
1

query I rowsort
SELECT DISTINCT - - 1 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT DISTINCT + - 86 FROM tab0 GROUP BY col2
----
-86

query I rowsort
SELECT ALL - tab1.col1 * 48 FROM tab1 GROUP BY tab1.col1
----
-2112
-2736
-288

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
62
62

query I rowsort
SELECT + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col2 * 25 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2054
624
988

query I rowsort
SELECT - 82 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT ALL cor0.col1 * 82 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
3608
4674
492

query I rowsort
SELECT - 17 FROM tab1 GROUP BY tab1.col2
----
-17
-17
-17

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5870
SELECT + - CAST( NULL AS SIGNED ) * - 79 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5870
SELECT + - CAST ( NULL AS INTEGER ) * - 79 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 * + 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2320
3160
3480

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT DISTINCT - 89 FROM tab1 GROUP BY tab1.col2
----
-89

query I rowsort
SELECT - - 71 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
5751

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
26
43
83

query I rowsort
SELECT + 40 FROM tab2 GROUP BY tab2.col1
----
40
40
40

query I rowsort
SELECT DISTINCT - 51 AS col1 FROM tab1 GROUP BY tab1.col1
----
-51

query I rowsort
SELECT ALL - tab2.col1 * 77 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3157
-4543
-4697

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-12
2
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL tab0.col1 * tab0.col1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( tab0.col1 ) IN ( tab0.col1 )
----

query I rowsort
SELECT - tab2.col2 * - 62 FROM tab2 GROUP BY tab2.col2
----
3596
4898
5394

query I rowsort
SELECT ALL - 51 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-51
-51
-51

query I rowsort
SELECT - 29 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29
-29
-29

query I rowsort
SELECT ( 45 ) AS col1 FROM tab0 GROUP BY col2
----
45
45
45

query I rowsort
SELECT 1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT ALL + - 55 AS col2 FROM tab1 GROUP BY tab1.col2
----
-55
-55
-55

query I rowsort
SELECT ALL 0 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + 74 FROM tab1 GROUP BY tab1.col2
----
74
74
74

query I rowsort
SELECT + - 40 FROM tab1 GROUP BY tab1.col2
----
-40
-40
-40

query I rowsort
SELECT ALL - + 66 AS col1 FROM tab1 GROUP BY tab1.col0
----
-66
-66
-66

query I rowsort
SELECT ALL - tab1.col0 - + 72 AS col2 FROM tab1 GROUP BY tab1.col0
----
-100
-154
-94

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 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - + ( tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - cor0.col0 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-26
-83
38

query I rowsort
SELECT 4 AS col0 FROM tab1 GROUP BY tab1.col0
----
4
4
4

query I rowsort
SELECT 51 AS col1 FROM tab0 GROUP BY tab0.col0
----
51
51
51

query I rowsort
SELECT ALL 32 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
32
32
32

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-58
-79
-87

query I rowsort
SELECT 23 FROM tab0 GROUP BY tab0.col1
----
23
23

query I rowsort
SELECT DISTINCT 65 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
65

query I rowsort
SELECT ALL - - tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - tab0.col0 AS col0 FROM tab0 WHERE ( + tab0.col0 ) IS NULL GROUP BY col0
----

query I rowsort
SELECT ALL 70 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
127
76

query I rowsort
SELECT + col1 + 27 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
68
86
88

query I rowsort
SELECT DISTINCT + tab2.col1 AS col1 FROM tab2 WHERE ( NULL ) NOT IN ( tab2.col1 / tab2.col2 ) GROUP BY tab2.col1
----

query I rowsort
SELECT ALL + tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING tab2.col1 IN ( tab2.col1 )
----
41
59
61

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col1 * 81 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3321
4779
4941

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - 43 AS col2 FROM tab0 GROUP BY tab0.col2
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - + 61 AS col0 FROM tab1 GROUP BY tab1.col2
----
-61

query I rowsort
SELECT - tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT + 44 AS col2 FROM tab2 GROUP BY tab2.col0
----
44
44
44

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 26, cor0.col0 * cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
26

query I rowsort
SELECT - COALESCE ( 68, + 45 - + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-68
-68
-68

query I rowsort
SELECT DISTINCT - 52 + + 43 AS col0 FROM tab2 GROUP BY tab2.col2
----
-9

query I rowsort
SELECT DISTINCT - 87 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-87

query I rowsort
SELECT ALL + 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
23
23

query I rowsort
SELECT DISTINCT 99 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
99

query I rowsort
SELECT ALL - 96 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0 HAVING + col0 IS NOT NULL
----
484
6724
784

query I rowsort
SELECT - tab0.col1 FROM tab0 WHERE NULL <= - tab0.col0 GROUP BY col1 HAVING NULL >= + tab0.col1
----

query I rowsort
SELECT 67 FROM tab0 AS cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + 98 FROM tab1 GROUP BY tab1.col2
----
98
98
98

onlyif mysql # DIV for integer division: 
query I rowsort label-5930
SELECT col1 DIV - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5930
SELECT col1 / - col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col2 - 57 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1
22
30

query I rowsort
SELECT - cor0.col0 * - ( + col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT CASE cor0.col2 WHEN cor0.col2 THEN cor0.col2 ELSE NULL END * - 28 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1624
-2212
-2436

query I rowsort
SELECT 3 + + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
25
31
85

query I rowsort
SELECT DISTINCT - 86 * - 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
7740

query I rowsort
SELECT ( - 87 ) AS col2 FROM tab2 cor0 GROUP BY col1
----
-87
-87
-87

query I rowsort
SELECT NULLIF ( cor0.col1, - cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT + 0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

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.col0
----
24
38
79

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col1
----
15
91
92

query I rowsort
SELECT DISTINCT - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
-41
-59
-61

query I rowsort
SELECT ALL + 81 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
10
36
73

query I rowsort
SELECT DISTINCT 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 ALL - cor0.col2 col0 FROM tab2 cor0 GROUP BY col1, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - + ( 27 ) + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
31
52
60

query I rowsort
SELECT DISTINCT - cor0.col0 * - 81 FROM tab1 AS cor0 GROUP BY col0
----
1782
2268
6642

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5949
SELECT cor0.col0 / CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5949
SELECT cor0.col0 / CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 36 AS col0 FROM tab2 GROUP BY tab2.col1
----
-36
-36
-36

query I rowsort
SELECT + tab2.col2 - - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL + 34 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

query I rowsort
SELECT DISTINCT tab2.col0 * 39 - col0 FROM tab2 GROUP BY tab2.col0
----
3458
3496
570

query I rowsort
SELECT + tab2.col0 * + tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - col0 - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1 HAVING ( NULL ) IS NULL
----
44
57
6

query I rowsort
SELECT ALL tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

onlyif mysql # DIV for integer division: 
query I rowsort label-5960
SELECT - + COALESCE ( + 47, - tab1.col0 DIV 28 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
-47
-47
-47

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5960
SELECT - + COALESCE ( + 47, - tab1.col0 / 28 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
-47
-47
-47

query I rowsort
SELECT ALL cor0.col0 + - col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-29
16
38

query I rowsort
SELECT cor0.col1 - cor0.col0 * + 58 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
-1508
-2413
-4814

query I rowsort
SELECT - 49 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1078
-1372
-4018

query I rowsort
SELECT DISTINCT 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT 93 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4185
6603
744

query I rowsort
SELECT DISTINCT - 0 * 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5968
SELECT CAST( - 47 AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-47
-47
-47

skipif mysql # not compatible
query I rowsort label-5968
SELECT CAST ( - 47 AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-47
-47
-47

query I rowsort
SELECT - - 14 FROM tab1 GROUP BY tab1.col1
----
14
14
14

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
34
34

query I rowsort
SELECT + + 38 + + col0 FROM tab2 GROUP BY tab2.col0
----
129
130
53

query I rowsort
SELECT + 24 AS col2 FROM tab2 GROUP BY tab2.col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-5974
SELECT DISTINCT col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-5974
SELECT DISTINCT col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT - tab2.col0 AS col2 FROM tab2 WHERE + tab2.col2 + - tab2.col0 IS NOT NULL GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 55 FROM tab0 GROUP BY tab0.col2
----
-55
-55
-55

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 58 * - 57 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3306
-3306
-3306

query I rowsort
SELECT 91 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 23 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 * 70 col0 FROM tab0 GROUP BY tab0.col1
----
-5670
0

query I rowsort
SELECT 47 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
47
47
47

query I rowsort
SELECT DISTINCT + 38 AS col2 FROM tab0 GROUP BY tab0.col0
----
38

query I rowsort
SELECT DISTINCT - ( + 16 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-16

query I rowsort
SELECT ALL col0 - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-38
26
83

query I rowsort
SELECT cor0.col0 * 52 + cor0.col0 * + 69 FROM tab2 AS cor0 GROUP BY cor0.col0
----
11011
11132
1815

query I rowsort
SELECT DISTINCT - 8 * + 5 FROM tab0 cor0 GROUP BY col0
----
-40

query I rowsort
SELECT ALL cor0.col0 * 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1394
374
476

query I rowsort
SELECT 63 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
63
63
63

query I rowsort
SELECT + 63 + - ( cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-20
20
37

query I rowsort
SELECT DISTINCT 99 FROM tab2 AS cor0 GROUP BY cor0.col0
----
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1032
-2054
-3154

query I rowsort
SELECT ALL 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 DISTINCT - cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5997
SELECT - tab2.col0 + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5997
SELECT - tab2.col0 + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT + - 69 FROM tab2 GROUP BY tab2.col0
----
-69
-69
-69

query I rowsort
SELECT - NULLIF ( 41, col2 ) FROM tab1 GROUP BY tab1.col2
----
-41
-41
-41

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 96, cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT - 46 FROM tab0 GROUP BY tab0.col0
----
-46
-46
-46

query I rowsort
SELECT ALL - 9 FROM tab1 GROUP BY tab1.col2
----
-9
-9
-9

query I rowsort
SELECT ALL + 73 AS col0 FROM tab0 cor0 GROUP BY col2
----
73
73
73

query I rowsort
SELECT DISTINCT 53 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2385
3763
424

query I rowsort
SELECT DISTINCT - 40 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-40

query I rowsort
SELECT - cor0.col1 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, col1
----
132
1596
3608

query I rowsort
SELECT ALL + - 60 FROM tab0 GROUP BY tab0.col2
----
-60
-60
-60

query I rowsort
SELECT cor0.col0 * 37 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
3367
3404
555

query I rowsort
SELECT DISTINCT - 15 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-15

onlyif mysql # DIV for integer division: 
query I rowsort label-6011
SELECT + cor0.col1 DIV cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6011
SELECT + cor0.col1 / cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
1
1
1

query I rowsort
SELECT + 72 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT - 34 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-34

query I rowsort
SELECT ( + col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col0 - - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 29 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
1305
2059
232

query I rowsort
SELECT DISTINCT + 97 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
5
6
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 87 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
87

query I rowsort
SELECT - 78 FROM tab0 GROUP BY tab0.col2
----
-78
-78
-78

onlyif mysql # DIV for integer division: 
query I rowsort label-6021
SELECT - cor0.col2 DIV col2 + + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
7
70

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6021
SELECT - cor0.col2 / col2 + + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44
7
70

query I rowsort
SELECT DISTINCT - 34 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-34

query I rowsort
SELECT DISTINCT 45 + + 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
48

query I rowsort
SELECT + 54 AS col0 FROM tab2 GROUP BY tab2.col0
----
54
54
54

query I rowsort
SELECT DISTINCT - 42 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-42

query I rowsort
SELECT DISTINCT - - tab0.col1 + - 4 AS col0 FROM tab0 GROUP BY tab0.col1
----
-4
77

query I rowsort
SELECT - 3 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - 13 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
-13

onlyif mysql # DIV for integer division: 
query I rowsort label-6029
SELECT ALL + cor0.col1 DIV 79 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6029
SELECT ALL + cor0.col1 / 79 AS col1 FROM tab2 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
----
166
52
86

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-6031
SELECT CAST( + 88 AS SIGNED ) DIV + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14
2

skipif mysql # not compatible
query I rowsort label-6031
SELECT CAST ( + 88 AS INTEGER ) / + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14
2

query I rowsort
SELECT ALL + 24 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
24
24
24

query I rowsort
SELECT + 44 FROM tab0 GROUP BY tab0.col2
----
44
44
44

query I rowsort
SELECT - 22 AS col2 FROM tab2 GROUP BY tab2.col0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT - col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-164
-44
-56

query I rowsort
SELECT + + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 29 * tab1.col0 FROM tab1 GROUP BY col0
----
2378
638
812

query I rowsort
SELECT - 76 AS col1 FROM tab2 GROUP BY tab2.col1
----
-76
-76
-76

query I rowsort
SELECT - 50 FROM tab0 GROUP BY tab0.col1
----
-50
-50

query I rowsort
SELECT DISTINCT tab1.col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT - + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6043
SELECT cor0.col0 DIV + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6043
SELECT cor0.col0 / + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
2

query I rowsort
SELECT + 99 FROM tab0 cor0 GROUP BY col2
----
99
99
99

query I rowsort
SELECT DISTINCT tab2.col1 FROM tab1 AS cor0 CROSS JOIN tab2 GROUP BY tab2.col1 HAVING NULL IS NULL
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
484
6724
784

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY col0, col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab1 GROUP BY tab1.col0
----
-90

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab1 WHERE + tab1.col2 IS NOT NULL GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col2 * col2 col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - cor0.col1 * 4 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-176
-228
-24

query I rowsort
SELECT ALL 7 * + 39 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col0
----
273
273
273

query I rowsort
SELECT DISTINCT 59 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59

query I rowsort
SELECT ALL 52 FROM tab2 cor0 GROUP BY cor0.col0
----
52
52
52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6057
SELECT + col0 / CAST( NULL AS SIGNED ) + 88 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6057
SELECT + col0 / CAST ( NULL AS INTEGER ) + 88 AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 11 FROM tab0 GROUP BY tab0.col0
----
-11
-11
-11

query I rowsort
SELECT + 2 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-6060
SELECT ALL + 33 DIV tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-6060
SELECT ALL + 33 / tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6061
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6061
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 45 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2610
-3555
-3915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - ( - 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 ALL 56 col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
56
56
56

query I rowsort
SELECT + cor0.col1 * - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5
-5

query I rowsort
SELECT + 85 * 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
8075
8075
8075

query I rowsort
SELECT 12 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 29 col0 FROM tab0 GROUP BY tab0.col1
----
29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6071
SELECT cor0.col2 + cor0.col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6071
SELECT cor0.col2 + cor0.col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6072
SELECT ALL + 11 + - cor1.col2 * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6072
SELECT ALL + 11 + - cor1.col2 * CAST ( NULL AS REAL ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
162

query I rowsort
SELECT + tab1.col0 FROM tab1 WHERE NULL IN ( - tab1.col2 / tab1.col1 + tab1.col2 * - tab1.col1 ) GROUP BY tab1.col0
----

query I rowsort
SELECT + tab0.col2 FROM tab0 WHERE col0 = ( NULL ) GROUP BY tab0.col2
----

query I rowsort
SELECT ALL tab0.col2 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - CASE 1 WHEN tab1.col1 * + 75 THEN NULL ELSE 53 END col2 FROM tab1 GROUP BY tab1.col1
----
-53
-53
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 col2 FROM tab1 GROUP BY tab1.col0
----
48
48
48

query I rowsort
SELECT DISTINCT + + 62 AS col0 FROM tab1 GROUP BY tab1.col1
----
62

query I rowsort
SELECT DISTINCT + 19 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
19

query I rowsort
SELECT + 14 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-6083
SELECT DISTINCT cor0.col0 DIV 53 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-6083
SELECT DISTINCT cor0.col0 / 53 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 col2 FROM tab1 GROUP BY col1
----
44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6085
SELECT ALL + CAST( tab1.col1 AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-6085
SELECT ALL + CAST ( tab1.col1 AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( - 73, tab2.col2 ) FROM tab2 GROUP BY tab2.col1
----
73
73
73

query I rowsort
SELECT ALL tab1.col1 * - 14 FROM tab1 GROUP BY tab1.col1
----
-616
-798
-84

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col1, cor1.col2
----
45
71
8

query I rowsort
SELECT ( - cor0.col1 ) FROM tab2 cor0 GROUP BY col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 5 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
110
140
410

query I rowsort
SELECT - 18 FROM tab1 GROUP BY tab1.col2
----
-18
-18
-18

query I rowsort
SELECT + tab1.col2 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL - tab2.col1 + 53 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
2132
3068
3172

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 35 AS col0 FROM tab0 GROUP BY tab0.col1
----
35

onlyif mysql # DIV for integer division: 
query I rowsort label-6097
SELECT cor0.col1 DIV 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-6097
SELECT cor0.col1 / 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT ( + 53 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
53

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( - 8, tab1.col1 ) FROM tab1 GROUP BY tab1.col2
----
8
8
8

query I rowsort
SELECT 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT - ( col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 95 FROM tab1 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT + + 33 FROM tab0 GROUP BY tab0.col1
----
33
33

query I rowsort
SELECT - col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
51

query I rowsort
SELECT - + 60 FROM tab0 GROUP BY tab0.col0
----
-60
-60
-60

query I rowsort
SELECT - 89 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-89
-89
-89

query I rowsort
SELECT 78 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT DISTINCT - 43 FROM tab2 cor0 GROUP BY cor0.col1
----
-43

query I rowsort
SELECT DISTINCT + tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL - col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT COALESCE ( col2, + cor0.col2 ) + col2 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT + 56 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
56
56
56

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT tab2.col1 IS NULL
----
41
59
61

query I rowsort
SELECT + - 3 FROM tab1 GROUP BY col2
----
-3
-3
-3

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.col0 + + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT - 93 FROM tab1 GROUP BY col0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT + 56 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
135
80
94

query I rowsort
SELECT - 30 + 70 FROM tab0 cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT ALL - 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-94
-94
-94

query I rowsort
SELECT 90 + - 11 AS col1 FROM tab1 GROUP BY tab1.col2
----
79
79
79

query I rowsort
SELECT 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT 83 AS col1 FROM tab2 cor0 GROUP BY col2
----
83
83
83

query I rowsort
SELECT - 64 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-64
-64
-64

query I rowsort
SELECT 87 FROM tab1 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT ALL + NULLIF ( + cor0.col1, + cor0.col1 ) + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 91 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT 94 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5452
7426
8178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab2 cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 71 * + 78 AS col1 FROM tab2 GROUP BY tab2.col1
----
5538

query I rowsort
SELECT 66 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT + col2 FROM tab0 GROUP BY tab0.col2 HAVING NOT ( NULL ) IS NOT NULL
----
24
38
79

query I rowsort
SELECT DISTINCT + + 29 FROM tab1 GROUP BY tab1.col1
----
29

query I rowsort
SELECT ALL 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
77
77
77

query I rowsort
SELECT DISTINCT + - 72 FROM tab2 GROUP BY col2
----
-72

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6141
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6141
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-6142
SELECT - 57 DIV - 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6142
SELECT - 57 / - 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col2, cor1.col2
----
15
91
92

query I rowsort
SELECT DISTINCT + 49 FROM tab2 GROUP BY tab2.col0
----
49

query I rowsort
SELECT DISTINCT - 94 FROM tab1 GROUP BY tab1.col0
----
-94

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6146
SELECT CAST( NULL AS DECIMAL ) FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6146
SELECT CAST ( NULL AS REAL ) FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - 95 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-95
-95
-95

query I rowsort
SELECT - 56 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-56
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 + - cor0.col0 * 44 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1156
-3532
-892

query I rowsort
SELECT DISTINCT + 86 FROM tab2 GROUP BY col0
----
86

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT ( 85 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT ALL - + tab1.col1 * - 6 FROM tab1 GROUP BY col1
----
264
342
36

query I rowsort
SELECT DISTINCT - 60 FROM tab0 cor0 GROUP BY cor0.col2
----
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 32 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
32
32

query I rowsort
SELECT ALL col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
114
12
88

query I rowsort
SELECT ALL 52 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT DISTINCT - 46 + - 43 AS col1 FROM tab2 GROUP BY tab2.col1
----
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT - col2 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT ALL 85 * - 92 AS col0 FROM tab0 GROUP BY col2
----
-7820
-7820
-7820

query I rowsort
SELECT 25 * + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
2050
550
700

query I rowsort
SELECT - cor0.col0 - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-182
-184
-30

query I rowsort
SELECT cor0.col0 - 68 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-53
23
24

query I rowsort
SELECT - 30 AS col2 FROM tab2 GROUP BY tab2.col0
----
-30
-30
-30

query I rowsort
SELECT + tab2.col0 + 74 FROM tab2 GROUP BY tab2.col0
----
165
166
89

query I rowsort
SELECT - tab2.col0 * + 24 AS col2 FROM tab2 GROUP BY tab2.col0
----
-2184
-2208
-360

query I rowsort
SELECT cor0.col2 * cor0.col2 + - 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1998
37
5014

query I rowsort
SELECT - 14 FROM tab0 GROUP BY col1
----
-14
-14

query I rowsort
SELECT DISTINCT 51 - 4 FROM tab0 GROUP BY tab0.col2
----
47

query I rowsort
SELECT ALL - tab2.col1 * - 50 FROM tab2 GROUP BY col1
----
2050
2950
3050

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL col1 FROM tab2 WHERE NOT ( tab2.col0 / col0 ) IS NULL GROUP BY tab2.col1 HAVING NOT + tab2.col1 > NULL
----

query I rowsort
SELECT ALL tab0.col0 FROM tab0 WHERE NOT ( NULL ) IS NOT NULL GROUP BY tab0.col0 HAVING + tab0.col0 < ( NULL )
----

query I rowsort
SELECT DISTINCT - cor0.col2 * + 14 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-112
-630
-994

query I rowsort
SELECT - + tab2.col0 + + tab2.col0 * ( + 89 ) FROM tab2 GROUP BY tab2.col0
----
1320
8008
8096

query I rowsort
SELECT DISTINCT - 14 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1148
-308
-392

query I rowsort
SELECT DISTINCT + + 77 AS col1 FROM tab0 GROUP BY tab0.col1
----
77

query I rowsort
SELECT DISTINCT + 81 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
81

query I rowsort
SELECT - 44 - 75 AS col2 FROM tab0 GROUP BY tab0.col2
----
-119
-119
-119

query I rowsort
SELECT DISTINCT - tab1.col2 * 90 AS col2 FROM tab1 GROUP BY tab1.col2
----
-4050
-6390
-720

query I rowsort
SELECT ALL - + 98 AS col2 FROM tab1 GROUP BY tab1.col1
----
-98
-98
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-6186
SELECT ALL + + tab1.col1 DIV col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6186
SELECT ALL + + tab1.col1 / col1 FROM tab1 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT - 90 FROM tab2 GROUP BY tab2.col1
----
-90
-90
-90

query I rowsort
SELECT + + 71 AS col2 FROM tab1 GROUP BY tab1.col1
----
71
71
71

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT 52 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
110
131
139

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-50
-50
-50

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT - cor0.col1 * cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

query I rowsort
SELECT ALL + tab1.col0 * 31 AS col1 FROM tab1 GROUP BY col0
----
2542
682
868

query I rowsort
SELECT 68 + - ( + cor0.col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-14
40
46

query I rowsort
SELECT + - 75 AS col1 FROM tab0 GROUP BY tab0.col1
----
-75
-75

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 56, - tab2.col2, tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
56
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-6198
SELECT + tab1.col1 DIV tab1.col1 + + 86 FROM tab1 GROUP BY col1
----
87
87
87

skipif mysql # not compatible
query I rowsort label-6198
SELECT + tab1.col1 / tab1.col1 + + 86 FROM tab1 GROUP BY col1
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6199
SELECT DISTINCT + ( cor0.col0 ) DIV + 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-6199
SELECT DISTINCT + ( cor0.col0 ) / + 62 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT 60 AS col2 FROM tab1 GROUP BY tab1.col0
----
60
60
60

query I rowsort
SELECT + cor0.col1 * - cor0.col0 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3402
0
0

query I rowsort
SELECT DISTINCT - 96 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-96

query I rowsort
SELECT DISTINCT 8 FROM tab2 GROUP BY tab2.col2
----
8

query I rowsort
SELECT ALL + + 33 + + 18 * + tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
1095
1131
771

query I rowsort
SELECT + 92 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT ALL + tab0.col0 * + col0 FROM tab0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT 20 FROM tab2 cor0 GROUP BY cor0.col0
----
20

query I rowsort
SELECT + cor0.col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT ALL - COALESCE ( - 16, cor0.col2 ) + + cor0.col1 * 52 FROM tab1 AS cor0 GROUP BY col2, col1, cor0.col0
----
2304
2980
328

query I rowsort
SELECT 90 FROM tab1 cor0 GROUP BY cor0.col2, col2
----
90
90
90

query I rowsort
SELECT ALL - 34 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-34
-34
-34

query I rowsort
SELECT DISTINCT 93 FROM tab1 GROUP BY tab1.col2
----
93

query I rowsort
SELECT - 66 AS col1 FROM tab2 GROUP BY tab2.col2
----
-66
-66
-66

query I rowsort
SELECT + tab1.col1 - + tab1.col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1892
-30
-3192

query I rowsort
SELECT + 33 FROM tab1 GROUP BY tab1.col1
----
33
33
33

query I rowsort
SELECT ALL - 87 AS col0 FROM tab1 cor0 GROUP BY col1
----
-87
-87
-87

query I rowsort
SELECT - 12 * cor0.col0 + + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-258
-279
-940

query I rowsort
SELECT + cor0.col0 * + 2 AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
164
44
56

query I rowsort
SELECT - cor0.col2 + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 77 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
122
148
85

query I rowsort
SELECT - 48 FROM tab0 GROUP BY tab0.col0
----
-48
-48
-48

query I rowsort
SELECT DISTINCT - - tab2.col1 + - 39 FROM tab2 GROUP BY tab2.col1
----
2
20
22

query I rowsort
SELECT ALL tab0.col1 - - 79 FROM tab0 GROUP BY tab0.col1
----
160
79

query I rowsort
SELECT + 40 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

query I rowsort
SELECT - col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-6226
SELECT ALL - - ( 19 ) DIV + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6226
SELECT ALL - - ( 19 ) / + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
1

query I rowsort
SELECT cor0.col2 * - 17 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-1343
-408
-646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 73 * - 22 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1606
1606
1606

query I rowsort
SELECT DISTINCT + tab2.col2 * + 2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

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 ( 46 ) FROM tab2 GROUP BY tab2.col1
----
46
46
46

query I rowsort
SELECT ALL 17 * + col1 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1026
108
792

query I rowsort
SELECT ALL 64 AS col0 FROM tab0 GROUP BY tab0.col1
----
64
64

query I rowsort
SELECT ALL 68 FROM tab2 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT DISTINCT - tab0.col2 - ( + 4 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
-28
-42
-83

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + 39 * - tab0.col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
3002
912

query I rowsort
SELECT - cor0.col2 - - cor0.col2 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1305
-184
-5893

query I rowsort
SELECT 80 FROM tab1 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT + 30 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT 78 FROM tab1, tab2 cor0 GROUP BY tab1.col2
----
78
78
78

query I rowsort
SELECT 1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT 59 FROM tab1 AS cor0 GROUP BY col0
----
59
59
59

query I rowsort
SELECT 43 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
43
43
43

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 - 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-30
-30
-30

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 * 46 - - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2726
3713
4089

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-7
-7
-7

query I rowsort
SELECT + 17 * + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
1377

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-6255
SELECT DISTINCT - tab2.col1 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1

skipif mysql # not compatible
query I rowsort label-6255
SELECT DISTINCT - tab2.col1 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1

query I rowsort
SELECT DISTINCT + + tab0.col1 + col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL - 79 * tab0.col2 + 34 FROM tab0 GROUP BY tab0.col2
----
-1862
-2968
-6207

onlyif mysql # DIV for integer division: 
query I rowsort label-6258
SELECT DISTINCT + cor0.col2 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-6258
SELECT DISTINCT + cor0.col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT - 16 FROM tab2 AS cor0 GROUP BY col0
----
-16
-16
-16

onlyif mysql # DIV for integer division: 
query I rowsort label-6260
SELECT - 0 DIV - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6260
SELECT - 0 / - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 57 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-2508
-3249
-342

query I rowsort
SELECT 87 + - cor0.col0 * cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1967
-3067
-945

onlyif mysql # DIV for integer division: 
query I rowsort label-6263
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-6263
SELECT DISTINCT cor0.col2 / + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT tab2.col1 * + tab2.col1 FROM tab2 GROUP BY col1 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 60 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT + cor0.col2 + - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - ( cor0.col0 ) * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT - - 7 FROM tab2 GROUP BY tab2.col1
----
7
7
7

onlyif mysql # DIV for integer division: 
query I rowsort label-6269
SELECT DISTINCT - 5 DIV col2 FROM tab0 GROUP BY tab0.col2
----
0

skipif mysql # not compatible
query I rowsort label-6269
SELECT DISTINCT - 5 / col2 FROM tab0 GROUP BY tab0.col2
----
0

query I rowsort
SELECT 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
51
51
51

query I rowsort
SELECT DISTINCT col2 + + 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
21
58
84

query I rowsort
SELECT 56 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT DISTINCT - + ( + tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT 98 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
98
98
98

query I rowsort
SELECT DISTINCT COALESCE ( 44, + tab2.col0 + + 14 ) FROM tab2 GROUP BY tab2.col0
----
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT 58 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT + - 9 FROM tab0 GROUP BY col1
----
-9
-9

onlyif mysql # DIV for integer division: 
query I rowsort label-6279
SELECT - - 5 DIV - 5 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6279
SELECT - - 5 / - 5 FROM tab2 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT - 51 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
-51
-51

query I rowsort
SELECT + col1 * 28 FROM tab0 cor0 GROUP BY col1
----
0
2268

onlyif mysql # DIV for integer division: 
query I rowsort label-6282
SELECT + cor0.col1 DIV - 12 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3
-4
0

skipif mysql # not compatible
query I rowsort label-6282
SELECT + cor0.col1 / - 12 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3
-4
0

query I rowsort
SELECT - ( tab0.col2 ) FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + 3 * + 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
276
276
276

query I rowsort
SELECT DISTINCT + 70 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1680
2660
5530

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 col2 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
-54
-54
-54

query I rowsort
SELECT - 31 FROM tab1 GROUP BY tab1.col1
----
-31
-31
-31

query I rowsort
SELECT + + 94 AS col2 FROM tab1 GROUP BY tab1.col0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 20 col2 FROM tab1 GROUP BY tab1.col0
----
20

query I rowsort
SELECT ALL + - 7 FROM tab1 GROUP BY tab1.col2
----
-7
-7
-7

query I rowsort
SELECT - 31 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - cor0.col1 + + col0 * + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
126
1539
3564

query I rowsort
SELECT ALL - 4 * 88 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-360
-397
-423

query I rowsort
SELECT 66 * 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
4554
4554
4554

query I rowsort
SELECT ( tab0.col2 ) FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab0.col0 + + tab0.col0 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT ALL + 72 + - 36 FROM tab1 GROUP BY tab1.col2
----
36
36
36

query I rowsort
SELECT DISTINCT cor0.col2 - + 79 FROM tab0 AS cor0 GROUP BY col1, col2, cor0.col0
----
-41
-55
0

query I rowsort
SELECT DISTINCT - 84 FROM tab0 GROUP BY tab0.col2
----
-84

query I rowsort
SELECT ALL - ( + cor0.col2 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - 48 * tab1.col2 FROM tab1 GROUP BY col2
----
-2160
-3408
-384

query I rowsort
SELECT + + col0 - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT - + tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + 13 FROM tab0 GROUP BY col2
----
13
13
13

query I rowsort
SELECT ALL - cor0.col0 - + 89 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-115
-132
-172

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6307
SELECT - CAST( NULL AS SIGNED ) + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6307
SELECT - CAST ( NULL AS INTEGER ) + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6309
SELECT ALL + CAST( NULL AS SIGNED ) / - 55 AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6309
SELECT ALL + CAST ( NULL AS INTEGER ) / - 55 AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( 82, tab0.col2, - tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col0
----
82
82
82

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 65 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT DISTINCT - cor0.col0 + 75 FROM tab1 AS cor0 GROUP BY col0
----
-7
47
53

query I rowsort
SELECT ALL 65 AS col1 FROM tab0 GROUP BY col0
----
65
65
65

query I rowsort
SELECT DISTINCT + 39 FROM tab2 AS cor0 GROUP BY cor0.col2
----
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * - 84 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
1260
7644
7728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col2 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-6318
SELECT 6 + - cor0.col2 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5
5
5

skipif mysql # not compatible
query I rowsort label-6318
SELECT 6 + - cor0.col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT 90 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 - 35 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-7

query I rowsort
SELECT 74 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
100
117
157

query I rowsort
SELECT DISTINCT 47 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47

query I rowsort
SELECT ALL - 94 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-94
-94
-94

query I rowsort
SELECT ALL ( + 37 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 91 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-91
-91
-91

query I rowsort
SELECT + + 65 AS col2 FROM tab1 GROUP BY tab1.col1
----
65
65
65

query I rowsort
SELECT + tab2.col0 * tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

query I rowsort
SELECT + tab2.col0 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-6330
SELECT DISTINCT - tab1.col0 DIV - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-6330
SELECT DISTINCT - tab1.col0 / - col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-6331
SELECT ALL + - tab1.col2 DIV + 66 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6331
SELECT ALL + - tab1.col2 / + 66 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1
0
0

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT + 41 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT ALL - NULLIF ( + 52, - 9 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

query I rowsort
SELECT ( - 63 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-63
-63

query I rowsort
SELECT ALL 37 FROM tab1 AS cor0 GROUP BY cor0.col1
----
37
37
37

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 FROM tab0 cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT DISTINCT + 0 AS col0 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT + tab1.col2 - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL - 49 AS col0 FROM tab0 GROUP BY tab0.col1
----
-49
-49

query I rowsort
SELECT ALL 18 FROM tab1 GROUP BY tab1.col1
----
18
18
18

query I rowsort
SELECT ALL + - 60 AS col0 FROM tab0 GROUP BY tab0.col1
----
-60
-60

query I rowsort
SELECT ALL + 84 + 5 * - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-26
-326
-56

query I rowsort
SELECT - 12 FROM tab0 AS cor0 GROUP BY col0
----
-12
-12
-12

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT + ( col0 ) + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-17
11
14

query I rowsort
SELECT + cor0.col2 + + cor0.col2 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
1482
600
6320

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6349
SELECT DISTINCT + CAST( - 47 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-47

skipif mysql # not compatible
query I rowsort label-6349
SELECT DISTINCT + CAST ( - 47 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-47

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT 30 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
30

onlyif mysql # DIV for integer division: 
query I rowsort label-6352
SELECT DISTINCT - tab1.col0 DIV col0 FROM tab1 GROUP BY tab1.col0
----
-1

skipif mysql # not compatible
query I rowsort label-6352
SELECT DISTINCT - tab1.col0 / col0 FROM tab1 GROUP BY tab1.col0
----
-1

query I rowsort
SELECT + tab2.col2 AS col0 FROM tab2 WHERE NOT ( NULL ) IN ( - tab2.col0 + col1 ) GROUP BY tab2.col2
----

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - ( - col0 ) FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT 82 + + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
123
141
143

query I rowsort
SELECT DISTINCT + - 27 AS col1 FROM tab0 GROUP BY tab0.col1
----
-27

query I rowsort
SELECT - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - col2 + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL 29 AS col2 FROM tab1 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT ALL + 16 FROM tab2 GROUP BY tab2.col0
----
16
16
16

query I rowsort
SELECT DISTINCT 88 FROM tab2 GROUP BY tab2.col0
----
88

query I rowsort
SELECT + col0 * 67 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1742
2881
5561

query I rowsort
SELECT DISTINCT 16 AS col1 FROM tab0 GROUP BY tab0.col0
----
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 89 col0 FROM tab0 GROUP BY tab0.col2
----
89

query I rowsort
SELECT DISTINCT + + 60 AS col1 FROM tab2 GROUP BY tab2.col2
----
60

query I rowsort
SELECT ALL + - tab0.col2 + - tab0.col2 FROM tab0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT ( col1 ) * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT - - 87 AS col0 FROM tab1 GROUP BY tab1.col0
----
87

query I rowsort
SELECT - 76 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-76
-76
-76

query I rowsort
SELECT ALL cor0.col2 * - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - 77 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-77
-77
-77

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL - 23 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

query I rowsort
SELECT ALL cor0.col2 * - 99 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-4455
-7029
-792

query I rowsort
SELECT ALL CASE cor0.col2 WHEN - cor0.col0 THEN - cor0.col2 ELSE NULL END / - cor0.col1 + cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + COALESCE ( 17, col2 ) col2 FROM tab0 GROUP BY tab0.col1
----
17
17

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ( 5 ) FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 60 col1 FROM tab0 GROUP BY tab0.col2
----
60
60
60

query I rowsort
SELECT DISTINCT - 32 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
-32

query I rowsort
SELECT DISTINCT - col0 + 10 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
198
252
738

query I rowsort
SELECT DISTINCT + 14 AS col1 FROM tab2 GROUP BY tab2.col0
----
14

query I rowsort
SELECT 26 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col1, cor0.col1
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col1 + - 3 FROM tab0 AS cor0 GROUP BY col1
----
-3
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6388
SELECT - CAST( NULL AS SIGNED ) * 95 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6388
SELECT - CAST ( NULL AS INTEGER ) * 95 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL cor0.col0 + NULLIF ( cor0.col0, cor0.col0 * 59 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 74 - - 54 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
4346
5900
6492

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 cor0 GROUP BY col1, cor0.col2, cor0.col0
----
0
0
81

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-6395
SELECT ALL + 48 DIV - 46 FROM tab0 GROUP BY col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6395
SELECT ALL + 48 / - 46 FROM tab0 GROUP BY col2
----
-1
-1
-1

query I rowsort
SELECT ALL + - tab2.col2 + - col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT DISTINCT + 77 AS col2 FROM tab1 GROUP BY tab1.col2
----
77

query I rowsort
SELECT DISTINCT cor0.col1 * 45 + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
2024
2622
276

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 61 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
61
61
61

query I rowsort
SELECT cor0.col2 + + 80 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2159
3464
6678

query I rowsort
SELECT - + ( - tab1.col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT cor0.col0 - + cor0.col0 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3440
26
83

query I rowsort
SELECT - cor0.col2 - + 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-68
-89
-97

query I rowsort
SELECT ALL tab0.col0 + tab0.col0 * + 65 FROM tab0 GROUP BY tab0.col0
----
1716
2838
5478

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + + tab0.col1 - 91 * col1 FROM tab0 GROUP BY col1
----
-7290
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col0 * + tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - tab0.col2 + - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-158
-48
-76

query I rowsort
SELECT - col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - tab2.col0 * - 54 FROM tab2 GROUP BY tab2.col0
----
4914
4968
810

query I rowsort
SELECT ALL - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-6414
SELECT ALL - 98 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-6414
SELECT ALL - 98 / - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
1
3
4

query I rowsort
SELECT + col2 + cor0.col0 * 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1093
1701
3275

onlyif mysql # DIV for integer division: 
query I rowsort label-6416
SELECT ALL - 3 DIV - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-6416
SELECT ALL - 3 / - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + tab1.col0 * + col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
462
6642
756

query I rowsort
SELECT - 19 + + 93 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
74
74
74

query I rowsort
SELECT DISTINCT 69 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
69

query I rowsort
SELECT ALL 89 FROM tab1 AS cor0 GROUP BY col1, cor0.col2, cor0.col0
----
89
89
89

query I rowsort
SELECT cor0.col2 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + + tab0.col0 + - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT col0 + - col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 15 AS col1 FROM tab0 GROUP BY tab0.col1
----
-15

query I rowsort
SELECT DISTINCT + 6 FROM tab1 GROUP BY tab1.col1
----
6

query I rowsort
SELECT + 94 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
94
94
94

query I rowsort
SELECT DISTINCT 21 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
112
113
36

query I rowsort
SELECT + - 18 FROM tab1 GROUP BY tab1.col1
----
-18
-18
-18

query I rowsort
SELECT - cor0.col0 + - cor0.col2 AS col2 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 ALL tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - 67 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-67
-67
-67

query I rowsort
SELECT + 35 * 67 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2345
2345
2345

query I rowsort
SELECT col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + + tab0.col1 + + 42 FROM tab0 GROUP BY tab0.col1
----
123
42

onlyif mysql # DIV for integer division: 
query I rowsort label-6436
SELECT DISTINCT 28 DIV + cor0.col1 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
0
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6436
SELECT DISTINCT 28 / + cor0.col1 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
0
4

onlyif mysql # DIV for integer division: 
query I rowsort label-6437
SELECT DISTINCT + + tab1.col0 DIV tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1

skipif mysql # not compatible
query I rowsort label-6437
SELECT DISTINCT + + tab1.col0 / tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT 21 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
21
21
21

query I rowsort
SELECT DISTINCT + 62 * + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
2542
3658
3782

query I rowsort
SELECT + tab2.col1 * - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT DISTINCT - tab1.col1 / tab1.col1 AS col1 FROM tab1 GROUP BY col1 HAVING NOT NULL < NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-6443
SELECT col1 DIV - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6443
SELECT col1 / - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT ALL 55 AS col2 FROM tab0 GROUP BY tab0.col2
----
55
55
55

query I rowsort
SELECT ALL + 15 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
15
15

query I rowsort
SELECT + cor0.col1 * cor0.col0 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, col0
----
154
1624
3690

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 cor0 GROUP BY col0, col2
----
-15
-91
-92

query I rowsort
SELECT ALL 9 FROM tab2 GROUP BY tab2.col1
----
9
9
9

query I rowsort
SELECT ALL + tab0.col1 * - col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - 97 + 64 FROM tab2 GROUP BY tab2.col2
----
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6452
SELECT + CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6452
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 95 + + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
136
154
156

query I rowsort
SELECT DISTINCT - + 22 AS col0 FROM tab1 GROUP BY tab1.col1
----
-22

query I rowsort
SELECT DISTINCT - col2 + tab0.col2 FROM tab0 GROUP BY col2
----
0

query I rowsort
SELECT 40 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
40
40
40

onlyif mysql # DIV for integer division: 
query I rowsort label-6457
SELECT DISTINCT cor0.col0 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-6457
SELECT DISTINCT cor0.col0 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
1

query I rowsort
SELECT 95 * 62 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5890
5890
5890

query I rowsort
SELECT DISTINCT - + 96 FROM tab0 GROUP BY tab0.col0
----
-96

query I rowsort
SELECT + 53 FROM tab0 GROUP BY tab0.col1
----
53
53

query I rowsort
SELECT cor0.col2 - - cor0.col2 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3306
-6162
-7482

query I rowsort
SELECT + col2 * + 17 AS col2 FROM tab0 GROUP BY tab0.col2
----
1343
408
646

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6463
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6463
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT + - 83 * 17 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1411
-1411
-1411

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT + 46 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-6467
SELECT DISTINCT - 37 DIV + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-6467
SELECT DISTINCT - 37 / + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6468
SELECT DISTINCT cor0.col0 DIV - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-6468
SELECT DISTINCT cor0.col0 / - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT DISTINCT 51 FROM tab0 GROUP BY tab0.col0
----
51

query I rowsort
SELECT DISTINCT - 97 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-10
-18
-39

query I rowsort
SELECT DISTINCT 28 + cor0.col1 * + 34 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
2782
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 17 col0 FROM tab2 GROUP BY tab2.col2
----
-17

query I rowsort
SELECT ALL + 27 AS col2 FROM tab1 GROUP BY tab1.col2
----
27
27
27

query I rowsort
SELECT DISTINCT + 9 FROM tab1 GROUP BY tab1.col2
----
9

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
26
43
83

query I rowsort
SELECT + cor0.col2 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT 2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2
2
2

query I rowsort
SELECT ALL ( 72 ) FROM tab0 GROUP BY tab0.col0
----
72
72
72

query I rowsort
SELECT + 87 AS col2 FROM tab0 GROUP BY tab0.col0
----
87
87
87

query I rowsort
SELECT col2 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT + tab0.col2 FROM tab0 WHERE + tab0.col2 / col1 IS NOT NULL GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL - 54 FROM tab1 cor0 GROUP BY col0
----
-54
-54
-54

query I rowsort
SELECT ALL col2 * 44 FROM tab1 GROUP BY tab1.col2
----
1980
3124
352

query I rowsort
SELECT DISTINCT + 1 FROM tab1 cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT + ( cor0.col0 ) + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT - tab0.col1 * col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT - + tab2.col1 + 48 FROM tab2 GROUP BY tab2.col1
----
-11
-13
7

query I rowsort
SELECT DISTINCT cor0.col1 * - 84 + col1 FROM tab1 AS cor0 GROUP BY col1
----
-3652
-4731
-498

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
45
71
8

query I rowsort
SELECT + 87 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT ALL + cor0.col1 * 56 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2464
3192
336

query I rowsort
SELECT 49 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
133
150
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 92 col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
92
92
92

query I rowsort
SELECT DISTINCT - - 70 FROM tab2 GROUP BY tab2.col0
----
70

query I rowsort
SELECT DISTINCT col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20

onlyif mysql # DIV for integer division: 
query I rowsort label-6500
SELECT DISTINCT cor0.col2 + - col2 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
44
71
8

skipif mysql # not compatible
query I rowsort label-6500
SELECT DISTINCT cor0.col2 + - col2 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
44
71
8

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 80 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
80
80
80

query I rowsort
SELECT DISTINCT tab1.col0 * tab1.col0 + + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
13448
1568
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab2.col0 + + tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL - col2 * + tab2.col2 - 31 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3395
-6272
-7600

query I rowsort
SELECT + 79 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT DISTINCT 53 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
53

query I rowsort
SELECT cor0.col2 + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT + 61 * + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1342
1708
5002

query I rowsort
SELECT DISTINCT + tab1.col0 * 5 AS col1 FROM tab1 GROUP BY tab1.col0
----
110
140
410

query I rowsort
SELECT cor0.col0 + + cor0.col0 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
1320
5428
7280

query I rowsort
SELECT tab2.col2 + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + cor0.col0 * + 65 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1664
2752
5312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT 11 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11

query I rowsort
SELECT DISTINCT + + tab0.col1 + 15 AS col0 FROM tab0 GROUP BY col1
----
15
96

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
85

query I rowsort
SELECT + ( 58 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT - + NULLIF ( + 21, + col2 ) * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1491
168
945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + cor0.col0 * 22 col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
2093
2116
345

query I rowsort
SELECT 36 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
36
36

query I rowsort
SELECT DISTINCT - + 76 FROM tab0 GROUP BY tab0.col0
----
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col1 FROM tab2 GROUP BY tab2.col0
----
27
27
27

query I rowsort
SELECT - - 61 - tab1.col2 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-1964
-3
-4980

query I rowsort
SELECT - - tab0.col0 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT ALL 70 FROM tab0 GROUP BY tab0.col2
----
70
70
70

query I rowsort
SELECT ALL + 18 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
42
56
97

query I rowsort
SELECT + 84 FROM tab1 AS cor0 GROUP BY col1
----
84
84
84

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 24 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
24
24
24

query I rowsort
SELECT + 48 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
48
48
48

query I rowsort
SELECT 43 FROM tab1 GROUP BY tab1.col0
----
43
43
43

query I rowsort
SELECT 86 FROM tab0 GROUP BY tab0.col1
----
86
86

query I rowsort
SELECT - 49 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-23
-6
34

query I rowsort
SELECT 38 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
38
38
38

query I rowsort
SELECT - 33 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-33
-33
-33

query I rowsort
SELECT + 39 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
39
39
39

onlyif mysql # DIV for integer division: 
query I rowsort label-6542
SELECT ALL - 45 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-6542
SELECT ALL - 45 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
3

query I rowsort
SELECT + col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
3364
6241
7569

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT - 56 * tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-1456
-2408
-4648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 col2 FROM tab0 GROUP BY tab0.col2
----
96
96
96

query I rowsort
SELECT + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING NULL > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 * + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
3526
83

query I rowsort
SELECT DISTINCT - + ( 56 ) AS col1 FROM tab1 GROUP BY tab1.col0
----
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + ( + 34 ) - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-47
34

query I rowsort
SELECT - ( + 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 DISTINCT - 3 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3

query I rowsort
SELECT + 96 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
96
96
96

onlyif mysql # DIV for integer division: 
query I rowsort label-6556
SELECT 40 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
5

skipif mysql # not compatible
query I rowsort label-6556
SELECT 40 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
5

query I rowsort
SELECT ALL - - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - tab2.col2 + - 0 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-6559
SELECT ALL COALESCE ( - 43, tab0.col0 * + tab0.col0 + ( + tab0.col1 ) * tab0.col1, CASE tab0.col0 WHEN tab0.col0 THEN tab0.col0 * + tab0.col2 WHEN tab0.col0 * tab0.col1 THEN NULL WHEN + col1 + col1 THEN - tab0.col0 DIV - tab0.col1 + + tab0.col1 ELSE col1 END ) FROM tab0 GROUP BY tab0.col1
----
-43
-43

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-6559
SELECT ALL COALESCE ( - 43, tab0.col0 * + tab0.col0 + ( + tab0.col1 ) * tab0.col1, CASE tab0.col0 WHEN tab0.col0 THEN tab0.col0 * + tab0.col2 WHEN tab0.col0 * tab0.col1 THEN NULL WHEN + col1 + col1 THEN - tab0.col0 / - tab0.col1 + + tab0.col1 ELSE col1 END ) FROM tab0 GROUP BY tab0.col1
----
-43
-43

query I rowsort
SELECT - 63 FROM tab2 GROUP BY tab2.col1
----
-63
-63
-63

query I rowsort
SELECT DISTINCT 33 * + tab1.col2 FROM tab1 GROUP BY col2
----
1485
2343
264

query I rowsort
SELECT - 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-24
-24
-24

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
-15
-91
-92

query I rowsort
SELECT cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT - 88 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5104
6952
7656

query I rowsort
SELECT cor0.col1 * col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - col1 AS col2 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT - tab0.col2 AS col2 FROM tab0 GROUP BY col2 HAVING NULL IS NULL
----
-24
-38
-79

query I rowsort
SELECT - 50 AS col0 FROM tab1 GROUP BY col2
----
-50
-50
-50

query I rowsort
SELECT DISTINCT tab2.col1 + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT + 10 + + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
34
48
89

query I rowsort
SELECT CASE - cor0.col0 WHEN cor0.col1 * + cor0.col0 THEN NULL ELSE + col0 + + cor0.col1 END * cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
1140
12236
13650

query I rowsort
SELECT DISTINCT tab1.col0 - + 42 AS col1 FROM tab1 GROUP BY tab1.col0
----
-14
-20
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-52
-52
-52

onlyif mysql # DIV for integer division: 
query I rowsort label-6577
SELECT ALL - + tab2.col1 + tab2.col1 DIV 19 FROM tab2 GROUP BY tab2.col1
----
-39
-56
-58

skipif mysql # not compatible
query I rowsort label-6577
SELECT ALL - + tab2.col1 + tab2.col1 / 19 FROM tab2 GROUP BY tab2.col1
----
-39
-56
-58

onlyif mysql # DIV for integer division: 
query I rowsort label-6578
SELECT + tab1.col2 DIV + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6578
SELECT + tab1.col2 / + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT + + 23 FROM tab0 GROUP BY tab0.col2
----
23
23
23

query I rowsort
SELECT - 40 FROM tab1 GROUP BY col1
----
-40
-40
-40

query I rowsort
SELECT - tab0.col1 * tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT ALL 5 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT tab2.col1 * + 40 AS col1 FROM tab2 GROUP BY tab2.col1
----
1640
2360
2440

query I rowsort
SELECT - cor0.col1 + 72 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
28
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 4 col0 FROM tab1 GROUP BY tab1.col1
----
-4
-4
-4

query I rowsort
SELECT + 34 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
34
34

query I rowsort
SELECT tab0.col0 * ( tab0.col0 * - tab0.col0 ) AS col2 FROM tab0 GROUP BY col0
----
-17576
-571787
-79507

query I rowsort
SELECT - + 31 - 78 AS col1 FROM tab1 GROUP BY tab1.col1
----
-109
-109
-109

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 col0 FROM tab2 AS cor0 GROUP BY col2
----
-2
-2
-2

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, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 86 FROM tab0 GROUP BY tab0.col0
----
86

query I rowsort
SELECT ALL + 33 AS col0 FROM tab2 GROUP BY tab2.col2
----
33
33
33

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6593
SELECT - - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6593
SELECT - - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 55 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
114
116
96

query I rowsort
SELECT ALL 31 * + 25 FROM tab0 cor0 GROUP BY cor0.col2
----
775
775
775

query I rowsort
SELECT 84 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
84
84
84

query I rowsort
SELECT ( + 6 ) AS col0 FROM tab1 GROUP BY col2
----
6
6
6

query I rowsort
SELECT + 2 FROM tab2 GROUP BY tab2.col0
----
2
2
2

query I rowsort
SELECT 61 FROM tab0 AS cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT + 6 AS col0 FROM tab2 GROUP BY tab2.col1
----
6
6
6

query I rowsort
SELECT + 16 AS col2 FROM tab2 GROUP BY tab2.col2
----
16
16
16

query I rowsort
SELECT - 23 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-1035
-1633
-184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 * - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1215
1917
216

query I rowsort
SELECT + 94 AS col0 FROM tab2 GROUP BY tab2.col2
----
94
94
94

query I rowsort
SELECT ALL 28 * - 60 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1680
-1680
-1680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 29 * + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1305
2059
232

query I rowsort
SELECT 88 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT ALL cor0.col0 + 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
130
70
76

query I rowsort
SELECT DISTINCT + 52 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-29
52

query I rowsort
SELECT DISTINCT 64 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
105
123
125

onlyif mysql # DIV for integer division: 
query I rowsort label-6611
SELECT ALL - cor0.col0 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6611
SELECT ALL - cor0.col0 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-2
0

query I rowsort
SELECT DISTINCT + 20 AS col2 FROM tab2 GROUP BY tab2.col1
----
20

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col1 FROM tab2 GROUP BY col2
----
47
47
47

query I rowsort
SELECT ALL 24 FROM tab2 GROUP BY tab2.col1
----
24
24
24

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT tab0.col0 * + 45 AS col2 FROM tab0 GROUP BY tab0.col0
----
1170
1935
3735

query I rowsort
SELECT - 88 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-6621
SELECT ALL 88 DIV - 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6621
SELECT ALL 88 / - 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6622
SELECT - CAST( + 51 AS SIGNED ) FROM tab0 GROUP BY tab0.col1
----
-51
-51

skipif mysql # not compatible
query I rowsort label-6622
SELECT - CAST ( + 51 AS INTEGER ) FROM tab0 GROUP BY tab0.col1
----
-51
-51

query I rowsort
SELECT - col0 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - 86 * cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-1892
-2408
-7052

query I rowsort
SELECT - tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL + ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-6627
SELECT 44 DIV 27 AS col0 FROM tab0 GROUP BY tab0.col1
----
1
1

skipif mysql # not compatible
query I rowsort label-6627
SELECT 44 / 27 AS col0 FROM tab0 GROUP BY tab0.col1
----
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6628
SELECT ALL CAST( NULL AS SIGNED ) * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6628
SELECT ALL CAST ( NULL AS INTEGER ) * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 42 FROM tab0 AS cor0 GROUP BY col2
----
42

query I rowsort
SELECT ALL + 44 FROM tab2 AS cor0 GROUP BY cor0.col0
----
44
44
44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6631
SELECT ALL CAST( - 37 AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-37
-37

skipif mysql # not compatible
query I rowsort label-6631
SELECT ALL CAST ( - 37 AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-37
-37

query I rowsort
SELECT cor0.col2 * 9 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
216
342
711

query I rowsort
SELECT + col0 + + 88 FROM tab0 GROUP BY tab0.col0
----
114
131
171

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT tab2.col2 + - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + - 52 AS col2 FROM tab2 GROUP BY tab2.col1
----
-52

query I rowsort
SELECT - 88 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-88
-88
-88

query I rowsort
SELECT - + col0 * tab0.col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT 93 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NULL
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6643
SELECT - tab2.col0 DIV tab2.col0 col2 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-6643
SELECT - tab2.col0 / tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-1
-1
-1

query I rowsort
SELECT - tab0.col1 + tab0.col1 * + tab0.col1 FROM tab0 WHERE - col0 IS NULL GROUP BY tab0.col1
----

query I rowsort
SELECT - cor0.col0 * 63 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1638
-2709
-5229

query I rowsort
SELECT ALL tab1.col2 * - ( 16 + 63 * tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-128295
-318719
-4160

query I rowsort
SELECT COALESCE ( cor0.col2, + cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 21 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
21

query I rowsort
SELECT ALL + tab1.col2 + - tab1.col2 * - 77 FROM tab1 GROUP BY tab1.col2
----
3510
5538
624

onlyif mysql # DIV for integer division: 
query I rowsort label-6650
SELECT - 31 DIV tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-6650
SELECT - 31 / tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-5
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 25 - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-104
-112
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 32 col0 FROM tab1 GROUP BY tab1.col1
----
-32
-32
-32

query I rowsort
SELECT DISTINCT 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
88

query I rowsort
SELECT tab1.col2 + + col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - 38 * tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-1444
-3002
-912

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 tab0.col0 * 85 AS col1 FROM tab0 GROUP BY col0
----
2210
3655
7055

query I rowsort
SELECT + - col0 + 29 AS col1 FROM tab2 GROUP BY tab2.col0
----
-62
-63
14

query I rowsort
SELECT + - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - + tab2.col1 * 68 AS col2 FROM tab2 GROUP BY tab2.col1
----
-2788
-4012
-4148

query I rowsort
SELECT + 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 - 21 + + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
-15
23
36

query I rowsort
SELECT ALL + 28 FROM tab2 GROUP BY tab2.col1
----
28
28
28

query I rowsort
SELECT ALL 14 AS col2 FROM tab0 GROUP BY tab0.col1
----
14
14

query I rowsort
SELECT + tab2.col2 - 1 AS col2 FROM tab2 GROUP BY tab2.col2
----
57
78
86

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col0
----
-22
-28
-82

query I rowsort
SELECT - 50 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-50
-50
-50

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6669
SELECT ALL - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6669
SELECT ALL - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT + tab1.col0 + - 95 AS col1 FROM tab1 GROUP BY tab1.col0
----
-13
-67
-73

query I rowsort
SELECT - 88 FROM tab2 GROUP BY tab2.col0
----
-88
-88
-88

query I rowsort
SELECT ALL - 48 FROM tab1 GROUP BY tab1.col2
----
-48
-48
-48

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 86 * tab0.col0 + + tab0.col0 * + 24 FROM tab0 GROUP BY tab0.col0
----
2860
4730
9130

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-110
-1568
-3526

query I rowsort
SELECT 8 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT + - COALESCE ( tab2.col1, tab2.col1 ) * - tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - ( tab0.col2 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col0 * 63 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
1386
1764
5166

query I rowsort
SELECT ALL 17 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT 18 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-26
-39
12

onlyif mysql # DIV for integer division: 
query I rowsort label-6682
SELECT ALL cor0.col2 DIV cor0.col2 col1 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-6682
SELECT ALL cor0.col2 / cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + + 5 AS col1 FROM tab1 GROUP BY tab1.col2
----
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 45 col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
45
45
45

query I rowsort
SELECT + cor0.col1 FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-56
-56
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
59

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT DISTINCT 95 - - 93 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
2513
4094
7814

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
50

query I rowsort
SELECT col2 + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL + + 45 AS col2 FROM tab0 GROUP BY col0
----
45
45
45

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL 99 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT ALL 30 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT ALL 68 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL - 58 FROM tab0 GROUP BY tab0.col0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT cor0.col2 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT DISTINCT - 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-31

query I rowsort
SELECT 63 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3654
4977
5481

query I rowsort
SELECT 57 FROM tab2 GROUP BY tab2.col2
----
57
57
57

query I rowsort
SELECT 23 AS col2 FROM tab1 GROUP BY tab1.col2
----
23
23
23

query I rowsort
SELECT DISTINCT 55 FROM tab0 GROUP BY tab0.col0
----
55

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + tab1.col2 FROM tab1 WHERE + tab1.col0 NOT IN ( col2 ) GROUP BY tab1.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - - 0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT ALL + 92 FROM tab2 GROUP BY tab2.col2
----
92
92
92

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 70, tab1.col2 * + tab1.col0 + tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-70
-70
-70

query I rowsort
SELECT + - col2 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6716
SELECT + CAST( tab1.col1 AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-6716
SELECT + CAST ( tab1.col1 AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + ( ( + cor0.col2 ) ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 73 * + cor0.col1 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3085
-4398
-4468

query I rowsort
SELECT DISTINCT - tab1.col1 + - 52 FROM tab1 GROUP BY tab1.col1
----
-109
-58
-96

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT col2 AS col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 15 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-15

query I rowsort
SELECT + 50 FROM tab2 GROUP BY tab2.col2
----
50
50
50

query I rowsort
SELECT DISTINCT 2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2

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 - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NULL <= NULL
----

query I rowsort
SELECT + col2 - - cor0.col2 FROM tab2 cor0 GROUP BY col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-6728
SELECT 92 DIV col2 + 12 FROM tab1 cor0 GROUP BY col2
----
13
14
23

skipif mysql # not compatible
query I rowsort label-6728
SELECT 92 / col2 + 12 FROM tab1 cor0 GROUP BY col2
----
13
14
23

query I rowsort
SELECT DISTINCT col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT 24 FROM tab2 AS cor0 GROUP BY col0
----
24
24
24

query I rowsort
SELECT DISTINCT 39 AS col0 FROM tab2 GROUP BY col2
----
39

query I rowsort
SELECT DISTINCT 9 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
67
88
96

query I rowsort
SELECT DISTINCT - 60 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-60

onlyif mysql # DIV for integer division: 
query I rowsort label-6734
SELECT 3 * cor0.col2 + - cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
134
212
23

skipif mysql # not compatible
query I rowsort label-6734
SELECT 3 * cor0.col2 + - cor0.col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
134
212
23

query I rowsort
SELECT DISTINCT + 3 AS col1 FROM tab1 GROUP BY tab1.col1
----
3

query I rowsort
SELECT DISTINCT + 1 FROM tab1 AS cor0 GROUP BY col1
----
1

query I rowsort
SELECT DISTINCT - 33 - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-39
-77
-90

query I rowsort
SELECT + cor0.col1 + 36 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1517
2183
2257

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 24 FROM tab1 GROUP BY tab1.col0
----
24
24
24

query I rowsort
SELECT 72 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1872
3096
5976

query I rowsort
SELECT + 67 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
67
67
67

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6743
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6743
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( + col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT tab2.col0 * - ( 30 ) + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-2639
-2668
-435

query I rowsort
SELECT - 86 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-86
-86
-86

query I rowsort
SELECT + 39 FROM tab2 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT ALL + 30 * - 64 FROM tab1 cor0 GROUP BY cor0.col0
----
-1920
-1920
-1920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 19 col1 FROM tab0 GROUP BY tab0.col0
----
19

query I rowsort
SELECT + - 25 AS col0 FROM tab2 GROUP BY tab2.col1
----
-25
-25
-25

query I rowsort
SELECT + tab0.col1 * - tab0.col1 + 15 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6546
15

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1444
576
6241

query I rowsort
SELECT cor0.col1 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-3483
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 28 col2 FROM tab1 GROUP BY tab1.col0
----
28

query I rowsort
SELECT DISTINCT + 35 * 92 AS col0 FROM tab1 GROUP BY tab1.col0
----
3220

query I rowsort
SELECT ALL 62 + - 43 FROM tab2 GROUP BY col2
----
19
19
19

query I rowsort
SELECT - 92 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-10
-64
-70

query I rowsort
SELECT ALL + 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15
15

query I rowsort
SELECT ALL + col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 72 col0 FROM tab2 GROUP BY tab2.col1
----
-72
-72
-72

query I rowsort
SELECT DISTINCT + 74 FROM tab2 GROUP BY tab2.col1
----
74

query I rowsort
SELECT ALL 10 AS col1 FROM tab2 GROUP BY tab2.col0
----
10
10
10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6764
SELECT + CAST( NULL AS SIGNED ) / - col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6764
SELECT + CAST ( NULL AS INTEGER ) / - col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6765
SELECT - CAST( 77 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-77
-77
-77

skipif mysql # not compatible
query I rowsort label-6765
SELECT - CAST ( 77 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-77
-77
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 79 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT - tab2.col0 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - + 46 AS col0 FROM tab0 GROUP BY tab0.col0
----
-46
-46
-46

query I rowsort
SELECT ALL - 18 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-26
-63
-89

query I rowsort
SELECT ALL - 82 * + col2 + - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-4814
-6557
-7221

query I rowsort
SELECT + 23 AS col0 FROM tab2 GROUP BY tab2.col1
----
23
23
23

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - CASE + 23 WHEN 54 THEN col2 + cor0.col2 * col1 END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT + + 58 AS col0 FROM tab0 GROUP BY tab0.col1
----
58

query I rowsort
SELECT + col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
1260
176
5822

query I rowsort
SELECT ALL - + 41 AS col1 FROM tab2 GROUP BY col2
----
-41
-41
-41

query I rowsort
SELECT ALL + 54 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
54
54
54

onlyif mysql # DIV for integer division: 
query I rowsort label-6777
SELECT ALL - cor0.col1 DIV - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6777
SELECT ALL - cor0.col1 / - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 41 + - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-100
-102
-82

query I rowsort
SELECT DISTINCT 14 - + cor0.col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-31
-57
6

query I rowsort
SELECT ALL - col2 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-576
-6241

onlyif mysql # DIV for integer division: 
query I rowsort label-6781
SELECT ALL 12 DIV tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6781
SELECT ALL 12 / tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + - 99 FROM tab0 GROUP BY tab0.col2
----
-99
-99
-99

query I rowsort
SELECT ALL + 98 FROM tab1 GROUP BY tab1.col0
----
98
98
98

query I rowsort
SELECT DISTINCT - - 39 FROM tab0 GROUP BY tab0.col0
----
39

query I rowsort
SELECT DISTINCT - 80 FROM tab2 GROUP BY col1
----
-80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6786
SELECT DISTINCT - + CAST( NULLIF ( - tab1.col0, col0 ) AS SIGNED ) + + 43 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1232
3608
968

skipif mysql # not compatible
query I rowsort label-6786
SELECT DISTINCT - + CAST ( NULLIF ( - tab1.col0, col0 ) AS INTEGER ) + + 43 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1232
3608
968

query I rowsort
SELECT - - 29 AS col0 FROM tab2 GROUP BY tab2.col0
----
29
29
29

query I rowsort
SELECT ALL - ( tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - ( tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-6790
SELECT - NULLIF ( 7, 54 * + cor0.col2 ) DIV cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6790
SELECT - NULLIF ( 7, 54 * + cor0.col2 ) / cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + 34 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
34
34
34

query I rowsort
SELECT 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
97
97
97

query I rowsort
SELECT - 51 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-51
-51
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-6795
SELECT DISTINCT + 40 DIV tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
0
5

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6795
SELECT DISTINCT + 40 / tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
0
5

query I rowsort
SELECT col1 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
0
0
6561

query I rowsort
SELECT + 20 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT + 66 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
66

query I rowsort
SELECT ALL - cor0.col1 * + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + + 1 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + col0 * - 77 FROM tab2 GROUP BY tab2.col0
----
-1155
-7007
-7084

query I rowsort
SELECT + tab1.col1 - - 39 AS col2 FROM tab1 GROUP BY tab1.col1
----
45
83
96

query I rowsort
SELECT + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + - col2 * - 79 AS col2 FROM tab2 GROUP BY col2
----
4582
6241
6873

query I rowsort
SELECT ALL + 59 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
59
59

query I rowsort
SELECT ALL cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6807
SELECT DISTINCT - tab1.col2 + tab1.col2 DIV 53 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-70
-8

skipif mysql # not compatible
query I rowsort label-6807
SELECT DISTINCT - tab1.col2 + tab1.col2 / 53 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-70
-8

query I rowsort
SELECT DISTINCT col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
164
44
56

query I rowsort
SELECT 7 + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
31
45
86

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT - cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2 WHERE NOT NULL IS NULL GROUP BY tab2.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + 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 DISTINCT cor0.col0 + + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 38 AS col1 FROM tab0 GROUP BY tab0.col0
----
-38

onlyif mysql # DIV for integer division: 
query I rowsort label-6816
SELECT + col0 + + cor0.col0 DIV - 14 FROM tab0 cor0 GROUP BY cor0.col0
----
25
40
78

skipif mysql # not compatible
query I rowsort label-6816
SELECT + col0 + + cor0.col0 / - 14 FROM tab0 cor0 GROUP BY cor0.col0
----
25
40
78

onlyif mysql # DIV for integer division: 
query I rowsort label-6817
SELECT + cor0.col2 DIV 70 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6817
SELECT + cor0.col2 / 70 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
1
1

query I rowsort
SELECT ALL 28 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2025
-5041
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 90 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
90

query I rowsort
SELECT DISTINCT cor0.col1 * col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT - - tab1.col2 + - 19 AS col1 FROM tab1 GROUP BY tab1.col2
----
-11
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
166
52
86

query I rowsort
SELECT ALL - cor0.col1 - - cor0.col0 FROM tab2 cor0 GROUP BY col0, col1
----
-46
32
51

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6826
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6826
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col0
----
NULL

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col0, col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 28 + - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-54
0
6

query I rowsort
SELECT DISTINCT - COALESCE ( - col2, cor0.col2 * + 55 ) + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 26 col1 FROM tab0 GROUP BY tab0.col0
----
26
26
26

query I rowsort
SELECT 49 AS col1 FROM tab2 GROUP BY tab2.col0
----
49
49
49

query I rowsort
SELECT 5 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 76 col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
76
76
76

query I rowsort
SELECT 95 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
176
95

query I rowsort
SELECT ALL 73 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1898
3139
6059

query I rowsort
SELECT + 38 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
38
38
38

onlyif mysql # DIV for integer division: 
query I rowsort label-6837
SELECT ALL + 69 DIV 40 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6837
SELECT ALL + 69 / 40 FROM tab0 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + - 61 AS col1 FROM tab0 GROUP BY tab0.col1
----
-61

query I rowsort
SELECT - 18 * 39 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-702
-702
-702

query I rowsort
SELECT DISTINCT - - 13 AS col0 FROM tab2 GROUP BY tab2.col0
----
13

query I rowsort
SELECT ALL + - tab1.col0 * tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-6842
SELECT 13 DIV tab1.col1 + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6842
SELECT 13 / tab1.col1 + tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
44
57
8

query I rowsort
SELECT - 1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-1
80

query I rowsort
SELECT - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT + + tab2.col0 + + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT DISTINCT + 6 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col0 FROM tab2 GROUP BY tab2.col1
----
-7
-7
-7

query I rowsort
SELECT DISTINCT 85 FROM tab0 AS cor0 GROUP BY cor0.col2
----
85

query I rowsort
SELECT + 47 * 82 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3854
3854
3854

query I rowsort
SELECT ALL tab0.col1 + tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
162

query I rowsort
SELECT ALL 78 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-4524
-6162
-6786

query I rowsort
SELECT - 32 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-32
-32
-32

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
158
48
76

query I rowsort
SELECT + tab2.col0 - - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT DISTINCT 74 + 7 AS col0 FROM tab1 GROUP BY tab1.col1
----
81

query I rowsort
SELECT 39 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1014
1677
3237

query I rowsort
SELECT DISTINCT ( + col1 ) FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col2 * - col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT ALL + 4 AS col0 FROM tab2 GROUP BY tab2.col2
----
4
4
4

query I rowsort
SELECT DISTINCT + + tab0.col2 + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT + tab1.col2 * + 54 AS col2 FROM tab1 GROUP BY tab1.col2
----
2430
3834
432

query I rowsort
SELECT ALL 64 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
64
64
64

query I rowsort
SELECT 18 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
18
18
18

query I rowsort
SELECT ALL + 30 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-6866
SELECT ALL 28 + tab2.col1 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
27
27
27

skipif mysql # not compatible
query I rowsort label-6866
SELECT ALL 28 + tab2.col1 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
27
27
27

query I rowsort
SELECT + 89 AS col2 FROM tab1 GROUP BY tab1.col2
----
89
89
89

query I rowsort
SELECT ALL + 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
25
25

query I rowsort
SELECT ALL + 17 + - 97 FROM tab2 GROUP BY tab2.col2
----
-80
-80
-80

query I rowsort
SELECT - ( + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 90 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
114
128
169

query I rowsort
SELECT + 28 * 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
168
168
168

query I rowsort
SELECT ALL 1 * 22 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
22
22

query I rowsort
SELECT ALL + 48 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT ALL + 50 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT - tab2.col1 * + 5 AS col0 FROM tab2 GROUP BY tab2.col1
----
-205
-295
-305

query I rowsort
SELECT - tab1.col1 + 94 AS col2 FROM tab1 GROUP BY tab1.col1
----
37
50
88

query I rowsort
SELECT 69 FROM tab0 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL tab1.col2 - 2 FROM tab1 GROUP BY tab1.col2
----
43
6
69

query I rowsort
SELECT ALL cor0.col0 * ( - col0 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-1849
-676
-6889

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 DISTINCT cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, col0, cor0.col2
----
15
91
92

query I rowsort
SELECT 88 AS col0 FROM tab2 GROUP BY tab2.col2
----
88
88
88

query I rowsort
SELECT cor0.col1 * col1 + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1722
3540
3782

query I rowsort
SELECT ALL - col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6561
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6889
SELECT DISTINCT - CAST( NULL AS SIGNED ) - - 40 FROM tab2 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6889
SELECT DISTINCT - CAST ( NULL AS INTEGER ) - - 40 FROM tab2 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT - 53 FROM tab1 GROUP BY col1
----
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT ALL + 48 + 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
141
141
141

query I rowsort
SELECT ALL - col2 * + 52 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1248
-1976
-4108

query I rowsort
SELECT - tab0.col1 * + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT - cor0.col0 + col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-16
-38
29

query I rowsort
SELECT tab0.col0 * + col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT cor0.col0 * - 12 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1092
-1104
-180

query I rowsort
SELECT DISTINCT ( 96 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
96

query I rowsort
SELECT - 61 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT + 34 FROM tab0 GROUP BY col1
----
34
34

query I rowsort
SELECT ALL 58 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
58
58
58

query I rowsort
SELECT ALL - tab2.col0 * + 94 FROM tab2 GROUP BY tab2.col0
----
-1410
-8554
-8648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
15
91
92

query I rowsort
SELECT 83 FROM tab1 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT + 20 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT - - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - col2 AS col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT tab0.col2 * + tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
182
184
30

query I rowsort
SELECT DISTINCT - col1 * 24 FROM tab2 cor0 GROUP BY cor0.col1
----
-1416
-1464
-984

query I rowsort
SELECT - + 77 FROM tab1 GROUP BY col1
----
-77
-77
-77

query I rowsort
SELECT ALL + 52 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT 44 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
3564

query I rowsort
SELECT ALL + 91 FROM tab1 GROUP BY col0
----
91
91
91

query I rowsort
SELECT ALL 32 + - 3 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
29
29
29

query I rowsort
SELECT - 82 - + 14 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT DISTINCT + 2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 48 col2 FROM tab1 GROUP BY tab1.col1
----
48
48
48

query I rowsort
SELECT ( 69 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
69
69
69

query I rowsort
SELECT DISTINCT + 36 FROM tab2 GROUP BY tab2.col0
----
36

query I rowsort
SELECT + + tab0.col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT + - 75 AS col2 FROM tab0 GROUP BY tab0.col0
----
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 24 col0 FROM tab1 GROUP BY tab1.col1
----
24
24
24

query I rowsort
SELECT ALL - 48 AS col1 FROM tab1 GROUP BY tab1.col2
----
-48
-48
-48

query I rowsort
SELECT + cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT ALL + 55 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1, cor0.col2
----
-2475
-3905
-440

onlyif mysql # DIV for integer division: 
query I rowsort label-6928
SELECT DISTINCT - cor0.col1 DIV - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
4

skipif mysql # not compatible
query I rowsort label-6928
SELECT DISTINCT - cor0.col1 / - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
4

query I rowsort
SELECT ALL - 22 FROM tab0 GROUP BY tab0.col2
----
-22
-22
-22

query I rowsort
SELECT DISTINCT + 23 FROM tab0 GROUP BY tab0.col2
----
23

query I rowsort
SELECT ALL - 9 AS col0 FROM tab1 GROUP BY tab1.col0
----
-9
-9
-9

query I rowsort
SELECT ALL + 54 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1404
2322
4482

query I rowsort
SELECT DISTINCT - 84 FROM tab2 GROUP BY tab2.col0
----
-84

query I rowsort
SELECT + + tab0.col0 + tab0.col0 * tab0.col0 FROM tab0 GROUP BY col0
----
1892
6972
702

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING tab1.col1 - + col1 IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT col1 > ( NULL )
----

query I rowsort
SELECT + + 59 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
141
81
87

query I rowsort
SELECT DISTINCT + 7 * 58 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
406

onlyif mysql # DIV for integer division: 
query I rowsort label-6940
SELECT ALL cor0.col1 DIV cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6940
SELECT ALL cor0.col1 / cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 77 FROM tab2 GROUP BY tab2.col2
----
-77

query I rowsort
SELECT + 8 AS col2 FROM tab2 GROUP BY tab2.col2
----
8
8
8

query I rowsort
SELECT - + 62 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1364
-1736
-5084

onlyif mysql # DIV for integer division: 
query I rowsort label-6944
SELECT 82 DIV - 15 FROM tab1 GROUP BY tab1.col2
----
-5
-5
-5

skipif mysql # not compatible
query I rowsort label-6944
SELECT 82 / - 15 FROM tab1 GROUP BY tab1.col2
----
-5
-5
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + 62 ) col1 FROM tab0 cor0 GROUP BY col0
----
62
62
62

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 76, - cor0.col0 + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-6947
SELECT ALL - 12 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6947
SELECT ALL - 12 / - 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 cor0.col2 + - cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-12
-34
72

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
21
21
21

query I rowsort
SELECT DISTINCT + 34 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT NULLIF ( 43, tab0.col2 / - tab0.col2 ) FROM tab0 GROUP BY col2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT 64 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
64
64
64

query I rowsort
SELECT 17 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT + tab2.col1 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 68 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-68

query I rowsort
SELECT ALL ( - 76 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT 90 FROM tab2 AS cor0 GROUP BY cor0.col0
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
36
36
36

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
22
28
82

query I rowsort
SELECT + 57 FROM tab1 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT + - col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + 58 FROM tab2 GROUP BY col0
----
58
58
58

query I rowsort
SELECT ALL - 30 + + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
-22
15
41

query I rowsort
SELECT 9 FROM tab2 AS cor0 GROUP BY col0
----
9
9
9

onlyif mysql # DIV for integer division: 
query I rowsort label-6972
SELECT cor0.col1 + + cor0.col1 DIV - 59 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-6972
SELECT cor0.col1 + + cor0.col1 / - 59 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - 60 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2
19
27

query I rowsort
SELECT DISTINCT 13 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13

query I rowsort
SELECT + 28 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
36
73
99

query I rowsort
SELECT ALL + + 16 FROM tab2 GROUP BY tab2.col0
----
16
16
16

query I rowsort
SELECT ALL tab0.col2 + 48 AS col2 FROM tab0 GROUP BY tab0.col2
----
127
72
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - tab2.col1 * - tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT + - ( - 45 ) FROM tab2 GROUP BY col2
----
45
45
45

query I rowsort
SELECT ( 43 ) + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
100
49
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 76, + cor0.col1 * + cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-76

query I rowsort
SELECT + 87 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT ALL tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT + tab2.col1 IS NULL
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col2 * tab1.col2 col1 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT + 52 FROM tab2 AS cor0 GROUP BY col1
----
52
52
52

query I rowsort
SELECT ALL - 60 FROM tab1 AS cor0 GROUP BY col0
----
-60
-60
-60

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

query I rowsort
SELECT ( 67 ) + + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
108
126
128

query I rowsort
SELECT ALL - cor0.col2 * 84 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-4872
-6636
-7308

query I rowsort
SELECT 93 AS col2 FROM tab1 GROUP BY tab1.col2
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1, col2
----
26
43
83

query I rowsort
SELECT ALL + 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
31
31
31

query I rowsort
SELECT - - tab0.col2 * - tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6998
SELECT + CAST( NULL AS SIGNED ) * ( - 36 * + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6998
SELECT + CAST ( NULL AS INTEGER ) * ( - 36 * + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT 88 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
88

query I rowsort
SELECT ALL + 54 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
125
62
99

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT ALL + 55 FROM tab1 GROUP BY tab1.col1
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - COALESCE ( + 7, tab0.col0, tab0.col0 + + col0 ) col1 FROM tab0 GROUP BY tab0.col1
----
-7
-7

query I rowsort
SELECT DISTINCT + col2 + - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT ALL tab2.col0 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 + tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 16 + 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25

query I rowsort
SELECT ALL 10 + 13 AS col1 FROM tab2 GROUP BY tab2.col1
----
23
23
23

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab0 GROUP BY tab0.col1
----
51

query I rowsort
SELECT + + 6 AS col2 FROM tab2 GROUP BY tab2.col1
----
6
6
6

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab2 WHERE NOT NULL BETWEEN NULL AND tab2.col0 GROUP BY tab2.col2
----

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT - col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT ( + tab0.col1 ) IS NULL
----
-81
0

query I rowsort
SELECT 65 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
65
65
65

query I rowsort
SELECT DISTINCT - cor0.col1 + 80 FROM tab2 AS cor0 GROUP BY cor0.col1
----
19
21
39

onlyif mysql # DIV for integer division: 
query I rowsort label-7018
SELECT COALESCE ( 25, - tab1.col2 + 2 DIV tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
25
25
25

skipif mysql # not compatible
query I rowsort label-7018
SELECT COALESCE ( 25, - tab1.col2 + 2 / tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
25
25
25

query I rowsort
SELECT 76 * + col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6075

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT + 57 FROM tab2 GROUP BY col0
----
57
57
57

query I rowsort
SELECT ALL + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-7024
SELECT DISTINCT - 25 + 1 DIV - tab0.col2 FROM tab0 GROUP BY col2
----
-25

skipif mysql # not compatible
query I rowsort label-7024
SELECT DISTINCT - 25 + 1 / - tab0.col2 FROM tab0 GROUP BY col2
----
-25

query I rowsort
SELECT ALL - 21 FROM tab1 GROUP BY tab1.col1
----
-21
-21
-21

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( - ( 81 ), + tab1.col0 ) FROM tab1 GROUP BY tab1.col1
----
-81
-81
-81

query I rowsort
SELECT 79 FROM tab1 AS cor0 GROUP BY col2
----
79
79
79

query I rowsort
SELECT DISTINCT cor0.col1 * - 95 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-4180
-5415
-570

query I rowsort
SELECT ALL - - 17 FROM tab0 GROUP BY tab0.col0
----
17
17
17

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 - 47 * - cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1248
2064
3984

query I rowsort
SELECT 86 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6966

query I rowsort
SELECT DISTINCT - 18 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18

query I rowsort
SELECT DISTINCT + + tab2.col2 + 11 * tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1044
696
948

query I rowsort
SELECT ALL 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT 94 - 39 AS col1 FROM tab2 GROUP BY tab2.col2
----
55
55
55

query I rowsort
SELECT ALL cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT - tab1.col1 + + 31 FROM tab1 GROUP BY col1
----
-13
-26
25

query I rowsort
SELECT - cor0.col2 * 0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-7041
SELECT + 11 DIV - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7041
SELECT + 11 / - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT ALL + - 38 FROM tab2 GROUP BY tab2.col0
----
-38
-38
-38

query I rowsort
SELECT ( - col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 3 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-132
-171
-18

query I rowsort
SELECT DISTINCT 6 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
12
50
63

query I rowsort
SELECT DISTINCT - tab2.col2 + + 97 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
5568
7584
8352

query I rowsort
SELECT ALL cor0.col1 * + col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL + 67 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
67
67
67

query I rowsort
SELECT - 83 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-83
-83
-83

query I rowsort
SELECT + 16 - - tab1.col1 FROM tab1 GROUP BY col1
----
22
60
73

query I rowsort
SELECT ALL + 19 + cor0.col1 FROM tab0 cor0 GROUP BY col1
----
100
19

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT ALL tab2.col1 * 26 FROM tab2 GROUP BY col1
----
1066
1534
1586

query I rowsort
SELECT DISTINCT - - 85 FROM tab2 GROUP BY tab2.col1
----
85

query I rowsort
SELECT + - 50 + - 57 FROM tab2 GROUP BY tab2.col2
----
-107
-107
-107

onlyif mysql # DIV for integer division: 
query I rowsort label-7056
SELECT 51 DIV - 66 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7056
SELECT 51 / - 66 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + ( + 51 ) FROM tab2 GROUP BY tab2.col2
----
51
51
51

query I rowsort
SELECT DISTINCT - tab2.col2 * col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - col0 + 65 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-18
22
39

onlyif mysql # DIV for integer division: 
query I rowsort label-7060
SELECT ALL - 90 DIV - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7060
SELECT ALL - 90 / - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7061
SELECT cor0.col1 DIV 85 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7061
SELECT cor0.col1 / 85 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + 25 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
33
70
96

query I rowsort
SELECT DISTINCT 19 + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
25
63
76

query I rowsort
SELECT - 48 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT ALL - 61 AS col1 FROM tab2 GROUP BY tab2.col1
----
-61
-61
-61

query I rowsort
SELECT DISTINCT 77 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3465
5467
616

query I rowsort
SELECT DISTINCT - 79 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-79

query I rowsort
SELECT - 88 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
3960
6248
704

query I rowsort
SELECT - 87 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-87
-87
-87

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 + - cor0.col1 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - col2 + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-142
-16
-90

query I rowsort
SELECT - col1 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 col0 FROM tab2 GROUP BY col1
----
91
91
91

query I rowsort
SELECT 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
76
76
76

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7077
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7077
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 91 FROM tab0 GROUP BY tab0.col1
----
91
91

query I rowsort
SELECT ALL + col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 * 73 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-3796
-3796
-3796

query I rowsort
SELECT + + 65 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2925
4615
520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 + - tab0.col0 col2 FROM tab0 GROUP BY col0
----
-166
-52
-86

query I rowsort
SELECT col2 * + 16 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1264
1392
928

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 58 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
58
58

query I rowsort
SELECT + 95 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
95
95
95

query I rowsort
SELECT 40 FROM tab0 GROUP BY tab0.col2
----
40
40
40

query I rowsort
SELECT ALL - col1 + + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - tab0.col2 FROM tab0 WHERE NULL IN ( - tab0.col1 ) GROUP BY tab0.col2
----

query I rowsort
SELECT - ( 46 ) * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2070
-3266
-368

query I rowsort
SELECT 77 * 66 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5082
5082
5082

onlyif mysql # DIV for integer division: 
query I rowsort label-7092
SELECT + col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7092
SELECT + col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT ( - cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + + 47 FROM tab1 GROUP BY tab1.col2
----
47
47
47

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.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT - ( 13 ) * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
1053

query I rowsort
SELECT + ( - 1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

query I rowsort
SELECT ( tab0.col2 ) * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 51 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT - tab1.col1 - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

query I rowsort
SELECT 77 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
77
77
77

query I rowsort
SELECT ALL 87 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
87
87
87

query I rowsort
SELECT + 5 AS col1 FROM tab1 GROUP BY tab1.col2
----
5
5
5

query I rowsort
SELECT DISTINCT + 22 FROM tab0 AS cor0 GROUP BY cor0.col0
----
22

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

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT 40 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT DISTINCT + 33 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
112
120
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 59 col1 FROM tab0 GROUP BY tab0.col2
----
59
59
59

query I rowsort
SELECT + 93 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
93
93
93

query I rowsort
SELECT - col1 * 46 + - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3807
0

query I rowsort
SELECT + 18 AS col1 FROM tab1 GROUP BY col0
----
18
18
18

query I rowsort
SELECT ALL - 88 FROM tab1 GROUP BY tab1.col0
----
-88
-88
-88

query I rowsort
SELECT ALL + - col1 * - 66 FROM tab0 GROUP BY tab0.col1
----
0
5346

query I rowsort
SELECT - 65 * cor0.col1 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-5184
0
0

query I rowsort
SELECT + tab1.col1 * - 30 - tab1.col1 FROM tab1 GROUP BY col1
----
-1364
-1767
-186

query I rowsort
SELECT - 50 FROM tab0 GROUP BY tab0.col2
----
-50
-50
-50

query I rowsort
SELECT + col2 * 16 + 83 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5742
7821
8613

query I rowsort
SELECT DISTINCT - ( + 14 ) * - 13 FROM tab2 GROUP BY tab2.col0
----
182

query I rowsort
SELECT + ( - 56 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT + ( cor1.col1 ) FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7128
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7128
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 64 FROM tab0 GROUP BY tab0.col2
----
64

query I rowsort
SELECT + - ( col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 * 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1380
8372
8464

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT tab1.col1 + + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT 49 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT DISTINCT 98 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
4410
6958
784

query I rowsort
SELECT - 34 AS col0 FROM tab0 GROUP BY tab0.col0
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab0.col1 + 92 AS col1 FROM tab0 GROUP BY tab0.col1
----
11
92

query I rowsort
SELECT ALL 82 FROM tab2 AS cor0 GROUP BY cor0.col0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 65 col2 FROM tab2 GROUP BY tab2.col1
----
-65
-65
-65

query I rowsort
SELECT DISTINCT col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL col2 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
102
115
14

query I rowsort
SELECT + 21 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
21
21
21

query I rowsort
SELECT + + cor0.col1 AS col2 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 56 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT ALL 75 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
75
75
75

query I rowsort
SELECT + + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - 25 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT ALL 31 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT 23 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23

query I rowsort
SELECT ALL + col0 * - 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1650
-2100
-6150

query I rowsort
SELECT 5 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5
86

query I rowsort
SELECT ALL - 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-12
-12

query I rowsort
SELECT - cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT - 25 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 col1 FROM tab1 GROUP BY tab1.col1
----
7
7
7

query I rowsort
SELECT + 90 AS col0 FROM tab2 GROUP BY tab2.col1
----
90
90
90

query I rowsort
SELECT - 8 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-8
-8
-8

query I rowsort
SELECT ALL + tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING ( col2 ) IS NULL
----

query I rowsort
SELECT tab0.col1 * - ( - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 80 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-80
-80
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-7163
SELECT - cor0.col2 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7163
SELECT - cor0.col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20

query I rowsort
SELECT DISTINCT + 0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT cor0.col2 * - ( - col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + + 72 FROM tab2 GROUP BY col0
----
72
72
72

query I rowsort
SELECT DISTINCT + 86 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1892
2408
7052

query I rowsort
SELECT - 21 * cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1180
-1220
-820

query I rowsort
SELECT + - col1 * + 80 AS col0 FROM tab2 GROUP BY tab2.col1
----
-3280
-4720
-4880

onlyif mysql # DIV for integer division: 
query I rowsort label-7172
SELECT 21 DIV + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7172
SELECT 21 / + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1, col1
----
-45
-71
-8

query I rowsort
SELECT ALL 5 + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
33
87

query I rowsort
SELECT + cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT - - 63 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
5733
5796
945

query I rowsort
SELECT tab0.col1 * 80 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6480

query I rowsort
SELECT tab1.col0 * 60 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
1298
1652
4838

query I rowsort
SELECT ALL + - 97 FROM tab1 GROUP BY tab1.col0
----
-97
-97
-97

query I rowsort
SELECT 43 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT ALL + + ( + 88 ) AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT ALL + tab0.col1 * - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1 HAVING NULL = NULL
----

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
0
81

query I rowsort
SELECT - cor0.col1 - + col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-114
-12
-88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7186
SELECT ALL + tab2.col1 / CAST( NULL AS SIGNED ) col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7186
SELECT ALL + tab2.col1 / CAST ( NULL AS INTEGER ) col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 64 AS col1 FROM tab2 GROUP BY tab2.col2
----
64

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 + + cor0.col1 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
6480

query I rowsort
SELECT DISTINCT + 91 - + 92 FROM tab0 AS cor0 GROUP BY col0
----
-1

query I rowsort
SELECT ALL cor0.col1 * + ( - col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-6561
0

query I rowsort
SELECT 11 AS col1 FROM tab1 GROUP BY tab1.col2
----
11
11
11

query I rowsort
SELECT + 28 AS col1 FROM tab1 GROUP BY tab1.col2
----
28
28
28

query I rowsort
SELECT ALL 99 AS col0 FROM tab1 GROUP BY tab1.col2
----
99
99
99

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7195
SELECT - CAST( NULL AS SIGNED ) + 25 / + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7195
SELECT - CAST ( NULL AS INTEGER ) + 25 / + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 56, + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
56

onlyif mysql # DIV for integer division: 
query I rowsort label-7197
SELECT DISTINCT cor0.col2 DIV - 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-7197
SELECT DISTINCT cor0.col2 / - 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 * + 79 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2054
-3397
-6557

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7199
SELECT - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7199
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-7200
SELECT ALL + 55 DIV + 86 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7200
SELECT ALL + 55 / + 86 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT 76 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1824
-2888
-6004

query I rowsort
SELECT - 1 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-27
-44
-84

query I rowsort
SELECT - cor0.col0 + + cor0.col1 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
110
1568
3526

onlyif mysql # DIV for integer division: 
query I rowsort label-7204
SELECT DISTINCT - tab1.col2 DIV - 9 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
5
7

skipif mysql # not compatible
query I rowsort label-7204
SELECT DISTINCT - tab1.col2 / - 9 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
5
7

onlyif mysql # DIV for integer division: 
query I rowsort label-7205
SELECT DISTINCT col0 DIV + 88 FROM tab2 GROUP BY col0
----
0
1

skipif mysql # not compatible
query I rowsort label-7205
SELECT DISTINCT col0 / + 88 FROM tab2 GROUP BY col0
----
0
1

query I rowsort
SELECT DISTINCT 32 AS col0 FROM tab1 GROUP BY tab1.col1
----
32

query I rowsort
SELECT ALL 86 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
86
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-7208
SELECT DISTINCT + cor0.col0 DIV col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7208
SELECT DISTINCT + cor0.col0 / col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
1
2

query I rowsort
SELECT cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT cor0.col2 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
102
115
14

query I rowsort
SELECT ALL - tab1.col0 + + 97 AS col2 FROM tab1 GROUP BY tab1.col0
----
15
69
75

query I rowsort
SELECT ALL + ( cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 35 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT NULLIF ( + cor0.col1, cor0.col1 ) + + col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 23 AS col2 FROM tab0 GROUP BY tab0.col0
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 3 col2 FROM tab2 GROUP BY tab2.col0
----
3

query I rowsort
SELECT - cor0.col0 * + 77 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2002
-3311
-6391

query I rowsort
SELECT DISTINCT 98 * - 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5292

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 77 FROM tab1 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT ALL - 72 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT ALL + 96 AS col0 FROM tab2 GROUP BY tab2.col1
----
96
96
96

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 53 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
53
53
53

query I rowsort
SELECT ALL 21 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 col1 FROM tab2 cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT - + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL tab1.col2 - 1 AS col1 FROM tab1 GROUP BY col2
----
44
7
70

query I rowsort
SELECT - + 2 FROM tab1 GROUP BY tab1.col0
----
-2
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-7231
SELECT tab0.col2 * + tab0.col2 + 17 DIV tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif mysql # not compatible
query I rowsort label-7231
SELECT tab0.col2 * + tab0.col2 + 17 / tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT + 42 FROM tab2 GROUP BY tab2.col1
----
42
42
42

query I rowsort
SELECT + - 58 * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
4698

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + - tab0.col0 + + 61 FROM tab0 GROUP BY tab0.col0
----
-22
18
35

query I rowsort
SELECT ALL 96 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1440
-8736
-8832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 13 + 72 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT DISTINCT - 58 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-58

query I rowsort
SELECT DISTINCT 97 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
97

onlyif mysql # DIV for integer division: 
query I rowsort label-7244
SELECT DISTINCT 8 DIV + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
0

skipif mysql # not compatible
query I rowsort label-7244
SELECT DISTINCT 8 / + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT 20 FROM tab0 cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT ALL 14 FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT ALL 94 AS col0 FROM tab2 GROUP BY tab2.col1
----
94
94
94

query I rowsort
SELECT - col1 + tab0.col1 * + 56 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
4455

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-33

query I rowsort
SELECT ALL - 19 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-19
-19
-19

query I rowsort
SELECT ALL - 28 FROM tab0 GROUP BY col2
----
-28
-28
-28

query I rowsort
SELECT - 58 * 37 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-2204
-2225
-2233

query I rowsort
SELECT DISTINCT 71 FROM tab0 GROUP BY tab0.col0
----
71

onlyif mysql # DIV for integer division: 
query I rowsort label-7255
SELECT ALL + COALESCE ( 59, - cor0.col0 * ( cor0.col1 ) + + cor0.col2, + ( - 40 ) DIV + 43, cor0.col2 * + cor0.col2 ) DIV 7 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
8
8
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7255
SELECT ALL + COALESCE ( 59, - cor0.col0 * ( cor0.col1 ) + + cor0.col2, + ( - 40 ) / + 43, cor0.col2 * + cor0.col2 ) / 7 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
8
8
8

query I rowsort
SELECT ALL + 59 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
103
116
65

onlyif mysql # DIV for integer division: 
query I rowsort label-7257
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-7257
SELECT ALL - cor0.col1 / cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT + 62 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
144
84
90

query I rowsort
SELECT DISTINCT 18 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7260
SELECT ALL CAST( + 26 AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
26
26

skipif mysql # not compatible
query I rowsort label-7260
SELECT ALL CAST ( + 26 AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT + 20 * - col2 FROM tab2 GROUP BY tab2.col2
----
-1160
-1580
-1740

query I rowsort
SELECT DISTINCT - + tab2.col1 + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab0 GROUP BY col1
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
80
80
80

onlyif mysql # DIV for integer division: 
query I rowsort label-7265
SELECT tab2.col1 DIV + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7265
SELECT tab2.col1 / + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT ALL cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7267
SELECT col1 DIV + 42 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7267
SELECT col1 / + 42 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
0
1
1

query I rowsort
SELECT DISTINCT + col0 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT + 27 * + 98 AS col1 FROM tab2 GROUP BY tab2.col0
----
2646
2646
2646

onlyif mysql # DIV for integer division: 
query I rowsort label-7270
SELECT col0 DIV - cor0.col0 + - cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-485
-6725
-785

skipif mysql # not compatible
query I rowsort label-7270
SELECT col0 / - cor0.col0 + - cor0.col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-485
-6725
-785

query I rowsort
SELECT ALL + ( 45 ) * - col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-3645
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 - - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
116
117
40

query I rowsort
SELECT ALL + 71 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + + 60 * tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
1440
2280
4740

onlyif mysql # DIV for integer division: 
query I rowsort label-7276
SELECT DISTINCT + tab1.col1 DIV + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1

skipif mysql # not compatible
query I rowsort label-7276
SELECT DISTINCT + tab1.col1 / + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1

query I rowsort
SELECT + cor0.col1 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
1944

query I rowsort
SELECT - - tab1.col0 * tab1.col0 + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
506
6806
812

query I rowsort
SELECT - 3 AS col1 FROM tab1 GROUP BY tab1.col0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT + 23 AS col0 FROM tab0 GROUP BY tab0.col2
----
23
23
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7282
SELECT - CAST( tab0.col2 AS SIGNED ) * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

skipif mysql # not compatible
query I rowsort label-7282
SELECT - CAST ( tab0.col2 AS INTEGER ) * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + 4 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
4
4
4

query I rowsort
SELECT DISTINCT 81 FROM tab0 AS cor0 GROUP BY cor0.col0
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 + tab2.col2 col1 FROM tab2 GROUP BY col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 51 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-51
-51

query I rowsort
SELECT DISTINCT - 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-26

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab0 GROUP BY tab0.col1
----
19

query I rowsort
SELECT DISTINCT + tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NULL
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7290
SELECT + 89 + - col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7290
SELECT + 89 + - col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 92 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
92
92

query I rowsort
SELECT DISTINCT + 42 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
42

query I rowsort
SELECT DISTINCT - - tab0.col1 + - 87 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6
-87

query I rowsort
SELECT DISTINCT + 67 FROM tab2 GROUP BY tab2.col1
----
67

onlyif mysql # DIV for integer division: 
query I rowsort label-7295
SELECT DISTINCT + col2 DIV + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7295
SELECT DISTINCT + col2 / + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1

query I rowsort
SELECT ALL - 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-56
-56
-56

query I rowsort
SELECT ALL 26 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT 27 + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-16
-56
1

query I rowsort
SELECT cor0.col2 * + 76 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1824
2888
6004

query I rowsort
SELECT DISTINCT - tab0.col1 * 10 AS col0 FROM tab0 GROUP BY tab0.col1
----
-810
0

query I rowsort
SELECT - 18 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT - 26 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-26
-26
-26

query I rowsort
SELECT - 16 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-16
-16
-16

query I rowsort
SELECT - 46 + + col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0, cor0.col0
----
-20
-3
37

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-7306
SELECT + cor0.col1 DIV + col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
45
58
7

skipif mysql # not compatible
query I rowsort label-7306
SELECT + cor0.col1 / + col1 + + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
45
58
7

query I rowsort
SELECT DISTINCT - tab2.col0 - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT DISTINCT tab0.col2 * - col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL <> ( NULL )
----

query I rowsort
SELECT DISTINCT - tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING ( NULL ) IS NULL
----
-81
0

query I rowsort
SELECT col1 * + tab2.col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT 76 FROM tab2 GROUP BY col0
----
76
76
76

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab2 GROUP BY tab2.col1
----
91

query I rowsort
SELECT - 98 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-98
-98

query I rowsort
SELECT - 67 FROM tab2 GROUP BY tab2.col1
----
-67
-67
-67

query I rowsort
SELECT - 91 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-91
-91
-91

query I rowsort
SELECT DISTINCT - 34 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1530
2414
272

query I rowsort
SELECT ALL - + tab1.col1 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-114
-12
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-7319
SELECT ALL tab0.col0 DIV - 26 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-7319
SELECT ALL tab0.col0 / - 26 FROM tab0 GROUP BY tab0.col0
----
-1
-1
-3

onlyif mysql # DIV for integer division: 
query I rowsort label-7320
SELECT 44 DIV - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7320
SELECT 44 / - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 60 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
60
60
60

query I rowsort
SELECT ALL 86 FROM tab1 AS cor0 GROUP BY col1
----
86
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT 63 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col2
----
63

query I rowsort
SELECT - 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-32
-32
-32

query I rowsort
SELECT ALL 95 FROM tab0 GROUP BY tab0.col1
----
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 42 col0 FROM tab2 GROUP BY tab2.col2
----
-42
-42
-42

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 82 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
82

query I rowsort
SELECT ALL + - 36 FROM tab1 GROUP BY col0
----
-36
-36
-36

query I rowsort
SELECT 4 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
0
324

query I rowsort
SELECT 4 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
4
4
4

query I rowsort
SELECT ALL cor0.col1 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col1 + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-1539
-3564

query I rowsort
SELECT ALL + - ( col1 ) AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7337
SELECT + CAST( NULL AS DECIMAL ) col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7337
SELECT + CAST ( NULL AS REAL ) col2 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - tab2.col0 * + col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col1 AS col2 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 ALL - 51 * tab0.col0 col2 FROM tab0 GROUP BY col0
----
-1326
-2193
-4233

query I rowsort
SELECT ALL 42 * + 64 AS col1 FROM tab1 GROUP BY tab1.col2
----
2688
2688
2688

query I rowsort
SELECT DISTINCT + - 29 FROM tab2 GROUP BY tab2.col2
----
-29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7343
SELECT ALL CAST( NULL AS SIGNED ) / + tab0.col1 col2 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-7343
SELECT ALL CAST ( NULL AS INTEGER ) / + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL tab2.col1 - 56 * + 56 AS col0 FROM tab2 GROUP BY tab2.col1
----
-3075
-3077
-3095

query I rowsort
SELECT ALL - cor0.col2 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-53
19
45

query I rowsort
SELECT ALL - + tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - + tab0.col0 + - 24 AS col0 FROM tab0 GROUP BY tab0.col0
----
-107
-50
-67

query I rowsort
SELECT DISTINCT 10 FROM tab0 GROUP BY tab0.col0
----
10

query I rowsort
SELECT ALL - + 7 AS col0 FROM tab2 GROUP BY tab2.col0
----
-7
-7
-7

query I rowsort
SELECT + 5 AS col1 FROM tab2 GROUP BY tab2.col0
----
5
5
5

query I rowsort
SELECT + + ( - tab1.col0 ) + - tab1.col0 * + 52 FROM tab1 GROUP BY tab1.col0
----
-1166
-1484
-4346

query I rowsort
SELECT ALL - + tab1.col0 * col0 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT col1 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT 63 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
57
6

query I rowsort
SELECT DISTINCT + col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT ALL - 22 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-7
69
70

query I rowsort
SELECT DISTINCT 88 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3960
6248
704

onlyif mysql # DIV for integer division: 
query I rowsort label-7359
SELECT DISTINCT - COALESCE ( + 66, + tab0.col0 DIV COALESCE ( tab0.col1 * tab0.col1, + tab0.col2 - + tab0.col1 ), + 29 ) FROM tab0 GROUP BY tab0.col2
----
-66

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7359
SELECT DISTINCT - COALESCE ( + 66, + tab0.col0 / COALESCE ( tab0.col1 * tab0.col1, + tab0.col2 - + tab0.col1 ), + 29 ) FROM tab0 GROUP BY tab0.col2
----
-66

query I rowsort
SELECT DISTINCT - + 60 * 81 AS col2 FROM tab2 GROUP BY tab2.col0
----
-4860

query I rowsort
SELECT - + 39 FROM tab1 GROUP BY tab1.col2
----
-39
-39
-39

query I rowsort
SELECT DISTINCT - cor0.col0 - + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-182
-184
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col2 FROM tab2 WHERE ( NULL ) IS NOT NULL GROUP BY col0
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7365
SELECT tab1.col1 + + col1 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
45
58
7

skipif mysql # not compatible
query I rowsort label-7365
SELECT tab1.col1 + + col1 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
45
58
7

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + cor0.col0 + 86 FROM tab0 AS cor0 GROUP BY col0
----
112
129
169

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-11
-14
17

query I rowsort
SELECT 44 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
44
44

onlyif mysql # DIV for integer division: 
query I rowsort label-7370
SELECT DISTINCT - tab2.col1 DIV + 63 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-7370
SELECT DISTINCT - tab2.col1 / + 63 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT DISTINCT tab2.col1 + 96 AS col2 FROM tab2 GROUP BY tab2.col1
----
137
155
157

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2070
5112
72

query I rowsort
SELECT ALL - ( - 96 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 19 col0 FROM tab1 GROUP BY tab1.col1
----
19
19
19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7375
SELECT CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7375
SELECT CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 64 AS col0 FROM tab1 GROUP BY tab1.col0
----
64
64
64

query I rowsort
SELECT + 31 AS col0 FROM tab0 GROUP BY tab0.col2
----
31
31
31

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1392
5394
7268

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL CASE cor1.col0 WHEN + 67 THEN + 51 END FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 56 AS col0 FROM tab1 GROUP BY tab1.col2
----
-56
-56
-56

query I rowsort
SELECT DISTINCT - - 88 FROM tab0 GROUP BY tab0.col0
----
88

query I rowsort
SELECT - 66 AS col0 FROM tab0 GROUP BY tab0.col0
----
-66
-66
-66

query I rowsort
SELECT + + col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7387
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-7387
SELECT - cor0.col2 / - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT tab1.col0 * col0 AS col0 FROM tab1 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING + col0 IS NULL
----

query I rowsort
SELECT + tab2.col1 FROM tab2 WHERE NOT ( tab2.col2 * tab2.col0 ) NOT IN ( - tab2.col0 ) GROUP BY tab2.col1
----

query I rowsort
SELECT tab1.col1 * - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY col1 HAVING NOT ( + tab0.col1 ) IS NULL
----
0
81

query I rowsort
SELECT ALL + tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT - - 45 * 77 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
3465
3465
3465

query I rowsort
SELECT ALL + 54 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT + + col2 * + 47 FROM tab2 GROUP BY tab2.col2
----
2726
3713
4089

query I rowsort
SELECT DISTINCT tab2.col0 + tab2.col0 * 92 FROM tab2 GROUP BY tab2.col0
----
1395
8463
8556

query I rowsort
SELECT ALL + cor0.col2 + + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
153
30
73

query I rowsort
SELECT DISTINCT - 7 + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19
36
76

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL 85 FROM tab0 cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT ALL col0 FROM tab1 cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT - 72 FROM tab2 GROUP BY col0
----
-72
-72
-72

query I rowsort
SELECT COALESCE ( + cor0.col1, cor0.col1 * + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-7407
SELECT ALL col2 DIV 21 + - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-43
-68
-8

skipif mysql # not compatible
query I rowsort label-7407
SELECT ALL col2 / 21 + - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-43
-68
-8

query I rowsort
SELECT + 30 + 46 AS col2 FROM tab0 GROUP BY tab0.col2
----
76
76
76

query I rowsort
SELECT - 1 AS col1 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ( cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + 20 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20

query I rowsort
SELECT - 12 * tab0.col0 + 85 FROM tab0 GROUP BY tab0.col0
----
-227
-431
-911

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT + 49 FROM tab1 GROUP BY tab1.col0
----
49
49
49

query I rowsort
SELECT ALL cor0.col0 * + 71 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1065
6461
6532

query I rowsort
SELECT ( 36 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 col0 FROM tab0 GROUP BY col1
----
-49
-49

query I rowsort
SELECT tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT - 44 * tab1.col0 - col0 FROM tab1 GROUP BY tab1.col0
----
-1260
-3690
-990

query I rowsort
SELECT 99 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT 74 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor0.col1
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT cor0.col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col2
----
9 values hashing to 90cf6ec6406229dce3ed591cac36d8fb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT - 16 + 86 AS col1 FROM tab0 GROUP BY tab0.col2
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 24 * 31 + + tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
768
782
823

query I rowsort
SELECT ALL - 15 FROM tab2 GROUP BY tab2.col2
----
-15
-15
-15

query I rowsort
SELECT ALL + ( 91 ) * col2 + col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
2208
3496
7268

query I rowsort
SELECT + - 53 FROM tab0 GROUP BY tab0.col2
----
-53
-53
-53

query I rowsort
SELECT + 44 FROM tab0 GROUP BY tab0.col0
----
44
44
44

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7431
SELECT + CAST( NULL AS SIGNED ) * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7431
SELECT + CAST ( NULL AS INTEGER ) * tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT 10 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
10

query I rowsort
SELECT - - tab1.col2 * - 8 FROM tab1 GROUP BY tab1.col2
----
-360
-568
-64

query I rowsort
SELECT + 83 FROM tab2 GROUP BY tab2.col2
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( cor0.col1 ) + - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-118
-122
-82

query I rowsort
SELECT ALL + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-7439
SELECT DISTINCT cor0.col2 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1

skipif mysql # not compatible
query I rowsort label-7439
SELECT DISTINCT cor0.col2 / - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-1

query I rowsort
SELECT 40 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

query I rowsort
SELECT - 14 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-14
-14
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-7442
SELECT ALL - - 53 DIV + 8 AS col0 FROM tab1 GROUP BY tab1.col0
----
6
6
6

skipif mysql # not compatible
query I rowsort label-7442
SELECT ALL - - 53 / + 8 AS col0 FROM tab1 GROUP BY tab1.col0
----
6
6
6

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT + - 89 AS col2 FROM tab2 GROUP BY tab2.col1
----
-89

query I rowsort
SELECT ALL + + 47 FROM tab0 GROUP BY col2
----
47
47
47

query I rowsort
SELECT + 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT ALL tab2.col0 + 43 AS col2 FROM tab2 GROUP BY tab2.col0
----
134
135
58

query I rowsort
SELECT ALL + 54 + + 16 FROM tab0 cor0 GROUP BY cor0.col2
----
70
70
70

onlyif mysql # DIV for integer division: 
query I rowsort label-7449
SELECT cor0.col1 DIV - 6 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-10
-6
-9

skipif mysql # not compatible
query I rowsort label-7449
SELECT cor0.col1 / - 6 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-10
-6
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + - tab1.col2 col1 FROM tab1 WHERE NOT col0 * tab1.col1 <= tab1.col0 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT + - 79 AS col2 FROM tab2 GROUP BY tab2.col1
----
-79
-79
-79

query I rowsort
SELECT ALL + tab0.col2 * - 8 + col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-168
-266
-553

query I rowsort
SELECT ALL 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7454
SELECT ALL + cor0.col2 DIV ( - 83 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7454
SELECT ALL + cor0.col2 / ( - 83 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT + 37 AS col0 FROM tab0 GROUP BY tab0.col1
----
37
37

query I rowsort
SELECT ALL - - 34 AS col0 FROM tab0 GROUP BY tab0.col1
----
34
34

query I rowsort
SELECT DISTINCT ( + 35 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
35

query I rowsort
SELECT DISTINCT + 68 AS col0 FROM tab1 GROUP BY tab1.col2
----
68

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 * + 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1003
1037
697

query I rowsort
SELECT ALL + tab1.col1 * + 35 AS col1 FROM tab1 GROUP BY tab1.col1
----
1540
1995
210

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT - 53 FROM tab0 GROUP BY col2
----
-53
-53
-53

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, cor0.col2, col0
----
0
162

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 57 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT ALL - tab1.col0 + + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.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.col2
----
-80
-80
-80

query I rowsort
SELECT cor0.col1 * 34 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1496
1938
204

query I rowsort
SELECT ALL - col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0 HAVING NULL IS NULL
----
15
91
92

query I rowsort
SELECT + 75 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
156
75

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 col1 FROM tab0 GROUP BY tab0.col1
----
78
78

query I rowsort
SELECT DISTINCT + cor0.col1 - - cor0.col1 * - 13 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-972
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7479
SELECT - tab1.col2 DIV tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7479
SELECT - tab1.col2 / tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

query I rowsort
SELECT col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT - 42 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-42

query I rowsort
SELECT 45 + - 93 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2187
-3489
-7302

query I rowsort
SELECT tab1.col1 * 29 + + tab1.col1 FROM tab1 GROUP BY col1
----
1320
1710
180

query I rowsort
SELECT DISTINCT 62 FROM tab0 GROUP BY tab0.col1
----
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 36 col2 FROM tab1 GROUP BY tab1.col1
----
36

query I rowsort
SELECT - 40 FROM tab1 AS cor0 GROUP BY col1
----
-40
-40
-40

query I rowsort
SELECT - + 27 AS col1 FROM tab0 GROUP BY col0
----
-27
-27
-27

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-7490
SELECT DISTINCT + - tab2.col0 DIV tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1

skipif mysql # not compatible
query I rowsort label-7490
SELECT DISTINCT + - tab2.col0 / tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1

query I rowsort
SELECT DISTINCT + - 18 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-18

query I rowsort
SELECT ALL cor0.col1 * + 24 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1056
1368
144

query I rowsort
SELECT DISTINCT - tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 10 AS col0 FROM tab0 GROUP BY tab0.col2
----
-10
-10
-10

query I rowsort
SELECT ALL + 7 * + 45 + + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
341
358
398

query I rowsort
SELECT 74 * 94 FROM tab0 AS cor0 GROUP BY cor0.col0
----
6956
6956
6956

query I rowsort
SELECT ALL - 43 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-43
-43
-43

query I rowsort
SELECT DISTINCT + tab2.col1 - + tab2.col1 * tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1640
-3422
-3660

query I rowsort
SELECT DISTINCT + cor0.col2 - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-11
-14
17

query I rowsort
SELECT 28 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
28
28
28

query I rowsort
SELECT + tab1.col0 + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 22 * 99 FROM tab0 GROUP BY tab0.col1
----
-2178

query I rowsort
SELECT DISTINCT - 23 AS col2 FROM tab0 GROUP BY tab0.col1
----
-23

query I rowsort
SELECT col2 * ( 17 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1207
136
765

query I rowsort
SELECT 6 * 57 FROM tab1 GROUP BY tab1.col0
----
342
342
342

query I rowsort
SELECT - 99 FROM tab0 GROUP BY tab0.col0
----
-99
-99
-99

query I rowsort
SELECT ALL + ( - 81 ) FROM tab1 GROUP BY tab1.col2
----
-81
-81
-81

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + + COALESCE ( 9, tab1.col1 * tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
9
9
9

onlyif mysql # DIV for integer division: 
query I rowsort label-7509
SELECT + tab1.col2 DIV + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7509
SELECT + tab1.col2 / + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT DISTINCT - 41 * cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-3321
0

query I rowsort
SELECT tab1.col2 + 9 FROM tab1 GROUP BY tab1.col2
----
17
54
80

query I rowsort
SELECT 24 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-7513
SELECT ALL - - ( 2 ) DIV - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7513
SELECT ALL - - ( 2 ) / - tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL + 0 + + 23 * - 98 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2254
-2254
-2254

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7515
SELECT + CAST( 86 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
86
86
86

skipif mysql # not compatible
query I rowsort label-7515
SELECT + CAST ( 86 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
86
86
86

query I rowsort
SELECT ALL 83 - + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
2
83

query I rowsort
SELECT DISTINCT + cor0.col2 * - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + 42 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
42
42
42

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT ALL 42 - cor0.col0 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1263
-5294
-7147

query I rowsort
SELECT tab2.col1 + - 20 FROM tab2 GROUP BY col1
----
21
39
41

query I rowsort
SELECT col1 - + 65 AS col1 FROM tab2 GROUP BY col1
----
-24
-4
-6

query I rowsort
SELECT ALL 91 AS col0 FROM tab0 GROUP BY tab0.col2
----
91
91
91

query I rowsort
SELECT + 82 - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
39
56

query I rowsort
SELECT DISTINCT cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col0
----
22
28
82

query I rowsort
SELECT col0 - - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT 1 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT 39 FROM tab0 GROUP BY tab0.col0
----
39

query I rowsort
SELECT 92 FROM tab1 GROUP BY tab1.col0
----
92
92
92

query I rowsort
SELECT 55 FROM tab0 GROUP BY tab0.col0
----
55
55
55

query I rowsort
SELECT ALL 84 FROM tab0 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT 70 + + 78 FROM tab0 AS cor0 GROUP BY cor0.col2
----
148
148
148

query I rowsort
SELECT 71 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT ALL + + 37 AS col1 FROM tab0 GROUP BY tab0.col0
----
37
37
37

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7536
SELECT ALL col2 DIV ( tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7536
SELECT ALL col2 / ( tab0.col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
1
1
1

query I rowsort
SELECT ALL - 47 AS col0 FROM tab1 GROUP BY tab1.col1
----
-47
-47
-47

query I rowsort
SELECT - + 75 AS col2 FROM tab0 GROUP BY tab0.col1
----
-75
-75

query I rowsort
SELECT DISTINCT - + tab1.col2 + 17 FROM tab1 GROUP BY tab1.col2
----
-28
-54
9

query I rowsort
SELECT + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - cor0.col2 * 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-1032
-1634
-3397

query I rowsort
SELECT ALL 95 FROM tab0 GROUP BY tab0.col0
----
95
95
95

query I rowsort
SELECT cor0.col1 + - 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-30
-32
-50

query I rowsort
SELECT DISTINCT - cor0.col2 * 76 FROM tab2 cor0 GROUP BY cor0.col2
----
-4408
-6004
-6612

query I rowsort
SELECT ALL - ( 39 ) + - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-121
-61
-67

query I rowsort
SELECT DISTINCT + + 46 AS col2 FROM tab2 GROUP BY col2
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + COALESCE ( 10, cor0.col1 + - cor0.col0 * col1, + cor0.col0 * - cor0.col0 + cor0.col1 * + cor0.col2, + cor0.col2 ) col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab1.col1 + 92 col2 FROM tab1 GROUP BY tab1.col1
----
136
149
98

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( - 74, + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-74
-74
-74

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab0 GROUP BY tab0.col0
----
-90

query I rowsort
SELECT - 88 AS col1 FROM tab1 GROUP BY tab1.col2
----
-88
-88
-88

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT ALL 97 + 16 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
113
113

query I rowsort
SELECT ALL + 76 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
76
76
76

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - 78 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1170
-7098
-7176

query I rowsort
SELECT 57 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57
57
57

onlyif mysql # DIV for integer division: 
query I rowsort label-7560
SELECT - col2 DIV - 67 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7560
SELECT - col2 / - 67 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7561
SELECT DISTINCT cor0.col2 * - COALESCE ( + 28, cor0.col2 + col2 DIV 84 ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-1064
-2212
-672

skipif mysql # not compatible
query I rowsort label-7561
SELECT DISTINCT cor0.col2 * - COALESCE ( + 28, cor0.col2 + col2 / 84 ) AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-1064
-2212
-672

query I rowsort
SELECT DISTINCT 58 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
2552
3306
348

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 col2 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT - 10 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-450
-710
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-7566
SELECT + tab0.col1 * COALESCE ( + tab0.col1, tab0.col1 DIV - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
6561

skipif mysql # not compatible
query I rowsort label-7566
SELECT + tab0.col1 * COALESCE ( + tab0.col1, tab0.col1 / - tab0.col1 ) FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT + 40 AS col0 FROM tab0 GROUP BY col2
----
40

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2, col2
----
45
71
8

query I rowsort
SELECT - + tab0.col0 + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1, cor1.col2
----
9 values hashing to f3d5535ca23ef1eea7c72c1650eea05c

query I rowsort
SELECT ALL - cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col1
----
-24
-38
-79

query I rowsort
SELECT ALL 13 FROM tab1 GROUP BY tab1.col2
----
13
13
13

query I rowsort
SELECT DISTINCT + 51 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1326
2193
4233

query I rowsort
SELECT 9 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
9
9
9

query I rowsort
SELECT 43 AS col1 FROM tab1 GROUP BY col2
----
43
43
43

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7576
SELECT - - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7576
SELECT - - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT 63 + 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
141
141
141

query I rowsort
SELECT ALL - 55 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-55
-55
-55

query I rowsort
SELECT - 87 FROM tab0 GROUP BY tab0.col1
----
-87
-87

query I rowsort
SELECT col0 * col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT 42 FROM tab0 GROUP BY tab0.col0
----
42

query I rowsort
SELECT ALL - 71 * 61 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-4353
-4359
-4413

query I rowsort
SELECT cor0.col1 * + 62 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5022

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6480

query I rowsort
SELECT + 51 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
2244
2907
306

query I rowsort
SELECT DISTINCT - 46 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-46

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7587
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-7587
SELECT ALL + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 45 FROM tab0 GROUP BY tab0.col2
----
-45

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - - COALESCE ( 28, tab0.col0, - CASE 4 WHEN tab0.col0 + - tab0.col0 * + tab0.col1 THEN + col1 END * + tab0.col1 ) FROM tab0 GROUP BY col2
----
28
28
28

query I rowsort
SELECT DISTINCT 12 FROM tab0 GROUP BY tab0.col0
----
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 83 col0 FROM tab2 GROUP BY tab2.col0
----
83

query I rowsort
SELECT 74 AS col1 FROM tab0 GROUP BY col2
----
74
74
74

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
78

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
-81
0
0

query I rowsort
SELECT tab1.col2 + 77 FROM tab1 GROUP BY col2
----
122
148
85

query I rowsort
SELECT + 27 + + 43 FROM tab1 AS cor0 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT ALL 89 AS col1 FROM tab1 GROUP BY tab1.col2
----
89
89
89

query I rowsort
SELECT DISTINCT + 40 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
40

query I rowsort
SELECT col1 + + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
105
24
24

query I rowsort
SELECT 12 FROM tab1 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT 44 + - col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-37
44

query I rowsort
SELECT DISTINCT - + 5 FROM tab0 GROUP BY tab0.col0
----
-5

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - tab0.col1 + - COALESCE ( 13, tab0.col1 * tab0.col0 ) FROM tab0 GROUP BY tab0.col1
----
-13
-94

query I rowsort
SELECT - 32 + 29 FROM tab2 GROUP BY tab2.col1
----
-3
-3
-3

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 72 col0 FROM tab0 GROUP BY tab0.col0
----
-72
-72
-72

query I rowsort
SELECT - tab2.col0 * - col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT - 16 + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
25
43
45

query I rowsort
SELECT DISTINCT 97 AS col1 FROM tab1 GROUP BY tab1.col0
----
97

query I rowsort
SELECT DISTINCT + - 4 FROM tab2 GROUP BY tab2.col0
----
-4

onlyif mysql # DIV for integer division: 
query I rowsort label-7611
SELECT - - tab0.col2 DIV - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7611
SELECT - - tab0.col2 / - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT + 58 + - 66 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5948
-6014
-932

query I rowsort
SELECT + 87 * 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
8091
8091
8091

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - - 77 AS col1 FROM tab2 GROUP BY tab2.col0
----
77

query I rowsort
SELECT ALL + 43 FROM tab1 GROUP BY tab1.col0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL ( - tab0.col1 ) AS col2 FROM tab0 GROUP BY col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 + 30 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
4

query I rowsort
SELECT - 55 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT - + tab0.col1 + 83 AS col1 FROM tab0 GROUP BY col1
----
2
83

query I rowsort
SELECT - tab1.col1 * + 38 AS col1 FROM tab1 GROUP BY col1
----
-1672
-2166
-228

query I rowsort
SELECT ALL - 6 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-6
-6
-6

query I rowsort
SELECT DISTINCT 43 FROM tab1 GROUP BY col2
----
43

query I rowsort
SELECT DISTINCT cor0.col2 * + ( + cor0.col2 * 71 ) FROM tab2 AS cor0 GROUP BY col2
----
238844
443111
537399

query I rowsort
SELECT - 29 AS col2 FROM tab1 GROUP BY tab1.col2
----
-29
-29
-29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7627
SELECT CAST( - col1 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

skipif mysql # not compatible
query I rowsort label-7627
SELECT CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL - cor0.col0 * + 77 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-2002
-3311
-6391

onlyif mysql # DIV for integer division: 
query I rowsort label-7629
SELECT - cor0.col1 DIV + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7629
SELECT - cor0.col1 / + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT - 22 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-22
-22
-22

query I rowsort
SELECT ALL - tab1.col0 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - 13 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-13
-13

query I rowsort
SELECT - 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4
-4
-4

query I rowsort
SELECT ALL 0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT ALL 73 AS col1 FROM tab2 GROUP BY tab2.col1
----
73
73
73

query I rowsort
SELECT cor0.col1 * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL - 48 FROM tab2 GROUP BY tab2.col1
----
-48
-48
-48

query I rowsort
SELECT DISTINCT 88 AS col0 FROM tab0 GROUP BY tab0.col0
----
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 24 FROM tab1 AS cor0 GROUP BY col1
----
24
24
24

query I rowsort
SELECT - 76 AS col0 FROM tab1 cor0 GROUP BY col2
----
-76
-76
-76

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT cor0.col0 + 37 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
128
129
52

query I rowsort
SELECT - 91 AS col1 FROM tab2 GROUP BY tab2.col0
----
-91
-91
-91

query I rowsort
SELECT - - tab1.col0 * - 74 FROM tab1 GROUP BY tab1.col0
----
-1628
-2072
-6068

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
1849
676
6889

query I rowsort
SELECT + + 13 AS col1 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT col2 * 5 FROM tab1 AS cor0 GROUP BY cor0.col2
----
225
355
40

query I rowsort
SELECT ALL - 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-58
-58
-58

query I rowsort
SELECT DISTINCT - 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-59

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
93

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
2565
3124
48

query I rowsort
SELECT - 76 FROM tab0 GROUP BY tab0.col2
----
-76
-76
-76

query I rowsort
SELECT 14 FROM tab0 AS cor0 GROUP BY col2
----
14
14
14

query I rowsort
SELECT + cor1.col0 + + cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
166
52
86

query I rowsort
SELECT DISTINCT col0 * cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT - tab0.col1 + - 38 FROM tab0 GROUP BY tab0.col1
----
-119
-38

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 12, tab1.col1 * tab1.col2 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
-12
-12
-12

query I rowsort
SELECT - cor0.col2 + + cor0.col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1406
552
6162

query I rowsort
SELECT ALL + cor0.col1 * 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL tab1.col0 + + tab1.col0 AS col1 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT ALL + 89 FROM tab1 GROUP BY tab1.col2
----
89
89
89

onlyif mysql # DIV for integer division: 
query I rowsort label-7666
SELECT ALL + 39 DIV tab0.col2 FROM tab0 GROUP BY col2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7666
SELECT ALL + 39 / tab0.col2 FROM tab0 GROUP BY col2
----
0
1
1

query I rowsort
SELECT - + tab2.col2 + - col2 FROM tab2 GROUP BY tab2.col2
----
-116
-158
-174

query I rowsort
SELECT ALL 44 FROM tab1 GROUP BY tab1.col2
----
44
44
44

query I rowsort
SELECT 87 FROM tab0 AS cor0 GROUP BY col0
----
87
87
87

query I rowsort
SELECT + cor0.col1 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 8 * + cor0.col2 + 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
148
444
652

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-54
-54
-54

query I rowsort
SELECT ALL 35 AS col0 FROM tab0 GROUP BY tab0.col1
----
35
35

query I rowsort
SELECT ALL + + 88 + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
169
88

query I rowsort
SELECT ALL + + 42 + - tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1
-41
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 - + tab2.col0 * tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
-240
-8372
-8556

query I rowsort
SELECT - 61 * 68 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, col2
----
-4148
-4148
-4148

query I rowsort
SELECT DISTINCT + 89 FROM tab0 GROUP BY tab0.col2
----
89

query I rowsort
SELECT 61 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 46 AS col1 FROM tab1 GROUP BY tab1.col1
----
46

query I rowsort
SELECT - 1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-42
-60
-62

query I rowsort
SELECT ALL ( 80 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT cor0.col1 * 52 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
2288
2964
312

query I rowsort
SELECT DISTINCT - 54 AS col0 FROM tab1 GROUP BY tab1.col0
----
-54

query I rowsort
SELECT + 61 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
1586
2623
5063

query I rowsort
SELECT - 17 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-17
-17
-17

query I rowsort
SELECT cor0.col0 - - 68 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
150
90
96

query I rowsort
SELECT ALL 63 * - 75 FROM tab1 GROUP BY col1
----
-4725
-4725
-4725

query I rowsort
SELECT + 54 FROM tab2 GROUP BY tab2.col0
----
54
54
54

query I rowsort
SELECT DISTINCT + 2 + + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 61 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
61

query I rowsort
SELECT tab2.col1 + - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT + 57 FROM tab0 GROUP BY tab0.col1
----
57
57

query I rowsort
SELECT ALL + 58 AS col1 FROM tab2 GROUP BY tab2.col1
----
58
58
58

query I rowsort
SELECT ALL tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( NULL ) IS NOT NULL
----
1849
676
6889

query I rowsort
SELECT DISTINCT - + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-7699
SELECT DISTINCT cor0.col2 DIV cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-7699
SELECT DISTINCT cor0.col2 / cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
44
57
6

query I rowsort
SELECT - + 56 AS col0 FROM tab2 GROUP BY tab2.col2
----
-56
-56
-56

query I rowsort
SELECT + 29 * 49 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1443
1449
1503

query I rowsort
SELECT ALL + 13 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
13
13

query I rowsort
SELECT DISTINCT + - 38 AS col1 FROM tab2 GROUP BY tab2.col1
----
-38

query I rowsort
SELECT - col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 68 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
68

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT ALL CASE - COALESCE ( + 56, col1 ) WHEN cor0.col1 + cor0.col0 THEN + cor0.col0 + 5 END AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 50 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-50
-50
-50

query I rowsort
SELECT ALL + 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT - 67 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 * 43 col0 FROM tab2 GROUP BY tab2.col1
----
-1763
-2537
-2623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL - tab2.col1 * - 25 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
1066
1534
1586

query I rowsort
SELECT - cor0.col0 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT DISTINCT - + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + 29 FROM tab1 GROUP BY tab1.col2
----
29
29
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 5 ) col0 FROM tab2 GROUP BY tab2.col0
----
-5
-5
-5

query I rowsort
SELECT 28 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT 93 FROM tab2 GROUP BY col0
----
93
93
93

query I rowsort
SELECT ALL + col0 * + cor0.col0 + + col0 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1352
13778
3698

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING NOT NULL IS NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-7723
SELECT - cor0.col2 DIV - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7723
SELECT - cor0.col2 / - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - 73 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-73
-73

onlyif mysql # DIV for integer division: 
query I rowsort label-7725
SELECT DISTINCT - + col1 DIV 86 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
query I rowsort label-7725
SELECT DISTINCT - + col1 / 86 AS col0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL - cor1.col2 * 78 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col2
----
-1872
-2964
-6162

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - - 40 FROM tab1 GROUP BY tab1.col1
----
40

query I rowsort
SELECT - 0 AS col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT - - tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-7732
SELECT - col0 DIV + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7732
SELECT - col0 / + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col2, cor1.col1
----
9 values hashing to cca41de50bd454833d55050217f62aa5

query I rowsort
SELECT - 39 FROM tab0 GROUP BY col0
----
-39
-39
-39

query I rowsort
SELECT 43 * cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
3913
3956
645

query I rowsort
SELECT ALL + ( 0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col1 * - 63 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2583
-3717
-3843

query I rowsort
SELECT DISTINCT 48 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col0
----
48

query I rowsort
SELECT ALL + + tab2.col2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT ALL + tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT ALL tab2.col2 + col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * - 79 col2 FROM tab1 GROUP BY tab1.col2
----
-3555
-5609
-632

query I rowsort
SELECT ALL - cor0.col0 * ( + cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT 86 + 33 FROM tab2 cor0 GROUP BY cor0.col0
----
119
119
119

query I rowsort
SELECT ALL 62 FROM tab1 AS cor0 GROUP BY cor0.col0
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col1 FROM tab2 GROUP BY tab2.col1
----
24

query I rowsort
SELECT ALL - tab0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 29 FROM tab1 GROUP BY tab1.col0
----
29

query I rowsort
SELECT - 65 FROM tab0 GROUP BY col2
----
-65
-65
-65

query I rowsort
SELECT ALL tab0.col2 + col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT 17 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
100
43
60

query I rowsort
SELECT ALL - 2 FROM tab0 GROUP BY tab0.col2
----
-2
-2
-2

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT ALL - cor0.col1 + 11 FROM tab2 AS cor0 GROUP BY col1
----
-30
-48
-50

query I rowsort
SELECT - cor0.col0 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT DISTINCT - 27 AS col1 FROM tab1 GROUP BY tab1.col1
----
-27

query I rowsort
SELECT DISTINCT + 3 * + 42 AS col1 FROM tab0 GROUP BY tab0.col1
----
126

query I rowsort
SELECT DISTINCT + ( + 39 ) FROM tab1 cor0 GROUP BY cor0.col2, col2
----
39

query I rowsort
SELECT DISTINCT + 34 FROM tab0 GROUP BY tab0.col2
----
34

query I rowsort
SELECT ALL + cor0.col0 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-29
16
38

query I rowsort
SELECT DISTINCT 89 - 95 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2191
-3521
-7416

query I rowsort
SELECT + + tab1.col2 * - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL + 47 AS col2 FROM tab0 GROUP BY tab0.col2
----
47
47
47

query I rowsort
SELECT - ( tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 75 AS col1 FROM tab2 GROUP BY tab2.col2
----
75
75
75

query I rowsort
SELECT + 44 * - tab1.col2 FROM tab1 GROUP BY col2
----
-1980
-3124
-352

query I rowsort
SELECT ALL + tab2.col1 * - 28 FROM tab2 GROUP BY tab2.col1
----
-1148
-1652
-1708

query I rowsort
SELECT 45 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + + 67 FROM tab0 GROUP BY tab0.col1
----
67
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7773
SELECT ALL - - tab0.col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7773
SELECT ALL - - tab0.col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 32 FROM tab0 GROUP BY tab0.col0
----
32

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.col1
----
15
91
92

query I rowsort
SELECT ALL - cor0.col2 + + 10 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
405
639
72

query I rowsort
SELECT + + 71 FROM tab1 GROUP BY tab1.col0
----
71
71
71

query I rowsort
SELECT + 8 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-18
-35
-75

query I rowsort
SELECT 84 * - 62 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5208
-5208
-5208

query I rowsort
SELECT ALL 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL + - col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7783
SELECT DISTINCT cor0.col0 DIV - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7783
SELECT DISTINCT cor0.col0 / - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT - cor0.col1 + 45 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-14
-16
4

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 12 FROM tab0 cor0 GROUP BY col1
----
12
12

onlyif mysql # DIV for integer division: 
query I rowsort label-7787
SELECT DISTINCT cor0.col0 DIV 68 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
0
1

skipif mysql # not compatible
query I rowsort label-7787
SELECT DISTINCT cor0.col0 / 68 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
0
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7788
SELECT DISTINCT - COALESCE ( - 8, tab2.col0 + - CAST( NULL AS SIGNED ) ) FROM tab2 GROUP BY col2
----
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-7788
SELECT DISTINCT - COALESCE ( - 8, tab2.col0 + - CAST ( NULL AS INTEGER ) ) FROM tab2 GROUP BY col2
----
8

query I rowsort
SELECT DISTINCT 14 + + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
40
57
97

onlyif mysql # DIV for integer division: 
query I rowsort label-7790
SELECT DISTINCT - 59 DIV + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-7790
SELECT DISTINCT - 59 / + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1
0

query I rowsort
SELECT ALL - cor0.col1 * 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2665
-3835
-3965

query I rowsort
SELECT + 99 + col1 FROM tab0 GROUP BY tab0.col1
----
180
99

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

query I rowsort
SELECT 75 FROM tab2 GROUP BY tab2.col1
----
75
75
75

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7795
SELECT DISTINCT tab2.col0 * CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7795
SELECT DISTINCT tab2.col0 * CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT + - 6 AS col0 FROM tab2 GROUP BY col1
----
-6
-6
-6

query I rowsort
SELECT ALL + + col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT tab2.col2 * - tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + + col2 * - tab2.col2 + 37 FROM tab2 GROUP BY col2
----
-3327
-6204
-7532

query I rowsort
SELECT DISTINCT - col0 * + 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-120
-728
-736

onlyif mysql # DIV for integer division: 
query I rowsort label-7801
SELECT + cor0.col1 DIV cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7801
SELECT + cor0.col1 / cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
1
1
1

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to ec1f9c518baf89f5f85dda11171d4494

query I rowsort
SELECT col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT cor0.col1 * 13 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1053

query I rowsort
SELECT DISTINCT + 3 + 69 AS col2 FROM tab0 GROUP BY tab0.col2
----
72

query I rowsort
SELECT DISTINCT + + 81 FROM tab2 GROUP BY tab2.col2
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 col1 FROM tab1 GROUP BY tab1.col2
----
-44
-44
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL 68 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col1
----
68
68
68

query I rowsort
SELECT + tab1.col1 * 10 FROM tab1 GROUP BY col1
----
440
570
60

query I rowsort
SELECT DISTINCT 1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT ALL + ( - tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - tab0.col1 * + 34 FROM tab0 GROUP BY tab0.col1
----
-2754
0

query I rowsort
SELECT - 40 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-40
-40
-40

query I rowsort
SELECT ALL 19 * col1 + + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
1620

query I rowsort
SELECT ( - 91 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-91
-91
-91

query I rowsort
SELECT ALL + 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
34
34
34

query I rowsort
SELECT ( cor1.col2 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
24
38
79

query I rowsort
SELECT 4 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
4
4
4

query I rowsort
SELECT DISTINCT - - tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT 48 + - tab1.col2 * - 78 AS col1 FROM tab1 GROUP BY tab1.col2
----
3558
5586
672

query I rowsort
SELECT + - tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT - - 54 FROM tab2 GROUP BY tab2.col2
----
54
54
54

query I rowsort
SELECT + - 0 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL 99 AS col1 FROM tab2 GROUP BY tab2.col2
----
99
99
99

query I rowsort
SELECT - 37 AS col1 FROM tab2 cor0 GROUP BY col2
----
-37
-37
-37

query I rowsort
SELECT cor0.col0 + - 4 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, col0
----
11
87
88

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-81
0

query I rowsort
SELECT 17 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT ALL + tab1.col0 + 70 AS col1 FROM tab1 GROUP BY tab1.col0
----
152
92
98

query I rowsort
SELECT DISTINCT cor0.col2 * 33 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1254
2607
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + + 27 FROM tab2 GROUP BY tab2.col2
----
27
27
27

query I rowsort
SELECT ( - tab2.col2 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT - 98 AS col2 FROM tab1 GROUP BY tab1.col1
----
-98
-98
-98

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-7838
SELECT DISTINCT 49 + tab0.col0 DIV 55 FROM tab0 GROUP BY tab0.col0
----
49
50

skipif mysql # not compatible
query I rowsort label-7838
SELECT DISTINCT 49 + tab0.col0 / 55 FROM tab0 GROUP BY tab0.col0
----
49
50

query I rowsort
SELECT cor0.col1 * + cor0.col1 - - 19 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
19
6580

query I rowsort
SELECT DISTINCT cor0.col0 + ( - 22 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
6
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-37
-37
-37

query I rowsort
SELECT 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT DISTINCT 75 FROM tab1 GROUP BY col1
----
75

query I rowsort
SELECT DISTINCT - - 35 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1505
2905
910

query I rowsort
SELECT ALL cor0.col1 + 57 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
101
114
63

query I rowsort
SELECT ALL 93 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0, col2
----
93
93
93

query I rowsort
SELECT ALL cor0.col1 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 43 * 83 col1 FROM tab0 GROUP BY tab0.col1
----
-3569

onlyif mysql # DIV for integer division: 
query I rowsort label-7849
SELECT + 20 DIV - 85 - + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7849
SELECT + 20 / - 85 - + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-7850
SELECT DISTINCT + 7 - + 94 DIV - 94 col1 FROM tab0 GROUP BY tab0.col1
----
8

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7850
SELECT DISTINCT + 7 - + 94 / - 94 col1 FROM tab0 GROUP BY tab0.col1
----
8

query I rowsort
SELECT + 38 FROM tab2 AS cor0 GROUP BY col2
----
38
38
38

query I rowsort
SELECT 98 FROM tab1 GROUP BY tab1.col0
----
98
98
98

query I rowsort
SELECT - - 83 FROM tab2 GROUP BY col1
----
83
83
83

query I rowsort
SELECT DISTINCT + 83 AS col2 FROM tab2 GROUP BY tab2.col2
----
83

query I rowsort
SELECT DISTINCT + + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + + 68 AS col0 FROM tab0 GROUP BY col0
----
68

query I rowsort
SELECT - - ( 70 ) FROM tab2 GROUP BY tab2.col1
----
70
70
70

query I rowsort
SELECT DISTINCT + 89 AS col2 FROM tab2 GROUP BY tab2.col1
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 * + 43 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
473
473
473

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + cor0.col0 ) + - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-29
16
38

query I rowsort
SELECT ALL + 48 AS col1 FROM tab0 GROUP BY tab0.col0
----
48
48
48

query I rowsort
SELECT ALL 40 * tab1.col0 + col0 FROM tab1 GROUP BY tab1.col0
----
1148
3362
902

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 + NULLIF ( 1 + - cor0.col2 * 41, - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
-113
-407
3003

query I rowsort
SELECT cor0.col1 + + col1 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-126
-1539
-3564

query I rowsort
SELECT + + col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 1 + + 37 AS col0 FROM tab0 GROUP BY col0
----
38

query I rowsort
SELECT DISTINCT - - 92 FROM tab2 GROUP BY col1
----
92

query I rowsort
SELECT DISTINCT - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 WHERE NOT NULL IS NULL GROUP BY cor0.col1
----

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1 WHERE - col1 IS NULL GROUP BY tab1.col2
----

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
3364
6241
7569

query I rowsort
SELECT ALL 76 + + col2 FROM tab2 GROUP BY tab2.col2
----
134
155
163

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 96 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT COALESCE ( cor0.col0, - col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL - - tab0.col1 * + 60 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
4860

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-7879
SELECT DISTINCT + tab0.col1 DIV 71 col1 FROM tab0 GROUP BY col1
----
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7879
SELECT DISTINCT + tab0.col1 / 71 col1 FROM tab0 GROUP BY col1
----
0
1

query I rowsort
SELECT DISTINCT + - ( ( + tab0.col1 ) ) AS col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL - col0 * tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-210
-8190
-8372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * - 48 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1968
-2832
-2928

query I rowsort
SELECT + tab0.col2 * 76 AS col0 FROM tab0 GROUP BY tab0.col2
----
1824
2888
6004

query I rowsort
SELECT + cor0.col0 + - 63 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1664
2752
5312

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7885
SELECT + cor0.col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7885
SELECT + cor0.col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 31 AS col0 FROM tab2 GROUP BY tab2.col2
----
31
31
31

query I rowsort
SELECT ALL 8 FROM tab1 GROUP BY tab1.col1
----
8
8
8

query I rowsort
SELECT - cor0.col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-38
-79
57

query I rowsort
SELECT - 16 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-16
-16

query I rowsort
SELECT ALL tab0.col2 - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL + 15 - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-30
-56
7

query I rowsort
SELECT ALL 90 FROM tab0 GROUP BY tab0.col2
----
90
90
90

onlyif mysql # DIV for integer division: 
query I rowsort label-7893
SELECT + cor0.col2 DIV col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7893
SELECT + cor0.col2 / col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-7894
SELECT DISTINCT + tab2.col0 DIV tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1

skipif mysql # not compatible
query I rowsort label-7894
SELECT DISTINCT + tab2.col0 / tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - + COALESCE ( + 76, tab1.col2 * - CASE + tab1.col0 WHEN - tab1.col2 + ( + 36 ) THEN + tab1.col0 WHEN + tab1.col0 * - 45 THEN tab1.col0 ELSE NULL END - tab1.col2 ) + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-48
-54
6

query I rowsort
SELECT DISTINCT + cor0.col2 * + 37 FROM tab0 cor0 GROUP BY cor0.col2
----
1406
2923
888

query I rowsort
SELECT ALL - 81 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
-81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7898
SELECT CAST( 13 AS SIGNED ) - + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-28
-46
-48

skipif mysql # not compatible
query I rowsort label-7898
SELECT CAST ( 13 AS INTEGER ) - + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-28
-46
-48

query I rowsort
SELECT 36 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
36
36
36

query I rowsort
SELECT - 94 AS col2 FROM tab2 GROUP BY tab2.col2
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT DISTINCT 74 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
74

query I rowsort
SELECT DISTINCT + 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 34 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2788
748
952

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab1 GROUP BY tab1.col0
----
19

query I rowsort
SELECT cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 59 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
59

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7910
SELECT DISTINCT - + tab1.col0 * CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7910
SELECT DISTINCT - + tab1.col0 * CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT ALL - cor0.col0 + 86 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
-6
71

onlyif mysql # DIV for integer division: 
query I rowsort label-7912
SELECT DISTINCT cor0.col1 + - cor0.col1 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
55
6

skipif mysql # not compatible
query I rowsort label-7912
SELECT DISTINCT cor0.col1 + - cor0.col1 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
55
6

query I rowsort
SELECT 85 FROM tab2 cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT ALL + tab0.col1 + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT + + tab1.col0 * - 0 AS col1 FROM tab1 GROUP BY tab1.col0
----
0
0
0

query I rowsort
SELECT 8 AS col0 FROM tab1 GROUP BY tab1.col0
----
8
8
8

query I rowsort
SELECT DISTINCT + 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
57

query I rowsort
SELECT - - 69 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
160
161
84

query I rowsort
SELECT DISTINCT 19 FROM tab2 GROUP BY tab2.col0
----
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 59 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-59
-59
-59

query I rowsort
SELECT DISTINCT 67 FROM tab0 AS cor0 GROUP BY col0
----
67

query I rowsort
SELECT - 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + 99 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
99

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + 34 FROM tab2 AS cor0 GROUP BY col0
----
34

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY col2 HAVING NULL IS NULL
----
45
71
8

query I rowsort
SELECT DISTINCT - - 89 FROM tab1 GROUP BY tab1.col1
----
89

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 10, 43 * - tab2.col0 + col0, tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col2
----
10
10
10

query I rowsort
SELECT ALL 43 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
102
104
84

query I rowsort
SELECT ALL - 5 FROM tab0 GROUP BY tab0.col1
----
-5
-5

query I rowsort
SELECT + cor0.col0 + 50 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
133
76
93

query I rowsort
SELECT ALL + 35 AS col1 FROM tab2 GROUP BY tab2.col1
----
35
35
35

query I rowsort
SELECT + tab2.col0 * - 75 FROM tab2 GROUP BY tab2.col0
----
-1125
-6825
-6900

query I rowsort
SELECT ALL + + 22 FROM tab2 GROUP BY tab2.col1
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT - - tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - - 73 AS col0 FROM tab0 GROUP BY tab0.col0
----
73
73
73

query I rowsort
SELECT + cor0.col2 + + 54 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
112
133
141

query I rowsort
SELECT + cor0.col0 + - 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-30
-47
10

onlyif mysql # DIV for integer division: 
query I rowsort label-7942
SELECT + COALESCE ( 16, col2 DIV ( tab0.col1 * tab0.col2 ) ) * + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1264
384
608

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7942
SELECT + COALESCE ( 16, col2 / ( tab0.col1 * tab0.col2 ) ) * + tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
1264
384
608

query I rowsort
SELECT ALL - 73 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-164
-165
-88

query I rowsort
SELECT DISTINCT 37 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
37

query I rowsort
SELECT ALL + - 61 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-61
-61
-61

query I rowsort
SELECT - 83 * + col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-2158
-3569
-6889

query I rowsort
SELECT ALL - 64 AS col2 FROM tab2 GROUP BY tab2.col2
----
-64
-64
-64

query I rowsort
SELECT ALL + cor0.col2 * 33 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
1914
2607
2871

query I rowsort
SELECT + cor0.col2 * - 77 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3465
-5467
-616

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7950
SELECT + cor0.col0 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0 GROUP BY col0, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7950
SELECT + cor0.col0 * - CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0 GROUP BY col0, col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col0 * 70 FROM tab1 GROUP BY col0
----
1540
1960
5740

query I rowsort
SELECT + 94 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
94
94
94

query I rowsort
SELECT DISTINCT - 59 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col0
----
-59

query I rowsort
SELECT DISTINCT - ( 8 ) + tab0.col0 FROM tab0 GROUP BY col0
----
18
35
75

query I rowsort
SELECT - 4 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT cor0.col2 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
105
121
67

query I rowsort
SELECT - 63 + + col1 FROM tab2 GROUP BY tab2.col1
----
-2
-22
-4

query I rowsort
SELECT ALL - 16 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT tab2.col2 * + 10 AS col1 FROM tab2 GROUP BY tab2.col2
----
580
790
870

query I rowsort
SELECT ALL ( 1 ) FROM tab0 GROUP BY tab0.col0
----
1
1
1

query I rowsort
SELECT ALL - 97 AS col2 FROM tab2 GROUP BY tab2.col0
----
-97
-97
-97

query I rowsort
SELECT - 88 AS col0 FROM tab0 GROUP BY col1
----
-88
-88

query I rowsort
SELECT - 0 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT - - tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT 35 FROM tab1 cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT + - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT tab0.col1 - - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL 74 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
119
145
82

query I rowsort
SELECT - 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-5
-5
-5

query I rowsort
SELECT + 8 - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-7
-83
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-7971
SELECT DISTINCT - - tab0.col2 DIV - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-7971
SELECT DISTINCT - - tab0.col2 / - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT - tab2.col2 - - 63 FROM tab2 GROUP BY tab2.col2
----
-16
-24
5

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) * cor0.col0 + 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1829
-656
-6869

query I rowsort
SELECT ALL - tab2.col1 + + 69 AS col2 FROM tab2 GROUP BY tab2.col1
----
10
28
8

query I rowsort
SELECT ALL - tab2.col1 + ( - 20 + - 56 ) FROM tab2 GROUP BY tab2.col1
----
-117
-135
-137

onlyif mysql # DIV for integer division: 
query I rowsort label-7976
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-7976
SELECT tab2.col2 / + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

query I rowsort
SELECT + tab0.col1 + 98 AS col0 FROM tab0 GROUP BY tab0.col1
----
179
98

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + 23 FROM tab1 GROUP BY col1
----
23
23
23

query I rowsort
SELECT - 37 AS col1 FROM tab0 GROUP BY tab0.col0
----
-37
-37
-37

query I rowsort
SELECT ( + 88 ) FROM tab0 AS cor0 GROUP BY col1
----
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 70 col2 FROM tab2 GROUP BY tab2.col0
----
70
70
70

query I rowsort
SELECT DISTINCT + cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col2
----
41
59
61

query I rowsort
SELECT - tab0.col0 + - 40 FROM tab0 GROUP BY tab0.col0
----
-123
-66
-83

query I rowsort
SELECT ALL - 16 + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
12
6
66

query I rowsort
SELECT DISTINCT - 47 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47

query I rowsort
SELECT DISTINCT 64 FROM tab2 AS cor0 GROUP BY cor0.col1
----
64

query I rowsort
SELECT + 94 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
-7614
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col0 + - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT ALL + 10 * - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-450
-710
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 57 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT COALESCE ( - cor0.col0, - 88 ) FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + 9 AS col0 FROM tab1 GROUP BY col2
----
9
9
9

query I rowsort
SELECT ( cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 - + ( cor0.col2 + - cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 83 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
83
83
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 30, - tab1.col1, 66 ) AS col1 FROM tab1 GROUP BY col0
----
-30
-30
-30

query I rowsort
SELECT ALL cor0.col1 + + 25 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
2106

query I rowsort
SELECT tab2.col0 * + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 35 * + col0 FROM tab0 GROUP BY tab0.col0
----
-1505
-2905
-910

query I rowsort
SELECT - + 39 FROM tab2 GROUP BY tab2.col0
----
-39
-39
-39

query I rowsort
SELECT ALL cor0.col1 * + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL 10 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT + 68 FROM tab2 GROUP BY tab2.col1
----
68
68
68

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 42 col0 FROM tab2 GROUP BY tab2.col2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 84 col1 FROM tab1 GROUP BY tab1.col1
----
84
84
84

query I rowsort
SELECT ALL - + 29 AS col2 FROM tab0 GROUP BY tab0.col1
----
-29
-29

query I rowsort
SELECT ALL - + ( 96 ) + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-15
-96

query I rowsort
SELECT 13 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
13
13
13

query I rowsort
SELECT + 17 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL 84 * 14 FROM tab0 GROUP BY tab0.col0
----
1176
1176
1176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + cor0.col0 + + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1930
676
6889

query I rowsort
SELECT ALL + 92 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
4048
5244
552

query I rowsort
SELECT - cor0.col2 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
1305
5336
7189

query I rowsort
SELECT cor0.col0 * + cor0.col2 + cor0.col2 * cor0.col0 FROM tab0 AS cor0 GROUP BY col2, col0
----
2064
4108
6308

query I rowsort
SELECT ALL 70 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
70
70
70

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8022
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8022
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
NULL

query I rowsort
SELECT ALL - 71 FROM tab2 GROUP BY tab2.col2
----
-71
-71
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-8025
SELECT ALL tab1.col2 DIV - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8025
SELECT ALL tab1.col2 / - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-8026
SELECT DISTINCT + tab1.col2 DIV tab1.col2 FROM tab1 GROUP BY col2 HAVING NULL IS NULL
----
1

skipif mysql # not compatible
query I rowsort label-8026
SELECT DISTINCT + tab1.col2 / tab1.col2 FROM tab1 GROUP BY col2 HAVING NULL IS NULL
----
1

onlyif mysql # DIV for integer division: 
query I rowsort label-8027
SELECT ALL - col0 DIV + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8027
SELECT ALL - col0 / + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT - - tab1.col2 * - col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - 74 FROM tab2 GROUP BY col2
----
-74

query I rowsort
SELECT DISTINCT + 62 * col1 + - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
4941

query I rowsort
SELECT DISTINCT - 40 FROM tab2 GROUP BY col1
----
-40

query I rowsort
SELECT DISTINCT - - tab2.col1 * - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT 44 AS col1 FROM tab0 GROUP BY tab0.col2
----
44
44
44

query I rowsort
SELECT ALL ( 5 ) + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
27
33
87

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8036
SELECT ALL - + CAST( NULL AS DECIMAL ) col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8036
SELECT ALL - + CAST ( NULL AS REAL ) col2 FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - tab0.col1 * 36 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-2835
0

query I rowsort
SELECT - 41 AS col0 FROM tab1 GROUP BY tab1.col0
----
-41
-41
-41

onlyif mysql # DIV for integer division: 
query I rowsort label-8039
SELECT DISTINCT + cor0.col0 + + CASE 37 + + cor0.col2 WHEN cor0.col1 DIV - cor0.col2 + col0 * cor0.col1 THEN NULL ELSE + 2 + cor0.col0 END DIV + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
15
92
93

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8039
SELECT DISTINCT + cor0.col0 + + CASE 37 + + cor0.col2 WHEN cor0.col1 / - cor0.col2 + col0 * cor0.col1 THEN NULL ELSE + 2 + cor0.col0 END / + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
15
92
93

query I rowsort
SELECT 79 + 97 FROM tab0 GROUP BY tab0.col2
----
176
176
176

onlyif mysql # DIV for integer division: 
query I rowsort label-8041
SELECT DISTINCT - + tab0.col2 DIV COALESCE ( tab0.col2 * + tab0.col2, + 10, - tab0.col1, tab0.col2 * - 99 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8041
SELECT DISTINCT - + tab0.col2 / COALESCE ( tab0.col2 * + tab0.col2, + 10, - tab0.col1, tab0.col2 * - 99 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8042
SELECT DISTINCT + - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8042
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT col1 * 91 FROM tab2 AS cor0 GROUP BY col1
----
3731
5369
5551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 91 col0 FROM tab0 GROUP BY tab0.col0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 12 col0 FROM tab0 GROUP BY tab0.col1
----
-12

query I rowsort
SELECT - ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - tab0.col2 + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1406
552
6162

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
41
59
61

query I rowsort
SELECT - - tab2.col2 * 16 FROM tab2 GROUP BY tab2.col2
----
1264
1392
928

onlyif mysql # DIV for integer division: 
query I rowsort label-8053
SELECT col1 DIV 11 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
0
0
7

skipif mysql # not compatible
query I rowsort label-8053
SELECT col1 / 11 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
0
0
7

query I rowsort
SELECT DISTINCT + tab1.col1 - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col2 + col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING ( NULL ) NOT IN ( + cor0.col2 )
----

query I rowsort
SELECT DISTINCT + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - - 35 * tab0.col0 + - tab0.col0 FROM tab0 GROUP BY col0
----
1462
2822
884

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6561
0
0

query I rowsort
SELECT DISTINCT 23 AS col1 FROM tab0 GROUP BY tab0.col2
----
23

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8062
SELECT ALL + tab1.col2 + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8062
SELECT ALL + tab1.col2 + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT + - 24 AS col0 FROM tab0 GROUP BY col2
----
-24
-24
-24

query I rowsort
SELECT DISTINCT - cor0.col2 * 6 + 76 FROM tab1 AS cor0 GROUP BY col2
----
-194
-350
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + tab0.col0 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - 36 FROM tab2 GROUP BY col0
----
-36

query I rowsort
SELECT DISTINCT - - 43 FROM tab2 GROUP BY tab2.col1
----
43

query I rowsort
SELECT DISTINCT 44 FROM tab0 GROUP BY tab0.col1
----
44

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
81

query I rowsort
SELECT col1 * tab0.col1 + - 40 FROM tab0 GROUP BY tab0.col1
----
-40
6521

query I rowsort
SELECT col1 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

query I rowsort
SELECT DISTINCT + + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + 37 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
37

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT ALL tab1.col1 + 63 FROM tab1 GROUP BY col1
----
107
120
69

query I rowsort
SELECT DISTINCT + 46 * cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3726

query I rowsort
SELECT 28 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT + - tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL 17 FROM tab1 GROUP BY tab1.col1
----
17
17
17

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8086
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8086
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL 73 * cor0.col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
5994

query I rowsort
SELECT - 32 AS col1 FROM tab0 GROUP BY tab0.col2
----
-32
-32
-32

query I rowsort
SELECT ALL + 6 * 14 AS col0 FROM tab1 GROUP BY tab1.col0
----
84
84
84

query I rowsort
SELECT DISTINCT - - tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT + cor0.col2 * - 81 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1944
-3078
-6399

query I rowsort
SELECT DISTINCT + + 13 AS col1 FROM tab1 GROUP BY col2
----
13

query I rowsort
SELECT 48 * - 41 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1968
-1968
-1968

query I rowsort
SELECT ALL - 85 AS col0 FROM tab1 GROUP BY tab1.col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT 42 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT - 3 AS col2 FROM tab1 GROUP BY tab1.col0
----
-3
-3
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 * col0 - + 56 col0 FROM tab1 GROUP BY tab1.col0
----
1308
1680
5028

query I rowsort
SELECT 4 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT ALL - + 91 * - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
4095
6461
728

query I rowsort
SELECT ALL + + col1 + + col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT DISTINCT - 3 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-135
-213
-24

query I rowsort
SELECT + 56 * 74 AS col0 FROM tab0 AS cor0 GROUP BY col1, col1
----
4144
4144

query I rowsort
SELECT DISTINCT - 55 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-55

query I rowsort
SELECT ALL - 92 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-92
-92
-92

query I rowsort
SELECT DISTINCT - 46 AS col0 FROM tab0 GROUP BY tab0.col2
----
-46

query I rowsort
SELECT - 4 AS col1 FROM tab0 GROUP BY tab0.col0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + 47 - + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-24
2
39

query I rowsort
SELECT DISTINCT tab0.col2 * - tab0.col2 - 87 FROM tab0 GROUP BY tab0.col2
----
-1531
-6328
-663

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8109
SELECT DISTINCT - - CASE + tab1.col0 WHEN CAST( NULL AS SIGNED ) THEN + tab1.col1 END FROM tab1 GROUP BY tab1.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8109
SELECT DISTINCT - - CASE + tab1.col0 WHEN CAST ( NULL AS INTEGER ) THEN + tab1.col1 END FROM tab1 GROUP BY tab1.col2
----
NULL

query I rowsort
SELECT + 3 AS col2 FROM tab2 GROUP BY tab2.col1
----
3
3
3

query I rowsort
SELECT DISTINCT + 56 AS col2 FROM tab2 GROUP BY tab2.col0
----
56

query I rowsort
SELECT 98 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
98
98

query I rowsort
SELECT + cor0.col0 + - 96 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4
-5
-81

onlyif mysql # DIV for integer division: 
query I rowsort label-8114
SELECT ALL + 90 DIV - 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8114
SELECT ALL + 90 / - 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-8117
SELECT DISTINCT - ( + cor0.col0 ) DIV + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8117
SELECT DISTINCT - ( + cor0.col0 ) / + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-2
0

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT + 64 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
23
3
5

query I rowsort
SELECT DISTINCT + + NULLIF ( - 71, - tab2.col0 ) * + 3 FROM tab2 GROUP BY tab2.col0
----
-213

query I rowsort
SELECT ALL + - 39 FROM tab2 GROUP BY tab2.col0
----
-39
-39
-39

query I rowsort
SELECT + 46 FROM tab1 AS cor0 GROUP BY col1
----
46
46
46

query I rowsort
SELECT ALL - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1 HAVING - tab0.col1 IS NULL
----

query I rowsort
SELECT tab2.col0 AS col2 FROM tab2 WHERE NOT col2 + - col2 IS NULL GROUP BY tab2.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT 62 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
62
62
62

query I rowsort
SELECT + 16 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
16
16
16

query I rowsort
SELECT + cor0.col2 * cor0.col0 + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1056
2133
3192

onlyif mysql # DIV for integer division: 
query I rowsort label-8128
SELECT DISTINCT + 17 DIV 99 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

skipif mysql # not compatible
query I rowsort label-8128
SELECT DISTINCT + 17 / 99 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT 78 FROM tab1 AS cor0 GROUP BY col0
----
78
78
78

query I rowsort
SELECT ALL + tab2.col2 * 1 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8132
SELECT + CAST( NULL AS SIGNED ) col0 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8132
SELECT + CAST ( NULL AS INTEGER ) col0 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8133
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8133
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT - 3 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT ALL - tab0.col0 * 71 AS col1 FROM tab0 GROUP BY tab0.col0
----
-1846
-3053
-5893

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT col1 + + 36 FROM tab1 GROUP BY tab1.col1
----
42
80
93

query I rowsort
SELECT cor0.col2 - cor0.col1 * - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
1968
38
79

query I rowsort
SELECT ALL + ( 84 ) FROM tab2 GROUP BY tab2.col0
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 6 + - col2 * - col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3370
6247
7575

query I rowsort
SELECT - 19 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-19
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col2 ) * tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-8145
SELECT 75 DIV col1 col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8145
SELECT 75 / col1 col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 15 FROM tab1 cor0 GROUP BY cor0.col0
----
-15

query I rowsort
SELECT ALL 70 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT ALL - 52 FROM tab1 GROUP BY tab1.col0
----
-52
-52
-52

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8149
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8149
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab0 GROUP BY tab0.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-8151
SELECT cor0.col1 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-8151
SELECT cor0.col1 / - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-4
0
0

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT tab1.col1 - - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
114
12
88

onlyif mysql # DIV for integer division: 
query I rowsort label-8155
SELECT + col2 DIV ( 12 ) FROM tab2 cor0 GROUP BY cor0.col2
----
4
6
7

skipif mysql # not compatible
query I rowsort label-8155
SELECT + col2 / ( 12 ) FROM tab2 cor0 GROUP BY cor0.col2
----
4
6
7

query I rowsort
SELECT ALL + tab0.col2 + + 22 FROM tab0 GROUP BY tab0.col2
----
101
46
60

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 * NULLIF ( cor0.col1, - cor0.col1 ) + - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
6480
NULL

query I rowsort
SELECT DISTINCT - 99 FROM tab1 GROUP BY tab1.col2
----
-99

query I rowsort
SELECT ALL - 57 FROM tab1 GROUP BY col0
----
-57
-57
-57

query I rowsort
SELECT ALL 72 + + tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
110
151
96

query I rowsort
SELECT DISTINCT + 24 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
24

query I rowsort
SELECT DISTINCT tab0.col1 * + 52 FROM tab0 GROUP BY tab0.col1
----
0
4212

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col2 FROM tab2 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT DISTINCT + + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT - 7 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-7
-7
-7

query I rowsort
SELECT ALL + 77 FROM tab1 GROUP BY tab1.col2
----
77
77
77

query I rowsort
SELECT + tab0.col2 * + 85 FROM tab0 GROUP BY tab0.col2
----
2040
3230
6715

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT - 88 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-88
-88
-88

query I rowsort
SELECT ALL + + 78 FROM tab1 GROUP BY tab1.col1
----
78
78
78

query I rowsort
SELECT ALL + cor0.col2 + - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - 25 AS col2 FROM tab0 GROUP BY tab0.col0
----
-25
-25
-25

query I rowsort
SELECT - 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-77
-77

query I rowsort
SELECT ALL - 62 FROM tab1 cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT 19 + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
27
64
90

query I rowsort
SELECT DISTINCT - - tab1.col2 * + col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - + tab1.col1 * 15 - 46 AS col0 FROM tab1 GROUP BY tab1.col1
----
-136
-706
-901

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 94, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-94
-94
-94

query I rowsort
SELECT - - tab2.col2 * 28 + + 46 AS col2 FROM tab2 GROUP BY tab2.col2
----
1670
2258
2482

query I rowsort
SELECT ALL 17 FROM tab1 GROUP BY col2
----
17
17
17

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8184
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + - 27 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8184
SELECT DISTINCT + CAST ( NULL AS REAL ) + - 27 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

query I rowsort
SELECT - 71 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-71
-71
-71

query I rowsort
SELECT DISTINCT cor0.col0 * - 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-286
-473
-913

query I rowsort
SELECT + + tab2.col1 * - tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1640
-3422
-3660

query I rowsort
SELECT + tab0.col1 AS col0 FROM tab0 WHERE NOT ( NULL ) NOT IN ( tab0.col1 ) GROUP BY tab0.col1
----

onlyif mysql # DIV for integer division: 
query I rowsort label-8189
SELECT DISTINCT tab2.col2 DIV + col2 FROM tab2 GROUP BY tab2.col2
----
1

skipif mysql # not compatible
query I rowsort label-8189
SELECT DISTINCT tab2.col2 / + col2 FROM tab2 GROUP BY tab2.col2
----
1

query I rowsort
SELECT DISTINCT + - 53 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-8
18

query I rowsort
SELECT DISTINCT + - 32 AS col1 FROM tab0 GROUP BY tab0.col2
----
-32

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab0 GROUP BY tab0.col2
----
27

query I rowsort
SELECT DISTINCT - ( + 45 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-45

query I rowsort
SELECT cor0.col1 - cor0.col2 * - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
2419
4720
5368

query I rowsort
SELECT DISTINCT - 75 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-30
-4
-67

query I rowsort
SELECT DISTINCT + - 39 AS col2 FROM tab0 GROUP BY tab0.col2
----
-39

query I rowsort
SELECT DISTINCT 36 AS col2 FROM tab2 GROUP BY tab2.col2
----
36

query I rowsort
SELECT DISTINCT 56 FROM tab1 GROUP BY col2
----
56

query I rowsort
SELECT ALL - + 17 AS col2 FROM tab2 GROUP BY tab2.col1
----
-17
-17
-17

query I rowsort
SELECT ALL 65 - 93 AS col2 FROM tab0 GROUP BY tab0.col0
----
-28
-28
-28

query I rowsort
SELECT 18 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( tab0.col2 ) col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - tab0.col2 * 38 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1444
-3002
-912

query I rowsort
SELECT ALL - 7 * 65 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-398
-411
-449

query I rowsort
SELECT DISTINCT - + 91 AS col1 FROM tab1 GROUP BY tab1.col2
----
-91

query I rowsort
SELECT DISTINCT + 39 AS col1 FROM tab0 GROUP BY tab0.col1
----
39

query I rowsort
SELECT + + 96 FROM tab0 GROUP BY tab0.col2
----
96
96
96

query I rowsort
SELECT DISTINCT + ( - tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT - 6 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
20
37
77

query I rowsort
SELECT 97 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
97
97
97

query I rowsort
SELECT 40 AS col2 FROM tab1 cor0 GROUP BY col1
----
40
40
40

query I rowsort
SELECT DISTINCT ( 83 ) FROM tab1 GROUP BY tab1.col1
----
83

query I rowsort
SELECT + 96 FROM tab0 cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT - 26 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-26
-26

query I rowsort
SELECT ALL - - 60 FROM tab2 GROUP BY tab2.col2
----
60
60
60

query I rowsort
SELECT 78 FROM tab1 GROUP BY tab1.col0
----
78
78
78

query I rowsort
SELECT DISTINCT + - 6 FROM tab1 GROUP BY tab1.col0
----
-6

query I rowsort
SELECT DISTINCT - + 94 AS col1 FROM tab0 GROUP BY col2
----
-94

query I rowsort
SELECT + 29 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
29
29
29

query I rowsort
SELECT - cor0.col0 * ( 27 ) FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-1161
-2241
-702

query I rowsort
SELECT DISTINCT + 23 AS col1 FROM tab0 GROUP BY tab0.col1
----
23

query I rowsort
SELECT ALL + 51 AS col2 FROM tab2 GROUP BY tab2.col1
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 7 col1 FROM tab1 GROUP BY tab1.col2
----
7
7
7

query I rowsort
SELECT ALL + 41 FROM tab1 GROUP BY tab1.col2
----
41
41
41

query I rowsort
SELECT ALL + 75 FROM tab2 GROUP BY tab2.col0
----
75
75
75

query I rowsort
SELECT + 78 + 84 FROM tab1 AS cor0 GROUP BY col0
----
162
162
162

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 79 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT ALL 72 FROM tab1 AS cor0 GROUP BY col1
----
72
72
72

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8233
SELECT ALL - - tab0.col2 + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8233
SELECT ALL - - tab0.col2 + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 + NULLIF ( + cor0.col1, cor0.col1 * 36 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
114
12
88

query I rowsort
SELECT - ( + tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 13 FROM tab2 GROUP BY tab2.col1
----
13
13
13

query I rowsort
SELECT DISTINCT - - 25 + + tab1.col1 FROM tab1 GROUP BY col1
----
31
69
82

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
116
158
174

query I rowsort
SELECT DISTINCT 62 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
62

query I rowsort
SELECT DISTINCT ( 18 ) * cor0.col0 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
1638
1656
270

query I rowsort
SELECT ( 62 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
62
62
62

query I rowsort
SELECT DISTINCT + 46 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT - tab2.col2 + - 66 FROM tab2 GROUP BY col2
----
-124
-145
-153

query I rowsort
SELECT + 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL + 92 FROM tab2 GROUP BY tab2.col0
----
92
92
92

query I rowsort
SELECT + 43 FROM tab1 GROUP BY tab1.col2
----
43
43
43

query I rowsort
SELECT ALL + 34 FROM tab2 cor0 GROUP BY cor0.col1
----
34
34
34

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8249
SELECT ALL - CAST( col0 AS SIGNED ) * + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1849
-676
-6889

skipif mysql # not compatible
query I rowsort label-8249
SELECT ALL - CAST ( col0 AS INTEGER ) * + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ( ( cor0.col1 ) ) FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

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 ALL - tab0.col1 * 84 AS col1 FROM tab0 GROUP BY tab0.col1
----
-6804
0

query I rowsort
SELECT ALL - 74 FROM tab0 GROUP BY tab0.col0
----
-74
-74
-74

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col1 + + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL tab2.col1 + + 52 AS col1 FROM tab2 GROUP BY tab2.col1
----
111
113
93

query I rowsort
SELECT - 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-10
-10
-10

query I rowsort
SELECT + col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0, cor1.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT cor0.col2 * 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4365
6887
776

query I rowsort
SELECT ALL + - NULLIF ( tab1.col0, + ( 54 ) ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab1 GROUP BY tab1.col2
----
89

query I rowsort
SELECT DISTINCT + + 33 * - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1254
-2607
-792

query I rowsort
SELECT ALL - col0 * col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT 50 FROM tab0 GROUP BY col2
----
50

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL COALESCE ( + 63, cor1.col2 ) AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
63
63
63

query I rowsort
SELECT + 40 * col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
3321

query I rowsort
SELECT ALL 3 FROM tab2 GROUP BY tab2.col0
----
3
3
3

query I rowsort
SELECT 37 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
37
37
37

query I rowsort
SELECT cor0.col2 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1944

query I rowsort
SELECT col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + + 92 AS col0 FROM tab2 GROUP BY tab2.col0
----
92
92
92

query I rowsort
SELECT DISTINCT - + 28 FROM tab1 GROUP BY tab1.col1
----
-28

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + 64 FROM tab2 AS cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT DISTINCT - tab2.col2 * tab2.col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3422
-6320
-7656

query I rowsort
SELECT + 43 FROM tab2 cor0 GROUP BY cor0.col1
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

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

onlyif mysql # DIV for integer division: 
query I rowsort label-8283
SELECT ALL + col1 DIV - 60 col0 FROM tab2 AS cor0 GROUP BY col1
----
-1
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8283
SELECT ALL + col1 / - 60 col0 FROM tab2 AS cor0 GROUP BY col1
----
-1
0
0

query I rowsort
SELECT DISTINCT cor0.col1 * ( 15 ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
1215

query I rowsort
SELECT + 68 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col1
----
68
68
68
68
68
68

query I rowsort
SELECT + + 79 AS col2 FROM tab2 GROUP BY tab2.col0
----
79
79
79

query I rowsort
SELECT ALL 8 FROM tab0 GROUP BY tab0.col2
----
8
8
8

query I rowsort
SELECT 97 FROM tab0 GROUP BY tab0.col2
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 col1 FROM tab1 GROUP BY tab1.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL - tab0.col1 AS col2 FROM tab0 GROUP BY col1 HAVING NOT NULL IS NOT NULL
----
-81
0

query I rowsort
SELECT 67 AS col0 FROM tab2 GROUP BY tab2.col1
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 42 - - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-18
-4
37

query I rowsort
SELECT tab2.col2 - + 52 AS col2 FROM tab2 GROUP BY col2
----
27
35
6

query I rowsort
SELECT + 52 FROM tab1 GROUP BY tab1.col0
----
52
52
52

query I rowsort
SELECT ALL + - tab0.col0 * tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 21, tab1.col2 + col2, - tab1.col0 * tab1.col1 ) FROM tab1 GROUP BY tab1.col2
----
21
21
21

query I rowsort
SELECT ALL - 54 FROM tab1 GROUP BY tab1.col2
----
-54
-54
-54

query I rowsort
SELECT + ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 col1 FROM tab2 GROUP BY tab2.col1
----
15

query I rowsort
SELECT + 19 FROM tab1 cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT COALESCE ( + cor0.col1, - cor0.col2, - cor0.col1 ) * - 37 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col2
----
-1459
-2104
-2170

query I rowsort
SELECT + 11 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
11
11

query I rowsort
SELECT cor0.col1 * - 70 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-2870
-4130
-4270

query I rowsort
SELECT ALL + 11 + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
102
103
26

query I rowsort
SELECT DISTINCT + + ( + 63 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
63

query I rowsort
SELECT DISTINCT - + 6 FROM tab1 GROUP BY tab1.col2
----
-6

query I rowsort
SELECT DISTINCT - 45 FROM tab2 GROUP BY tab2.col1
----
-45

query I rowsort
SELECT - cor0.col1 + 80 FROM tab1 AS cor0 GROUP BY col1
----
23
36
74

query I rowsort
SELECT DISTINCT cor0.col2 + 93 FROM tab2 AS cor0 GROUP BY col2
----
151
172
180

query I rowsort
SELECT DISTINCT - 16 AS col2 FROM tab1 GROUP BY tab1.col1
----
-16

query I rowsort
SELECT + cor0.col0 * cor0.col0 + - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
138
8202
8406

query I rowsort
SELECT DISTINCT - + 98 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-2156
-2744
-8036

query I rowsort
SELECT - 32 AS col2 FROM tab1 GROUP BY tab1.col2
----
-32
-32
-32

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT + + tab2.col2 * - col2 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT - col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 78 FROM tab1 AS cor0 GROUP BY col1
----
78
78
78

onlyif mysql # DIV for integer division: 
query I rowsort label-8318
SELECT ALL - - tab1.col2 DIV 83 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8318
SELECT ALL - - tab1.col2 / 83 FROM tab1 GROUP BY tab1.col2
----
0
0
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 8, cor0.col1 * - cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT DISTINCT + - 14 - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-55
-73
-75

query I rowsort
SELECT + + tab0.col1 + 66 FROM tab0 GROUP BY tab0.col1
----
147
66

query I rowsort
SELECT ALL + 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
35
35
35

query I rowsort
SELECT cor0.col0 * 60 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
5460
5520
900

query I rowsort
SELECT ALL + cor0.col2 * + 72 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1728
2736
5688

query I rowsort
SELECT + 75 FROM tab2 GROUP BY col2
----
75
75
75

query I rowsort
SELECT - 61 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT 80 FROM tab1 GROUP BY col2
----
80
80
80

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + + col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 19 FROM tab2 GROUP BY tab2.col1
----
19
19
19

query I rowsort
SELECT ALL + + tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 29 col2 FROM tab2 GROUP BY tab2.col1
----
29

query I rowsort
SELECT - 51 AS col0 FROM tab0 GROUP BY tab0.col1
----
-51
-51

query I rowsort
SELECT DISTINCT + 50 FROM tab0 AS cor0 GROUP BY cor0.col0
----
50

query I rowsort
SELECT ALL 19 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT - + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 59 * NULLIF ( cor0.col1, cor0.col1 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * - tab0.col0 col2 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL tab0.col1 - tab0.col1 AS col0 FROM tab0 GROUP BY col1
----
0
0

query I rowsort
SELECT ALL 8 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
8
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-8341
SELECT 61 DIV 94 FROM tab1 GROUP BY col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8341
SELECT 61 / 94 FROM tab1 GROUP BY col2
----
0
0
0

query I rowsort
SELECT 54 + 74 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
128
128
128

onlyif mysql # DIV for integer division: 
query I rowsort label-8343
SELECT - ( 71 ) DIV col2 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-8

skipif mysql # not compatible
query I rowsort label-8343
SELECT - ( 71 ) / col2 FROM tab1 AS cor0 GROUP BY col2
----
-1
-1
-8

query I rowsort
SELECT 83 FROM tab2 GROUP BY tab2.col0
----
83
83
83

query I rowsort
SELECT + 84 AS col1 FROM tab2 GROUP BY tab2.col2
----
84
84
84

query I rowsort
SELECT + + 8 + + 57 * col1 AS col1 FROM tab0 GROUP BY col1
----
4625
8

query I rowsort
SELECT - 9 + tab1.col2 FROM tab1 GROUP BY col2
----
-1
36
62

onlyif mysql # DIV for integer division: 
query I rowsort label-8348
SELECT + NULLIF ( - cor0.col2, + col2 * 11 ) DIV + cor0.col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-1
80

skipif mysql # not compatible
query I rowsort label-8348
SELECT + NULLIF ( - cor0.col2, + col2 * 11 ) / + cor0.col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-1
80

query I rowsort
SELECT DISTINCT - 3 FROM tab2 GROUP BY tab2.col2
----
-3

query I rowsort
SELECT + 88 AS col1 FROM tab1 GROUP BY col0
----
88
88
88

query I rowsort
SELECT ALL + 99 + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
17
71
77

query I rowsort
SELECT DISTINCT - 77 FROM tab0 GROUP BY tab0.col1
----
-77

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT 38 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
38
38
38

query I rowsort
SELECT ALL - tab2.col0 + - tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-182
-184
-30

query I rowsort
SELECT ALL + - tab2.col2 * 67 FROM tab2 GROUP BY col2
----
-3886
-5293
-5829

query I rowsort
SELECT - + 62 AS col0 FROM tab0 GROUP BY col2
----
-62
-62
-62

query I rowsort
SELECT ALL - 56 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-56
-56

query I rowsort
SELECT 76 FROM tab1 GROUP BY tab1.col1
----
76
76
76

query I rowsort
SELECT - 94 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-94
-94
-94

query I rowsort
SELECT ALL - - tab2.col2 * 23 FROM tab2 GROUP BY tab2.col2
----
1334
1817
2001

query I rowsort
SELECT - tab0.col0 - + 31 FROM tab0 GROUP BY tab0.col0
----
-114
-57
-74

query I rowsort
SELECT tab2.col0 + col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 64 FROM tab2 GROUP BY tab2.col1
----
64
64
64

query I rowsort
SELECT cor0.col1 + 69 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
150
69

query I rowsort
SELECT + + 24 - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-14
-55
0

query I rowsort
SELECT DISTINCT + 27 AS col0 FROM tab0 GROUP BY tab0.col2
----
27

query I rowsort
SELECT - 43 * - cor1.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col2, cor1.col1
----
0
0
3483

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT 93 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT ALL + 97 FROM tab1 AS cor0 GROUP BY cor0.col0
----
97
97
97

query I rowsort
SELECT - 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT + 17 FROM tab1 AS cor0 GROUP BY col2
----
17
17
17

query I rowsort
SELECT ALL + tab1.col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + col1 - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT + + 85 FROM tab2 GROUP BY tab2.col0
----
85
85
85

query I rowsort
SELECT + 80 AS col2 FROM tab2 GROUP BY tab2.col0
----
80
80
80

query I rowsort
SELECT 53 * - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-2173
-3127
-3233

query I rowsort
SELECT col1 * + 69 AS col2 FROM tab0 GROUP BY col1
----
0
5589

onlyif mysql # DIV for integer division: 
query I rowsort label-8381
SELECT ALL - tab2.col1 DIV + tab2.col1 - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-42
-60
-62

skipif mysql # not compatible
query I rowsort label-8381
SELECT ALL - tab2.col1 / + tab2.col1 - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
-42
-60
-62

query I rowsort
SELECT 27 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
33
71
84

query I rowsort
SELECT ALL 2 FROM tab1 GROUP BY tab1.col1
----
2
2
2

query I rowsort
SELECT ALL - - 62 FROM tab0 GROUP BY tab0.col2
----
62
62
62

query I rowsort
SELECT - 85 FROM tab1 AS cor0 GROUP BY col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - 46 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-46

query I rowsort
SELECT DISTINCT + 26 AS col0 FROM tab0 GROUP BY tab0.col0
----
26

query I rowsort
SELECT ALL + + tab0.col0 + - 69 FROM tab0 GROUP BY tab0.col0
----
-26
-43
14

query I rowsort
SELECT DISTINCT + + 29 AS col0 FROM tab1 GROUP BY tab1.col2
----
29

query I rowsort
SELECT + 8 AS col1 FROM tab0 GROUP BY tab0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT - 32 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-73
-91
-93

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT 9 + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
17
54
80

query I rowsort
SELECT ALL + - col1 * - tab0.col1 + 29 FROM tab0 GROUP BY tab0.col1
----
29
6590

query I rowsort
SELECT ALL + 74 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1924
3182
6142

onlyif mysql # DIV for integer division: 
query I rowsort label-8396
SELECT - cor0.col0 DIV - COALESCE ( - cor0.col2, + cor0.col0 + + 31 ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
20
28
81

skipif mysql # not compatible
query I rowsort label-8396
SELECT - cor0.col0 / - COALESCE ( - cor0.col2, + cor0.col0 + + 31 ) + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
20
28
81

query I rowsort
SELECT ALL 73 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
73
73
73

query I rowsort
SELECT + 72 FROM tab1 GROUP BY tab1.col1
----
72
72
72

query I rowsort
SELECT 37 FROM tab2 GROUP BY tab2.col0
----
37
37
37

query I rowsort
SELECT - 68 AS col0 FROM tab0 GROUP BY tab0.col0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
19

query I rowsort
SELECT + ( + tab1.col0 ) AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - + ( 66 ) FROM tab2 GROUP BY tab2.col0
----
-66
-66
-66

query I rowsort
SELECT + 8 FROM tab2 GROUP BY tab2.col0
----
8
8
8

query I rowsort
SELECT 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL - 60 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
158
48
76

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + 18 * - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-1062
-1098
-738

query I rowsort
SELECT 82 FROM tab2 GROUP BY tab2.col1
----
82
82
82

query I rowsort
SELECT DISTINCT + col1 * 14 FROM tab2 GROUP BY tab2.col1
----
574
826
854

query I rowsort
SELECT ALL 97 FROM tab2 AS cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT DISTINCT + COALESCE ( cor0.col0, cor0.col0 ) * - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 58 col1 FROM tab1 GROUP BY tab1.col2
----
-58
-58
-58

query I rowsort
SELECT DISTINCT 2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
10
47
73

query I rowsort
SELECT - 48 FROM tab2 GROUP BY tab2.col2
----
-48
-48
-48

query I rowsort
SELECT + 9 FROM tab1 GROUP BY tab1.col1
----
9
9
9

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL 90 FROM tab2 AS cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT 32 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT cor0.col0 * 92 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
1380
8372
8464

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 + + 76 col0 FROM tab0 GROUP BY tab0.col1
----
-5
76

query I rowsort
SELECT ALL 26 FROM tab0 GROUP BY tab0.col2
----
26
26
26

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col1 - + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 72 AS col2 FROM tab2 GROUP BY tab2.col2
----
72

query I rowsort
SELECT + 50 + - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-29
12
26

query I rowsort
SELECT ( + 19 ) FROM tab0 GROUP BY tab0.col2
----
19
19
19

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT tab1.col2 * + 25 - - tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
264
3150
6816

query I rowsort
SELECT - 55 FROM tab1 GROUP BY tab1.col2
----
-55
-55
-55

query I rowsort
SELECT ALL cor0.col0 - + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 76 FROM tab2 GROUP BY tab2.col0
----
76

query I rowsort
SELECT ALL 40 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-51
-52
25

query I rowsort
SELECT ( + cor0.col1 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor0.col0
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-8437
SELECT COALESCE ( 15, + col0 DIV cor0.col0, + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col2
----
15
15
15

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8437
SELECT COALESCE ( 15, + col0 / cor0.col0, + cor0.col0 ) FROM tab0 cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT tab0.col1 + - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL - 40 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT 41 - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-38
17
3

query I rowsort
SELECT - + tab0.col1 * tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT - - 56 FROM tab0 GROUP BY tab0.col0
----
56

query I rowsort
SELECT + cor0.col2 - 2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
43
6
69

query I rowsort
SELECT DISTINCT + - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 74 AS col0 FROM tab2 GROUP BY tab2.col0
----
74

query I rowsort
SELECT DISTINCT tab1.col0 + 81 FROM tab1 GROUP BY tab1.col0
----
103
109
163

query I rowsort
SELECT ALL - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2 HAVING col2 <= NULL
----

query I rowsort
SELECT + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( - col0 ) IS NULL
----

query I rowsort
SELECT col1 * tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-8451
SELECT ALL + tab2.col1 * ( 65 DIV - tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-8451
SELECT ALL + tab2.col1 * ( 65 / - tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 * 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 DISTINCT - tab2.col2 * tab2.col2 col0 FROM tab2 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT + cor0.col0 * 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2639
2668
435

query I rowsort
SELECT 67 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT DISTINCT + 32 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1408
1824
192

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + - 49 FROM tab0 GROUP BY tab0.col2
----
-49
-49
-49

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-8461
SELECT 56 + - cor0.col2 DIV - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, col0, cor0.col0
----
56
56
57

skipif mysql # not compatible
query I rowsort label-8461
SELECT 56 + - cor0.col2 / - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, col0, cor0.col0
----
56
56
57

query I rowsort
SELECT DISTINCT - col0 + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
182
184
30

onlyif mysql # DIV for integer division: 
query I rowsort label-8464
SELECT DISTINCT cor0.col1 DIV cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-8464
SELECT DISTINCT cor0.col1 / cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-8466
SELECT ALL - col1 DIV + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8466
SELECT ALL - col1 / + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT ALL + tab2.col0 AS col2 FROM tab2 WHERE NOT NULL NOT IN ( + tab2.col0 ) GROUP BY tab2.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + tab1.col2 - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT DISTINCT 58 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58

query I rowsort
SELECT cor0.col1 + 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
14
95

query I rowsort
SELECT DISTINCT - 29 AS col0 FROM tab2 GROUP BY tab2.col0
----
-29

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + + COALESCE ( 27, tab1.col1 ) * tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1215
1917
216

query I rowsort
SELECT 7 AS col2 FROM tab0 GROUP BY tab0.col2
----
7
7
7

query I rowsort
SELECT DISTINCT + - col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL - + 61 FROM tab0 GROUP BY tab0.col1
----
-61
-61

query I rowsort
SELECT + 14 - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-10
-24
-65

query I rowsort
SELECT ALL 25 FROM tab0 AS cor0 GROUP BY col2
----
25
25
25

query I rowsort
SELECT ALL 54 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
54
54
54

query I rowsort
SELECT DISTINCT - - 83 AS col2 FROM tab2 GROUP BY tab2.col0
----
83

query I rowsort
SELECT + 62 FROM tab0 GROUP BY tab0.col1
----
62
62

query I rowsort
SELECT DISTINCT + 98 FROM tab0 GROUP BY col1
----
98

query I rowsort
SELECT ALL - + tab1.col2 + + 48 AS col0 FROM tab1 GROUP BY tab1.col2
----
-23
3
40

query I rowsort
SELECT ALL + 68 FROM tab1 GROUP BY tab1.col2
----
68
68
68

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 63, cor0.col2 + + cor0.col2 ) * - 35 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2205
2205
2205

query I rowsort
SELECT DISTINCT 30 * + 12 FROM tab2 GROUP BY tab2.col0
----
360

query I rowsort
SELECT DISTINCT cor0.col2 * 28 + + 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1275
2003
239

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT + 83 AS col0 FROM tab2 GROUP BY tab2.col2
----
83
83
83

query I rowsort
SELECT col0 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ALL - - 57 FROM tab1 GROUP BY tab1.col1
----
57
57
57

query I rowsort
SELECT - 7 FROM tab1 GROUP BY tab1.col1
----
-7
-7
-7

query I rowsort
SELECT 66 FROM tab0 GROUP BY tab0.col1
----
66
66

query I rowsort
SELECT - col1 * + 24 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1056
-1368
-144

query I rowsort
SELECT - 25 FROM tab2 GROUP BY tab2.col1
----
-25
-25
-25

query I rowsort
SELECT ALL + - tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8498
SELECT + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8498
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT 8 * + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
328
472
488

query I rowsort
SELECT - NULLIF ( cor0.col0, + col0 ) + - ( 32 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 12 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 + cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
12546
2044
660

onlyif mysql # DIV for integer division: 
query I rowsort label-8503
SELECT ALL + 53 DIV 51 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

skipif mysql # not compatible
query I rowsort label-8503
SELECT ALL + 53 / 51 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

query I rowsort
SELECT 93 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-4185
-6603
-744

query I rowsort
SELECT 26 AS col2 FROM tab1 GROUP BY tab1.col1
----
26
26
26

query I rowsort
SELECT DISTINCT + - 22 FROM tab0 GROUP BY col1
----
-22

query I rowsort
SELECT col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT + 68 FROM tab1 GROUP BY tab1.col0
----
68

query I rowsort
SELECT col1 * + col1 FROM tab2 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT 6 - + 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT ALL - 14 FROM tab1 GROUP BY tab1.col0
----
-14
-14
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-8512
SELECT DISTINCT 92 DIV - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-15
-2

skipif mysql # not compatible
query I rowsort label-8512
SELECT DISTINCT 92 / - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-15
-2

query I rowsort
SELECT - tab0.col0 * + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL - col2 * ( tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL - 12 AS col0 FROM tab2 GROUP BY tab2.col1
----
-12
-12
-12

query I rowsort
SELECT - ( 54 ) * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1404
-2322
-4482

query I rowsort
SELECT ALL + 35 FROM tab0 GROUP BY tab0.col0
----
35
35
35

query I rowsort
SELECT DISTINCT - col0 + 63 AS col1 FROM tab1 GROUP BY tab1.col0
----
-19
35
41

query I rowsort
SELECT DISTINCT + 47 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 * 50 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4050
4050

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT col1 - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-16
-38
29

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
102
115
14

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 17, + col2 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-17
-17
-17

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-8527
SELECT - tab1.col2 DIV + col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8527
SELECT - tab1.col2 / + col2 FROM tab1 GROUP BY tab1.col2
----
-1
-1
-1

query I rowsort
SELECT - tab2.col2 * - tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + + tab0.col0 + - 32 FROM tab0 GROUP BY tab0.col0
----
-6
11
51

query I rowsort
SELECT ALL + tab2.col2 * 6 FROM tab2 GROUP BY col2
----
348
474
522

query I rowsort
SELECT DISTINCT + - tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT 86 AS col1 FROM tab1 GROUP BY tab1.col0
----
86
86
86

onlyif mysql # DIV for integer division: 
query I rowsort label-8533
SELECT DISTINCT - + tab0.col2 DIV + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-8533
SELECT DISTINCT - + tab0.col2 / + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT 90 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
3690
5310
5490

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-8536
SELECT DISTINCT col1 DIV tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1

skipif mysql # not compatible
query I rowsort label-8536
SELECT DISTINCT col1 / tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
1

query I rowsort
SELECT ALL tab2.col2 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + tab0.col2 * - tab0.col2 FROM tab0 GROUP BY tab0.col2 HAVING tab0.col2 IS NULL
----

query I rowsort
SELECT NULLIF ( + cor0.col1, cor0.col1 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - tab1.col1 * tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT - col0 * - 57 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
5187
5244
855

query I rowsort
SELECT ALL - 63 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-20
-37
20

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( col2, tab2.col2 + COALESCE ( + 68, + col2 * ( + tab2.col1 * tab2.col1 ) ) * col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 35 FROM tab0 GROUP BY tab0.col2
----
35

query I rowsort
SELECT + 29 + 47 AS col1 FROM tab1 GROUP BY tab1.col1
----
76
76
76

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT + 68 FROM tab2 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT + 31 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT cor0.col1 * + 0 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
0

query I rowsort
SELECT + 15 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
15
96

query I rowsort
SELECT DISTINCT tab0.col2 - tab0.col2 * - tab0.col2 FROM tab0 GROUP BY col2
----
1482
600
6320

query I rowsort
SELECT ALL col2 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
14
14
14

query I rowsort
SELECT ALL + 49 FROM tab0 GROUP BY tab0.col1
----
49
49

query I rowsort
SELECT ALL + 92 + tab0.col1 * - 89 FROM tab0 GROUP BY tab0.col1
----
-7117
92

query I rowsort
SELECT 29 AS col0 FROM tab1 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT ALL - - 4 AS col0 FROM tab2 GROUP BY tab2.col1
----
4
4
4

query I rowsort
SELECT + - 95 FROM tab2 GROUP BY tab2.col0
----
-95
-95
-95

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT cor0.col0 + + cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to 36e626e5b3701257664569a1c2e5afd1

query I rowsort
SELECT - 57 FROM tab1 GROUP BY tab1.col1
----
-57
-57
-57

onlyif mysql # DIV for integer division: 
query I rowsort label-8563
SELECT - 30 DIV tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-8563
SELECT - 30 / tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-5
0
0

query I rowsort
SELECT + 74 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
74
74
74

query I rowsort
SELECT DISTINCT - - tab0.col2 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab0.col0 + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 40 * 85 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3400
3400
3400

query I rowsort
SELECT - 38 FROM tab1 GROUP BY tab1.col1
----
-38
-38
-38

query I rowsort
SELECT col1 - 76 * 88 AS col0 FROM tab1 GROUP BY tab1.col1
----
-6631
-6644
-6682

query I rowsort
SELECT 67 * 13 FROM tab2 GROUP BY tab2.col1
----
871
871
871

query I rowsort
SELECT 73 FROM tab2 GROUP BY tab2.col0
----
73
73
73

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-81
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8573
SELECT DISTINCT - CAST( NULL AS DECIMAL ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8573
SELECT DISTINCT - CAST ( NULL AS REAL ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT DISTINCT - - 69 + 5 AS col2 FROM tab0 GROUP BY tab0.col2
----
74

query I rowsort
SELECT DISTINCT - tab2.col0 * - 46 AS col2 FROM tab2 GROUP BY col0
----
4186
4232
690

query I rowsort
SELECT ( col2 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + col1 - - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1944
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8580
SELECT + tab1.col1 DIV - 68 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8580
SELECT + tab1.col1 / - 68 AS col0 FROM tab1 GROUP BY tab1.col1
----
0
0
0

query I rowsort
SELECT - 69 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
-24
-61
2

onlyif mysql # DIV for integer division: 
query I rowsort label-8582
SELECT cor0.col1 DIV 92 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8582
SELECT cor0.col1 / 92 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
70

onlyif mysql # DIV for integer division: 
query I rowsort label-8584
SELECT DISTINCT - 39 DIV + 68 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0

skipif mysql # not compatible
query I rowsort label-8584
SELECT DISTINCT - 39 / + 68 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 86, tab0.col1, COALESCE ( 3, + tab0.col0 ) - tab0.col0 * + COALESCE ( tab0.col0, tab0.col0 + tab0.col0 ) ) FROM tab0 GROUP BY col1
----
-86
-86

query I rowsort
SELECT ALL + 14 AS col1 FROM tab1 GROUP BY col2
----
14
14
14

query I rowsort
SELECT 9 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 col2 FROM tab2 GROUP BY tab2.col0
----
81
81
81

query I rowsort
SELECT DISTINCT ( + 5 ) * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
130
215
415

query I rowsort
SELECT DISTINCT - 24 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 16 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
16

query I rowsort
SELECT ALL cor0.col2 + + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL + 24 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
24
24

query I rowsort
SELECT 69 FROM tab1 GROUP BY tab1.col2
----
69
69
69

query I rowsort
SELECT DISTINCT - - 82 FROM tab2 GROUP BY tab2.col2
----
82

query I rowsort
SELECT ALL - + tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - + tab2.col2 * - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 68 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
68

query I rowsort
SELECT ALL - 84 + tab2.col2 * - tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-3448
-6325
-7653

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 82, - tab0.col2, tab0.col0 ) AS col2 FROM tab0 GROUP BY tab0.col2
----
82

query I rowsort
SELECT + 90 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
131
149
151

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-81
0
0

query I rowsort
SELECT DISTINCT 67 - tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
-24
-25
52

query I rowsort
SELECT DISTINCT - 70 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
-70

query I rowsort
SELECT + - tab0.col0 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT 6 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL + 22 FROM tab2 GROUP BY col2
----
22
22
22

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - + 17 FROM tab1 GROUP BY tab1.col1
----
-17

query I rowsort
SELECT DISTINCT 59 FROM tab2 GROUP BY col0
----
59

query I rowsort
SELECT - 24 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-24
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 30 FROM tab0 cor0 GROUP BY col0
----
-30
-30
-30

query I rowsort
SELECT cor0.col2 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0
0

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 - 10 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT + 17 * tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
1377

onlyif mysql # DIV for integer division: 
query I rowsort label-8619
SELECT ALL col0 DIV col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8619
SELECT ALL col0 / col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 col2 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - + tab2.col2 + + 6 FROM tab2 GROUP BY tab2.col2
----
-52
-73
-81

query I rowsort
SELECT ALL + 80 FROM tab1 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT DISTINCT col0 * - 74 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-1636
-2117
-6139

query I rowsort
SELECT 18 * 47 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
846
846
846

onlyif mysql # DIV for integer division: 
query I rowsort label-8625
SELECT 37 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-8625
SELECT 37 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1
1

query I rowsort
SELECT - 2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2
-2
-2

query I rowsort
SELECT - ( cor0.col0 ) * cor0.col2 + + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
-1218
-5278
-7110

query I rowsort
SELECT ALL 26 FROM tab0 GROUP BY col1
----
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 9 * + cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
198
252
738

query I rowsort
SELECT ALL - 38 AS col0 FROM tab2 GROUP BY tab2.col0
----
-38
-38
-38

query I rowsort
SELECT + COALESCE ( - tab2.col1, - tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 81 AS col2 FROM tab1 GROUP BY tab1.col1
----
81
81
81

query I rowsort
SELECT DISTINCT 45 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45

query I rowsort
SELECT - cor0.col2 - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-142
-16
-90

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8635
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8635
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT - 74 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-74
-74

query I rowsort
SELECT ALL 45 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT - + 24 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-115
-116
-39

query I rowsort
SELECT DISTINCT + 82 AS col1 FROM tab0 GROUP BY col2
----
82

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-22
-28
-82

query I rowsort
SELECT col2 AS col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT 68 AS col1 FROM tab2 cor0 GROUP BY col0
----
68

query I rowsort
SELECT ALL tab2.col2 + + 99 AS col2 FROM tab2 GROUP BY tab2.col2
----
157
178
186

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT 1 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + + 97 FROM tab2 GROUP BY tab2.col0
----
97
97
97

query I rowsort
SELECT + 55 FROM tab2 GROUP BY tab2.col1
----
55
55
55

query I rowsort
SELECT ALL - - 87 - 63 AS col2 FROM tab2 GROUP BY tab2.col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-8649
SELECT col2 DIV cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8649
SELECT col2 / cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - cor0.col2 + - cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2070
-5112
-72

query I rowsort
SELECT cor0.col0 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
102
150
170

query I rowsort
SELECT ALL 28 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT ALL 47 AS col1 FROM tab2 GROUP BY tab2.col0
----
47
47
47

query I rowsort
SELECT DISTINCT - ( tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - + 68 FROM tab0 GROUP BY tab0.col0
----
-68
-68
-68

query I rowsort
SELECT - tab1.col0 * 20 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1640
-440
-560

query I rowsort
SELECT DISTINCT + 67 AS col2 FROM tab1 GROUP BY col2
----
67

query I rowsort
SELECT ALL - ( - 1 ) FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + + tab1.col0 * + tab1.col0 AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT ALL tab2.col1 + tab2.col1 * - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1640
-3422
-3660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 WHERE ( NULL ) < NULL GROUP BY col2
----

query I rowsort
SELECT - tab1.col0 - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

onlyif mysql # DIV for integer division: 
query I rowsort label-8664
SELECT DISTINCT - 43 DIV col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8664
SELECT DISTINCT - 43 / col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1
0

query I rowsort
SELECT DISTINCT + 5 AS col1 FROM tab1 GROUP BY col1
----
5

query I rowsort
SELECT ALL 46 FROM tab1 GROUP BY tab1.col2
----
46
46
46

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8667
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8667
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 96 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
7776

query I rowsort
SELECT - tab0.col0 * 83 FROM tab0 GROUP BY tab0.col0
----
-2158
-3569
-6889

query I rowsort
SELECT + 16 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT DISTINCT + 7 + 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40

query I rowsort
SELECT 76 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
76
76
76

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 70, tab2.col2, - tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
-70
-70
-70

query I rowsort
SELECT + 39 AS col2 FROM tab2 GROUP BY tab2.col2
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT + 48 AS col2 FROM tab0 GROUP BY tab0.col2
----
48
48
48

query I rowsort
SELECT ALL - - 66 AS col2 FROM tab0 GROUP BY tab0.col0
----
66
66
66

query I rowsort
SELECT - 48 AS col1 FROM tab1 GROUP BY tab1.col0
----
-48
-48
-48

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 16 FROM tab0 GROUP BY tab0.col0
----
16
16
16

query I rowsort
SELECT - + 52 FROM tab2 GROUP BY col2
----
-52
-52
-52

query I rowsort
SELECT DISTINCT + 19 FROM tab0 GROUP BY tab0.col2
----
19

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - 5 FROM tab1 cor0 GROUP BY cor0.col0
----
-5
-5
-5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8686
SELECT DISTINCT CAST( - 30 AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-30

skipif mysql # not compatible
query I rowsort label-8686
SELECT DISTINCT CAST ( - 30 AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-30

query I rowsort
SELECT DISTINCT 87 FROM tab0 GROUP BY tab0.col0
----
87

query I rowsort
SELECT ALL + + 23 FROM tab2 GROUP BY tab2.col0
----
23
23
23

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT col2 IS NOT NULL
----

query I rowsort
SELECT ALL - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL - tab0.col0 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + 85 FROM tab2 AS cor0 GROUP BY cor0.col1
----
85
85
85

query I rowsort
SELECT DISTINCT 31 + - tab2.col1 FROM tab2 GROUP BY col1
----
-10
-28
-30

query I rowsort
SELECT ALL + tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL - - tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - - 59 AS col0 FROM tab1 GROUP BY tab1.col0
----
59

query I rowsort
SELECT ALL 56 * - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-2296
-3304
-3416

query I rowsort
SELECT 40 FROM tab1 cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT 41 - tab1.col2 FROM tab1 GROUP BY col2
----
-30
-4
33

query I rowsort
SELECT DISTINCT + 48 AS col1 FROM tab0 GROUP BY tab0.col0
----
48

query I rowsort
SELECT 68 AS col1 FROM tab0 GROUP BY tab0.col1
----
68
68

query I rowsort
SELECT - 64 AS col0 FROM tab2 GROUP BY tab2.col1
----
-64
-64
-64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8703
SELECT + cor0.col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8703
SELECT + cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 78 + - 86 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

query I rowsort
SELECT col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT ALL 96 FROM tab1 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT DISTINCT - 46 AS col2 FROM tab1 GROUP BY tab1.col1
----
-46

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, col1, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT + 16 + - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-22
-63
-8

query I rowsort
SELECT - 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-60
-60
-60

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT + 23 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
23
23
23

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + tab2.col2 + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT ALL ( + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-46

query I rowsort
SELECT DISTINCT 13 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13

query I rowsort
SELECT ALL - col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT + tab1.col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT DISTINCT + 38 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
38

query I rowsort
SELECT ALL - 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

query I rowsort
SELECT + cor0.col2 + + 89 FROM tab0 AS cor0 GROUP BY cor0.col2
----
113
127
168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 48 * 4 col1 FROM tab2 GROUP BY tab2.col0
----
192
192
192

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab1 GROUP BY tab1.col0
----
70

query I rowsort
SELECT - - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 74 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT ALL + 10 FROM tab1 GROUP BY tab1.col0
----
10
10
10

query I rowsort
SELECT DISTINCT tab2.col0 + 36 AS col2 FROM tab2 GROUP BY tab2.col0
----
127
128
51

query I rowsort
SELECT 48 * - cor0.col1 + + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-2030
-266
-2708

query I rowsort
SELECT ALL - + 80 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-124
-137
-86

query I rowsort
SELECT 44 - - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
125
44

query I rowsort
SELECT + 68 AS col2 FROM tab2 GROUP BY tab2.col1
----
68
68
68

query I rowsort
SELECT 28 * cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
2548
2576
420

query I rowsort
SELECT - + 71 + + 82 FROM tab0 GROUP BY tab0.col2
----
11
11
11

query I rowsort
SELECT - cor0.col1 * + 33 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2673
0
0

query I rowsort
SELECT + 34 AS col0 FROM tab1 cor0 GROUP BY col1
----
34
34
34

query I rowsort
SELECT DISTINCT + 89 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3649
-5251
-5429

query I rowsort
SELECT + 32 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
32
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-8740
SELECT DISTINCT + + 52 DIV - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8740
SELECT DISTINCT + + 52 / - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-1
-2
0

query I rowsort
SELECT 93 AS col0 FROM tab2 GROUP BY tab2.col2
----
93
93
93

query I rowsort
SELECT + - tab1.col1 * tab1.col1 + - 74 AS col1 FROM tab1 GROUP BY col1
----
-110
-2010
-3323

query I rowsort
SELECT DISTINCT ( col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT + 39 + - tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-3325
-6202
-7530

query I rowsort
SELECT ALL + 95 * 68 FROM tab0 GROUP BY tab0.col1
----
6460
6460

query I rowsort
SELECT ALL cor0.col2 - + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 6 FROM tab0 GROUP BY tab0.col0
----
-6

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab0 GROUP BY tab0.col0
----
48

query I rowsort
SELECT DISTINCT + - 34 AS col0 FROM tab0 GROUP BY tab0.col2
----
-34

query I rowsort
SELECT ALL + 17 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17
17

query I rowsort
SELECT ( 93 ) FROM tab1 GROUP BY tab1.col2
----
93
93
93

query I rowsort
SELECT ALL ( 70 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT ALL - 81 AS col0 FROM tab2 GROUP BY tab2.col0
----
-81
-81
-81

query I rowsort
SELECT ( + 20 ) FROM tab2 AS cor0 GROUP BY col1
----
20
20
20

onlyif mysql # DIV for integer division: 
query I rowsort label-8755
SELECT tab1.col1 DIV 75 + + tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-8755
SELECT tab1.col1 / 75 + + tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 97 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
97

query I rowsort
SELECT - 35 * - 64 AS col2 FROM tab2 cor0 GROUP BY col1
----
2240
2240
2240

query I rowsort
SELECT DISTINCT + 24 AS col1 FROM tab2 GROUP BY tab2.col1
----
24

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT - col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT - 30 AS col0 FROM tab0 GROUP BY tab0.col0
----
-30
-30
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 70 ) + cor0.col2 * + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
134
2095
5111

query I rowsort
SELECT ALL tab1.col1 + - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 * - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col0 FROM tab0 GROUP BY tab0.col0 HAVING NOT ( NULL ) >= NULL
----

query I rowsort
SELECT - 62 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-2790
-4402
-496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 18 col1 FROM tab2 GROUP BY tab2.col0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col1 - - 10 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-34
-47
4

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91

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 DISTINCT 38 FROM tab0 GROUP BY col0
----
38

query I rowsort
SELECT DISTINCT + NULLIF ( + 72, 39 ) FROM tab1 GROUP BY tab1.col0
----
72

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8774
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 80 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8774
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 80 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT + 83 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
83
83
83

query I rowsort
SELECT ALL + tab1.col2 * - 4 FROM tab1 GROUP BY tab1.col2
----
-180
-284
-32

query I rowsort
SELECT + col0 + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + ( + 37 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT + 20 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
20
20

query I rowsort
SELECT ALL 19 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
19
19
19

query I rowsort
SELECT + + 48 FROM tab1 GROUP BY col2
----
48
48
48

query I rowsort
SELECT + 85 FROM tab1 GROUP BY col2
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL tab1.col1 * + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - col1 * + tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-87

query I rowsort
SELECT + cor0.col1 * 6 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
486

query I rowsort
SELECT DISTINCT - tab1.col2 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-8790
SELECT ALL cor0.col1 + - COALESCE ( + 10, cor0.col2 + - 61 DIV - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-10
71

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-8790
SELECT ALL cor0.col1 + - COALESCE ( + 10, cor0.col2 + - 61 / - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-10
71

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-240
-8372
-8556

query I rowsort
SELECT DISTINCT 40 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 10 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT + ( tab2.col2 ) FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + 66 * tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
2706
3894
4026

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 22 ) col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col1, cor0.col0, cor0.col2
----
-22
-22
-22

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8798
SELECT cor0.col0 + CAST( NULL AS SIGNED ) * 43 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8798
SELECT cor0.col0 + CAST ( NULL AS INTEGER ) * 43 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 16 FROM tab2 GROUP BY tab2.col0
----
-16
-16
-16

query I rowsort
SELECT ALL col1 AS col1 FROM tab0 cor0 GROUP BY col1, cor0.col1
----
0
81

query I rowsort
SELECT - cor0.col1 + - 11 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-17
-55
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-8802
SELECT + tab1.col2 DIV tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8802
SELECT + tab1.col2 / tab1.col2 col2 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT ALL - - 80 FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT DISTINCT 44 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4004
4048
660

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
57

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab1 GROUP BY tab1.col1
----
98

query I rowsort
SELECT + 29 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
29
29
29

query I rowsort
SELECT - tab1.col1 + + tab1.col1 AS col2 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT 37 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
37

query I rowsort
SELECT DISTINCT - + 26 FROM tab2 GROUP BY tab2.col0
----
-26

query I rowsort
SELECT + 60 FROM tab2 GROUP BY tab2.col2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 17 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT ALL + cor0.col2 * + 92 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
5394
7347
8091

query I rowsort
SELECT - 99 + - 44 AS col1 FROM tab2 GROUP BY tab2.col1
----
-143
-143
-143

onlyif mysql # DIV for integer division: 
query I rowsort label-8818
SELECT DISTINCT - col1 DIV - col1 FROM tab1 GROUP BY tab1.col1
----
1

skipif mysql # not compatible
query I rowsort label-8818
SELECT DISTINCT - col1 / - col1 FROM tab1 GROUP BY tab1.col1
----
1

query I rowsort
SELECT ALL + + 99 FROM tab0 GROUP BY tab0.col1
----
99
99

query I rowsort
SELECT ALL ( + tab0.col1 ) * 14 + + col1 FROM tab0 GROUP BY tab0.col1
----
0
1215

query I rowsort
SELECT ALL - 58 FROM tab0 GROUP BY tab0.col1
----
-58
-58

query I rowsort
SELECT - 47 + - 63 FROM tab1 GROUP BY tab1.col2
----
-110
-110
-110

query I rowsort
SELECT - cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - - tab0.col0 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT 68 * 63 FROM tab2 GROUP BY col0
----
4284
4284
4284

query I rowsort
SELECT 86 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
86
86
86

query I rowsort
SELECT DISTINCT 9 + - col0 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-123
-1587
-3599

query I rowsort
SELECT + cor0.col2 + cor0.col2 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
2610
3195
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col2 * + 51 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-2295
-3621
-408

query I rowsort
SELECT - NULLIF ( - tab2.col0, + 52 * 90 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + - 2 - + 15 FROM tab1 GROUP BY tab1.col0
----
-17
-17
-17

query I rowsort
SELECT + 21 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
1491
168
945

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17

onlyif mysql # DIV for integer division: 
query I rowsort label-8837
SELECT + col2 DIV - 69 - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-72
-8

skipif mysql # not compatible
query I rowsort label-8837
SELECT + col2 / - 69 - tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-72
-8

query I rowsort
SELECT DISTINCT + tab0.col0 * 78 FROM tab0 GROUP BY tab0.col0
----
2028
3354
6474

query I rowsort
SELECT DISTINCT 54 FROM tab0 AS cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT ALL 25 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 64 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT - NULLIF ( + 54, 18 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-54
-54
-54

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT col2 + - 3 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
55
76
84

query I rowsort
SELECT tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL 27 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT - 97 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-97
-97
-97

query I rowsort
SELECT DISTINCT ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 52 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-52

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

onlyif mysql # DIV for integer division: 
query I rowsort label-8854
SELECT ALL + cor0.col2 DIV cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8854
SELECT ALL + cor0.col2 / cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
1
1
1

query I rowsort
SELECT - cor0.col1 + - 40 * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
-1681
-2419
-2501

query I rowsort
SELECT 81 FROM tab1 cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT - 16 AS col0 FROM tab2 GROUP BY tab2.col1
----
-16

query I rowsort
SELECT ALL - 72 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-117
-143
-80

query I rowsort
SELECT + 50 AS col1 FROM tab1 GROUP BY tab1.col1
----
50
50
50

query I rowsort
SELECT cor0.col2 * 94 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
2256
3572
7426

query I rowsort
SELECT + 64 FROM tab0 AS cor0 GROUP BY cor0.col1
----
64
64

query I rowsort
SELECT - 94 * col0 FROM tab1 GROUP BY col0
----
-2068
-2632
-7708

query I rowsort
SELECT ALL - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 92 + 5 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-87

query I rowsort
SELECT + cor0.col0 * - 23 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2093
-2116
-345

query I rowsort
SELECT ALL 90 AS col0 FROM tab1 GROUP BY tab1.col1
----
90
90
90

query I rowsort
SELECT ALL - 24 * 36 FROM tab2 GROUP BY tab2.col2
----
-864
-864
-864

onlyif mysql # DIV for integer division: 
query I rowsort label-8869
SELECT - 27 DIV 28 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8869
SELECT - 27 / 28 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL - 50 * + 24 FROM tab0 GROUP BY tab0.col1
----
-1200
-1200

onlyif mysql # DIV for integer division: 
query I rowsort label-8871
SELECT - 17 DIV 76 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-8871
SELECT - 17 / 76 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + ( + cor0.col1 ) + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-16
-38
29

query I rowsort
SELECT ALL - 8 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
18
35
75

query I rowsort
SELECT cor0.col2 * cor0.col2 + ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT cor0.col2 + 30 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
109
54
68

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8876
SELECT DISTINCT - CAST( 33 AS SIGNED ) FROM tab2 AS cor0 GROUP BY col1
----
-33

skipif mysql # not compatible
query I rowsort label-8876
SELECT DISTINCT - CAST ( 33 AS INTEGER ) FROM tab2 AS cor0 GROUP BY col1
----
-33

query I rowsort
SELECT ALL - 57 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3306
4503
4959

query I rowsort
SELECT 99 FROM tab1 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT + 9 FROM tab2 GROUP BY tab2.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col2 col1 FROM tab1 GROUP BY col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8882
SELECT DISTINCT - tab0.col2 * CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8882
SELECT DISTINCT - tab0.col2 * CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-8883
SELECT ALL tab2.col2 DIV tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-8883
SELECT ALL tab2.col2 / tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
59
80
88

query I rowsort
SELECT ALL cor0.col1 + + cor0.col0 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3813
5428
976

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
0
81

query I rowsort
SELECT cor0.col0 + 55 * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
3282
4436
4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab0.col1 col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
225
8281
8464

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
93

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 1 FROM tab1 GROUP BY tab1.col0
----
1

query I rowsort
SELECT ALL + 81 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
81
81
81

query I rowsort
SELECT 21 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
21
21
21

query I rowsort
SELECT - 12 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-12
-12
-12

query I rowsort
SELECT DISTINCT ( 50 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
50

query I rowsort
SELECT DISTINCT - 57 * 47 AS col2 FROM tab1 cor0 GROUP BY col0
----
-2679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 83 + - tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
-128
-154
-91

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 89, tab2.col0, + tab2.col0 + + CASE - tab2.col2 WHEN + 71 THEN 31 ELSE + tab2.col0 + - tab2.col2 * COALESCE ( tab2.col0, tab2.col1 ) END ) AS col1 FROM tab2 GROUP BY tab2.col0
----
-89

query I rowsort
SELECT DISTINCT - 87 + - 18 AS col0 FROM tab1 GROUP BY col0
----
-105

query I rowsort
SELECT ALL cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
225
8281
8464

query I rowsort
SELECT DISTINCT tab0.col2 * 4 + + col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
120
190
395

query I rowsort
SELECT cor0.col0 * - ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + cor0.col1 + - 12 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-6
32
45

query I rowsort
SELECT DISTINCT 17 FROM tab1 AS cor0 GROUP BY cor0.col0
----
17

query I rowsort
SELECT 19 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
19
19

query I rowsort
SELECT + 95 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
95
95
95

query I rowsort
SELECT cor0.col2 * - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1444
-576
-6241

query I rowsort
SELECT ALL - 67 - - 5 AS col0 FROM tab0 GROUP BY tab0.col1
----
-62
-62

query I rowsort
SELECT - 91 FROM tab2 GROUP BY tab2.col1
----
-91
-91
-91

onlyif mysql # DIV for integer division: 
query I rowsort label-8910
SELECT - cor0.col2 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-8910
SELECT - cor0.col2 / + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-1
-1
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8911
SELECT - cor0.col0 + + cor0.col0 DIV - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23
-29
-83

skipif mysql # not compatible
query I rowsort label-8911
SELECT - cor0.col0 + + cor0.col0 / - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-23
-29
-83

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 + 15 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1666
-3466
-3706

query I rowsort
SELECT ALL + 94 + 13 FROM tab2 GROUP BY col1
----
107
107
107

query I rowsort
SELECT DISTINCT + + 22 AS col0 FROM tab0 GROUP BY tab0.col2
----
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 83 + + 58 col2 FROM tab1 GROUP BY tab1.col0
----
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 19 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-19

query I rowsort
SELECT ALL + ( + col1 ) FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 49 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-49
-49
-49

query I rowsort
SELECT - 68 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + - 42 - - 50 FROM tab2 GROUP BY tab2.col1
----
8
8
8

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT ALL + 92 FROM tab2 GROUP BY col1
----
92
92
92

query I rowsort
SELECT - col2 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - + tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL + 21 + - 44 FROM tab2 GROUP BY col2
----
-23
-23
-23

query I rowsort
SELECT + 57 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
57
57
57

query I rowsort
SELECT ALL - - col0 * tab2.col0 FROM tab2 GROUP BY col0
----
225
8281
8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 / col1 + - ( CASE - cor0.col1 WHEN cor0.col0 * + 66 + cor0.col2 THEN + cor0.col0 WHEN cor0.col1 THEN cor0.col0 END ) col1 FROM tab2 cor0 GROUP BY col2, cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + tab2.col0 + tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
182
184
30

query I rowsort
SELECT - + 41 FROM tab1 GROUP BY tab1.col1
----
-41
-41
-41

onlyif mysql # DIV for integer division: 
query I rowsort label-8933
SELECT col1 DIV col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8933
SELECT col1 / col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
1

query I rowsort
SELECT col2 * - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col0 col1 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL ( - 33 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-33
-33
-33

query I rowsort
SELECT ALL - NULLIF ( + cor0.col0, - cor0.col0 * cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + 33 * tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
3003
3036
495

query I rowsort
SELECT ALL - cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + tab0.col1 + - tab0.col1 FROM tab0 GROUP BY col1 HAVING NOT col1 IS NULL
----
0

query I rowsort
SELECT tab2.col2 - col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT - tab0.col1 FROM tab0 WHERE NOT - col2 NOT BETWEEN ( - col1 ) AND ( NULL ) GROUP BY tab0.col1
----

query I rowsort
SELECT + - col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT - 67 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT cor0.col1 * - ( 82 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-6642
0

query I rowsort
SELECT ALL tab0.col2 * - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL + 30 AS col1 FROM tab0 GROUP BY tab0.col2
----
30
30
30

query I rowsort
SELECT - - 18 AS col0 FROM tab1 GROUP BY tab1.col0
----
18
18
18

query I rowsort
SELECT 15 * 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
255
255
255

query I rowsort
SELECT ALL - col2 AS 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 DISTINCT + + 29 col0 FROM tab2 GROUP BY tab2.col0
----
29

query I rowsort
SELECT ( cor0.col2 ) + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT + - tab0.col1 FROM tab0 GROUP BY col1
----
-81
0

query I rowsort
SELECT - cor0.col1 * - ( 49 * + 48 ) + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
190593

query I rowsort
SELECT - 75 FROM tab0 GROUP BY tab0.col2
----
-75
-75
-75

query I rowsort
SELECT + tab2.col1 + 71 AS col2 FROM tab2 GROUP BY tab2.col1
----
112
130
132

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1260
-176
-5822

query I rowsort
SELECT 26 + 72 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
98
98
98

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT 88 FROM tab1 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col2 * 4 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
152
316
96

query I rowsort
SELECT ALL - cor0.col0 * 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1144
-1892
-3652

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
93

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT cor0.col2 + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT - - col0 * 50 FROM tab2 GROUP BY tab2.col0
----
4550
4600
750

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
133
150
76

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL - 84 FROM tab0 GROUP BY tab0.col2
----
-84
-84
-84

onlyif mysql # DIV for integer division: 
query I rowsort label-8972
SELECT ALL - cor0.col0 * - cor0.col0 + + cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
485
6725
785

skipif mysql # not compatible
query I rowsort label-8972
SELECT ALL - cor0.col0 * - cor0.col0 + + cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
485
6725
785

query I rowsort
SELECT DISTINCT tab0.col1 AS col0 FROM tab0 GROUP BY col1 HAVING ( NULL ) IS NULL
----
0
81

query I rowsort
SELECT - 66 AS col2 FROM tab0 GROUP BY tab0.col2
----
-66
-66
-66

query I rowsort
SELECT + 79 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
170
171
94

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT + cor0.col1 * + 55 + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2464
3192
336

query I rowsort
SELECT DISTINCT col0 + - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT 61 * + 75 FROM tab2 cor0 GROUP BY cor0.col0
----
4575

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 76 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
76
76
76

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT - + tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT cor0.col0 * 21 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1911
1932
315

query I rowsort
SELECT + 30 * + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1350
2130
240

query I rowsort
SELECT 94 FROM tab0 GROUP BY tab0.col2
----
94
94
94

query I rowsort
SELECT 54 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
1296
2052
4266

onlyif mysql # DIV for integer division: 
query I rowsort label-8987
SELECT ALL 91 DIV - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-6
0

skipif mysql # not compatible
query I rowsort label-8987
SELECT ALL 91 / - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-6
0

query I rowsort
SELECT ALL - ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - 59 AS col1 FROM tab2 GROUP BY tab2.col0
----
-59
-59
-59

query I rowsort
SELECT ALL ( - 45 ) FROM tab0 GROUP BY tab0.col1
----
-45
-45

query I rowsort
SELECT 51 FROM tab1 GROUP BY tab1.col1
----
51
51
51

query I rowsort
SELECT ALL tab0.col0 * 88 AS col0 FROM tab0 GROUP BY tab0.col0
----
2288
3784
7304

query I rowsort
SELECT ALL 25 FROM tab2 GROUP BY tab2.col0
----
25
25
25

query I rowsort
SELECT + 91 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
91
91
91

query I rowsort
SELECT ALL cor0.col1 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
162

onlyif mysql # DIV for integer division: 
query I rowsort label-8996
SELECT tab2.col1 + 77 DIV tab2.col1 FROM tab2 GROUP BY col1
----
42
60
62

skipif mysql # not compatible
query I rowsort label-8996
SELECT tab2.col1 + 77 / tab2.col1 FROM tab2 GROUP BY col1
----
42
60
62

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - tab1.col1 + ( - tab1.col1 ) AS col2 FROM tab1 GROUP BY col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT 58 FROM tab0 GROUP BY col1
----
58

query I rowsort
SELECT 38 FROM tab1 GROUP BY col2
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 60 * + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
-2460
-3540
-3660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT + - 0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + tab0.col0 + 28 * + 51 AS col2 FROM tab0 GROUP BY col0
----
1454
1471
1511

query I rowsort
SELECT ALL + 65 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
65
65
65

query I rowsort
SELECT DISTINCT - 18 AS col2 FROM tab1 GROUP BY tab1.col0
----
-18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9008
SELECT + CAST( NULL AS SIGNED ) * + 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9008
SELECT + CAST ( NULL AS INTEGER ) * + 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 55 FROM tab0 cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL - tab1.col0 * 82 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-1804
-2296
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 48 * tab0.col0 col1 FROM tab0 GROUP BY tab0.col0
----
1248
2064
3984

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9012
SELECT ALL + CAST( NULL AS DECIMAL ) / + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9012
SELECT ALL + CAST ( NULL AS REAL ) / + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * + 36 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2835

query I rowsort
SELECT DISTINCT + + col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NOT NULL IS NOT NULL
----
0
81

query I rowsort
SELECT 65 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
65
65
65

query I rowsort
SELECT 48 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
48
48

query I rowsort
SELECT ALL ( cor0.col1 ) + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
162

query I rowsort
SELECT 68 + 4 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
392
68

query I rowsort
SELECT - 46 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-46
-46
-46

query I rowsort
SELECT DISTINCT 28 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
28

query I rowsort
SELECT + 47 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
130
73
90

query I rowsort
SELECT ALL + 66 FROM tab1 GROUP BY tab1.col2
----
66
66
66

query I rowsort
SELECT ALL 81 FROM tab0 GROUP BY tab0.col2
----
81
81
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 24 col0 FROM tab2 GROUP BY tab2.col2
----
-24
-24
-24

query I rowsort
SELECT DISTINCT + 53 AS col2 FROM tab1 GROUP BY tab1.col2
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col1 col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL col2 + - cor0.col2 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2520
-3053
-40

query I rowsort
SELECT + 29 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
29
29

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 31, tab0.col1, 39 * + col1 ) FROM tab0 GROUP BY tab0.col2
----
-31
-31
-31

query I rowsort
SELECT - tab0.col0 + 77 AS col1 FROM tab0 GROUP BY tab0.col0
----
-6
34
51

query I rowsort
SELECT DISTINCT 73 FROM tab2 cor0 GROUP BY cor0.col1
----
73

query I rowsort
SELECT cor0.col0 * 90 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1350
8190
8280

query I rowsort
SELECT DISTINCT 38 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3458
-3496
-570

query I rowsort
SELECT ALL 82 + 28 FROM tab1 GROUP BY tab1.col1
----
110
110
110

query I rowsort
SELECT - - ( + 88 ) FROM tab0 GROUP BY tab0.col1
----
88
88

onlyif mysql # DIV for integer division: 
query I rowsort label-9037
SELECT + + 0 DIV 5 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-9037
SELECT + + 0 / 5 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT 67 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
111
124
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) + cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
158
48
76

onlyif mysql # DIV for integer division: 
query I rowsort label-9040
SELECT + cor0.col2 DIV cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9040
SELECT + cor0.col2 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

query I rowsort
SELECT - 3 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-132
-171
-18

query I rowsort
SELECT ALL + 41 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
41
41
41

query I rowsort
SELECT + 62 * - tab0.col1 FROM tab0 GROUP BY col1
----
-5022
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9045
SELECT ALL - + CAST( NULL AS DECIMAL ) + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9045
SELECT ALL - + CAST ( NULL AS REAL ) + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - 81 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-81
-81
-81

query I rowsort
SELECT + col0 - - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT ALL - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2, cor0.col2
----
9 values hashing to 0b6eac60b12718df0c5ffc2484241344

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + COALESCE ( + tab2.col2, tab2.col2 ) col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - - tab2.col2 - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 1 AS col2 FROM tab0 GROUP BY tab0.col0
----
1

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 tab0.col0 * + tab0.col0 - ( tab0.col0 ) * - col0 FROM tab0 GROUP BY tab0.col0
----
1352
13778
3698

query I rowsort
SELECT ALL - tab0.col0 - + 57 AS col0 FROM tab0 GROUP BY tab0.col0
----
-100
-140
-83

query I rowsort
SELECT 15 - 73 FROM tab0 GROUP BY col1
----
-58
-58

query I rowsort
SELECT DISTINCT - - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col0 * - 28 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2296
616
784

query I rowsort
SELECT DISTINCT + col0 - + 90 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-62
-68
-8

query I rowsort
SELECT cor0.col0 + - cor0.col0 * col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1806
-650
-6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-12
2
27

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 30 FROM tab2 cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT ALL + 5 FROM tab2 GROUP BY tab2.col0
----
5
5
5

query I rowsort
SELECT - 10 FROM tab2 AS cor0 GROUP BY col0
----
-10
-10
-10

query I rowsort
SELECT cor0.col0 - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 - + cor0.col1 * - 49 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
38
3993
79

query I rowsort
SELECT ALL 27 FROM tab1 GROUP BY tab1.col2
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col1 FROM tab2 WHERE NULL IS NOT NULL GROUP BY tab2.col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-9071
SELECT 24 DIV tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9071
SELECT 24 / tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT ALL 42 FROM tab0 AS cor0 GROUP BY col2
----
42
42
42

query I rowsort
SELECT - cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1681
-3481
-3721

query I rowsort
SELECT ALL - ( - 73 ) + - 94 FROM tab1, tab2 cor0 GROUP BY tab1.col1
----
-21
-21
-21

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( + 93, tab2.col0 ) * - tab2.col2 FROM tab2 GROUP BY col2
----
5394
7347
8091

query I rowsort
SELECT DISTINCT 73 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73

onlyif mysql # DIV for integer division: 
query I rowsort label-9077
SELECT DISTINCT 64 DIV + cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9077
SELECT DISTINCT 64 / + cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
0
2

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab1 GROUP BY tab1.col1
----
19

query I rowsort
SELECT - 15 FROM tab0 GROUP BY tab0.col2
----
-15
-15
-15

query I rowsort
SELECT ALL 24 FROM tab2 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT + 13 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
13
13
13

query I rowsort
SELECT ALL 74 AS col2 FROM tab0 GROUP BY tab0.col0
----
74
74
74

query I rowsort
SELECT cor0.col2 * ( - 54 * cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
-181656
-337014
-408726

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9084
SELECT ALL CAST( - 99 AS SIGNED ) + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-17
-71
-77

skipif mysql # not compatible
query I rowsort label-9084
SELECT ALL CAST ( - 99 AS INTEGER ) + + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-17
-71
-77

onlyif mysql # DIV for integer division: 
query I rowsort label-9085
SELECT ALL + 45 DIV COALESCE ( 7, + cor0.col1, ( 65 ) ) - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2
-39
-65

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9085
SELECT ALL + 45 / COALESCE ( 7, + cor0.col1, ( 65 ) ) - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2
-39
-65

query I rowsort
SELECT DISTINCT + tab1.col0 * 36 AS col2 FROM tab1 GROUP BY tab1.col0
----
1008
2952
792

query I rowsort
SELECT ALL 89 FROM tab1 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ALL - 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 18 col2 FROM tab0 GROUP BY tab0.col0
----
18
18
18

query I rowsort
SELECT + + 41 FROM tab2 GROUP BY tab2.col1
----
41
41
41

query I rowsort
SELECT DISTINCT 83 FROM tab1 AS cor0 GROUP BY cor0.col1
----
83

query I rowsort
SELECT DISTINCT 64 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2624
3776
3904

query I rowsort
SELECT DISTINCT - 10 AS col2 FROM tab1 GROUP BY tab1.col2
----
-10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9094
SELECT CAST( + 2 AS SIGNED ) + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
60
81
89

skipif mysql # not compatible
query I rowsort label-9094
SELECT CAST ( + 2 AS INTEGER ) + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
60
81
89

query I rowsort
SELECT tab2.col2 AS col1 FROM tab2 WHERE NOT NULL IS NULL GROUP BY col2
----

query I rowsort
SELECT ALL - + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-9097
SELECT cor0.col1 DIV - 80 - - 77 FROM tab0 AS cor0 GROUP BY col1
----
76
77

skipif mysql # not compatible
query I rowsort label-9097
SELECT cor0.col1 / - 80 - - 77 FROM tab0 AS cor0 GROUP BY col1
----
76
77

query I rowsort
SELECT DISTINCT + 17 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT - - 83 + - col0 FROM tab2 GROUP BY tab2.col0
----
-8
-9
68

query I rowsort
SELECT ALL - ( 69 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-69
-69

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 24 col1 FROM tab2 GROUP BY tab2.col2
----
-24
-24
-24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 13 * - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1079
-338
-559

query I rowsort
SELECT DISTINCT + cor0.col0 * 97 - - 68 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col0, col2
----
2590
4239
8119

query I rowsort
SELECT - cor0.col1 * 79 FROM tab0 AS cor0 GROUP BY col1, col2
----
-6399
0
0

query I rowsort
SELECT + 5 FROM tab2 GROUP BY tab2.col0
----
5
5
5

onlyif mysql # DIV for integer division: 
query I rowsort label-9108
SELECT + ( 23 ) DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9108
SELECT + ( 23 ) / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
2

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab1 GROUP BY tab1.col0
----
-24

query I rowsort
SELECT - 67 AS col2 FROM tab2 GROUP BY tab2.col1
----
-67
-67
-67

query I rowsort
SELECT ALL + + 78 FROM tab1 GROUP BY tab1.col2
----
78
78
78

query I rowsort
SELECT - 81 AS col1 FROM tab1 GROUP BY tab1.col1
----
-81
-81
-81

query I rowsort
SELECT + + 97 AS col2 FROM tab0 GROUP BY tab0.col1
----
97
97

query I rowsort
SELECT - 61 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-61
-61
-61

onlyif mysql # DIV for integer division: 
query I rowsort label-9115
SELECT tab0.col0 DIV 57 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9115
SELECT tab0.col0 / 57 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
0
1

onlyif mysql # DIV for integer division: 
query I rowsort label-9116
SELECT + cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9116
SELECT + cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 22 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22

query I rowsort
SELECT DISTINCT 55 FROM tab1 cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
55

query I rowsort
SELECT - 32 FROM tab1 cor0 GROUP BY col0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT - - 52 AS col1 FROM tab1 GROUP BY tab1.col1
----
52

query I rowsort
SELECT - 38 AS col1 FROM tab1 GROUP BY col0
----
-38
-38
-38

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col2
----
9 values hashing to 66267ca705f58a4488972e09499aeb2b

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 91 FROM tab1 AS cor0 GROUP BY col2
----
91
91
91

query I rowsort
SELECT tab0.col1 * 14 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
1134

query I rowsort
SELECT + 65 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
65
65
65

query I rowsort
SELECT - 80 FROM tab0 GROUP BY tab0.col0
----
-80
-80
-80

query I rowsort
SELECT ALL 89 * - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-2136
-3382
-7031

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - 77 AS col0 FROM tab0 GROUP BY col1
----
-77
-77

query I rowsort
SELECT DISTINCT 23 FROM tab1 GROUP BY tab1.col0
----
23

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - tab0.col2 + 59 AS col2 FROM tab0 GROUP BY tab0.col2
----
-20
21
35

query I rowsort
SELECT cor0.col1 + 7 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
48
66
68

query I rowsort
SELECT + 32 FROM tab2 GROUP BY col0
----
32
32
32

query I rowsort
SELECT ALL 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
93
93
93

query I rowsort
SELECT - 0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 5 FROM tab2 cor0 GROUP BY cor0.col0
----
-5

onlyif mysql # DIV for integer division: 
query I rowsort label-9139
SELECT DISTINCT cor0.col0 DIV - 94 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-9139
SELECT DISTINCT cor0.col0 / - 94 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, col0
----
-15
-91
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9142
SELECT ALL - CAST( NULL AS SIGNED ) / cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9142
SELECT ALL - CAST ( NULL AS INTEGER ) / cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9143
SELECT DISTINCT CAST( NULL AS SIGNED ) / 28 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9143
SELECT DISTINCT CAST ( NULL AS INTEGER ) / 28 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9144
SELECT ALL CAST( NULL AS SIGNED ) - 14 * 47 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9144
SELECT ALL CAST ( NULL AS INTEGER ) - 14 * 47 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-9145
SELECT + COALESCE ( 31, cor0.col2 DIV + cor0.col2, - col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
31
31
31

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9145
SELECT + COALESCE ( 31, cor0.col2 / + cor0.col2, - col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
31
31
31

query I rowsort
SELECT + 85 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
85
85
85

query I rowsort
SELECT DISTINCT - 81 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81

onlyif mysql # DIV for integer division: 
query I rowsort label-9148
SELECT DISTINCT - tab0.col2 DIV - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9148
SELECT DISTINCT - tab0.col2 / - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 91 col0 FROM tab1 GROUP BY tab1.col1
----
91

query I rowsort
SELECT ( 80 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT DISTINCT - 22 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-22

query I rowsort
SELECT 7 AS col1 FROM tab1 GROUP BY tab1.col0
----
7
7
7

query I rowsort
SELECT - 53 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2332
-3021
-318

onlyif mysql # DIV for integer division: 
query I rowsort label-9154
SELECT DISTINCT cor0.col1 DIV - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-9154
SELECT DISTINCT cor0.col1 / - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-1
0

query I rowsort
SELECT DISTINCT - + tab1.col2 * - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 44 * + 57 FROM tab2 AS cor0 GROUP BY col0
----
2508

query I rowsort
SELECT - 85 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT 69 + 51 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
120
120
120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 85 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
85
85
85

query I rowsort
SELECT cor0.col2 * 81 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4698
6399
7047

query I rowsort
SELECT DISTINCT - 26 FROM tab1 GROUP BY tab1.col0
----
-26

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING ( col2 ) IS NOT NULL
----
24
38
79

query I rowsort
SELECT ALL + tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NULL
----
0
81

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT col2 * 7 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
315
497
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9166
SELECT CAST( NULL AS SIGNED ) - - 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9166
SELECT CAST ( NULL AS INTEGER ) - - 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT 68 AS col1 FROM tab1 GROUP BY tab1.col1
----
68

query I rowsort
SELECT DISTINCT + - 77 AS col2 FROM tab1 GROUP BY tab1.col1
----
-77

query I rowsort
SELECT + 17 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
17
17
17

query I rowsort
SELECT DISTINCT + - 65 FROM tab0 GROUP BY tab0.col2
----
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 78 - 70 col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
8
8
8

query I rowsort
SELECT ALL - - tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 73 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
73
73
73

query I rowsort
SELECT ALL cor0.col2 * - 33 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1254
-2607
-792

query I rowsort
SELECT + 40 * 21 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
840
840
840

query I rowsort
SELECT - + 44 - - tab1.col1 * - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-1980
-3293
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 36 col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
36

query I rowsort
SELECT ALL - 7 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-182
-301
-581

query I rowsort
SELECT 41 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT + - 37 FROM tab1 GROUP BY tab1.col1
----
-37
-37
-37

query I rowsort
SELECT + 33 FROM tab0 AS cor0 GROUP BY cor0.col2
----
33
33
33

query I rowsort
SELECT - 83 * - col0 FROM tab1 GROUP BY tab1.col0
----
1826
2324
6806

query I rowsort
SELECT ALL + 81 AS col1 FROM tab0 GROUP BY tab0.col0
----
81
81
81

query I rowsort
SELECT - 50 + + 86 * cor0.col2 FROM tab2 cor0 GROUP BY col2
----
4938
6744
7432

query I rowsort
SELECT DISTINCT - 0 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 * col2 col0 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + tab0.col0 + - ( - tab0.col0 ) AS col1 FROM tab0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT DISTINCT - cor0.col1 + 41 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-16
-3
35

query I rowsort
SELECT ALL - 75 * col1 FROM tab0 GROUP BY col1
----
-6075
0

query I rowsort
SELECT ALL + 99 AS col0 FROM tab1 GROUP BY col1
----
99
99
99

query I rowsort
SELECT + col1 * + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3483
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9193
SELECT cor0.col2 + + cor0.col2 DIV ( + 74 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

skipif mysql # not compatible
query I rowsort label-9193
SELECT cor0.col2 + + cor0.col2 / ( + 74 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT - 64 - 63 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-127
-127
-127

query I rowsort
SELECT DISTINCT - 62 FROM tab2 GROUP BY tab2.col0
----
-62

query I rowsort
SELECT DISTINCT + + COALESCE ( ( - 47 ), tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-47

query I rowsort
SELECT DISTINCT 71 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
71

query I rowsort
SELECT - 44 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-44
-44
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) NOT IN ( - cor0.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + col2 * - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY col2
----
-3306
-6162
-7482

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
118
122
82

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-9204
SELECT ALL - tab2.col0 DIV tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9204
SELECT ALL - tab2.col0 / tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT + cor0.col2 - + 88 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col2, cor1.col2
----
9 values hashing to 30b94f3abe89cc56db1ed70f4a4e05ad

query I rowsort
SELECT ALL 35 FROM tab0 cor0 GROUP BY col0
----
35
35
35

query I rowsort
SELECT ALL + 64 FROM tab0 GROUP BY tab0.col2
----
64
64
64

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9208
SELECT DISTINCT - CAST( NULL AS SIGNED ) + 23 AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9208
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + 23 AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT ALL - + tab2.col1 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + + tab1.col1 * tab1.col1 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1980
3306
42

query I rowsort
SELECT DISTINCT 49 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor0.col2
----
49

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-3364
-6241
-7569

query I rowsort
SELECT ALL + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT + - tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 86 FROM tab0 GROUP BY tab0.col0
----
-86
-86
-86

query I rowsort
SELECT ( 53 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, col2
----
53
53
53

query I rowsort
SELECT ALL - ( - 84 ) FROM tab2 AS cor0 GROUP BY col2, col1
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-9218
SELECT ALL 44 DIV - 80 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9218
SELECT ALL 44 / - 80 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
0
0
0

query I rowsort
SELECT 95 + + tab1.col1 FROM tab1 GROUP BY col1
----
101
139
152

query I rowsort
SELECT ALL 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
92
92

query I rowsort
SELECT DISTINCT - ( 94 ) AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-94

query I rowsort
SELECT 49 FROM tab1 AS cor0 GROUP BY col2
----
49
49
49

query I rowsort
SELECT - cor0.col2 * 3 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-135
-213
-24

query I rowsort
SELECT - col1 * - cor0.col1 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
1865
28
3204

query I rowsort
SELECT - 75 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-75
-75
-75

query I rowsort
SELECT - + 86 FROM tab2 GROUP BY tab2.col0
----
-86
-86
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-166
-52
-86

query I rowsort
SELECT - 2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
-2
-2

query I rowsort
SELECT ALL cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
158
48
76

query I rowsort
SELECT ALL - cor0.col2 + 69 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2
24
61

query I rowsort
SELECT + 59 FROM tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT - 28 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-28
-28
-28

query I rowsort
SELECT DISTINCT + ( + tab1.col1 ) AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 65 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col1 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT - 10 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT ( - 59 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-59
-59
-59

query I rowsort
SELECT - 41 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT ALL 80 + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
171
172
95

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT - tab2.col2 * col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT tab0.col1 * tab0.col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT tab0.col1 + col1 * - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1 HAVING NULL >= NULL
----

query I rowsort
SELECT 37 * - 51 FROM tab2 GROUP BY tab2.col1
----
-1887
-1887
-1887

query I rowsort
SELECT + 14 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
22
59
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - - 74 AS col2 FROM tab1 GROUP BY tab1.col2
----
74

query I rowsort
SELECT 50 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT + 4 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
4
4
4

query I rowsort
SELECT DISTINCT 86 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9253
SELECT CAST( NULL AS SIGNED ) * + 99 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9253
SELECT CAST ( NULL AS INTEGER ) * + 99 AS col0 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL + col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9256
SELECT cor0.col1 - + cor0.col2 DIV - cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
58
7

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9256
SELECT cor0.col1 - + cor0.col2 / - cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
58
7

query I rowsort
SELECT ALL cor0.col2 + + col1 * + ( cor0.col2 + - col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT 56 AS col2 FROM tab2 GROUP BY col0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
10

query I rowsort
SELECT DISTINCT - tab1.col0 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - - ( - ( col0 ) ) AS col0 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - NULLIF ( tab2.col1, + tab2.col1 ) AS col2 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2 WHERE NULL IS NULL GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT - cor0.col0 * 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1008
-2952
-792

query I rowsort
SELECT 55 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 69 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT - - ( + tab2.col2 ) FROM tab2 GROUP BY tab2.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9272
SELECT - + CAST( NULL AS SIGNED ) + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9272
SELECT - + CAST ( NULL AS INTEGER ) + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 88 AS col0 FROM tab2 cor0 GROUP BY col0
----
88

query I rowsort
SELECT 97 + 32 FROM tab1 AS cor0 GROUP BY cor0.col1
----
129
129
129

query I rowsort
SELECT - + 86 + - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-144
-165
-173

query I rowsort
SELECT - col2 * - 91 FROM tab0 GROUP BY tab0.col2
----
2184
3458
7189

query I rowsort
SELECT cor0.col2 * + cor0.col0 + - 35 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1270
5301
7154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( - ( tab2.col1 ) ) col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL - - 92 FROM tab2 GROUP BY tab2.col2
----
92
92
92

query I rowsort
SELECT DISTINCT tab0.col1 + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT ALL + + 99 AS col0 FROM tab0 GROUP BY tab0.col2
----
99
99
99

onlyif mysql # DIV for integer division: 
query I rowsort label-9282
SELECT + + 20 DIV + 66 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9282
SELECT + + 20 / + 66 AS col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT + tab0.col2 + - 58 AS col0 FROM tab0 GROUP BY tab0.col2
----
-20
-34
21

query I rowsort
SELECT - - tab0.col2 * ( 18 ) FROM tab0 GROUP BY tab0.col2
----
1422
432
684

query I rowsort
SELECT DISTINCT + tab1.col0 * ( tab1.col0 ) FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - cor0.col0 + - 14 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-105
-106
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 40 col2 FROM tab1 GROUP BY tab1.col2
----
-40
-40
-40

query I rowsort
SELECT DISTINCT + + tab0.col2 + 25 AS col0 FROM tab0 GROUP BY tab0.col2
----
104
49
63

query I rowsort
SELECT DISTINCT 94 * + CASE - tab2.col1 WHEN tab2.col1 - 29 THEN + 51 END FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT col2 * 36 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
1368
2844
864

query I rowsort
SELECT ALL - 80 FROM tab0 GROUP BY col1
----
-80
-80

query I rowsort
SELECT ALL 3 AS col1 FROM tab1 GROUP BY tab1.col0
----
3
3
3

onlyif mysql # DIV for integer division: 
query I rowsort label-9293
SELECT ALL col0 DIV + ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9293
SELECT ALL col0 / + ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT + 23 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
23
23
23

query I rowsort
SELECT ALL + + 94 AS col1 FROM tab1 GROUP BY tab1.col0
----
94
94
94

query I rowsort
SELECT ALL + 97 FROM tab2 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6561

query I rowsort
SELECT + tab2.col2 + + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT - 19 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-19

query I rowsort
SELECT DISTINCT 0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + - 26 FROM tab0 GROUP BY tab0.col2
----
-26
-26
-26

query I rowsort
SELECT - - tab0.col2 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT ALL 56 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
1452
1881
198

query I rowsort
SELECT - 65 FROM tab0 GROUP BY tab0.col1
----
-65
-65

query I rowsort
SELECT ALL 13 FROM tab2 cor0 GROUP BY col0
----
13
13
13

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
6561

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL 17 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT - col2 AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 55 AS col0 FROM tab1 GROUP BY col1
----
55
55
55

query I rowsort
SELECT ALL - - tab2.col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + + 98 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
104
142
155

query I rowsort
SELECT DISTINCT 81 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
81

query I rowsort
SELECT DISTINCT - 8 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-8

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
81

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
58
79
87

query I rowsort
SELECT 91 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1365
-8281
-8372

onlyif mysql # DIV for integer division: 
query I rowsort label-9320
SELECT - col0 DIV - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9320
SELECT - col0 / - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9321
SELECT + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9321
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 + + 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
271
8327
8510

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT + 52 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT 28 * tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
2268

query I rowsort
SELECT DISTINCT 35 AS col1 FROM tab0 cor0 GROUP BY col2
----
35

query I rowsort
SELECT 20 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT - tab1.col0 + 88 * - ( - 56 ) FROM tab1 GROUP BY col0
----
4846
4900
4906

query I rowsort
SELECT ALL + 68 FROM tab0 GROUP BY tab0.col2
----
68
68
68

query I rowsort
SELECT col0 + 4 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
19
95
96

query I rowsort
SELECT DISTINCT 85 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
85

query I rowsort
SELECT - col0 * - cor0.col0 - 44 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
440
6680
740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * + tab0.col1 col0 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL + tab0.col1 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - 74 FROM tab2 cor0 GROUP BY cor0.col0
----
-74
-74
-74

query I rowsort
SELECT + 96 * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
5568
7584
8352

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 80 * tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
3600
5680
640

query I rowsort
SELECT ALL - - 64 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
122
143
151

onlyif mysql # DIV for integer division: 
query I rowsort label-9345
SELECT cor0.col2 DIV + 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-9345
SELECT cor0.col2 / + 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
2
4

query I rowsort
SELECT ALL + - 2 FROM tab2 GROUP BY tab2.col0
----
-2
-2
-2

onlyif mysql # DIV for integer division: 
query I rowsort label-9347
SELECT ALL - tab1.col1 DIV tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9347
SELECT ALL - tab1.col1 / tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
-1
-1
-1

onlyif mysql # DIV for integer division: 
query I rowsort label-9348
SELECT - 93 DIV - 19 col2 FROM tab0 GROUP BY tab0.col0
----
4
4
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9348
SELECT - 93 / - 19 col2 FROM tab0 GROUP BY tab0.col0
----
4
4
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9349
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9349
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 36 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col2
----
-36
-36
-36

query I rowsort
SELECT ALL - ( - col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - ( + 88 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-88
-88
-88

query I rowsort
SELECT tab2.col2 - 9 FROM tab2 GROUP BY tab2.col2
----
49
70
78

query I rowsort
SELECT DISTINCT - tab0.col2 - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT ALL + tab0.col2 + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL > NULL
----

query I rowsort
SELECT ALL + tab1.col0 AS col0 FROM tab1 WHERE NOT ( + tab1.col2 ) IS NULL GROUP BY tab1.col0 HAVING NULL IS NULL
----
22
28
82

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT - col1 IS NOT NULL
----

query I rowsort
SELECT DISTINCT + 33 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
33

query I rowsort
SELECT ALL tab2.col1 * - 43 AS col2 FROM tab2 GROUP BY tab2.col1
----
-1763
-2537
-2623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - 22 FROM tab2 GROUP BY tab2.col2
----
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col1 FROM tab2 GROUP BY tab2.col1
----
97
97
97

query I rowsort
SELECT 7 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 45 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
45

query I rowsort
SELECT ALL + 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
105
121
67

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9369
SELECT + + tab1.col1 * CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9369
SELECT + + tab1.col1 * CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + NULLIF ( - cor0.col1, + 49 * 50 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 89 + + cor0.col1 * + 62 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
5111
89

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + + cor0.col2 * cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT 69 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
69
69
69

query I rowsort
SELECT col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 67 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT ALL 82 AS col0 FROM tab1 GROUP BY tab1.col2
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 col2 FROM tab2 GROUP BY tab2.col2
----
-94
-94
-94

query I rowsort
SELECT ALL + 3 AS col2 FROM tab2 GROUP BY tab2.col0
----
3
3
3

query I rowsort
SELECT ALL + - tab1.col2 + - 1 AS col2 FROM tab1 GROUP BY tab1.col2
----
-46
-72
-9

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 99, - tab0.col2 + + tab0.col1 ) FROM tab0 GROUP BY tab0.col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT - 43 + + 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9384
SELECT ALL - CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9384
SELECT ALL - CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - + tab0.col2 * tab0.col2 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 54 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54
54
54

onlyif mysql # DIV for integer division: 
query I rowsort label-9387
SELECT ALL COALESCE ( + cor0.col0, col1 DIV - cor0.col1 ) DIV - cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-43
-60
-61

skipif mysql # not compatible
query I rowsort label-9387
SELECT ALL COALESCE ( + cor0.col0, col1 / - cor0.col1 ) / - cor0.col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-43
-60
-61

query I rowsort
SELECT + 30 + + col0 * - ( - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
514
6754
814

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 90 col2 FROM tab0 GROUP BY col2
----
2160
3420
7110

query I rowsort
SELECT - ( 22 ) FROM tab1 GROUP BY col2
----
-22
-22
-22

query I rowsort
SELECT + 71 FROM tab0 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT 79 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT + - 89 FROM tab2 GROUP BY tab2.col1
----
-89
-89
-89

query I rowsort
SELECT - 42 AS col0 FROM tab2 GROUP BY tab2.col0
----
-42
-42
-42

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, col2
----
0
0
81

query I rowsort
SELECT + 12 FROM tab1 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT ALL - - tab1.col2 * tab1.col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col0 * - 89 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2288
3784
7304

onlyif mysql # DIV for integer division: 
query I rowsort label-9400
SELECT DISTINCT cor0.col0 DIV - 84 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
query I rowsort label-9400
SELECT DISTINCT cor0.col0 / - 84 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
0

query I rowsort
SELECT - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor1.col1
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 7 col0 FROM tab2 GROUP BY tab2.col2
----
-7
-7
-7

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT col0 + col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL + tab2.col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-9408
SELECT ALL cor0.col2 DIV + 1 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
45
71
8

skipif mysql # not compatible
query I rowsort label-9408
SELECT ALL cor0.col2 / + 1 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 70 * - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
4060
5530
6090

query I rowsort
SELECT cor0.col1 + - 57 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-16
2
4

query I rowsort
SELECT - 4 FROM tab0 GROUP BY tab0.col0
----
-4
-4
-4

query I rowsort
SELECT + 74 - - 78 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
152
152

query I rowsort
SELECT DISTINCT 17 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
1343
1479
986

query I rowsort
SELECT ALL 60 FROM tab2 AS cor0 GROUP BY col1
----
60
60
60

query I rowsort
SELECT + cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT ALL 59 AS col1 FROM tab1 GROUP BY tab1.col1
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 5 col0 FROM tab1 GROUP BY tab1.col0
----
-5
-5
-5

query I rowsort
SELECT ALL 35 * - cor0.col0 + - cor0.col0 FROM tab0 cor0 GROUP BY col0
----
-1548
-2988
-936

query I rowsort
SELECT ALL + 83 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT - col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + + 61 AS col0 FROM tab0 GROUP BY tab0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT + col1 + + 97 FROM tab2 GROUP BY tab2.col1
----
138
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 14 col0 FROM tab1 GROUP BY tab1.col1
----
14

query I rowsort
SELECT DISTINCT + 43 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
102
104
84

query I rowsort
SELECT DISTINCT + 91 AS col0 FROM tab1 GROUP BY tab1.col2
----
91

query I rowsort
SELECT ALL - ( - 57 ) + + col0 * 4 AS col0 FROM tab1 GROUP BY col0
----
145
169
385

query I rowsort
SELECT 88 + + cor0.col0 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
313
8369
8552

query I rowsort
SELECT + 65 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT ALL + 90 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT ALL - - tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab1.col0 col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2 HAVING ( NULL ) IS NULL
----
116
158
174

query I rowsort
SELECT cor0.col0 * - 43 FROM tab0 AS cor0 GROUP BY col0
----
-1118
-1849
-3569

query I rowsort
SELECT ALL + cor0.col1 + + 15 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
56
74
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * 79 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-2054
-3397
-6557

query I rowsort
SELECT - 42 FROM tab2 GROUP BY tab2.col1
----
-42
-42
-42

query I rowsort
SELECT 16 FROM tab1 GROUP BY tab1.col1
----
16
16
16

query I rowsort
SELECT ALL + 40 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
40
40
40

query I rowsort
SELECT ALL + 40 AS col2 FROM tab2 GROUP BY tab2.col2
----
40
40
40

query I rowsort
SELECT tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT - + 35 FROM tab1 GROUP BY tab1.col1
----
-35

query I rowsort
SELECT ALL 82 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
173
174
97

query I rowsort
SELECT DISTINCT 3 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
3

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col0 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1305
184
5893

query I rowsort
SELECT DISTINCT + 29 + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
112
55
72

onlyif mysql # DIV for integer division: 
query I rowsort label-9447
SELECT ALL - - tab2.col1 DIV + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9447
SELECT ALL - - tab2.col1 / + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - 42 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-42
-42
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 48 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48

onlyif mysql # DIV for integer division: 
query I rowsort label-9451
SELECT ALL - + tab0.col0 DIV + 55 AS col2 FROM tab0 GROUP BY col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9451
SELECT ALL - + tab0.col0 / + 55 AS col2 FROM tab0 GROUP BY col0
----
-1
0
0

query I rowsort
SELECT - 14 FROM tab1 GROUP BY tab1.col2
----
-14
-14
-14

query I rowsort
SELECT + col0 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-53
19
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 69 - + 60 col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
9

query I rowsort
SELECT - 23 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-23
-23
-23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 * 33 col0 FROM tab0 GROUP BY tab0.col0
----
1419
2739
858

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9457
SELECT DISTINCT - cor0.col2 - CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9457
SELECT DISTINCT - cor0.col2 - CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL

query I rowsort
SELECT - 28 + - 46 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-74
-74

query I rowsort
SELECT ALL cor0.col1 - + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + - 49 FROM tab2 GROUP BY tab2.col1
----
-49

query I rowsort
SELECT DISTINCT + tab1.col2 - ( + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9462
SELECT DISTINCT - tab0.col2 DIV tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9462
SELECT DISTINCT - tab0.col2 / tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-1

query I rowsort
SELECT 84 * cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
2184
3612
6972

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-138
-148
-99

query I rowsort
SELECT DISTINCT + 18 FROM tab0 GROUP BY tab0.col1
----
18

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
44
57
6

query I rowsort
SELECT + 86 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
86
86

query I rowsort
SELECT DISTINCT + 38 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
38

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
1305
5336
7189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 64 FROM tab0 GROUP BY col2
----
-64

query I rowsort
SELECT ALL + 44 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3564

query I rowsort
SELECT ALL - 97 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-97
-97
-97

query I rowsort
SELECT DISTINCT + 26 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
26

query I rowsort
SELECT + tab0.col1 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - 32 col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-17
59
60

query I rowsort
SELECT - - 26 FROM tab1 GROUP BY tab1.col1
----
26
26
26

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 - 53 * - 63 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
10228
4015
5188

query I rowsort
SELECT ALL + 79 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
79
79
79

query I rowsort
SELECT ALL + 65 AS col2 FROM tab0 GROUP BY tab0.col1
----
65
65

query I rowsort
SELECT DISTINCT + + 96 AS col0 FROM tab0 GROUP BY tab0.col1
----
96

query I rowsort
SELECT - 19 FROM tab0 GROUP BY tab0.col0
----
-19
-19
-19

query I rowsort
SELECT + 46 AS col2 FROM tab2 GROUP BY tab2.col1
----
46
46
46

query I rowsort
SELECT + 32 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-9487
SELECT DISTINCT - col2 DIV + 53 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9487
SELECT DISTINCT - col2 / + 53 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT 34 FROM tab1 AS cor0 GROUP BY col2
----
34
34
34

query I rowsort
SELECT ALL + COALESCE ( col0, cor0.col0 + cor0.col0 ) - 11 FROM tab1 AS cor0 GROUP BY col0
----
11
17
71

onlyif mysql # DIV for integer division: 
query I rowsort label-9491
SELECT ALL cor0.col0 DIV 42 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-9491
SELECT ALL cor0.col0 / 42 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
2
2

query I rowsort
SELECT + cor0.col2 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
0
0
0

query I rowsort
SELECT col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT cor0.col0 * 1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

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 ALL + 94 * 42 FROM tab2 GROUP BY tab2.col0
----
3948
3948
3948

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( tab0.col1 ) col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 62 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
106
119
68

query I rowsort
SELECT ALL 10 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col0
----
36
53
93

query I rowsort
SELECT DISTINCT + 29 - 19 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
10

query I rowsort
SELECT DISTINCT - ( 12 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9502
SELECT ALL CAST( NULL AS SIGNED ) + 76 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9502
SELECT ALL CAST ( NULL AS INTEGER ) + 76 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 53 AS col1 FROM tab2 GROUP BY tab2.col2
----
-53
-53
-53

query I rowsort
SELECT + 17 FROM tab1 GROUP BY tab1.col2
----
17
17
17

query I rowsort
SELECT DISTINCT + ( tab0.col2 ) AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + ( col1 ) FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL + 87 AS col2 FROM tab2 GROUP BY tab2.col2
----
87
87
87

query I rowsort
SELECT ALL + 17 - + 62 FROM tab0 GROUP BY tab0.col2
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - 3 FROM tab0 AS cor0 GROUP BY col1
----
-3

query I rowsort
SELECT cor0.col2 - - cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
138
148
99

query I rowsort
SELECT - - 27 FROM tab0 GROUP BY tab0.col1
----
27
27

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT - COALESCE ( + cor0.col2, - 76 ) + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT + 21 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor0.col0
----
21
21
21

query I rowsort
SELECT ALL + 21 * 19 + - tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
307
308
384

query I rowsort
SELECT + col1 AS col1 FROM tab2 cor0 GROUP BY col1, col0, col2
----
41
59
61

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT ALL + 47 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT ALL - 49 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-49
-49
-49

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col2 col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 15 * - tab2.col0 FROM tab2 GROUP BY col0
----
1365
1380
225

query I rowsort
SELECT - 35 FROM tab0 GROUP BY col1
----
-35
-35

query I rowsort
SELECT ALL + 51 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT ALL + - 10 FROM tab0 GROUP BY tab0.col1
----
-10
-10

query I rowsort
SELECT + tab2.col0 - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - tab2.col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT ( NULL ) IS NOT NULL
----
-41
-59
-61

query I rowsort
SELECT col0 + - 65 * + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1664
-2752
-5312

query I rowsort
SELECT - tab2.col2 + tab2.col2 AS col1 FROM tab2 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT - tab1.col1 + - tab1.col1 * 64 FROM tab1 GROUP BY tab1.col1
----
-2860
-3705
-390

query I rowsort
SELECT DISTINCT + 56 FROM tab0 AS cor0 GROUP BY cor0.col0
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 71 col1 FROM tab2 GROUP BY tab2.col1
----
-71
-71
-71

query I rowsort
SELECT - tab0.col0 - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-166
-52
-86

query I rowsort
SELECT DISTINCT + cor0.col0 - 9 * 96 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-772
-773
-849

query I rowsort
SELECT ALL + tab2.col0 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT cor0.col1 - - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
133
150
76

query I rowsort
SELECT DISTINCT - ( + 11 ) FROM tab1 GROUP BY tab1.col2
----
-11

onlyif mysql # DIV for integer division: 
query I rowsort label-9538
SELECT ALL tab0.col0 DIV 20 FROM tab0 GROUP BY tab0.col0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-9538
SELECT ALL tab0.col0 / 20 FROM tab0 GROUP BY tab0.col0
----
1
2
4

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9539
SELECT DISTINCT - CAST( + 95 AS SIGNED ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-95

skipif mysql # not compatible
query I rowsort label-9539
SELECT DISTINCT - CAST ( + 95 AS INTEGER ) AS col2 FROM tab1 GROUP BY tab1.col0
----
-95

query I rowsort
SELECT DISTINCT ( ( cor0.col1 ) ) * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 col2 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-9543
SELECT ALL + 76 DIV 97 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9543
SELECT ALL + 76 / 97 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT - 71 * - 70 FROM tab1 GROUP BY tab1.col1
----
4970
4970
4970

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
26
43
83

query I rowsort
SELECT DISTINCT 27 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27

query I rowsort
SELECT - - tab2.col1 * 11 + tab2.col1 FROM tab2 GROUP BY col1
----
492
708
732

query I rowsort
SELECT ALL + + 46 FROM tab2 GROUP BY col0
----
46
46
46

query I rowsort
SELECT - 32 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-32
-32
-32

onlyif mysql # DIV for integer division: 
query I rowsort label-9550
SELECT + cor0.col2 - + cor0.col2 DIV - 35 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
59
81
89

skipif mysql # not compatible
query I rowsort label-9550
SELECT + cor0.col2 - + cor0.col2 / - 35 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
59
81
89

query I rowsort
SELECT ALL 47 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
138
139
62

query I rowsort
SELECT ALL 49 AS col1 FROM tab1 GROUP BY tab1.col1
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * - tab2.col0 col0 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT + 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
63
63
63

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + col0 AS col0 FROM tab0 AS cor0 WHERE NOT ( NULL ) IN ( cor0.col2 * cor0.col1 ) GROUP BY cor0.col0
----

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NULL
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT tab0.col0 + tab0.col0 FROM tab0 GROUP BY col0
----
166
52
86

onlyif mysql # DIV for integer division: 
query I rowsort label-9560
SELECT ALL tab2.col2 + + tab2.col2 DIV + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
59
80
88

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9560
SELECT ALL tab2.col2 + + tab2.col2 / + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
59
80
88

query I rowsort
SELECT DISTINCT cor0.col1 - 97 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-36
-38
-56

query I rowsort
SELECT - 27 FROM tab0 AS cor0 GROUP BY col1
----
-27
-27

query I rowsort
SELECT ALL - cor0.col0 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-28
-85

query I rowsort
SELECT DISTINCT 53 FROM tab1 GROUP BY tab1.col1
----
53

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
102
150
170

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9566
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-9566
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT ALL - cor0.col0 * + 18 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1476
-396
-504

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 32 col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
32

query I rowsort
SELECT DISTINCT 92 - + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
49
66
9

query I rowsort
SELECT DISTINCT - ( 35 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-35

query I rowsort
SELECT + tab1.col0 * - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT + - 44 FROM tab0 GROUP BY tab0.col0
----
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 * cor0.col1 + cor0.col1 col0 FROM tab1 cor0 GROUP BY col1
----
4004
5187
546

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - - NULLIF ( tab2.col2, 85 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + tab2.col2 + tab2.col2 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT DISTINCT - tab1.col1 * - tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT 97 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2134
2716
7954

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 56 FROM tab2 GROUP BY tab2.col1
----
56

query I rowsort
SELECT + - 45 - - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-19
-2
38

query I rowsort
SELECT + 64 FROM tab2 AS cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT DISTINCT tab2.col2 * NULLIF ( 90, + 50 * tab2.col2 ) AS col0 FROM tab2 GROUP BY tab2.col2
----
5220
7110
7830

query I rowsort
SELECT DISTINCT 36 FROM tab0 cor0 GROUP BY cor0.col1
----
36

query I rowsort
SELECT DISTINCT cor0.col2 * ( + cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + 65 AS col0 FROM tab0 GROUP BY tab0.col1
----
65
65

query I rowsort
SELECT ALL 41 FROM tab1 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT + - tab2.col1 - + 8 AS col0 FROM tab2 GROUP BY tab2.col1
----
-49
-67
-69

query I rowsort
SELECT ALL + 9 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 63 AS col0 FROM tab2 GROUP BY tab2.col2
----
63
63
63

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9593
SELECT - CAST( 56 AS SIGNED ) + col2 FROM tab0 GROUP BY tab0.col2
----
-18
-32
23

skipif mysql # not compatible
query I rowsort label-9593
SELECT - CAST ( 56 AS INTEGER ) + col2 FROM tab0 GROUP BY tab0.col2
----
-18
-32
23

query I rowsort
SELECT + 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * - col2 - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-1482
-600
-6320

onlyif mysql # DIV for integer division: 
query I rowsort label-9596
SELECT - - 37 DIV tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9596
SELECT - - 37 / tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT + 94 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 23 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23

query I rowsort
SELECT DISTINCT + 19 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT - 94 * - col2 + + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2280
3610
7505

query I rowsort
SELECT cor0.col1 * cor0.col2 + - cor0.col2 FROM tab2 cor0 GROUP BY col2, cor0.col0, cor0.col1
----
2320
4582
5220

query I rowsort
SELECT + tab1.col2 + 32 AS col2 FROM tab1 GROUP BY tab1.col2
----
103
40
77

query I rowsort
SELECT ALL ( - ( cor0.col0 ) ) FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + cor0.col0 * - 77 - cor0.col0 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2002
-6391
-6794

query I rowsort
SELECT 64 + - col1 AS col1 FROM tab0 GROUP BY col1
----
-17
64

query I rowsort
SELECT ALL cor0.col2 - + ( - cor0.col2 + cor0.col2 * - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1479
5452
7347

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 99 + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
125
142
182

query I rowsort
SELECT ALL - 21 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1701
0

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9612
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-9612
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL

query I rowsort
SELECT ALL 88 AS col1 FROM tab0 GROUP BY tab0.col0
----
88
88
88

query I rowsort
SELECT ALL - - 8 * + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
176
224
656

query I rowsort
SELECT + tab0.col0 * - tab0.col0 + + tab0.col0 * tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT - 34 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1496
1938
204

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 91 FROM tab1 AS cor0 GROUP BY col1
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
116
158
174

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, 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 tab1 AS cor0 GROUP BY col2, cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT - tab0.col2 + 56 AS col2 FROM tab0 GROUP BY tab0.col2
----
-23
18
32

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT - 98 FROM tab1 GROUP BY tab1.col2
----
-98
-98
-98

query I rowsort
SELECT + 23 FROM tab2 GROUP BY tab2.col2
----
23
23
23

query I rowsort
SELECT 23 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1909
598
989

query I rowsort
SELECT DISTINCT - 20 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-20

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT + 20 AS col1 FROM tab0 GROUP BY tab0.col0
----
20
20
20

query I rowsort
SELECT ALL - - 47 * - tab2.col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-1886
-2714
-2806

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 72 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
65
86
94

query I rowsort
SELECT + + tab1.col1 + 85 AS col1 FROM tab1 GROUP BY tab1.col1
----
129
142
91

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT cor0.col1 * 78 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3432
4446
468

query I rowsort
SELECT cor0.col2 * - 95 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-5510
-7505
-8265

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9639
SELECT CAST( 57 AS SIGNED ) FROM tab1 AS cor0 GROUP BY col1
----
57
57
57

skipif mysql # not compatible
query I rowsort label-9639
SELECT CAST ( 57 AS INTEGER ) FROM tab1 AS cor0 GROUP BY col1
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 61 col2 FROM tab0 GROUP BY tab0.col2
----
-61
-61
-61

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1, col2
----
44
57
6

query I rowsort
SELECT - 31 FROM tab2 GROUP BY tab2.col0
----
-31
-31
-31

query I rowsort
SELECT 37 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
37
37
37

query I rowsort
SELECT DISTINCT 24 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
24

onlyif mysql # DIV for integer division: 
query I rowsort label-9645
SELECT DISTINCT + 44 DIV col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0

skipif mysql # not compatible
query I rowsort label-9645
SELECT DISTINCT + 44 / col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT DISTINCT - 17 FROM tab2 GROUP BY tab2.col0
----
-17

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col0 FROM tab2 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT 68 AS col0 FROM tab0 GROUP BY tab0.col1
----
68
68

query I rowsort
SELECT col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
142
16
90

query I rowsort
SELECT ALL - - col1 FROM tab0 GROUP BY col1
----
0
81

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 cor0.col2 * - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + 87 * 3 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
287
304
344

query I rowsort
SELECT + cor0.col0 * + 88 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1936
2464
7216

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9656
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9656
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 64 FROM tab0 GROUP BY tab0.col1
----
64
64

query I rowsort
SELECT ALL 90 FROM tab2 GROUP BY tab2.col1
----
90
90
90

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9659
SELECT + cor0.col2 + CAST( NULL AS SIGNED ) * 92 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9659
SELECT + cor0.col2 + CAST ( NULL AS INTEGER ) * 92 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + 42 FROM tab1 AS cor0 GROUP BY col1, col1
----
42
42
42

query I rowsort
SELECT + 53 * + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1272
2014
4187

query I rowsort
SELECT DISTINCT + 5 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
120
190
395

query I rowsort
SELECT + tab1.col0 + 4 AS col0 FROM tab1 GROUP BY col0
----
26
32
86

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT + tab0.col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT 98 * + 16 FROM tab0 GROUP BY col1
----
1568

query I rowsort
SELECT DISTINCT CASE cor0.col1 WHEN + 78 THEN NULL WHEN cor0.col0 THEN NULL ELSE cor0.col1 END AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - - tab1.col2 * - 90 - - 33 AS col0 FROM tab1 GROUP BY col2
----
-4017
-6357
-687

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT DISTINCT - 21 FROM tab1 GROUP BY tab1.col2
----
-21

query I rowsort
SELECT ALL 34 AS col0 FROM tab0 GROUP BY tab0.col1
----
34
34

query I rowsort
SELECT ALL 65 * 10 AS col2 FROM tab0 GROUP BY tab0.col1
----
650
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + 32 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
-51
6

query I rowsort
SELECT DISTINCT 98 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
98

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 46 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
104
125
133

query I rowsort
SELECT 63 AS col0 FROM tab2 GROUP BY col2
----
63
63
63

query I rowsort
SELECT + 97 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4365
6887
776

query I rowsort
SELECT 42 FROM tab1 GROUP BY tab1.col2
----
42
42
42

query I rowsort
SELECT + 23 FROM tab0 GROUP BY tab0.col2
----
23
23
23

query I rowsort
SELECT DISTINCT ( 2 ) AS col0 FROM tab2 GROUP BY tab2.col0
----
2

query I rowsort
SELECT 34 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT + cor0.col1 - 37 FROM tab2 AS cor0 GROUP BY col0, col1, cor0.col1
----
22
24
4

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - ( - 44 ) FROM tab2 GROUP BY tab2.col2
----
44
44
44

query I rowsort
SELECT ALL 36 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
36
36
36

onlyif mysql # DIV for integer division: 
query I rowsort label-9689
SELECT cor0.col0 + - 79 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
10
91
92

skipif mysql # not compatible
query I rowsort label-9689
SELECT cor0.col0 + - 79 / cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
10
91
92

query I rowsort
SELECT DISTINCT + - tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + tab1.col2 * - 28 col2 FROM tab1 GROUP BY col2
----
1260
1988
224

query I rowsort
SELECT DISTINCT + cor0.col0 * + NULLIF ( - col0, - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
NULL

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1849
676
6889

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 75 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75
75
75

onlyif mysql # DIV for integer division: 
query I rowsort label-9696
SELECT ALL - ( 25 ) DIV cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9696
SELECT ALL - ( 25 ) / cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - tab2.col2 * tab2.col2 FROM tab2 GROUP BY col2 HAVING NULL IS NULL
----
-3364
-6241
-7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab1.col0 + - ( tab1.col0 ) col2 FROM tab1 GROUP BY tab1.col0
----
0

query I rowsort
SELECT DISTINCT - col0 + 65 AS col1 FROM tab2 GROUP BY tab2.col0
----
-26
-27
50

query I rowsort
SELECT DISTINCT cor0.col2 + - col2 FROM tab2 AS cor0 GROUP BY col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9701
SELECT DISTINCT - cor0.col2 DIV 63 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-9701
SELECT DISTINCT - cor0.col2 / 63 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
0

query I rowsort
SELECT col0 * + tab2.col0 - ( tab2.col0 ) FROM tab2 GROUP BY col0
----
210
8190
8372

query I rowsort
SELECT ALL - 25 AS col1 FROM tab2 GROUP BY col0
----
-25
-25
-25

query I rowsort
SELECT + 3 FROM tab2 GROUP BY col2
----
3
3
3

query I rowsort
SELECT 61 FROM tab0 GROUP BY col0
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 * - col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3306
-6162
-7482

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col1 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor1.col1
----
9 values hashing to c3fce74ead130ec1d9dde8274d706e34

query I rowsort
SELECT 83 FROM tab0 GROUP BY tab0.col0
----
83
83
83

query I rowsort
SELECT - 87 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-87
-87
-87

query I rowsort
SELECT 75 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
75
75
75

query I rowsort
SELECT + ( tab1.col0 ) FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL - 93 AS col0 FROM tab1 cor0 GROUP BY col0, col2
----
-93
-93
-93

query I rowsort
SELECT DISTINCT + + 26 FROM tab1 GROUP BY tab1.col1
----
26

query I rowsort
SELECT ALL + 53 AS col2 FROM tab1 GROUP BY tab1.col0
----
53
53
53

query I rowsort
SELECT DISTINCT 36 FROM tab2 GROUP BY tab2.col1
----
36

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT - 38 * - tab2.col2 FROM tab2 GROUP BY col2
----
2204
3002
3306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 92 col0 FROM tab1 GROUP BY tab1.col2
----
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9719
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-9719
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
NULL

query I rowsort
SELECT 71 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
114
154
97

query I rowsort
SELECT DISTINCT 47 AS col1 FROM tab2 GROUP BY tab2.col2
----
47

query I rowsort
SELECT ALL + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING NOT - col2 IS NULL
----
45
71
8

query I rowsort
SELECT 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT - tab2.col1 - + 34 AS col2 FROM tab2 GROUP BY col1
----
-75
-93
-95

onlyif mysql # DIV for integer division: 
query I rowsort label-9725
SELECT DISTINCT cor0.col0 - col0 DIV cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
21
27
81

skipif mysql # not compatible
query I rowsort label-9725
SELECT DISTINCT cor0.col0 - col0 / cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
21
27
81

query I rowsort
SELECT 94 + - 97 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT 3 * + tab1.col0 - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
112
328
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 col2 FROM tab2 GROUP BY tab2.col1
----
22
22
22

query I rowsort
SELECT ALL - 59 AS col0 FROM tab1 GROUP BY tab1.col1
----
-59
-59
-59

query I rowsort
SELECT ALL + 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT ( 41 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT + tab0.col2 * - tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
142
16
90

query I rowsort
SELECT - 50 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
-50
-50
-50

onlyif mysql # DIV for integer division: 
query I rowsort label-9735
SELECT ALL 51 DIV tab1.col1 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
14
45
57

skipif mysql # not compatible
query I rowsort label-9735
SELECT ALL 51 / tab1.col1 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
14
45
57

query I rowsort
SELECT - 79 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-79
-79
2

query I rowsort
SELECT - 34 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-34
-34
-34

query I rowsort
SELECT DISTINCT 76 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
76

onlyif mysql # DIV for integer division: 
query I rowsort label-9739
SELECT tab0.col0 - - col0 DIV 73 FROM tab0 GROUP BY tab0.col0
----
26
43
84

skipif mysql # not compatible
query I rowsort label-9739
SELECT tab0.col0 - - col0 / 73 FROM tab0 GROUP BY tab0.col0
----
26
43
84

query I rowsort
SELECT 41 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2, cor0.col1
----
41
41
41

query I rowsort
SELECT 41 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41
41

query I rowsort
SELECT - 51 AS col2 FROM tab2 GROUP BY tab2.col1
----
-51
-51
-51

query I rowsort
SELECT - 3 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3
-3
-3

query I rowsort
SELECT ALL - 30 FROM tab0 GROUP BY tab0.col0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT - - 76 * tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
4408
6004
6612

query I rowsort
SELECT - ( + 39 ) FROM tab1 AS cor0 GROUP BY col2
----
-39
-39
-39

query I rowsort
SELECT + cor0.col0 * + 59 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
1298
1652
4838

query I rowsort
SELECT cor0.col0 + + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT cor0.col0 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
-1032
-2054
-3154

query I rowsort
SELECT 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
71
71
71

query I rowsort
SELECT DISTINCT + tab2.col1 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL 65 FROM tab1 GROUP BY tab1.col2
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-9753
SELECT ALL 2 DIV - 45 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9753
SELECT ALL 2 / - 45 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT ( 54 ) FROM tab1 AS cor0 GROUP BY cor0.col0, col0, col2
----
54

query I rowsort
SELECT + 88 FROM tab0 AS cor0 GROUP BY col0
----
88
88
88

query I rowsort
SELECT DISTINCT 52 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-3016
-4108
-4524

query I rowsort
SELECT 28 FROM tab0 cor0 GROUP BY col1
----
28
28

query I rowsort
SELECT 16 FROM tab0 AS cor0 GROUP BY cor0.col1
----
16
16

query I rowsort
SELECT ALL - + ( tab2.col2 ) + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 98 AS col0 FROM tab1 GROUP BY col0
----
-98

query I rowsort
SELECT 15 FROM tab0 GROUP BY tab0.col1
----
15
15

query I rowsort
SELECT ALL - cor0.col2 * 54 FROM tab2 AS cor0 GROUP BY col2
----
-3132
-4266
-4698

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 1 AS col0 FROM tab2 GROUP BY tab2.col0
----
1
1
1

query I rowsort
SELECT 78 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT col2 * - ( 80 + - tab2.col2 ) AS col1 FROM tab2 GROUP BY tab2.col2
----
-1276
-79
609

query I rowsort
SELECT ALL - 63 FROM tab0 GROUP BY tab0.col0
----
-63
-63
-63

query I rowsort
SELECT DISTINCT - NULLIF ( - 85, 72 ) FROM tab0 GROUP BY tab0.col2
----
85

query I rowsort
SELECT DISTINCT + - 54 * 84 FROM tab1 GROUP BY col0
----
-4536

query I rowsort
SELECT DISTINCT 68 FROM tab1 GROUP BY col0
----
68

query I rowsort
SELECT - 72 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT 12 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT 66 * - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1584
-2508
-5214

query I rowsort
SELECT DISTINCT - cor0.col0 * - 40 FROM tab1 AS cor0 GROUP BY col0
----
1120
3280
880

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col2 * - 1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 48 AS col2 FROM tab1 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT - ( col1 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 70 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT ALL + + COALESCE ( + tab1.col2, + tab1.col2 ) - + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT ALL 88 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
88
88
88

query I rowsort
SELECT ALL - col2 AS col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - - tab1.col2 * - col2 + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-1980
-4970
-56

query I rowsort
SELECT ALL + - tab1.col0 - - 15 AS col2 FROM tab1 GROUP BY tab1.col0
----
-13
-67
-7

query I rowsort
SELECT DISTINCT - tab2.col0 * 27 AS col2 FROM tab2 GROUP BY tab2.col0
----
-2457
-2484
-405

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT DISTINCT tab0.col1 - 59 AS col2 FROM tab0 GROUP BY tab0.col1
----
-59
22

query I rowsort
SELECT + ( - 72 ) FROM tab1 GROUP BY tab1.col0
----
-72
-72
-72

query I rowsort
SELECT 62 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2728
3534
372

query I rowsort
SELECT ALL + ( cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 85 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
85

query I rowsort
SELECT DISTINCT + 28 + - 10 FROM tab0 cor0 GROUP BY cor0.col0
----
18

onlyif mysql # DIV for integer division: 
query I rowsort label-9795
SELECT DISTINCT - - 11 DIV + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9795
SELECT DISTINCT - - 11 / + tab2.col1 col2 FROM tab2 GROUP BY tab2.col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9796
SELECT ALL - + tab0.col2 + + tab0.col2 DIV col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-23
-37
-78

skipif mysql # not compatible
query I rowsort label-9796
SELECT ALL - + tab0.col2 + + tab0.col2 / col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-23
-37
-78

query I rowsort
SELECT ALL - 43 AS col2 FROM tab1 GROUP BY tab1.col0
----
-43
-43
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - - 72 * tab0.col0 + 33 AS col1 FROM tab0 GROUP BY tab0.col0
----
1905
3129
6009

query I rowsort
SELECT ALL + 30 AS col1 FROM tab2 GROUP BY tab2.col1
----
30
30
30

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab1 GROUP BY tab1.col0
----
42

query I rowsort
SELECT 40 FROM tab0 AS cor0 GROUP BY col0, col2
----
40
40
40

query I rowsort
SELECT DISTINCT 1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT ALL ( + 47 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1034
1316
3854

query I rowsort
SELECT 92 FROM tab1 GROUP BY col0
----
92
92
92

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1681
3481
3721

query I rowsort
SELECT DISTINCT - col2 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-9811
SELECT ALL + 93 DIV tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
21
92
93

skipif mysql # not compatible
query I rowsort label-9811
SELECT ALL + 93 / tab2.col0 + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
21
92
93

query I rowsort
SELECT tab1.col1 * - 76 AS col2 FROM tab1 GROUP BY col1
----
-3344
-4332
-456

query I rowsort
SELECT - tab2.col2 AS col1 FROM tab1 cor0 CROSS JOIN tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
-58
-79
-87

query I rowsort
SELECT tab1.col2 FROM tab1 WHERE NULL IN ( tab1.col0 - tab1.col1 ) GROUP BY tab1.col2 HAVING col2 IS NOT NULL
----

query I rowsort
SELECT ALL tab2.col0 AS col0 FROM tab2 WHERE NOT NULL IN ( - tab2.col2 * + tab2.col0 - - tab2.col0 ) GROUP BY tab2.col0 HAVING NOT ( NULL ) >= NULL
----

query I rowsort
SELECT DISTINCT tab0.col0 - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - tab2.col2 col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - 46 AS col1 FROM tab2 GROUP BY tab2.col0
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( - tab2.col0 ) col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + ( 77 ) AS col0 FROM tab0, tab1 cor0 GROUP BY cor0.col1
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * 49 col1 FROM tab0 AS cor0 GROUP BY col1
----
0
3969

query I rowsort
SELECT DISTINCT + + 53 FROM tab2 GROUP BY tab2.col1
----
53

query I rowsort
SELECT + 53 FROM tab1 GROUP BY tab1.col2
----
53
53
53

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT 41 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
122
41

query I rowsort
SELECT DISTINCT - - tab2.col0 * tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
225
8281
8464

query I rowsort
SELECT - 6 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-6
-6
-6

query I rowsort
SELECT DISTINCT 1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - + 83 - 52 FROM tab0 GROUP BY col1
----
-135
-135

query I rowsort
SELECT cor0.col0 * 17 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1411
442
731

query I rowsort
SELECT ALL + 72 AS col0 FROM tab0 GROUP BY tab0.col1
----
72
72

query I rowsort
SELECT DISTINCT col1 + 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
124
137
86

query I rowsort
SELECT - 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-43
-43

query I rowsort
SELECT + cor0.col0 * 30 + + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2821
2852
465

onlyif mysql # DIV for integer division: 
query I rowsort label-9837
SELECT 89 DIV + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9837
SELECT 89 / + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
1
1
1

query I rowsort
SELECT 29 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT + col1 - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9840
SELECT cor0.col2 DIV + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9840
SELECT cor0.col2 / + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
1

query I rowsort
SELECT ALL + 24 FROM tab2 GROUP BY col1
----
24
24
24

query I rowsort
SELECT ALL - 36 AS col0 FROM tab1 GROUP BY tab1.col1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + 14 AS col0 FROM tab2 GROUP BY col0
----
14

query I rowsort
SELECT ALL 62 FROM tab0 GROUP BY col0
----
62
62
62

onlyif mysql # DIV for integer division: 
query I rowsort label-9845
SELECT DISTINCT - tab1.col2 DIV + 84 FROM tab1 GROUP BY tab1.col2
----
0

skipif mysql # not compatible
query I rowsort label-9845
SELECT DISTINCT - tab1.col2 / + 84 FROM tab1 GROUP BY tab1.col2
----
0

query I rowsort
SELECT - cor0.col2 * + 17 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1343
-408
-646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 + - col0 col2 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT cor0.col2 * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

query I rowsort
SELECT DISTINCT + 26 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-9851
SELECT DISTINCT - COALESCE ( 52, cor0.col1 DIV cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-52

skipif mysql # not compatible
query I rowsort label-9851
SELECT DISTINCT - COALESCE ( 52, cor0.col1 / cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-52

query I rowsort
SELECT ALL - 54 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-9854
SELECT - 57 DIV - tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
15
45
58

skipif mysql # not compatible
query I rowsort label-9854
SELECT - 57 / - tab1.col1 + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
15
45
58

query I rowsort
SELECT DISTINCT tab2.col1 - 42 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-1681
-2419
-2501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 97 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 91 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-91

query I rowsort
SELECT + 81 + 34 * + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
1611
2495
353

onlyif mysql # DIV for integer division: 
query I rowsort label-9859
SELECT ALL - 98 - tab2.col1 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-97
-97
-97

skipif mysql # not compatible
query I rowsort label-9859
SELECT ALL - 98 - tab2.col1 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-97
-97
-97

query I rowsort
SELECT cor0.col2 + + 29 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1140
2370
720

query I rowsort
SELECT col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT tab1.col0 - tab1.col0 * 64 AS col0 FROM tab1 GROUP BY tab1.col0
----
-1386
-1764
-5166

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2565
-3124
-48

query I rowsort
SELECT col0 + - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9865
SELECT tab2.col1 + 16 DIV - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif mysql # not compatible
query I rowsort label-9865
SELECT tab2.col1 + 16 / - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 35 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-35
-35
-35

onlyif mysql # DIV for integer division: 
query I rowsort label-9867
SELECT ALL 95 DIV col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-9867
SELECT ALL 95 / col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
1
1
2

query I rowsort
SELECT DISTINCT 7 FROM tab2 cor0 GROUP BY cor0.col2
----
7

query I rowsort
SELECT ALL - - col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + col1 * - ( + 69 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-5589
0
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9871
SELECT ALL + + CAST( NULL AS DECIMAL ) + + col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9871
SELECT ALL + + CAST ( NULL AS REAL ) + + col1 FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 16 - - 84 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
100
100
100

query I rowsort
SELECT ALL tab2.col0 + tab2.col0 * tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
240
8372
8556

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( + col2 ) IS NULL
----
24
38
79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IN ( + col0 )
----

query I rowsort
SELECT DISTINCT - + 58 FROM tab1 GROUP BY col2
----
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - - tab1.col1 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT - col0 + 74 * 12 FROM tab0 AS cor0 GROUP BY col0
----
805
845
862

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 * 50 col0 FROM tab0 GROUP BY tab0.col2
----
-1200
-1900
-3950

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 ALL + cor0.col0 * 1 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-9884
SELECT ALL - - 81 DIV tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
10

skipif mysql # not compatible
query I rowsort label-9884
SELECT ALL - - 81 / tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
1
1
10

query I rowsort
SELECT ALL - 83 AS col1 FROM tab1 GROUP BY tab1.col2
----
-83
-83
-83

query I rowsort
SELECT ALL 50 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
50
50
50

query I rowsort
SELECT ALL + tab1.col0 * + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT + cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
142
16
90

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, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL - - 48 AS col2 FROM tab2 GROUP BY tab2.col1
----
48
48
48

query I rowsort
SELECT cor0.col2 * 83 + + 46 FROM tab2 cor0 GROUP BY cor0.col2
----
4860
6603
7267

query I rowsort
SELECT + + tab1.col2 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + 18 AS col1 FROM tab0 GROUP BY tab0.col1
----
18

query I rowsort
SELECT ALL + 25 FROM tab2 GROUP BY tab2.col2
----
25
25
25

query I rowsort
SELECT DISTINCT + - 81 AS col0 FROM tab2 GROUP BY col1
----
-81

query I rowsort
SELECT - 69 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-69
-69
-69

query I rowsort
SELECT - 67 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT - 58 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-58
-58

query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - 22 AS col1 FROM tab1 GROUP BY tab1.col2
----
-22
-22
-22

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
35

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
81

query I rowsort
SELECT ALL + 85 + + 30 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
115
115
115

query I rowsort
SELECT ALL + 97 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
97
97
97

query I rowsort
SELECT 87 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
87
87
87

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 + cor0.col0 * col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT + 49 AS col0 FROM tab0 GROUP BY tab0.col0
----
49

query I rowsort
SELECT + cor0.col2 * col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * tab1.col1 col0 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL - 2 + cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1446
-578
-6243

query I rowsort
SELECT ( 81 ) FROM tab1 AS cor0 GROUP BY col2
----
81
81
81

query I rowsort
SELECT + 73 FROM tab0 GROUP BY tab0.col1
----
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 14 + + 83 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
97
97
97

query I rowsort
SELECT + 15 + - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-66
15

query I rowsort
SELECT cor0.col0 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3772
-5369
-915

query I rowsort
SELECT DISTINCT - 37 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-37

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 44 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
103
105
85

query I rowsort
SELECT DISTINCT - 24 + - ( - tab1.col1 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
-18
20
33

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9924
SELECT DISTINCT + + CAST( NULL AS DECIMAL ) FROM tab2 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9924
SELECT DISTINCT + + CAST ( NULL AS REAL ) FROM tab2 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT - 53 AS col0 FROM tab0 GROUP BY tab0.col0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT - 82 - 0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-82

query I rowsort
SELECT ALL 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
87
87
87

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2, col1
----
44
57
6

query I rowsort
SELECT DISTINCT + ( 93 ) AS col0 FROM tab0 GROUP BY tab0.col2
----
93

query I rowsort
SELECT ALL - 21 AS col1 FROM tab0 GROUP BY tab0.col2
----
-21
-21
-21

query I rowsort
SELECT DISTINCT - 73 AS col0 FROM tab2 GROUP BY tab2.col1
----
-73

query I rowsort
SELECT ALL 39 FROM tab0 AS cor0 GROUP BY col1
----
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0
0

query I rowsort
SELECT DISTINCT + - tab1.col1 * - tab1.col1 + tab1.col1 FROM tab1 GROUP BY col1
----
1980
3306
42

query I rowsort
SELECT ALL - cor0.col0 - + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-166
-52
-86

query I rowsort
SELECT DISTINCT 74 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5994

query I rowsort
SELECT - 10 FROM tab1 GROUP BY tab1.col2
----
-10
-10
-10

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-22
-28
-82

query I rowsort
SELECT 60 + 62 FROM tab1 AS cor0 GROUP BY cor0.col1
----
122
122
122

query I rowsort
SELECT ALL 32 FROM tab0 cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT DISTINCT - tab0.col0 + - ( - tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
0

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col2, - cor0.col2 * cor0.col2 + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT tab1.col2 + - 47 AS col0 FROM tab1 GROUP BY tab1.col2
----
-2
-39
24

query I rowsort
SELECT ALL - tab0.col0 * 69 + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-1768
-2924
-5644

query I rowsort
SELECT 19 * + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
1558
418
532

query I rowsort
SELECT ALL 58 FROM tab1 GROUP BY tab1.col1
----
58
58
58

query I rowsort
SELECT ALL + tab1.col0 * + 13 FROM tab1 GROUP BY tab1.col0
----
1066
286
364

query I rowsort
SELECT ALL ( - 85 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-85
-85
-85

query I rowsort
SELECT cor0.col1 * 11 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
891

query I rowsort
SELECT ALL + NULLIF ( - cor0.col0, col0 ) + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-164
-44
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 72 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
72
72

query I rowsort
SELECT DISTINCT + 54 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-63
-63
-63

query I rowsort
SELECT ALL 92 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-3772
-5428
-5612

query I rowsort
SELECT DISTINCT tab2.col1 + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL - col2 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-3364
-6241
-7569

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 39 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
39

query I rowsort
SELECT ALL - col1 + - tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT 28 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT - 79 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + tab2.col1 + ( tab2.col1 ) AS col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 40, - cor0.col1 + - cor0.col0 * + cor0.col0, - cor0.col1 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
40

query I rowsort
SELECT ALL - 76 AS col2 FROM tab0 GROUP BY tab0.col2
----
-76
-76
-76

query I rowsort
SELECT - 96 * tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-4320
-6816
-768

query I rowsort
SELECT NULLIF ( + cor0.col0, cor0.col0 ) * - cor0.col0 FROM tab2 cor0 GROUP BY col0, cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 80 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
80
80
80

query I rowsort
SELECT DISTINCT + + 41 FROM tab1 GROUP BY tab1.col1
----
41

query I rowsort
SELECT ALL + - 82 * + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-3362
-4838
-5002

query I rowsort
SELECT - - 43 FROM tab0 GROUP BY tab0.col1
----
43
43

query I rowsort
SELECT 69 * + 98 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
6681
6762

query I rowsort
SELECT - 46 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT ALL col0 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col2 - + 0 col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col2
----
-24
-38
-79

query I rowsort
SELECT + col1 + - cor0.col1 * - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1980
3306
42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9980
SELECT ALL CAST( 85 AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
85
85

skipif mysql # not compatible
query I rowsort label-9980
SELECT ALL CAST ( 85 AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
85
85

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
64

query I rowsort
SELECT - tab0.col1 + ( 41 ) FROM tab0 GROUP BY tab0.col1
----
-40
41

query I rowsort
SELECT DISTINCT - 84 FROM tab1 GROUP BY col1
----
-84

query I rowsort
SELECT DISTINCT - 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-23

query I rowsort
SELECT - 34 AS col0 FROM tab2 GROUP BY tab2.col0
----
-34
-34
-34

query I rowsort
SELECT ALL + + 63 + + col2 FROM tab2 GROUP BY tab2.col2
----
121
142
150

query I rowsort
SELECT DISTINCT + - 45 FROM tab0 GROUP BY col0
----
-45

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + 98 AS col0 FROM tab1 GROUP BY tab1.col1
----
98
98
98

query I rowsort
SELECT ALL 18 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
1026
108
792

query I rowsort
SELECT DISTINCT + col1 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT DISTINCT col2 + - col2 FROM tab2 GROUP BY tab2.col2
----
0

query I rowsort
SELECT + col1 + 11 FROM tab1 GROUP BY tab1.col1
----
17
55
68

query I rowsort
SELECT 9 FROM tab2 GROUP BY tab2.col2
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 63 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-63
-63
-63

query I rowsort
SELECT ALL col1 + 44 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
101
50
88

query I rowsort
SELECT DISTINCT - 67 FROM tab2 GROUP BY tab2.col0
----
-67

onlyif mysql # DIV for integer division: 
query I rowsort label-9998
SELECT - tab2.col2 DIV - 36 FROM tab2 GROUP BY tab2.col2
----
1
2
2

skipif mysql # not compatible
query I rowsort label-9998
SELECT - tab2.col2 / - 36 FROM tab2 GROUP BY tab2.col2
----
1
2
2

query I rowsort
SELECT DISTINCT - 48 * - 93 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
4488
4502
4543

