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 - tab1.col0 * 84 + + 38 AS col2 FROM tab1 GROUP BY tab1.col0
----
-1810
-2314
-6850

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

query I rowsort
SELECT DISTINCT - ( + col1 ) + - 51 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-108
-57
-95

query I rowsort
SELECT col1 * cor0.col1 * 56 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
194936
208376
94136

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

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

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

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

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

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

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

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

query I rowsort
SELECT DISTINCT - 21 FROM tab2 GROUP BY col2
----
-21

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 30 * - 9 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-270

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

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

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

query I rowsort
SELECT 79 * 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1501
1501
1501

query I rowsort
SELECT ALL ( + 68 ) FROM tab1 cor0 GROUP BY cor0.col2
----
68
68
68

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-62
SELECT ALL 59 DIV 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-62
SELECT ALL 59 / 26 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2
2
2

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 81 * 11 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
891
891
891

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-106
SELECT - 53 DIV cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1
-2
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-106
SELECT - 53 / cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1
-2
0

query I rowsort
SELECT 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 + cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

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 cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col0 * 51 FROM tab1 AS cor0 GROUP BY col0
----
1122
1428
4182

query I rowsort
SELECT ALL + 89 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
89
89
89

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 29 * ( cor0.col0 ) + + 47 FROM tab1 cor0 GROUP BY cor0.col0
----
2425
685
859

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - + 28 FROM tab0, tab2 cor0 GROUP BY tab0.col1
----
-28
-28

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

query I rowsort
SELECT ALL + 35 * 14 AS col1 FROM tab2 GROUP BY tab2.col1
----
490
490
490

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

query I rowsort
SELECT DISTINCT - cor0.col2 * 18 + + 56 FROM tab2 AS cor0 GROUP BY col2
----
-1366
-1510
-988

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query III rowsort
SELECT * FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-188
SELECT - 21 - + 57 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-21
-22
-23

skipif mysql # not compatible
query I rowsort label-188
SELECT - 21 - + 57 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-21
-22
-23

query I rowsort
SELECT + 37 + cor0.col0 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1342
5373
7226

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

query III rowsort
SELECT * FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col0
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-203
SELECT - cor0.col2 + CAST( 80 AS SIGNED ) FROM tab1 AS cor0 GROUP BY col2
----
35
72
9

skipif mysql # not compatible
query I rowsort label-203
SELECT - cor0.col2 + CAST ( 80 AS INTEGER ) FROM tab1 AS cor0 GROUP BY col2
----
35
72
9

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

query I rowsort
SELECT - 51 * + cor0.col2 FROM tab0, tab2 cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-2958
-4029
-4437

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 99 * 76 + + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
7565
7583
7585

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

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

query I rowsort
SELECT cor0.col0 + + 87 FROM tab1 AS cor0 GROUP BY cor0.col0
----
109
115
169

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 42 FROM tab0 cor0 GROUP BY col2
----
42
42
42

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 38 - - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-12
45
5

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

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

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

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 16 * - cor0.col0 * 47 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19552
32336
62416

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - col1 + 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-9
4
42

query I rowsort
SELECT ALL cor0.col1 * - ( 96 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4224
-5472
-576

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 44 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1980
3124
352

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

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

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

query I rowsort
SELECT ALL + 34 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1496
1938
204

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

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

skipif mysql # not compatible
query I rowsort label-292
SELECT CAST ( + 80 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
80
80

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-303
SELECT ALL + col0 DIV + 39 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-303
SELECT ALL + col0 / + 39 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

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

query I rowsort
SELECT tab0.col2 * + 60 FROM tab0 GROUP BY tab0.col2
----
1440
2280
4740

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 * 13 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-26325
-65533
-832

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

query I rowsort
SELECT - - col1 - 99 FROM tab1 GROUP BY col1
----
-42
-55
-93

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

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.col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

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

query I rowsort
SELECT + 94 * 24 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
2256
2256
2256

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

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

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

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

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 89 ) * col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5162
7031
7743

query I rowsort
SELECT + cor0.col0 * ( - 46 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4186
-4232
-690

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

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

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

query I rowsort
SELECT ALL - - 68 * cor0.col0 + + 89 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
1857
3013
5733

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

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

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

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

query I rowsort
SELECT cor0.col2 * - 78 AS col1 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
-4524
-6162
-6786

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

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

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

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

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

query I rowsort
SELECT - 49 + cor0.col0 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1800
627
6840

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - ( 94 ) FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-94
-94
-94

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col1 - 63 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-107
-120
-69

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - ( + 7 + cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-13
-51
-64

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + - 93 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
-93

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

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

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

query I rowsort
SELECT cor0.col0 * - 80 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-1760
-2240
-6560

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-442
SELECT 94 + - cor0.col0 DIV cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

skipif mysql # not compatible
query I rowsort label-442
SELECT 94 + - cor0.col0 / cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT ALL 55 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1430
-2365
-4565

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

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

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

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

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

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

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

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

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

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.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 27 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1161
-2241
-702

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 34 + 55 AS col2 FROM tab1 GROUP BY col1
----
21

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

query I rowsort
SELECT DISTINCT + cor0.col0 + - 89 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-46
-6
-63

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

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

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

skipif mysql # not compatible
query I rowsort label-482
SELECT cor0.col1 / 82 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

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

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

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

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

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

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

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

query I rowsort
SELECT ALL ( + col2 ) * 25 FROM tab0 AS cor0 GROUP BY col2
----
1975
600
950

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

skipif mysql # not compatible
query I rowsort label-491
SELECT ALL - cor0.col0 / - col0 + + 49 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
50
50
50

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

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

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

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

query I rowsort
SELECT ALL + - 71 * cor0.col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-2911
-4189
-4331

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT ( 36 ) * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1476
-2124
-2196

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

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

query I rowsort
SELECT ALL ( - ( cor0.col1 ) ) * + 3 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-132
-171
-18

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

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

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

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

query I rowsort
SELECT 39 - col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-18
-5
33

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 + - 95 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2068
-2632
-7708

query I rowsort
SELECT ALL + cor0.col0 - + 69 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-54
22
23

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

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

skipif mysql # not compatible
query I rowsort label-537
SELECT + 94 / col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
2
3

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

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

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

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

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

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

query I rowsort
SELECT 29 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-54
3

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-547
SELECT DISTINCT 40 DIV + 51 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-547
SELECT DISTINCT 40 / + 51 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
0

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

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

query I rowsort
SELECT 4 * - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-180
-284
-32

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

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

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

query I rowsort
SELECT ALL + 45 + 29 FROM tab1 GROUP BY tab1.col2
----
74
74
74

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + tab1.col2 + 74 * 12 col1 FROM tab1 GROUP BY tab1.col2
----
896
933
959

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col0 * col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
119852
162266
24768

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

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

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

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

query I rowsort
SELECT - ( 92 ) FROM tab1 cor0 GROUP BY cor0.col2
----
-92
-92
-92

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * 7 FROM tab1 cor0 GROUP BY col0
----
154
196
574

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

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

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

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

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

query I rowsort
SELECT 90 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
3
32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * 93 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2418
3999
7719

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query III rowsort
SELECT * FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

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

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-647
SELECT - 73 / 15 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT 78 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1170
7098
7176

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

query I rowsort
SELECT ALL 71 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1846
3053
5893

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

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

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-659
SELECT 49 / - 74 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT tab2.col1 * 13 FROM tab2 GROUP BY tab2.col1
----
533
767
793

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

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

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

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

query I rowsort
SELECT 79 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1738
2212
6478

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # DIV for integer division: 
query I rowsort label-692
SELECT - - 10 DIV 92 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-692
SELECT - - 10 / 92 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
0
0
0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - 97 + - 44 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-141
-141
-141

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - 55 + 16 - + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-130
-131
-54

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * 95 - 79 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1346
8566
8661

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 - 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-109
-123
-164

query I rowsort
SELECT cor0.col1 + cor0.col1 * + 71 FROM tab2 AS cor0 GROUP BY col1
----
2952
4248
4392

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 29 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1102
-2291
-696

query I rowsort
SELECT + ( cor0.col2 ) + + 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
117
54
91

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

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

query I rowsort
SELECT DISTINCT 67 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3886
-5293
-5829

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

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

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

query I rowsort
SELECT + ( cor0.col1 ) + + 7 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
88

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 * + 16 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
208
208
208

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

query III rowsort
SELECT ALL * FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

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

query I rowsort
SELECT DISTINCT 58 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
140
80
86

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

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

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

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

query I rowsort
SELECT col0 AS 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 - 10 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

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

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 * + 83 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
-3735
-5893
-664

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

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

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

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

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

query III rowsort
SELECT * FROM tab2 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT 27 - - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
106
51
65

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col0 * 46 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
1196
1978
3818

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

query I rowsort
SELECT DISTINCT - 21 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1659
-504
-798

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

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

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

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

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 * 59 col0 FROM tab0 GROUP BY tab0.col2
----
1440
2280
4740

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - ( 81 + + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-103
-109
-163

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 27 * - 71 FROM tab2 GROUP BY col0
----
1917

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 56 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1344
-2128
-4424

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

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

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

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

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

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

query I rowsort
SELECT + col1 * cor0.col1 * - 68 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-131648
-220932
-2448

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
78

query I rowsort
SELECT ALL + col1 * - col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 16 AS col1 FROM tab0 GROUP BY col0
----
16
16
16

query I rowsort
SELECT cor0.col1 - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 92 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
92
92
92

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col0 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT ALL + 45 * 27 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
1215
1215
1215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 13 - + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-68
13

query I rowsort
SELECT ALL col0 * ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-908
SELECT 52 DIV + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-908
SELECT 52 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3

query I rowsort
SELECT DISTINCT 64 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
64

query I rowsort
SELECT 25 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
2275
2300
375

query I rowsort
SELECT ALL cor0.col1 * 64 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2624
3776
3904

query I rowsort
SELECT 56 FROM tab0 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT DISTINCT 17 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
17

query I rowsort
SELECT + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-915
SELECT - 56 DIV + 14 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

skipif mysql # not compatible
query I rowsort label-915
SELECT - 56 / + 14 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + 46 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 28 AS col2 FROM tab2 GROUP BY col0
----
28
28
28

query I rowsort
SELECT ALL - ( cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - ( - 13 ) * - cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
-104
-585
-923

query I rowsort
SELECT DISTINCT - col2 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - - 63 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
63

query I rowsort
SELECT ALL 45 FROM tab0 AS cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT ALL col2 + + 20 * + cor0.col2 + - 39 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1179
1620
1788

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-76
-76
-76

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 24 col2 FROM tab1 AS cor0 GROUP BY col1
----
24
24
24

query I rowsort
SELECT ALL 9 FROM tab2 AS cor0 GROUP BY col1
----
9
9
9

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query III rowsort
SELECT * FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT ALL - ( ( col0 ) ) FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - ( - tab0.col0 ) + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT - + cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-948
SELECT DISTINCT cor0.col2 DIV 59 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1

skipif mysql # not compatible
query I rowsort label-948
SELECT DISTINCT cor0.col2 / 59 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
1

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 17 - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-21
-62
-7

query I rowsort
SELECT + 79 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2054
3397
6557

query I rowsort
SELECT 89 FROM tab2 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 44 + - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-38
16
22

query I rowsort
SELECT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 22 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 91 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-91
-91
-91

onlyif mysql # DIV for integer division: 
query I rowsort label-962
SELECT 78 DIV 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-962
SELECT 78 / 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-964
SELECT DISTINCT + - 88 DIV 33 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-2

skipif mysql # not compatible
query I rowsort label-964
SELECT DISTINCT + - 88 / 33 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-2

query I rowsort
SELECT - + tab2.col1 * + 32 AS col0 FROM tab2 GROUP BY tab2.col1
----
-1312
-1888
-1952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 86 col2 FROM tab0, tab0 cor0, tab2 cor1 GROUP BY cor1.col0
----
-86

query I rowsort
SELECT ALL - 93 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-93
-93
-93

query I rowsort
SELECT - 24 - + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-106
-46
-52

query I rowsort
SELECT + cor0.col2 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 60 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab1 cor0 GROUP BY col1
----
83

query I rowsort
SELECT cor0.col1 + + 72 FROM tab0 cor0 GROUP BY cor0.col1
----
153
72

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 41 FROM tab1 AS cor0 GROUP BY col1
----
41
41
41

query I rowsort
SELECT 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
95
95

query I rowsort
SELECT - 14 - - 14 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1176
-378
-616

query I rowsort
SELECT DISTINCT 1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL 53 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4823
-4876
-795

query I rowsort
SELECT 66 FROM tab2 GROUP BY tab2.col2
----
66
66
66

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-982
SELECT ALL 80 DIV cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-982
SELECT ALL 80 / cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
3

query I rowsort
SELECT ALL - col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT - 18 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-18

query I rowsort
SELECT DISTINCT 67 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
67

query I rowsort
SELECT ALL + 64 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
64
64
64

query I rowsort
SELECT 41 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT DISTINCT 46 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT cor0.col1 * - cor0.col1 * 80 FROM tab2 AS cor0 GROUP BY col1
----
-134480
-278480
-297680

query I rowsort
SELECT ALL - 94 AS col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
-94
-94
-94

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-992
SELECT DISTINCT - CAST( NULL AS DECIMAL ) FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-992
SELECT DISTINCT - CAST ( NULL AS REAL ) FROM tab2 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT ALL 12 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL + 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 79 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-997
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-997
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT cor0.col2 + + 60 FROM tab2 AS cor0 GROUP BY col2
----
118
139
147

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT - 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-42

query I rowsort
SELECT DISTINCT + col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 84 * - ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2016
3192
6636

query I rowsort
SELECT ALL 94 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
94
94
94

query I rowsort
SELECT - ( - 56 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + cor0.col1 * + 69 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3036
3933
414

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1019
SELECT DISTINCT + col0 + - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1019
SELECT DISTINCT + col0 + - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY col0
----
NULL

query I rowsort
SELECT ALL - + 1 * - 74 FROM tab2 GROUP BY tab2.col1
----
74
74
74

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL + 28 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
28
28

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT DISTINCT + 88 FROM tab0 GROUP BY col1
----
88

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 55 FROM tab0 AS cor0 GROUP BY col2
----
55
55
55

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT 95 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
95

query I rowsort
SELECT 7 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

onlyif mysql # DIV for integer division: 
query I rowsort label-1031
SELECT DISTINCT + cor0.col2 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-1031
SELECT DISTINCT + cor0.col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT + 68 FROM tab1 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT 93 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT + 82 * 17 FROM tab0 GROUP BY tab0.col2
----
1394
1394
1394

query I rowsort
SELECT - 83 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1992
3154
6557

query I rowsort
SELECT DISTINCT 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT + cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
61

query I rowsort
SELECT DISTINCT - + cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT cor0.col0 - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col2 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - col2 + 26 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1975
600
950

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col1 * 96 * + 91 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-707616
0

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 63 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1048
SELECT - CAST( NULL AS SIGNED ) - - 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1048
SELECT - CAST ( NULL AS INTEGER ) - - 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 94 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
94
94
94

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col2 + 49 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
128
73
87

query I rowsort
SELECT ALL + 95 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
95
95
95

query I rowsort
SELECT ALL + 53 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
53
53
53

query I rowsort
SELECT + 95 FROM tab2 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT cor0.col0 * + 44 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1170
1935
3735

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1058
SELECT CAST( NULL AS DECIMAL ) AS col1 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1058
SELECT CAST ( NULL AS REAL ) AS col1 FROM tab1 cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 82 FROM tab2 GROUP BY tab2.col1
----
82
82
82

query I rowsort
SELECT - 34 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-34
-34
-34

query I rowsort
SELECT 60 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1063
SELECT ALL - col2 - - CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1063
SELECT ALL - col2 - - CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - cor0.col0 + - 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-114
-131
-171

query I rowsort
SELECT 20 * - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-1640
-440
-560

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 68 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT + col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT + 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
59
59
59

query I rowsort
SELECT - 79 AS col0 FROM tab2 GROUP BY tab2.col0
----
-79
-79
-79

query I rowsort
SELECT ALL cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 41 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
41

query I rowsort
SELECT 34 + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
117
60
77

query I rowsort
SELECT DISTINCT 58 FROM tab1 GROUP BY tab1.col0
----
58

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1076
SELECT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1076
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - ( cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - 10 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL - 87 FROM tab0 GROUP BY col0
----
-87
-87
-87

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 3 col1 FROM tab2 GROUP BY col2
----
-3

query I rowsort
SELECT tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 14 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14

query I rowsort
SELECT 1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL 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 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - 7 * cor0.col1 + ( 51 ) FROM tab0 cor0 GROUP BY cor0.col1
----
-516
51

query I rowsort
SELECT cor0.col1 - cor0.col1 * - 51 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2132
3068
3172

query I rowsort
SELECT - - 42 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
42
42
42

query I rowsort
SELECT - + ( + tab2.col0 ) FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL ( + cor0.col0 ) * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col0 + + 92 FROM tab0 AS cor0 GROUP BY cor0.col0
----
118
135
175

query I rowsort
SELECT ALL + tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 39 * + 19 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
741
741

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT col0 - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-29
16
38

query I rowsort
SELECT DISTINCT ( col0 ) AS col2 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ( col0 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ( + 61 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT DISTINCT - 44 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-44

query I rowsort
SELECT + - 3 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT 98 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
98
98
98

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT 57 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
57
57
57

query I rowsort
SELECT DISTINCT 45 FROM tab2 AS cor0 GROUP BY cor0.col2
----
45

query I rowsort
SELECT ALL + 8 AS col0 FROM tab1 GROUP BY tab1.col1
----
8
8
8

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 93 + 95 FROM tab2 AS cor0 GROUP BY cor0.col0
----
188
188
188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 9 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
9

query I rowsort
SELECT - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 47 FROM tab1 AS cor0 GROUP BY col1
----
-47
-47
-47

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1136
SELECT CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1136
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + 98 * - cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3977
-5723
-5917

query I rowsort
SELECT ( cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL - 49 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-49
-49
-49

query I rowsort
SELECT ALL - 38 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-38
-38
-38

query III rowsort
SELECT ALL * FROM tab0 cor0 GROUP BY col0, cor0.col2, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT 62 FROM tab1 AS cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT - + 48 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT 57 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT 94 * cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
4136
5358
564

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col1 - + 64 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-108
-121
-70

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 80 FROM tab2 cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT DISTINCT + 59 FROM tab0 AS cor0 GROUP BY cor0.col0
----
59

query I rowsort
SELECT 30 * + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1740
2370
2610

query I rowsort
SELECT - 11 FROM tab2 cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT + 2 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 81 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
139
160
168

query I rowsort
SELECT ALL + 69 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT DISTINCT - 49 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-49

query I rowsort
SELECT ( + 40 ) FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
40
40
40

query I rowsort
SELECT + 98 FROM tab0, tab2 AS cor0, tab1 cor1 GROUP BY cor1.col1
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 45 * + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2610
3555
3915

query I rowsort
SELECT DISTINCT + 52 FROM tab0 cor0 GROUP BY cor0.col2
----
52

query I rowsort
SELECT DISTINCT + 49 - 5 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44

query I rowsort
SELECT DISTINCT 91 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4095
-6461
-728

query I rowsort
SELECT 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT cor0.col2 * + 19 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1349
152
855

onlyif mysql # DIV for integer division: 
query I rowsort label-1175
SELECT ALL 90 DIV col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
3
4

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1175
SELECT ALL 90 / col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
3
4

query I rowsort
SELECT ALL 92 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
92
92
92

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT tab1.col2 - + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
0
0
0

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 cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 23 FROM tab1 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT ALL + 23 AS col2 FROM tab0 GROUP BY tab0.col2
----
23
23
23

query I rowsort
SELECT ( 5 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT ALL + - 92 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
-92
-92
-92

query I rowsort
SELECT ALL + 11 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
11
11
11

query I rowsort
SELECT ALL 46 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + col0 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT cor0.col0 + col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
129
249
78

query I rowsort
SELECT - 89 AS col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
-89
-89
-89

query I rowsort
SELECT ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - + 53 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-53
-53
-53

query I rowsort
SELECT ALL - 16 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-16
-16
-16

query I rowsort
SELECT + 91 - + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
30
32
50

query I rowsort
SELECT ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT 91 * + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
3731
5369
5551

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-1205
SELECT - 56 DIV - cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1205
SELECT - 56 / - cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT DISTINCT - ( col1 ) - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-162
0

query I rowsort
SELECT cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 84 FROM tab0 cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT ALL ( + 16 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
16
16

query I rowsort
SELECT DISTINCT + 34 FROM tab2 GROUP BY tab2.col1
----
34

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-1213
SELECT + col1 DIV + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1213
SELECT + col1 / + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 40 FROM tab2 cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT ALL cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 81 + + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
126
152
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 17 + - 73 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-56
-56
-56

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL - 84 FROM tab0 GROUP BY tab0.col1
----
-84
-84

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
81

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 - + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 4 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT 97 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT 88 FROM tab0 cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT ALL - cor0.col2 + ( - 88 ) + - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-136
-164
-246

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT - ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 33 col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-33

query I rowsort
SELECT DISTINCT + - 69 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
-69

query I rowsort
SELECT - 36 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-36
-36
-36

query I rowsort
SELECT ALL + 94 FROM tab0 GROUP BY col1
----
94
94

query I rowsort
SELECT cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 78 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-78
-78

query I rowsort
SELECT 26 + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1962
3275
62

query I rowsort
SELECT cor0.col2 * col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 77 FROM tab0 AS cor0 GROUP BY cor0.col2
----
77

query I rowsort
SELECT + - cor0.col1 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - ( - 68 ) FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
68
68
68

query I rowsort
SELECT cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col0 + - 16 * - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
1394
374
476

query I rowsort
SELECT DISTINCT - col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-1250
SELECT 60 DIV cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-1250
SELECT 60 / cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
0
0
4

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT DISTINCT 54 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + - 46 FROM tab1 GROUP BY tab1.col2
----
-46
-46
-46

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab0.col1 + - tab0.col1 * - ( 25 ) col2 FROM tab0 GROUP BY tab0.col1
----
0
2106

query I rowsort
SELECT DISTINCT + 17 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
17

onlyif mysql # DIV for integer division: 
query I rowsort label-1259
SELECT + col1 DIV 43 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1259
SELECT + col1 / 43 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1
1

query I rowsort
SELECT DISTINCT + + 18 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
18

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1261
SELECT - CAST( 8 AS SIGNED ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

skipif mysql # not compatible
query I rowsort label-1261
SELECT - CAST ( 8 AS INTEGER ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 46 FROM tab2 AS cor0 GROUP BY col0
----
46
46
46

query I rowsort
SELECT - 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-93
-93

query I rowsort
SELECT + 10 + + 13 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
99
99

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + 30 * - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-1140
-2370
-720

query I rowsort
SELECT DISTINCT + 24 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24

query I rowsort
SELECT 80 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1200
7280
7360

query I rowsort
SELECT + 14 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1274
-1288
-210

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT - cor0.col1 * 76 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3116
-4484
-4636

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL 68 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
68
68
68

query I rowsort
SELECT - cor0.col2 - 42 FROM tab0 AS cor0 GROUP BY col2
----
-121
-66
-80

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - ( tab0.col0 ) FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 43 col2 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY tab0.col0
----
43
43
43

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
225
8281
8464

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 52 FROM tab1 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 21 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
21

query I rowsort
SELECT ALL - 34 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-1496
-1938
-204

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT 19 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
19
19
19

query I rowsort
SELECT 22 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT ALL 87 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, col2
----
87
87
87

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
-81
0

query I rowsort
SELECT + 11 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-242
-308
-902

query I rowsort
SELECT DISTINCT - 10 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2
----
-10

query I rowsort
SELECT 35 + cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
41
79
92

query I rowsort
SELECT ALL - 73 * + 80 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-5840
-5840
-5840

query I rowsort
SELECT - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + 61 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4941

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1311
SELECT ALL + 60 DIV tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-1311
SELECT ALL + 60 / tab0.col0 FROM tab0 GROUP BY tab0.col0
----
0
1
2

query I rowsort
SELECT DISTINCT cor0.col2 * 19 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
1501
456
722

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 2 * col1 - - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
123
177
183

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1316
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1316
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 27 FROM tab2 AS cor0 GROUP BY col0
----
27
27
27

query I rowsort
SELECT 96 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96
96

query I rowsort
SELECT ALL + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL + col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL + 97 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
97
97
97

query I rowsort
SELECT 0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 19 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-19
-19
-19

query I rowsort
SELECT 71 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1846
3053
5893

query I rowsort
SELECT ALL tab1.col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - ( - 1 ) * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 65 col0 FROM tab0 GROUP BY col2
----
-65

query I rowsort
SELECT ALL 64 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
64
64
64

query I rowsort
SELECT DISTINCT 96 FROM tab0 AS cor0 GROUP BY cor0.col2
----
96

query I rowsort
SELECT + cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab2 cor0 GROUP BY col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 91 FROM tab0 AS cor0 GROUP BY col1
----
91
91

query I rowsort
SELECT + 98 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
98
98
98

query I rowsort
SELECT ALL + 28 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-10
-51
4

query I rowsort
SELECT - 83 + - 19 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1641
-501
-615

query I rowsort
SELECT + 57 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT ALL - ( + 16 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-16
-16
-16

query I rowsort
SELECT + 38 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
38
38
38

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 44 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44

query I rowsort
SELECT 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
16
16
16

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 55 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
55
55
55

query I rowsort
SELECT + cor0.col0 * + 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1275
7735
7820

query I rowsort
SELECT DISTINCT - 29 AS col2 FROM tab1 GROUP BY tab1.col2
----
-29

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * - 18 col1 FROM tab1 AS cor0 GROUP BY col0
----
1476
396
504

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1353
SELECT ALL cor0.col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1353
SELECT ALL cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 43 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1118
-1849
-3569

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1357
SELECT cor0.col2 DIV + 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
14
9

skipif mysql # not compatible
query I rowsort label-1357
SELECT cor0.col2 / + 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
13
14
9

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 35 * + 19 + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-584
-665

query I rowsort
SELECT ALL - 79 AS col2 FROM tab0 GROUP BY tab0.col1
----
-79
-79

query I rowsort
SELECT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 99 FROM tab0 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT 55 + - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-28
12
29

query I rowsort
SELECT DISTINCT + 8 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
8

query I rowsort
SELECT 3 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
246
66
84

query I rowsort
SELECT ALL + 2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
2
2

onlyif mysql # DIV for integer division: 
query I rowsort label-1367
SELECT - 30 DIV cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-2
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1367
SELECT - 30 / cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT - cor0.col2 + 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3
38
52

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT col2 * 55 * cor0.col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
185020
343255
416295

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col1 + + 31 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
37
75
88

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT 27 FROM tab0 cor0 GROUP BY cor0.col2
----
27
27
27

query I rowsort
SELECT ALL - cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + tab2.col2 FROM tab2 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + 92 AS col0 FROM tab2 GROUP BY tab2.col0
----
92
92
92

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 49 FROM tab1 AS cor0 GROUP BY col0
----
49
49
49

query I rowsort
SELECT - col1 + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY col0, col2
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 75 * + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1950
3225
6225

query I rowsort
SELECT 4 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT ALL tab2.col2 + + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT - 90 * + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2160
-3420
-7110

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 44 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
44
44
44

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL ( + cor0.col2 ) + 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
154
175
183

query I rowsort
SELECT 68 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT + 76 AS col0 FROM tab2 GROUP BY tab2.col1
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-1408
SELECT - + cor0.col0 DIV 93 AS col0 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1408
SELECT - + cor0.col0 / 93 AS col0 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - + 19 FROM tab2 GROUP BY tab2.col1
----
-19
-19
-19

query I rowsort
SELECT ALL cor0.col2 + + 55 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
134
79
93

query I rowsort
SELECT ALL - 27 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-27
-27
-27

query I rowsort
SELECT 45 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT DISTINCT + 32 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
32

query I rowsort
SELECT - 18 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-18
-18

query I rowsort
SELECT DISTINCT 50 FROM tab0 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT - + 40 FROM tab0 GROUP BY col2
----
-40
-40
-40

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ( 26 ) FROM tab1 cor0 GROUP BY cor0.col1
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 col0 FROM tab0, tab1 cor0, tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT col1 + - 1 * 69 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-10
-28
-8

query III rowsort
SELECT ALL * FROM tab0 AS cor0 GROUP BY cor0.col0, col0, cor0.col2, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT DISTINCT + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 55 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1430
2365
4565

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 15 FROM tab0 GROUP BY col0
----
15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1426
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1426
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1427
SELECT CAST( NULL AS SIGNED ) * 77 col1 FROM tab0 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-1427
SELECT CAST ( NULL AS INTEGER ) * 77 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 97 + cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
322
8378
8561

query I rowsort
SELECT ALL + 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
63

query I rowsort
SELECT - 40 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT ALL + cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 27 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-27
-27
-27

query I rowsort
SELECT cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT 4 * 55 FROM tab2 AS cor0 GROUP BY cor0.col2
----
220
220
220

query I rowsort
SELECT 1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query III rowsort
SELECT ALL * FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

onlyif mysql # DIV for integer division: 
query I rowsort label-1444
SELECT + 86 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-1444
SELECT + 86 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
5

query I rowsort
SELECT + - ( cor0.col2 ) AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 + - cor0.col1 col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-157
-76

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT cor0.col0 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT 37 + + col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-447
-6687
-747

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 63 * - cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-5103
0

query I rowsort
SELECT - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 65 FROM tab1 AS cor0 GROUP BY cor0.col0
----
65

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 80 AS col0 FROM tab2 GROUP BY col2
----
80
80
80

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - 46 * + 6 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-276
-276
-276

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 98 col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-98
-98
-98

query I rowsort
SELECT 48 FROM tab1 GROUP BY tab1.col2
----
48
48
48

query I rowsort
SELECT col2 + - cor0.col2 * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1980
-4970
-56

query I rowsort
SELECT DISTINCT - 29 FROM tab2 cor0 GROUP BY cor0.col0
----
-29

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1464
SELECT DISTINCT CAST( 71 AS SIGNED ) + + col1 FROM tab1 AS cor0 GROUP BY col1
----
115
128
77

skipif mysql # not compatible
query I rowsort label-1464
SELECT DISTINCT CAST ( 71 AS INTEGER ) + + col1 FROM tab1 AS cor0 GROUP BY col1
----
115
128
77

query I rowsort
SELECT - 21 * 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-609
-609
-609

query I rowsort
SELECT DISTINCT 87 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT + cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 0 * 67 FROM tab0 cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
43
43
43

query I rowsort
SELECT 21 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
21
21
21

query I rowsort
SELECT ALL + 97 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL 94 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
94
94
94

query I rowsort
SELECT + ( + 33 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT DISTINCT - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1478
SELECT CAST( 36 AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col0
----
36
36
36

skipif mysql # not compatible
query I rowsort label-1478
SELECT CAST ( 36 AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col0
----
36
36
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1479
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1479
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 73 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT ALL + 41 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL + ( cor0.col1 ) * 1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

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 tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 39 FROM tab1 AS cor0 GROUP BY cor0.col1
----
39
39
39

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 21 FROM tab1 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT ALL + ( cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - tab1.col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1499
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1499
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + 11 FROM tab1 AS cor0 GROUP BY cor0.col1
----
11

query I rowsort
SELECT DISTINCT - 81 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-81

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + - 68 * cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1768
-2924
-5644

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT - cor0.col2 * - 97 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
4365
6887
776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT 33 FROM tab2 AS cor0 GROUP BY col0
----
33
33
33

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1512
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1512
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 47 + 86 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
133
133
133

query I rowsort
SELECT ALL - - ( - col1 ) FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 52 * cor0.col2 FROM tab0, tab1 cor0, tab0 cor1 GROUP BY cor0.col2
----
2340
3692
416

query I rowsort
SELECT ALL 69 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
69
69
69

query I rowsort
SELECT + ( + col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL 78 * cor0.col0 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
1170
7098
7176

query I rowsort
SELECT + 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
35
35
35

query I rowsort
SELECT ALL - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 7 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + col2 + 11 AS col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
19
56
82

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col1 * 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5346

query I rowsort
SELECT - ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 14 * 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
1036

onlyif mysql # DIV for integer division: 
query I rowsort label-1537
SELECT DISTINCT 79 DIV + 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11

skipif mysql # not compatible
query I rowsort label-1537
SELECT DISTINCT 79 / + 7 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11

query I rowsort
SELECT DISTINCT - 84 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-84

query I rowsort
SELECT ALL + - ( - cor0.col2 ) FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 48 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY tab0.col1
----
-48

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL 7 FROM tab0 AS cor0 GROUP BY col2
----
7
7
7

query I rowsort
SELECT 57 FROM tab0 cor0 GROUP BY col0
----
57
57
57

query I rowsort
SELECT + cor0.col0 * + cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-17576
-571787
-79507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 49 FROM tab1 AS cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 80 FROM tab2 AS cor0 GROUP BY col0
----
80

query I rowsort
SELECT + 81 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
122
140
142

query I rowsort
SELECT ALL - col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 3 AS col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
-3

query I rowsort
SELECT DISTINCT + + 36 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
36

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL - 65 FROM tab2 GROUP BY tab2.col2
----
-65
-65
-65

query I rowsort
SELECT ALL - 11 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-11
-11

onlyif mysql # DIV for integer division: 
query I rowsort label-1561
SELECT cor0.col1 DIV ( + 99 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1561
SELECT cor0.col1 / ( + 99 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT cor0.col0 + - 76 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-61
15
16

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-24
-38
-79

query I rowsort
SELECT - col1 + + cor0.col1 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
1640
3422
3660

query I rowsort
SELECT 26 FROM tab2 AS cor0 GROUP BY col2
----
26
26
26

query I rowsort
SELECT DISTINCT + 73 AS col2 FROM tab0 cor0 GROUP BY col0
----
73

query I rowsort
SELECT - ( - cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query III rowsort
SELECT ALL * FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT DISTINCT - + cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

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 - tab0.col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT 16 AS col2 FROM tab0 cor0 GROUP BY col0
----
16
16
16

query I rowsort
SELECT ALL + 88 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
88
88
88

query I rowsort
SELECT - 58 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
-58
-58
-58

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - 35 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-35
-35

query I rowsort
SELECT DISTINCT - tab1.col0 + 49 AS col1 FROM tab1 GROUP BY tab1.col0
----
-33
21
27

query I rowsort
SELECT 73 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT 58 FROM tab1 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
158
48
76

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT 33 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
33
33
33

query I rowsort
SELECT DISTINCT + 55 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
55

query I rowsort
SELECT + 28 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
28
28
28

query I rowsort
SELECT 31 FROM tab0 AS cor0 GROUP BY cor0.col1
----
31
31

query I rowsort
SELECT + 19 FROM tab2 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT DISTINCT - 12 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-12

query I rowsort
SELECT - 56 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-56
-56
-56

query I rowsort
SELECT ALL cor0.col2 * + 49 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1176
1862
3871

query I rowsort
SELECT DISTINCT 45 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45

query I rowsort
SELECT 97 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97
97

query I rowsort
SELECT ALL + 71 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
71
71
71

query I rowsort
SELECT - ( - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 63 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-63
-63
-63

query I rowsort
SELECT col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT 98 FROM tab1 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
19

query I rowsort
SELECT ALL - col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 54 * cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4914
4968
810

query I rowsort
SELECT DISTINCT 15 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 45 col2 FROM tab0 cor0 GROUP BY col2
----
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + ( cor0.col0 ) ) col1 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + ( + cor0.col0 * cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + ( 32 ) FROM tab1 cor0 GROUP BY cor0.col2
----
32

query I rowsort
SELECT ALL - - cor0.col1 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

query I rowsort
SELECT - 89 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-10
-2
-31

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-75

query I rowsort
SELECT DISTINCT - 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-48

query I rowsort
SELECT - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT - 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT ( 68 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
68

query I rowsort
SELECT DISTINCT - tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col0 + - 14 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
12
29
69

query I rowsort
SELECT ALL + 22 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT ALL + col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - - 23 AS col2 FROM tab2 GROUP BY tab2.col1
----
23
23
23

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - 62 * - 1 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
62
62

query I rowsort
SELECT DISTINCT ( col2 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + 69 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
69
69
69

query I rowsort
SELECT 67 FROM tab0 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1636
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-1636
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT DISTINCT - col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 24 + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
107
50
67

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-68

query I rowsort
SELECT DISTINCT 67 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6561

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 31 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 44 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-44
-44

query I rowsort
SELECT + 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
61
61
61

query I rowsort
SELECT 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT + cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1654
SELECT 76 DIV 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1654
SELECT 76 / 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL 16 FROM tab2, tab0 cor0 GROUP BY tab2.col0
----
16
16
16

query I rowsort
SELECT + + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + 61 FROM tab1 AS cor0 GROUP BY col0
----
61
61
61

query I rowsort
SELECT ALL 9 FROM tab2 AS cor0 GROUP BY cor0.col0
----
9
9
9

onlyif mysql # DIV for integer division: 
query I rowsort label-1659
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-1659
SELECT cor0.col0 / + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT cor0.col2 + - col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
95
95
95

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + tab0.col2 * 46 AS col0 FROM tab0 GROUP BY col2
----
1104
1748
3634

query I rowsort
SELECT 67 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
67
67
67

query I rowsort
SELECT + 21 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
21
21

query I rowsort
SELECT ALL - 63 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - + col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 87 FROM tab1 GROUP BY tab1.col0
----
87

query I rowsort
SELECT col0 - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
14

query I rowsort
SELECT ( cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 52 + - 75 AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
-127

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
24
38
79

query I rowsort
SELECT + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - 15 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
-15
-15

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col2 * 36 FROM tab2 cor0 GROUP BY cor0.col2
----
2088
2844
3132

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + ( cor0.col1 ) + - 19 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 77 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-77
-77
-77

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 18 AS col2 FROM tab0 GROUP BY tab0.col0
----
18
18
18

query I rowsort
SELECT DISTINCT 83 FROM tab2 AS cor0 GROUP BY cor0.col0
----
83

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - 90 FROM tab1 cor0 GROUP BY cor0.col0
----
-90
-90
-90

query I rowsort
SELECT - col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col2 + 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
117
125
96

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-1691
SELECT cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1691
SELECT cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT 30 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT - 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 - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT tab2.col1 + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL - cor0.col2 - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-158
-48
-76

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-1702
SELECT ALL - - 89 DIV 63 AS col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1702
SELECT ALL - - 89 / 63 AS col2 FROM tab2 GROUP BY tab2.col2
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-1703
SELECT ALL 59 DIV cor0.col0 col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
0
2
2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1703
SELECT ALL 59 / cor0.col0 col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
0
2
2

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 74 FROM tab0 AS cor0 GROUP BY cor0.col2
----
74

query I rowsort
SELECT ALL + 11 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT + 59 FROM tab1 AS cor0 GROUP BY col2
----
59
59
59

query I rowsort
SELECT 33 FROM tab2 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT + 84 FROM tab1 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT - 94 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + 13 col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-2
-78
-79

query I rowsort
SELECT cor0.col1 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 64 FROM tab1 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT 30 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - 53 FROM tab2 GROUP BY col1
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + - 9 FROM tab1 GROUP BY tab1.col1
----
-9

query I rowsort
SELECT 32 AS col0 FROM tab0 GROUP BY tab0.col0
----
32
32
32

query I rowsort
SELECT ALL + 34 * 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
374
374
374

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - 1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 54 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL 15 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
1065
120
675

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1729
SELECT ALL CAST( NULL AS SIGNED ) * + 34 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1729
SELECT ALL CAST ( NULL AS INTEGER ) * + 34 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 72 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-72
-72
-72

query I rowsort
SELECT ALL - 5 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col2, cor0.col1
----
-5
-5
-5

query I rowsort
SELECT DISTINCT + 91 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91

query I rowsort
SELECT ALL col0 * - 40 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3640
-3680
-600

query I rowsort
SELECT 34 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 28 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
28
28
28

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 31 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-31

query I rowsort
SELECT + 49 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4459
4508
735

query I rowsort
SELECT + 83 FROM tab2 cor0 GROUP BY col2
----
83
83
83

query I rowsort
SELECT ALL 4 AS col0 FROM tab1 GROUP BY tab1.col0
----
4
4
4

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 65 FROM tab2 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT 65 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
65
65
65

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - cor0.col1 + - 46 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-105
-107
-87

query I rowsort
SELECT DISTINCT + cor0.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 cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT 44 FROM tab0, tab2 cor0, tab2 AS cor1 GROUP BY cor1.col2
----
44
44
44

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + 57 * col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
3306
4503
4959

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - 68 * + col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-2992
-3876
-408

onlyif mysql # DIV for integer division: 
query I rowsort label-1757
SELECT DISTINCT col1 DIV ( 78 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
0

skipif mysql # not compatible
query I rowsort label-1757
SELECT DISTINCT col1 / ( 78 ) AS col2 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 98 col0 FROM tab0 cor0 GROUP BY col1
----
98
98

query I rowsort
SELECT DISTINCT - 2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 75 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-75

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1762
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-1762
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL + 29 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT + 29 FROM tab1 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL + 4 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT DISTINCT - 25 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-25

query I rowsort
SELECT 68 AS col0 FROM tab1 GROUP BY tab1.col0
----
68
68
68

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 10 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
10
10
10

query I rowsort
SELECT + + cor0.col2 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - cor0.col2 * - 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 + cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - tab0.col0 * tab0.col0 FROM tab0 GROUP BY col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

query I rowsort
SELECT 31 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT col1 * - 61 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2684
-3477
-366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ( - cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 5 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5
5
5

query I rowsort
SELECT DISTINCT cor0.col2 * col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + - 92 FROM tab2 GROUP BY tab2.col0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 93 + 42 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
135

query I rowsort
SELECT 72 FROM tab2 GROUP BY tab2.col2
----
72
72
72

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + cor0.col1 + + 70 FROM tab0 AS cor0 GROUP BY col1
----
151
70

query I rowsort
SELECT DISTINCT 95 FROM tab2 AS cor0 GROUP BY cor0.col1
----
95

query I rowsort
SELECT ALL + 51 FROM tab0 GROUP BY col2
----
51
51
51

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1796
SELECT - CAST( NULL AS SIGNED ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1796
SELECT - CAST ( NULL AS INTEGER ) FROM tab0 GROUP BY tab0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT ALL + 96 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
96
96
96

onlyif mysql # DIV for integer division: 
query I rowsort label-1799
SELECT + cor0.col1 DIV + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1799
SELECT + cor0.col1 / + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT - + 73 * cor0.col1 + 83 AS col0 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
-2910
-4224
-4370

query I rowsort
SELECT cor0.col0 + 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
116
59
76

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 25 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT - 40 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-1760
-2280
-240

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT - 45 AS col0 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
-45
-45
-45

query I rowsort
SELECT ALL 91 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
91
91
91

query I rowsort
SELECT col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - 81 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
-81
-81
-81

query I rowsort
SELECT DISTINCT cor0.col0 * + 70 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1540
1960
5740

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 82 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3608
4674
492

query I rowsort
SELECT ALL + 56 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL 68 FROM tab0 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 16 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-16
-16
-16

query I rowsort
SELECT ALL + 33 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
33
33
33

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT + 41 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
41
41

query I rowsort
SELECT ALL 49 FROM tab1 cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT ALL 39 FROM tab1 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT + 68 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, col1
----
68
68
68

query I rowsort
SELECT DISTINCT - 8 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-8

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col0 + 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
106
123
163

query I rowsort
SELECT DISTINCT - + col2 AS col1 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 44 * - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1232
-3608
-968

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1842
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1842
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 GROUP BY tab0.col1
----
NULL
NULL

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 + col1 * + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
0
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 62 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 79 FROM tab2, tab2 cor0, tab2 AS cor1 GROUP BY tab2.col1
----
79
79
79

query I rowsort
SELECT ALL - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + 84 FROM tab0 AS cor0 GROUP BY col1
----
84
84

query I rowsort
SELECT - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + 31 AS col1 FROM tab1 GROUP BY tab1.col2
----
31
31
31

query I rowsort
SELECT - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 + - col1 FROM tab1 cor0 GROUP BY col1
----
0

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 * cor0.col2 * - 81 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-116964
-46656
-505521

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col0 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL - col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 72 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT DISTINCT + 80 + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
124
137
86

query I rowsort
SELECT DISTINCT 76 FROM tab0 GROUP BY col2
----
76

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL + cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - + 9 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT 1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

query I rowsort
SELECT ALL - 68 FROM tab1 cor0 GROUP BY col0
----
-68
-68
-68

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 55 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL + 13 FROM tab1 cor0 GROUP BY cor0.col0
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT 20 FROM tab2 AS cor0 GROUP BY cor0.col0
----
20

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-1889
SELECT ALL 98 DIV - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-1889
SELECT ALL 98 / - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-2
-4

query I rowsort
SELECT DISTINCT 52 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
143
144
67

query I rowsort
SELECT DISTINCT - + 80 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-80

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 32 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
32

query I rowsort
SELECT ALL + ( - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-1897
SELECT + col2 DIV col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1897
SELECT + col2 / col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
1

query I rowsort
SELECT + 42 FROM tab0 AS cor0 GROUP BY cor0.col1
----
42
42

query I rowsort
SELECT DISTINCT 86 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-70

query I rowsort
SELECT cor0.col2 + - 99 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2352
-3724
-7742

query I rowsort
SELECT DISTINCT 23 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 27 col1 FROM tab0 GROUP BY tab0.col2
----
-27

query I rowsort
SELECT cor0.col2 * 3 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
174
237
261

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + 64 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT - cor0.col1 - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1907
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1907
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 51 col0 FROM tab2 cor0 GROUP BY col0
----
51

query I rowsort
SELECT DISTINCT 1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 + col2 + 21 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
123
171
191

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT 7 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
7
7
7

query I rowsort
SELECT 64 + col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
109
135
72

query I rowsort
SELECT 69 FROM tab1 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT ( cor0.col0 * 96 ) + 20 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2516
4148
7988

query I rowsort
SELECT cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
158
48
76

query I rowsort
SELECT 28 FROM tab2 AS cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT cor0.col1 * 29 AS col1 FROM tab1 cor0 GROUP BY col1
----
1276
1653
174

query I rowsort
SELECT DISTINCT col1 * 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2860
3705
390

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 50 FROM tab0 AS cor0 GROUP BY col1
----
50
50

query I rowsort
SELECT col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL cor0.col0 * ( - 13 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1183
-1196
-195

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT cor0.col0 * + 25 FROM tab2 AS cor0 GROUP BY col0
----
2275
2300
375

query I rowsort
SELECT ALL + 27 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
27
27
27

query I rowsort
SELECT DISTINCT + 0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
0

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT 37 FROM tab2 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 - - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 53 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
53
53
53

query I rowsort
SELECT ALL 67 AS col0 FROM tab0 GROUP BY tab0.col2
----
67
67
67

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 + - ( - col2 * cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT 91 FROM tab0 AS cor0 GROUP BY cor0.col2
----
91
91
91

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-1945
SELECT - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1945
SELECT - CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - tab0.col1 - + 39 FROM tab0 GROUP BY tab0.col1
----
-120
-39

query I rowsort
SELECT - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - tab2.col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 11 * 59 AS col1 FROM tab1 GROUP BY col2
----
-649
-649
-649

query I rowsort
SELECT + - 51 AS col1 FROM tab2 GROUP BY col2
----
-51
-51
-51

onlyif mysql # DIV for integer division: 
query I rowsort label-1951
SELECT DISTINCT + 20 DIV col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
0

skipif mysql # not compatible
query I rowsort label-1951
SELECT DISTINCT + 20 / col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
0

query I rowsort
SELECT ALL - 64 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-64
-64
-64

query I rowsort
SELECT DISTINCT col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL + ( - tab1.col0 ) AS col1 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 + 22 FROM tab0 AS cor0 GROUP BY cor0.col1
----
103
22

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col2 + + 14 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
101
72
93

query I rowsort
SELECT cor0.col2 * + 50 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2250
3550
400

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
116
158
174

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT 98 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7938

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ( 20 * - cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1420
-160
-900

query I rowsort
SELECT - 61 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT 86 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
3526
5074
5246

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY col0, cor0.col0, cor0.col2
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-1974
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-1974
SELECT + cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-1975
SELECT CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-1975
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 10 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-10

onlyif mysql # DIV for integer division: 
query I rowsort label-1978
SELECT cor0.col2 * 78 DIV 15 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
301
410
452

skipif mysql # not compatible
query I rowsort label-1978
SELECT cor0.col2 * 78 / 15 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
301
410
452

onlyif mysql # DIV for integer division: 
query I rowsort label-1979
SELECT ALL + col1 DIV 17 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
6
60

skipif mysql # not compatible
query I rowsort label-1979
SELECT ALL + col1 / 17 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
6
60

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT DISTINCT 11 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11

query I rowsort
SELECT col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 + + 25 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13
-54
1

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 + 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT + 33 * - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1419
-2739
-858

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
22

query I rowsort
SELECT + + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL 71 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1846
3053
5893

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
19

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT - col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - cor0.col2 * + ( 60 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-1440
-2280
-4740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col2 col2 FROM tab1, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 91 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT ALL - ( 66 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-66
-66
-66

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 50 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-50

query I rowsort
SELECT 81 + col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
162
81
81

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - 22 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
36
57
65

query I rowsort
SELECT + + 38 AS col0 FROM tab1, tab1 cor0, tab2 AS cor1 GROUP BY cor1.col2
----
38
38
38

query I rowsort
SELECT - 41 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-41
-41

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 25 FROM tab0 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT - 23 * - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
1357
1403
943

query I rowsort
SELECT - 11 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-11
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 77 FROM tab1 AS cor0 GROUP BY cor0.col1
----
77
77
77

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2016
SELECT - CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2016
SELECT - CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - - 76 FROM tab2 GROUP BY tab2.col0
----
76
76
76

query I rowsort
SELECT 69 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT ALL - 18 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT - - ( tab1.col2 ) AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - ( tab1.col2 ) AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
2

query I rowsort
SELECT ALL 79 FROM tab2 GROUP BY tab2.col2
----
79
79
79

query I rowsort
SELECT ALL + ( + 30 ) + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
113
56
73

query I rowsort
SELECT - col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col0 * 48 * - 63 FROM tab1 cor0 GROUP BY cor0.col0
----
-247968
-66528
-84672

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 21 FROM tab0 AS cor0 GROUP BY col2
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT ALL - 92 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

query I rowsort
SELECT ALL - 67 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT 3 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT - 59 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-59
-59
-59

query I rowsort
SELECT ALL - 65 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-65
-65
-65

query I rowsort
SELECT 19 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
19
19
19

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 ALL - col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT cor0.col1 + - col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-17
-20
-26

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query III rowsort
SELECT ALL * FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - ( cor0.col2 ) AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-2047
SELECT cor0.col0 * 98 DIV + 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
117
225
70

skipif mysql # not compatible
query I rowsort label-2047
SELECT cor0.col0 * 98 / + 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
117
225
70

query I rowsort
SELECT DISTINCT cor0.col1 + 96 FROM tab1 AS cor0 GROUP BY col1
----
102
140
153

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab0 cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2056
SELECT - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2056
SELECT - CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
-58
-79
-87

query I rowsort
SELECT - 65 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-65
-65
-65

query I rowsort
SELECT + 41 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT DISTINCT + 9 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
9

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT + 9 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
9
90

query I rowsort
SELECT DISTINCT - 68 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-68

query I rowsort
SELECT DISTINCT + 25 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
25

query I rowsort
SELECT + cor0.col0 - + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
0
0
0

query I rowsort
SELECT ALL - 81 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-81
-81
-81

query I rowsort
SELECT ALL + 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
48
48
48

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2071
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-2071
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT ( 86 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
86

query I rowsort
SELECT 55 FROM tab2 cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT + - ( 64 ) AS col1 FROM tab0 GROUP BY tab0.col2
----
-64
-64
-64

query I rowsort
SELECT - - ( cor0.col1 ) * 85 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
3485
5015
5185

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 26 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
26

query I rowsort
SELECT ALL 50 * 49 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2450
2450

onlyif mysql # DIV for integer division: 
query I rowsort label-2083
SELECT ALL 67 DIV - 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2083
SELECT ALL 67 / - 41 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT 89 FROM tab1 AS cor0 GROUP BY cor0.col1
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 74 col1 FROM tab1 GROUP BY tab1.col0
----
-74

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ( - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - 52 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT 23 * 72 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1656
1656
1656

query I rowsort
SELECT 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 20 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

query I rowsort
SELECT 14 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
14
14
14

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col2 * + 49 FROM tab0 cor0 GROUP BY col2
----
-1176
-1862
-3871

query I rowsort
SELECT + tab2.col2 * 50 AS col1 FROM tab2 GROUP BY tab2.col2
----
2900
3950
4350

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 64 FROM tab0 cor0 GROUP BY col1
----
64
64

query I rowsort
SELECT + - 19 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-19
-19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 78 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3510
5538
624

query I rowsort
SELECT 66 FROM tab1 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 41 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
41
41
41

query I rowsort
SELECT + 20 FROM tab2 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT DISTINCT 49 FROM tab2 AS cor0 GROUP BY cor0.col1
----
49

query I rowsort
SELECT 11 FROM tab0 AS cor0 GROUP BY cor0.col2
----
11
11
11

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 6 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

query I rowsort
SELECT ALL 6 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL - 58 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-58
-58

query I rowsort
SELECT ALL cor0.col1 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
124
26
83

query I rowsort
SELECT 88 * + ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY col2
----
5104
6952
7656

query I rowsort
SELECT 82 FROM tab0 cor0 GROUP BY cor0.col0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 48 col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

query I rowsort
SELECT 75 FROM tab0 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT 0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
0
0
0

query I rowsort
SELECT 45 FROM tab2 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT ( 86 + + col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
101
177
178

query I rowsort
SELECT DISTINCT - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - ( tab1.col1 ) * col1 * 15 AS col2 FROM tab1 GROUP BY tab1.col1
----
-29040
-48735
-540

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2127
SELECT ALL CAST( NULL AS DECIMAL ) FROM tab1 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2127
SELECT ALL CAST ( NULL AS REAL ) FROM tab1 GROUP BY col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + tab0.col0 * tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT + tab2.col1 + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL 99 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
99
99
99

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 58 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
58
58
58

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

query I rowsort
SELECT DISTINCT 2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2

query I rowsort
SELECT + 68 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
68
68
68

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + 85 FROM tab0 cor0 GROUP BY col2
----
85
85
85

query I rowsort
SELECT - 47 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-47
-47
-47

query I rowsort
SELECT + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT tab0.col2 + + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
158
48
76

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL + - 94 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-94
-94
-94

query I rowsort
SELECT ALL - + cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - ( + cor0.col2 ) * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL + 7 FROM tab1 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT ALL 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 70 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT col1 * + col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT 52 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1352
2236
4316

query I rowsort
SELECT ALL 97 FROM tab0 AS cor0 GROUP BY col1
----
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT 86 * 63 AS col2 FROM tab2 GROUP BY col2
----
5418

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 98 + + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
156
177
185

query I rowsort
SELECT 99 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT ALL 69 + cor0.col1 + 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
118
156
169

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL col0 - 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
14
20
74

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - + 98 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
-98
-98
-98

query I rowsort
SELECT 66 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT - 95 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-95
-95
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 38 col1 FROM tab1 GROUP BY tab1.col0
----
38

query I rowsort
SELECT DISTINCT + 49 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 15 * + 90 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
1350
1350
1350

query I rowsort
SELECT - 87 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

query I rowsort
SELECT + 78 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT 75 * 23 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1725

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT + 66 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
66

query I rowsort
SELECT cor0.col0 + 11 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
33
39
93

query I rowsort
SELECT DISTINCT 43 FROM tab1 cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT - 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-10
-10
-10

query I rowsort
SELECT - 61 * cor0.col0 - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1612
-2666
-5146

query I rowsort
SELECT + 7 * - 35 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY tab2.col0
----
-245
-245
-245

query I rowsort
SELECT DISTINCT 41 FROM tab2 cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT DISTINCT + 9 FROM tab1 AS cor0 GROUP BY cor0.col2
----
9

query I rowsort
SELECT + 96 + - 89 FROM tab0 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT ( + 1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT 52 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
52

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT 6 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 79 FROM tab2 AS cor0 GROUP BY col1
----
79
79
79

query I rowsort
SELECT + 25 AS col1 FROM tab2, tab1 cor0, tab0 cor1 GROUP BY cor1.col1
----
25
25

query I rowsort
SELECT ALL 98 * - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-1470
-8918
-9016

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 * + cor0.col1 + - 1 col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-1
8018

query I rowsort
SELECT - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL 84 AS col2 FROM tab0 GROUP BY tab0.col0
----
84
84
84

query I rowsort
SELECT ALL 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT - 33 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3003
3036
495

query I rowsort
SELECT DISTINCT - 59 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-59

query I rowsort
SELECT - col1 * - 61 FROM tab2 cor0 GROUP BY cor0.col1
----
2501
3599
3721

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT 44 AS col1 FROM tab0, tab0 cor0, tab0 AS cor1 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 34 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT - 36 FROM tab1 cor0 GROUP BY cor0.col2
----
-36
-36
-36

query I rowsort
SELECT DISTINCT - 28 FROM tab1 cor0 GROUP BY cor0.col2
----
-28

query I rowsort
SELECT - 47 * 10 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-470
-470

query I rowsort
SELECT DISTINCT 32 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT col0 + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query III rowsort
SELECT ALL * FROM tab2 AS cor0 GROUP BY cor0.col0, col2, col1
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT ALL - - tab0.col0 * 5 FROM tab0 GROUP BY tab0.col0
----
130
215
415

query I rowsort
SELECT + cor0.col2 * - 8 FROM tab2 AS cor0 GROUP BY col2
----
-464
-632
-696

query I rowsort
SELECT ALL - cor0.col2 * + ( - cor0.col2 ) FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT ALL cor0.col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - - 94 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
25
25
25

query I rowsort
SELECT DISTINCT col0 * 83 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1245
7553
7636

query I rowsort
SELECT DISTINCT 30 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
30

query I rowsort
SELECT 66 FROM tab1 GROUP BY tab1.col1
----
66
66
66

query I rowsort
SELECT DISTINCT - col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 52 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52
52
52

onlyif mysql # DIV for integer division: 
query I rowsort label-2233
SELECT + ( cor0.col0 ) DIV - cor0.col0 - - 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
44
44
44

skipif mysql # not compatible
query I rowsort label-2233
SELECT + ( cor0.col0 ) / - cor0.col0 - - 45 FROM tab1 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
84

query I rowsort
SELECT ALL cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + - 23 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-23

query I rowsort
SELECT 45 FROM tab2 cor0 GROUP BY col2
----
45
45
45

query I rowsort
SELECT 2 FROM tab1 AS cor0 GROUP BY col2
----
2
2
2

query I rowsort
SELECT 22 AS col0 FROM tab0 cor0 GROUP BY col1
----
22
22

query I rowsort
SELECT 91 FROM tab0 cor0 GROUP BY cor0.col2
----
91
91
91

query I rowsort
SELECT DISTINCT + 26 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26

query I rowsort
SELECT - cor0.col2 + 71 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-16
-8
13

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2 HAVING NOT NULL < NULL
----

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

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 DISTINCT + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab2.col0 AS col2 FROM tab2 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 35 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT - col2 - - cor0.col2 * + 56 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2475
3905
440

query I rowsort
SELECT 90 FROM tab2 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT - 39 FROM tab0 cor0 GROUP BY cor0.col2
----
-39
-39
-39

query I rowsort
SELECT ALL + 79 FROM tab1 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT ALL 32 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT DISTINCT 13 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
13

query I rowsort
SELECT 0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 87 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT + + 41 * - cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-3731
-3772
-615

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 76 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT - ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 2 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
17
93
94

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT cor0.col2 * - 17 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1207
-136
-765

query I rowsort
SELECT ALL 98 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT ALL + 34 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT - 86 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-86
-86
-86

query I rowsort
SELECT 8 FROM tab0 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT - 29 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-29
-29
-29

query I rowsort
SELECT + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT 8 FROM tab1 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL 48 FROM tab0 AS cor0 GROUP BY col0
----
48
48
48

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + + col2 + - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + 24 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 + + 10 + + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
168
58
86

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
1849
676
6889

query I rowsort
SELECT 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT - cor0.col1 - - 6 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-35
-53
-55

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2291
SELECT ALL CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2291
SELECT ALL CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 54 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT DISTINCT + cor0.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 + 31 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT ALL - 16 FROM tab2 cor0 GROUP BY cor0.col2
----
-16
-16
-16

query I rowsort
SELECT DISTINCT + col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT - - 66 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 74 FROM tab1 AS cor0 GROUP BY cor0.col1
----
74
74
74

onlyif mysql # DIV for integer division: 
query I rowsort label-2300
SELECT DISTINCT 10 - col2 DIV 38 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
10
8
9

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-2300
SELECT DISTINCT 10 - col2 / 38 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
10
8
9

query I rowsort
SELECT - - cor0.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - - cor0.col0 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 32 * + 72 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2304
2304
2304

query I rowsort
SELECT cor0.col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - 78 + + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-17
-19
-37

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-31
-31
-31

query I rowsort
SELECT 45 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
102
51
89

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - ( 84 ) AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-84
-84
-84

query I rowsort
SELECT - 50 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2050
-2950
-3050

query I rowsort
SELECT 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col2
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT cor0.col0 * + cor0.col0 - - 47 FROM tab2 AS cor0 GROUP BY cor0.col0
----
272
8328
8511

query I rowsort
SELECT DISTINCT ( cor0.col1 ) AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + - 62 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-62
-62
-62

query I rowsort
SELECT ALL col2 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2333
SELECT ALL tab1.col0 * CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2333
SELECT ALL tab1.col0 * CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 88 FROM tab0 AS cor0 GROUP BY cor0.col2
----
88

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL - 93 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT ALL 58 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - - cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 90 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 29 col2 FROM tab2 AS cor0 GROUP BY col0
----
-29

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + - tab1.col0 * - 46 FROM tab1 GROUP BY tab1.col0
----
1012
1288
3772

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + 89 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89
89

query I rowsort
SELECT + 47 FROM tab1 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT ALL - cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 81 - - cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
162
81

query I rowsort
SELECT DISTINCT + 37 AS col1 FROM tab1 GROUP BY tab1.col1
----
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 62 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-62
-62
-62

query I rowsort
SELECT - cor0.col1 * 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4180
-5415
-570

query I rowsort
SELECT DISTINCT - + 52 FROM tab2 GROUP BY tab2.col2
----
-52

query I rowsort
SELECT ALL - 43 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
-43
-43
-43

query I rowsort
SELECT - 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14
-14

query I rowsort
SELECT ALL - 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-35
-35
-35

query I rowsort
SELECT + - cor0.col1 * 8 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-328
-472
-488

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 col0 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 88 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
88

onlyif mysql # DIV for integer division: 
query I rowsort label-2364
SELECT ALL - cor0.col2 DIV + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2364
SELECT ALL - cor0.col2 / + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL ( + 95 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col2 - 4 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4
41
67

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT DISTINCT 29 + - 46 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-17

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT cor0.col1 + - 40 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-40
-40
41

query I rowsort
SELECT DISTINCT - ( ( col1 ) ) + ( 37 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-22
-24
-4

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 35 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
35

query I rowsort
SELECT ALL - 53 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1272
-2014
-4187

query I rowsort
SELECT DISTINCT + 91 FROM tab0 AS cor0 GROUP BY cor0.col2
----
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 col2 FROM tab2 AS cor0 GROUP BY col0, col2
----
-44
-44
-44

query I rowsort
SELECT - 27 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-27
-27
-27

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL cor0.col0 + 2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
24
30
84

query I rowsort
SELECT DISTINCT + cor0.col0 + 61 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
152
153
76

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - cor0.col1 * 7 FROM tab0 AS cor0 GROUP BY col1
----
-567
0

query I rowsort
SELECT + 72 * col0 FROM tab2 AS cor0 GROUP BY col0
----
1080
6552
6624

query I rowsort
SELECT ALL + 99 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT ALL 99 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
29
29

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * - 72 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1728
2736
5688

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - 99 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
41
59
61

query I rowsort
SELECT + 51 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
51
51
51

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, col2
----
-81
0

query I rowsort
SELECT 42 FROM tab0 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT ALL 49 FROM tab0 GROUP BY tab0.col1
----
49
49

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - ( 88 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-88
-88
-88

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-2407
SELECT ALL cor0.col0 DIV - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2407
SELECT ALL cor0.col0 / - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + 96 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT 42 * cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
3822
3864
630

query I rowsort
SELECT ALL - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 * - cor0.col0 - + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1892
-6972
-702

query I rowsort
SELECT ALL - 48 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + 44 FROM tab0 AS cor0 GROUP BY cor0.col1
----
44

query I rowsort
SELECT ALL 73 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT 16 FROM tab2 AS cor0 GROUP BY cor0.col1
----
16
16
16

query I rowsort
SELECT ALL cor0.col0 * - 7 FROM tab0 AS cor0 GROUP BY col0
----
-182
-301
-581

query I rowsort
SELECT DISTINCT - 11 AS col2 FROM tab1 GROUP BY tab1.col0
----
-11

query I rowsort
SELECT DISTINCT 93 * + cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
3813
5487
5673

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2420
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2420
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT + 65 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1690
2795
5395

query I rowsort
SELECT - 40 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-40
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 66 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
66

query I rowsort
SELECT cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 * - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4320
-6816
-768

query I rowsort
SELECT ALL + tab0.col2 AS col1 FROM tab0 WHERE NULL <> col1 GROUP BY tab0.col2
----

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, col0
----
26
43
83

query I rowsort
SELECT + + cor0.col2 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 15 * 7 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
111
149
162

query I rowsort
SELECT ALL - 85 * 80 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-6800
-6800
-6800

query I rowsort
SELECT - cor0.col1 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0
0

query I rowsort
SELECT ( cor0.col1 ) + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT + 83 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
83
83
83

query I rowsort
SELECT 46 FROM tab0 AS cor0 GROUP BY col1
----
46
46

query I rowsort
SELECT ALL 62 + + 81 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
143
143
143

query I rowsort
SELECT - cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 84 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
84
84
84

query I rowsort
SELECT + ( 63 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

query I rowsort
SELECT DISTINCT + ( + 12 ) AS col0 FROM tab1 GROUP BY col0
----
12

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT + 3 FROM tab1 cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT DISTINCT col2 + - 28 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
30
51
59

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2446
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2446
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-2448
SELECT ALL + 37 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2448
SELECT ALL + 37 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
4

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 87 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
87
87
87

query I rowsort
SELECT DISTINCT + 0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 50 FROM tab2 AS cor0 GROUP BY cor0.col2
----
50

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + + 30 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
30
30
30

onlyif mysql # DIV for integer division: 
query I rowsort label-2456
SELECT DISTINCT - 84 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-2456
SELECT DISTINCT - 84 / cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-1
0

query I rowsort
SELECT - - 99 FROM tab0 GROUP BY tab0.col2
----
99
99
99

query I rowsort
SELECT - 35 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-35
-35
-35

query I rowsort
SELECT col1 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - 91 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-91
-91
-91

query I rowsort
SELECT ALL 92 FROM tab2 AS cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT DISTINCT + cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 47 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-47
-47
-47

query I rowsort
SELECT 39 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
39
39
39

query I rowsort
SELECT + ( cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
114
12
88

query I rowsort
SELECT ALL + 40 FROM tab1 GROUP BY col2
----
40
40
40

query I rowsort
SELECT ALL + 0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 10 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 20 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT ALL + 38 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT DISTINCT + tab2.col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

query I rowsort
SELECT DISTINCT 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT - 96 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT - - 52 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col0
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab0.col2 col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2478
SELECT tab2.col2 / + 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-2478
SELECT tab2.col2 / + CAST ( NULL AS INTEGER ) col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 28 FROM tab1 AS cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT ALL - ( col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT 8 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT DISTINCT + ( - 91 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-91

query I rowsort
SELECT + 87 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
87
87
87

query I rowsort
SELECT DISTINCT cor0.col2 * 72 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
4176
5688
6264

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + 55 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
55
55
55

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
81

query I rowsort
SELECT - cor0.col0 + 17 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-74
-75
2

query I rowsort
SELECT - 85 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - cor0.col0 * + 62 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1364
-1736
-5084

query I rowsort
SELECT ALL 84 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT - 91 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1, tab2 cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 + 34 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
116
56
62

query I rowsort
SELECT ALL + col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2501
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-2501
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col1 + 98 * - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-4356
-5643
-594

query I rowsort
SELECT ALL cor0.col1 * ( + col1 ) AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 57 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
-57
-57
-57

query I rowsort
SELECT col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 6 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
6
6
6

query I rowsort
SELECT DISTINCT cor0.col1 * 4 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
164
236
244

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + col1 * ( 77 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3388
4389
462

query I rowsort
SELECT DISTINCT + 48 FROM tab2 AS cor0 GROUP BY cor0.col2
----
48

query I rowsort
SELECT col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT ALL - 33 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT - 28 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-28

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 45 FROM tab1 cor0 GROUP BY col0
----
45
45
45

query I rowsort
SELECT + 27 FROM tab1 AS cor0 GROUP BY cor0.col0
----
27
27
27

query I rowsort
SELECT ALL ( 22 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT DISTINCT - 87 FROM tab2 cor0 GROUP BY cor0.col1
----
-87

query I rowsort
SELECT 20 * col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
1160
1580
1740

query I rowsort
SELECT ALL - + ( + 99 ) * + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-5742
-7821
-8613

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT - tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 20 + + col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
38
59
67

onlyif mysql # DIV for integer division: 
query I rowsort label-2533
SELECT DISTINCT - tab1.col2 DIV + col2 FROM tab1 GROUP BY tab1.col2
----
-1

skipif mysql # not compatible
query I rowsort label-2533
SELECT DISTINCT - tab1.col2 / + col2 FROM tab1 GROUP BY tab1.col2
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 col0 FROM tab2 AS cor0 GROUP BY col2
----
-84
-84
-84

query I rowsort
SELECT ALL 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 14 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
14
14
14

query I rowsort
SELECT ALL ( 15 ) FROM tab1 cor0 GROUP BY col2
----
15
15
15

query I rowsort
SELECT - 98 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-98
-98
-98

query I rowsort
SELECT ( col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL - + 12 AS col1 FROM tab1 GROUP BY tab1.col0
----
-12
-12
-12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2542
SELECT DISTINCT CAST( NULL AS SIGNED ) + 34 FROM tab1 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-2542
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 34 FROM tab1 AS cor0 GROUP BY col2
----
NULL

query I rowsort
SELECT 73 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT 26 FROM tab1 GROUP BY tab1.col2
----
26
26
26

query I rowsort
SELECT DISTINCT + 20 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
20

onlyif mysql # DIV for integer division: 
query I rowsort label-2546
SELECT - cor0.col0 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2546
SELECT - cor0.col0 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT - + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + - 5 FROM tab1 GROUP BY tab1.col1
----
-5

query I rowsort
SELECT ALL - tab0.col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 66 FROM tab2 GROUP BY tab2.col2
----
66

query I rowsort
SELECT ALL - 74 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-74
-74
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 9 + col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
100
101
24

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL + col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 42 FROM tab1 GROUP BY tab1.col1
----
42
42
42

query I rowsort
SELECT 12 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT DISTINCT 38 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2559
SELECT - - CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2559
SELECT - - CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 7 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-7
-7
-7

query I rowsort
SELECT ALL - 54 FROM tab1 cor0 GROUP BY cor0.col1
----
-54
-54
-54

query I rowsort
SELECT cor0.col2 * - 26 FROM tab2 AS cor0 GROUP BY col2
----
-1508
-2054
-2262

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 ALL - col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + 24 AS col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
24

query I rowsort
SELECT - + 32 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY tab0.col1
----
-32
-32

query I rowsort
SELECT 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT ALL - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + + 87 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT + 79 + cor0.col1 + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
167
193
91

query I rowsort
SELECT ALL - 78 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-78
-78

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 72 FROM tab0 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
14
14
14

query I rowsort
SELECT - 23 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-23
-23
-23

query I rowsort
SELECT + 79 FROM tab2 AS cor0 GROUP BY cor0.col0
----
79
79
79

query I rowsort
SELECT DISTINCT - 58 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-58

query I rowsort
SELECT + 61 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2745
4331
488

query I rowsort
SELECT - - ( + tab2.col1 ) FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT col0 + 20 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
103
46
63

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
0
81

query I rowsort
SELECT - 91 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-91
-91
-91

query I rowsort
SELECT + 78 + + 19 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT ALL - 49 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2156
-2793
-294

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-2592
SELECT 16 DIV cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-2592
SELECT 16 / cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 28 * + 57 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1596
1596
1596

query I rowsort
SELECT + 14 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT + 71 FROM tab2 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
46
46
46

query I rowsort
SELECT + cor0.col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL + 80 FROM tab2 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT - 38 * 73 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2774
-2774

query I rowsort
SELECT DISTINCT - col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + 59 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
59
59
59

query I rowsort
SELECT - cor0.col0 * 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col1 * cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-185193
-216
-85184

query I rowsort
SELECT ALL - 74 * + 70 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-5180
-5180
-5180

query I rowsort
SELECT + 12 - 75 FROM tab0 cor0 GROUP BY cor0.col0
----
-63
-63
-63

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + 62 AS col0 FROM tab0, tab1 AS cor0, tab2 cor1 GROUP BY cor1.col1
----
62
62
62

query I rowsort
SELECT - 40 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 8 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
360
568
64

query I rowsort
SELECT + 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT ( 81 ) * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-4698
-6399
-7047

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - 65 * - 49 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
143325
226135
25480

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 82 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
82
82
82

query I rowsort
SELECT + 32 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT 66 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
66

query I rowsort
SELECT ALL + 38 * - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-2204
-3002
-3306

query I rowsort
SELECT + 4 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
4
4
4

query I rowsort
SELECT - 12 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + + tab2.col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL 21 FROM tab2 AS cor0 GROUP BY col1, col2
----
21
21
21

query I rowsort
SELECT + 80 FROM tab0 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT - 81 * + 9 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-729
-729
-729

query III rowsort
SELECT * FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT - 28 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-28
-28
-28

query I rowsort
SELECT 26 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
26
26
26

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT DISTINCT + 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
44

query I rowsort
SELECT - 28 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1232
-1596
-168

query I rowsort
SELECT DISTINCT 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 89 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT DISTINCT - 62 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-62

query I rowsort
SELECT - cor0.col2 + - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-116
-158
-174

query I rowsort
SELECT ALL + 88 AS col1 FROM tab2 cor0 GROUP BY col0
----
88
88
88

query I rowsort
SELECT + 8 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ( + 90 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab0, tab1 cor0, tab0 AS cor1 GROUP BY cor1.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-37
-37

query I rowsort
SELECT ALL 75 FROM tab0 AS cor0 GROUP BY col2
----
75
75
75

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + 6 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
28
34
88

query I rowsort
SELECT ALL + cor0.col2 + 98 FROM tab1 AS cor0 GROUP BY cor0.col2
----
106
143
169

query I rowsort
SELECT ALL - cor0.col2 * - 41 FROM tab0 cor0 GROUP BY cor0.col2
----
1558
3239
984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + + cor0.col0 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + - 10 AS col1 FROM tab0 GROUP BY tab0.col2
----
-10
-10
-10

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ( 18 ) FROM tab1 AS cor0 GROUP BY col0
----
18
18
18

query I rowsort
SELECT 49 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - - 19 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3
-63
-9

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 31 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
31
31
31

query I rowsort
SELECT ALL - 96 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-96
-96
-96

query I rowsort
SELECT ALL - 94 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-94
-94
-94

query I rowsort
SELECT col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - - tab1.col0 + + 7 AS col2 FROM tab1 GROUP BY tab1.col0
----
29
35
89

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT + ( 14 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT ALL + 40 * cor0.col2 - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
2262
3081
3393

query I rowsort
SELECT DISTINCT - 64 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-64

query I rowsort
SELECT tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL - cor0.col1 + + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL = NULL
----

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL 60 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
60
60
60

query I rowsort
SELECT 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + tab2.col2 - col2 FROM tab2 GROUP BY col2
----
0
0
0

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
42

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT ALL - 65 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2925
-4615
-520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 + + ( + 65 ) col0 FROM tab1, tab0 cor0 GROUP BY tab1.col0
----
-17
37
43

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT + 13 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT 3 FROM tab0 AS cor0 GROUP BY col1
----
3
3

query I rowsort
SELECT ( - 0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 10 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT + 40 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT DISTINCT - 47 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-47

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT + 32 + - 50 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-18
-18
-18

query I rowsort
SELECT DISTINCT cor0.col1 * + 13 + 16 FROM tab2 AS cor0 GROUP BY cor0.col1
----
549
783
809

query I rowsort
SELECT DISTINCT cor0.col1 - 47 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-3726
0

query I rowsort
SELECT - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 38 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
38

query I rowsort
SELECT ALL - 52 * 78 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-4056
-4056
-4056

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT - 52 * cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4641
-4692
-765

query I rowsort
SELECT ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL ( col1 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT 66 - 64 FROM tab2 GROUP BY col2
----
2

query I rowsort
SELECT 38 FROM tab1 cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT ALL 45 * col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
1170
1935
3735

query I rowsort
SELECT - 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-85
-85
-85

query I rowsort
SELECT ALL + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT + 52 AS col2 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT ALL 7 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7
7
7

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2729
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-2729
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT - col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 66 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
66
66
66

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT ALL 1 + cor0.col1 + + 93 FROM tab0 AS cor0 GROUP BY cor0.col1
----
175
94

query I rowsort
SELECT 39 + cor0.col1 * + col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1975
3288
75

query I rowsort
SELECT - cor1.col2 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 77 FROM tab1 AS cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT 20 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
20
20

onlyif mysql # DIV for integer division: 
query I rowsort label-2739
SELECT - 50 * col0 DIV 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29
-48
-94

skipif mysql # not compatible
query I rowsort label-2739
SELECT - 50 * col0 / 44 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29
-48
-94

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1, col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT + 81 * + col2 FROM tab2 AS cor0 GROUP BY col2
----
4698
6399
7047

query I rowsort
SELECT ALL 94 * - 65 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6110
-6110
-6110

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + 4 FROM tab2 AS cor0 GROUP BY col1
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + cor0.col0 * cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT + 47 FROM tab2 AS cor0 GROUP BY cor0.col2
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 69 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT 72 + - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-15
-7
14

query I rowsort
SELECT + cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + 24 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
58
79
87

query I rowsort
SELECT ALL + 90 + ( cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
114
128
169

query I rowsort
SELECT ALL - 65 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-65
-65
-65

query I rowsort
SELECT DISTINCT 11 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11

query I rowsort
SELECT - 91 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-91
-91
-91

query I rowsort
SELECT DISTINCT 69 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-10
-18
11

query I rowsort
SELECT cor0.col2 + - 71 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-13
16
8

query I rowsort
SELECT + 13 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13
13
13

query I rowsort
SELECT 0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT + + 32 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT 34 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
34
34
34

query I rowsort
SELECT - cor0.col0 + 71 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-12
28
45

query I rowsort
SELECT tab0.col2 * - 15 FROM tab0 GROUP BY tab0.col2
----
-1185
-360
-570

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + cor0.col1 * 7 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
308
399
42

query I rowsort
SELECT tab0.col2 * - 92 AS col2 FROM tab0 GROUP BY tab0.col2
----
-2208
-3496
-7268

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2773
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2773
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 58 FROM tab1 AS cor0 GROUP BY col0
----
58
58
58

query I rowsort
SELECT + cor0.col0 * 80 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
2080
3440
6640

query I rowsort
SELECT DISTINCT 81 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
105
119
160

query I rowsort
SELECT ALL + 48 - + col0 AS col2 FROM tab2 GROUP BY col0
----
-43
-44
33

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2778
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2778
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col2
----
NULL
NULL
NULL

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 12 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
12
12
12

query I rowsort
SELECT ( - cor0.col0 * + 41 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1148
-3362
-902

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + 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 ALL cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT - 50 + cor0.col2 * ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
1394
526
6191

query I rowsort
SELECT DISTINCT + 66 FROM tab0 cor0 GROUP BY cor0.col0
----
66

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

onlyif mysql # DIV for integer division: 
query I rowsort label-2790
SELECT ( cor0.col2 ) DIV + 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2790
SELECT ( cor0.col2 ) / + 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 92 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT + col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 60 FROM tab2 cor0 GROUP BY col0
----
60
60
60

query I rowsort
SELECT 30 FROM tab2 AS cor0 GROUP BY col0
----
30
30
30

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - ( 15 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-15
-15
-15

query I rowsort
SELECT - ( + tab2.col0 ) AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT - 60 FROM tab0 GROUP BY tab0.col0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + 26 * 63 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1638

query I rowsort
SELECT - 9 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT ALL - 18 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-18
-18
-18

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2804
SELECT ALL + - CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2804
SELECT ALL + - CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-2806
SELECT col1 / + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2806
SELECT col1 / + CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-2807
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-2807
SELECT ALL - cor0.col1 / cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 3 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
3
3
3

query I rowsort
SELECT ALL + 36 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
36
36
36

query I rowsort
SELECT ALL + 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT DISTINCT + 79 * ( col0 ) FROM tab1 GROUP BY tab1.col0
----
1738
2212
6478

query I rowsort
SELECT ALL - - 47 FROM tab1 GROUP BY tab1.col1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 col1 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
17

query I rowsort
SELECT DISTINCT - - 53 FROM tab1 GROUP BY tab1.col0
----
53

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
116
158
174

query I rowsort
SELECT - col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 40 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 17 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT 13 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-11
-25
-66

query I rowsort
SELECT ALL + 26 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT ALL - - 43 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
43
43
43

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT + col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT 92 FROM tab2 cor0 GROUP BY cor0.col1
----
92

query I rowsort
SELECT - 23 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
-23
-23
-23

query I rowsort
SELECT ALL 61 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
61
61
61

query I rowsort
SELECT - 40 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - ( + 35 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-35

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 78 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
135
75
81

query I rowsort
SELECT 53 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2
----
45
71
8

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL + + tab0.col2 AS col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - - cor1.col0 FROM tab1, tab0 cor0, tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT ALL - 35 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-35
-35
-35

query I rowsort
SELECT 73 * + cor0.col2 - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
3257
5101
562

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT + 22 FROM tab0 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
0
0
81

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + 26 FROM tab2 AS cor0 GROUP BY col2
----
26

query I rowsort
SELECT DISTINCT 22 FROM tab1 cor0 GROUP BY cor0.col0
----
22

query I rowsort
SELECT + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + - cor0.col0 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + tab2.col0 * 42 FROM tab2 GROUP BY tab2.col0
----
3822
3864
630

query I rowsort
SELECT ALL - 89 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-89
-89
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 19 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT + 56 FROM tab2 AS cor0 GROUP BY col0
----
56
56
56

query I rowsort
SELECT + + tab1.col0 * - 64 + 70 FROM tab1 GROUP BY col0
----
-1338
-1722
-5178

query I rowsort
SELECT DISTINCT 4 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-152
-316
-96

query I rowsort
SELECT 3 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT 0 FROM tab0 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 97 FROM tab0 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 70 FROM tab2 cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT ALL - 12 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-972
0

query I rowsort
SELECT 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
33
33
33

query I rowsort
SELECT 83 * 32 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2656
2656
2656

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-2878
SELECT + CAST( 58 AS SIGNED ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
58
58
58

skipif mysql # not compatible
query I rowsort label-2878
SELECT + CAST ( 58 AS INTEGER ) AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
58
58
58

query I rowsort
SELECT + 62 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
62
62
62

query I rowsort
SELECT 46 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-2881
SELECT cor0.col0 DIV cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2881
SELECT cor0.col0 / cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-2883
SELECT ALL 62 DIV + col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
44
83

skipif mysql # not compatible
query I rowsort label-2883
SELECT ALL 62 / + col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
44
83

onlyif mysql # DIV for integer division: 
query I rowsort label-2884
SELECT ALL - cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2884
SELECT ALL - cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - 40 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT 13 FROM tab2 AS cor0 GROUP BY cor0.col1
----
13
13
13

query I rowsort
SELECT ALL cor0.col2 * - ( cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

query I rowsort
SELECT col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ( + cor0.col0 + - 75 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-60
16
17

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT col2 * + col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT - 14 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-14
-14
-14

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 47 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
47
47
47

query I rowsort
SELECT ALL cor0.col2 * - ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT cor0.col2 + + 76 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
100
114
155

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 21 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
21
21

query I rowsort
SELECT ALL + 56 FROM tab1 AS cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT + 11 FROM tab1 GROUP BY tab1.col2
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col1 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
90
90
90

query I rowsort
SELECT + 86 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
86
86
86

query I rowsort
SELECT 37 * 33 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1221
1221
1221

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT tab0.col1 + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
162

query I rowsort
SELECT + tab0.col1 AS col2 FROM tab0, tab2 cor0 GROUP BY tab0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT ALL + cor0.col1 * 68 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
2788
4012
4148

query III rowsort
SELECT ALL * FROM tab0 AS cor0 GROUP BY cor0.col2, col0, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL - - col0 AS col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + 63 FROM tab0 GROUP BY tab0.col0
----
63
63
63

query I rowsort
SELECT 81 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT ( cor0.col1 ) - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + + col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + 58 FROM tab0 AS cor0 GROUP BY cor0.col2
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 97 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
97
97
97

query I rowsort
SELECT DISTINCT ( col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - 12 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-12
-12
-12

query I rowsort
SELECT ALL col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - ( + tab1.col2 ) FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + 74 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 74 col1 FROM tab0 AS cor0 GROUP BY col2
----
74
74
74

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 94 FROM tab0 AS cor0 GROUP BY cor0.col0
----
94

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-33

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab2 GROUP BY col1
----
16

query I rowsort
SELECT DISTINCT + 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
48

query I rowsort
SELECT ALL - ( 43 ) + col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-17
0
40

query I rowsort
SELECT 53 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3074
4187
4611

query I rowsort
SELECT 61 AS col1 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
61
61
61

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + 74 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
74
74

query I rowsort
SELECT ALL 99 * - 53 FROM tab1 AS cor0 GROUP BY col2
----
-5247
-5247
-5247

query I rowsort
SELECT ( + 25 ) + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
104
112
83

query I rowsort
SELECT col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col2 + 65 FROM tab1 AS cor0 GROUP BY cor0.col2
----
110
136
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 8 col0 FROM tab2, tab2 cor0 GROUP BY tab2.col2
----
-8

query I rowsort
SELECT + 93 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
93
93
93

query I rowsort
SELECT - cor0.col2 * + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-2952
SELECT - ( col0 ) DIV - col0 FROM tab0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2952
SELECT - ( col0 ) / - col0 FROM tab0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col0 - 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-139
-82
-99

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT DISTINCT - - 88 FROM tab0 GROUP BY tab0.col1
----
88

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT DISTINCT + tab2.col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT 60 * - cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-2460
-3540
-3660

query I rowsort
SELECT 53 - 10 FROM tab1 GROUP BY tab1.col0
----
43
43
43

query I rowsort
SELECT ALL - - ( col0 ) + col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT - + 93 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-93

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT DISTINCT - 33 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1353
1947
2013

query I rowsort
SELECT + 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT - 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT ALL 79 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3239
4661
4819

query I rowsort
SELECT DISTINCT ( col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT 27 FROM tab1 AS cor0 GROUP BY col1, col2
----
27

query I rowsort
SELECT 23 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
31
68
94

query I rowsort
SELECT ALL cor0.col0 FROM tab0 cor0 GROUP BY col2, col0
----
26
43
83

query I rowsort
SELECT ALL - 28 * col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-2548
-2576
-420

query I rowsort
SELECT ALL + cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col2 + col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
116
158
174

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
91
91
91

query I rowsort
SELECT + 7 FROM tab0 GROUP BY col0
----
7
7
7

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43

query I rowsort
SELECT + 48 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 13 col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
13
13
13

query I rowsort
SELECT DISTINCT - 12 FROM tab1 AS cor0 GROUP BY col1
----
-12

query I rowsort
SELECT DISTINCT ( + cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

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 ALL 68 FROM tab0 AS cor0 GROUP BY col2
----
68
68
68

query I rowsort
SELECT 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT 69 FROM tab2 cor0 GROUP BY col1
----
69

query I rowsort
SELECT DISTINCT + tab2.col0 AS col1 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 63 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-63
-63

query I rowsort
SELECT DISTINCT col2 + 90 FROM tab2 GROUP BY col2
----
148
169
177

query I rowsort
SELECT DISTINCT - ( + 32 ) FROM tab1 GROUP BY col0
----
-32

query I rowsort
SELECT DISTINCT - ( + col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT + cor0.col1 * - 38 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1558
-2242
-2318

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 * + 57 FROM tab1 AS cor0 GROUP BY cor0.col1
----
110352
185193
2052

onlyif mysql # DIV for integer division: 
query I rowsort label-2998
SELECT DISTINCT cor0.col1 DIV - 63 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1
0

skipif mysql # not compatible
query I rowsort label-2998
SELECT DISTINCT cor0.col1 / - 63 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1
0

query I rowsort
SELECT cor0.col1 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 + cor0.col0 + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
273
276
45

query I rowsort
SELECT + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT 30 FROM tab2 AS cor0 GROUP BY col1
----
30
30
30

query I rowsort
SELECT - 51 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - 49 FROM tab2 AS cor0 GROUP BY col0
----
-49

query I rowsort
SELECT - ( - cor0.col1 ) * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT - cor0.col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 67 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
67
67
67

query I rowsort
SELECT cor0.col2 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 + cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT 75 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT 78 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 46 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
46
46
46

query I rowsort
SELECT + cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - + 98 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-98
-98
-98

query I rowsort
SELECT ( cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - + 17 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-17
-17
-17

query I rowsort
SELECT ALL col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3025
SELECT - cor0.col1 DIV - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3025
SELECT - cor0.col1 / - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + ( 65 ) AS col2 FROM tab2 GROUP BY col0
----
65
65
65

query I rowsort
SELECT ALL 49 FROM tab1 GROUP BY tab1.col0
----
49
49
49

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3029
SELECT + CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3029
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 92 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 - - 3 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61
82
90

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query III rowsort
SELECT * FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, col1
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT DISTINCT - 35 AS col1 FROM tab0 GROUP BY col1
----
-35

query I rowsort
SELECT 3 + 73 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-11
-3
18

query I rowsort
SELECT DISTINCT - ( - col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL 17 FROM tab0 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT - - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
14
14

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 - 91 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-91
-91

query I rowsort
SELECT - cor0.col2 * + 19 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1349
-152
-855

query I rowsort
SELECT cor0.col2 - ( 70 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-25
-62
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 37 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT 46 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
46
46
46

query I rowsort
SELECT ALL - 48 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-48
-48
-48

query I rowsort
SELECT ALL - - cor0.col2 AS col0 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3055
SELECT ALL - CAST( NULL AS DECIMAL ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3055
SELECT ALL - CAST ( NULL AS REAL ) FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + 28 ) AS col1 FROM tab1 AS cor0 GROUP BY col2
----
28
28
28

query I rowsort
SELECT - 12 FROM tab0 cor0 GROUP BY col2
----
-12
-12
-12

query I rowsort
SELECT ALL ( 83 ) * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6723

query I rowsort
SELECT ( 73 ) AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
73
73
73

query I rowsort
SELECT + 97 FROM tab2, tab2 cor0, tab0 AS cor1 GROUP BY cor1.col0
----
97
97
97

query I rowsort
SELECT ALL 3 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
3
3

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3062
SELECT - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3062
SELECT - CAST ( NULL AS REAL ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * ( cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT + col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 24 * col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1968
-528
-672

query I rowsort
SELECT cor0.col0 - - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT + 56 * ( tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
0
4536

query I rowsort
SELECT cor0.col2 * 54 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
3132
4266
4698

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT - 77 + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-32
-6
-69

query I rowsort
SELECT DISTINCT 96 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96

query I rowsort
SELECT + + tab2.col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + 51 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL + cor0.col0 - - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL 90 FROM tab0 AS cor0 GROUP BY col0
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 18 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
18

query I rowsort
SELECT + 77 FROM tab1 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT ALL cor0.col2 + 53 FROM tab2 cor0 GROUP BY cor0.col2
----
111
132
140

query I rowsort
SELECT ALL - col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT col2 + 16 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
103
74
95

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3083
SELECT ALL - CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3083
SELECT ALL - CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 12 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT 80 * - ( + cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4640
-6320
-6960

query I rowsort
SELECT ALL tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - 35 FROM tab1 GROUP BY col0
----
-35
-35
-35

query I rowsort
SELECT - 35 FROM tab2 GROUP BY tab2.col1
----
-35
-35
-35

query I rowsort
SELECT DISTINCT 44 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
44

onlyif mysql # DIV for integer division: 
query I rowsort label-3093
SELECT 8 DIV cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3093
SELECT 8 / cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - - 95 FROM tab0 GROUP BY tab0.col0
----
95
95
95

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col0 * - 9 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-198
-252
-738

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT ALL 19 FROM tab0 AS cor0 GROUP BY col1
----
19
19

query I rowsort
SELECT + cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT ALL - cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 62 + 1 AS col2 FROM tab0 GROUP BY tab0.col2
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 13 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-13

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT DISTINCT - 63 + - 62 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-125

query I rowsort
SELECT ALL + 17 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
17
17

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query III rowsort
SELECT * FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col1
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT 20 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1660
520
860

query I rowsort
SELECT DISTINCT + 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT 75 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
156
75

query I rowsort
SELECT DISTINCT 33 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 87 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-87

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.col1
----
58
79
87

query I rowsort
SELECT ALL col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 83 col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-83

query I rowsort
SELECT 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT - cor0.col0 + - 50 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-132
-72
-78

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT 16 * 78 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1248
1248
1248

query I rowsort
SELECT DISTINCT 95 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
95

query I rowsort
SELECT ALL 46 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4186
-4232
-690

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 33 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-33

query I rowsort
SELECT ALL - 28 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3133
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3133
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT ( + cor0.col0 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3135
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3135
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 51 FROM tab2 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT DISTINCT + 21 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
21

query I rowsort
SELECT + cor0.col0 + - 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
74
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 63 AS col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
63

query I rowsort
SELECT ALL - - 36 FROM tab2 GROUP BY tab2.col1
----
36
36
36

query I rowsort
SELECT DISTINCT - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3147
SELECT ALL CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3147
SELECT ALL CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT 40 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT DISTINCT - 28 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-28

query I rowsort
SELECT - cor0.col2 * 15 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1185
-360
-570

query I rowsort
SELECT ALL 49 FROM tab0 AS cor0 GROUP BY col0
----
49
49
49

query I rowsort
SELECT DISTINCT 48 FROM tab0 cor0 GROUP BY col1
----
48

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT - + cor0.col2 + - 61 * 25 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
-1583
-1604
-1612

onlyif mysql # DIV for integer division: 
query I rowsort label-3157
SELECT tab1.col0 DIV - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3157
SELECT tab1.col0 / - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-1
-1
-1

query I rowsort
SELECT - 33 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-33
-33
-33

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL 80 FROM tab1 GROUP BY tab1.col1
----
80
80
80

query I rowsort
SELECT 80 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
80
80
80

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col1 - col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-83
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3166
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3166
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 85 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
100
176
177

onlyif mysql # DIV for integer division: 
query I rowsort label-3168
SELECT 85 DIV + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
2
3

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3168
SELECT 85 / + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
2
3

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT 66 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT ALL + 85 FROM tab1, tab2 AS cor0, tab2 cor1 GROUP BY cor1.col2
----
85
85
85

query I rowsort
SELECT + 10 AS col2 FROM tab1 cor0 GROUP BY col0
----
10
10
10

query I rowsort
SELECT ALL + 52 FROM tab1 AS cor0 GROUP BY cor0.col1
----
52
52
52

query I rowsort
SELECT + 12 FROM tab2 cor0 GROUP BY col1, col1
----
12
12
12

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL + + 91 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
91
91
91

query I rowsort
SELECT - tab0.col0 * - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT + 48 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
48
48
48

query I rowsort
SELECT - 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 - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 9 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT DISTINCT + cor0.col1 * 95 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
7695

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-3186
SELECT + cor0.col2 + 23 DIV - 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
78
86

skipif mysql # not compatible
query I rowsort label-3186
SELECT + cor0.col2 + 23 / - 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
78
86

query I rowsort
SELECT 75 * cor0.col2 - + 63 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1737
2787
5862

query I rowsort
SELECT ALL - 25 AS col1 FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
-25
-25
-25

query I rowsort
SELECT + tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + cor0.col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - - 90 AS col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
90
90
90

query I rowsort
SELECT - tab2.col2 * + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-95
-95
-95

query I rowsort
SELECT 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
43
43
43

query I rowsort
SELECT ALL 92 AS col2 FROM tab2 cor0 GROUP BY col1
----
92
92
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3199
SELECT ALL 87 DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
3
3

skipif mysql # not compatible
query I rowsort label-3199
SELECT ALL 87 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
3
3

query I rowsort
SELECT ALL - 46 FROM tab0 cor0 GROUP BY cor0.col0
----
-46
-46
-46

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 35 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT ( - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + 79 FROM tab2 GROUP BY tab2.col2
----
79
79
79

query I rowsort
SELECT ALL - - 51 AS col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
51
51
51

query I rowsort
SELECT 17 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT - ( + 72 ) FROM tab2 cor0 GROUP BY col0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - 90 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-90

onlyif mysql # DIV for integer division: 
query I rowsort label-3209
SELECT ALL - 87 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-14

skipif mysql # not compatible
query I rowsort label-3209
SELECT ALL - 87 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-14

query I rowsort
SELECT ALL - 96 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
53
53
53

query I rowsort
SELECT DISTINCT tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - cor0.col2 * - ( + 47 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1128
1786
3713

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 29 * cor0.col2 col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-1102
-2291
-696

query I rowsort
SELECT ALL 95 FROM tab2 AS cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT DISTINCT - + tab0.col2 + - tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
-158
-48
-76

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 * 91 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
7371

query I rowsort
SELECT ALL + 81 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
81
81
81

query I rowsort
SELECT ALL - 83 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-83
-83
-83

query I rowsort
SELECT + 80 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + 73 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-3227
SELECT + cor0.col2 DIV ( col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-3227
SELECT + cor0.col2 / ( col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
3

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL 68 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
150
90
96

query I rowsort
SELECT DISTINCT - 35 FROM tab0 cor0 GROUP BY cor0.col0
----
-35

query I rowsort
SELECT + 45 FROM tab1 cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT DISTINCT - - 29 FROM tab1 GROUP BY tab1.col1
----
29

query I rowsort
SELECT ALL - 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT 36 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
36

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - 56 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-56
-56
-56

query I rowsort
SELECT cor0.col1 * 57 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2337
3363
3477

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
114
12
88

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 96 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
96
96
96

query I rowsort
SELECT 78 FROM tab2 AS cor0 GROUP BY cor0.col1
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 + col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
59
77
79

query I rowsort
SELECT - 54 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-54
-54
-54

query I rowsort
SELECT cor0.col0 * + 74 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1628
2072
6068

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 78 FROM tab0 cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT DISTINCT col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
225
8281
8464

query I rowsort
SELECT DISTINCT - 35 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-35

query I rowsort
SELECT ALL 64 - 66 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
-2
-2
-2

query I rowsort
SELECT 5 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
5
5

query I rowsort
SELECT + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 72 + + cor0.col1 - 12 col1 FROM tab0 AS cor0 GROUP BY col1
----
141
60

onlyif mysql # DIV for integer division: 
query I rowsort label-3254
SELECT ( + cor0.col0 ) DIV 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3254
SELECT ( + cor0.col0 ) / 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
2

query I rowsort
SELECT DISTINCT 59 FROM tab0 AS cor0 GROUP BY cor0.col0
----
59

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
-81
0

query I rowsort
SELECT cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + - cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - 11 * + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-638
-869
-957

query I rowsort
SELECT tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL 2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
2
2
2

query I rowsort
SELECT + 97 FROM tab2 AS cor0 GROUP BY col0
----
97
97
97

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 84 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT ALL 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT ALL 20 * - col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1160
-1580
-1740

query I rowsort
SELECT tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - tab0.col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT - 29 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1682
-2291
-2523

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col0 * - 61 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5551
-5612
-915

query I rowsort
SELECT ALL - 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-98
-98

query I rowsort
SELECT 1 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 77 * cor0.col1 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
3388
4389
462

query I rowsort
SELECT ALL - cor0.col2 + 89 FROM tab1 AS cor0 GROUP BY col2
----
18
44
81

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT - 55 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-55

query I rowsort
SELECT ( col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + 32 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
32
32
32

query I rowsort
SELECT - 78 FROM tab2 cor0 GROUP BY cor0.col1
----
-78
-78
-78

query I rowsort
SELECT ALL - ( cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 88 AS col2 FROM tab0 GROUP BY tab0.col2
----
88

query I rowsort
SELECT - 36 AS col2 FROM tab1 GROUP BY col0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT 77 * - 90 FROM tab0 GROUP BY col2
----
-6930

query I rowsort
SELECT - 11 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT ALL - 39 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-39
-39
-39

query I rowsort
SELECT DISTINCT + 24 AS col1 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
24

query I rowsort
SELECT DISTINCT + cor0.col1 * + 32 * + 61 FROM tab1 AS cor0 GROUP BY cor0.col1
----
111264
11712
85888

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) * 86 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
3526
5074
5246

query I rowsort
SELECT cor1.col2 * 92 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
4140
6532
736

query I rowsort
SELECT ALL - 62 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT cor0.col2 * 70 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1680
2660
5530

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 29 - + 21 FROM tab0 GROUP BY tab0.col0
----
8
8
8

query I rowsort
SELECT + 97 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
10
18
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * cor0.col1 col0 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 + col2 * + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
160
2121
5137

query I rowsort
SELECT + 54 * cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
2430
3834
432

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT + 7 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 78 FROM tab0 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT + 3 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
3
3

query I rowsort
SELECT ALL - 45 * 71 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3195
-3195
-3195

query I rowsort
SELECT 16 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
16
16
16

query I rowsort
SELECT DISTINCT - 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14

query I rowsort
SELECT cor0.col2 + 65 FROM tab1 AS cor0 GROUP BY cor0.col2
----
110
136
73

query I rowsort
SELECT DISTINCT - 83 AS col1 FROM tab2 GROUP BY tab2.col2
----
-83

query I rowsort
SELECT + - 52 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-52
-52
-52

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY col2, col2, cor0.col0
----
24
38
79

query I rowsort
SELECT - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-3323
SELECT cor0.col2 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-3323
SELECT cor0.col2 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
0
0
3

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT 22 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
22
22
22

query I rowsort
SELECT ( cor0.col2 ) * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL 67 AS col2 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
67
67
67

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - - 4 AS col0 FROM tab0 GROUP BY tab0.col2
----
4

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col2 * 97 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-5626
-7663
-8439

query I rowsort
SELECT ALL cor0.col2 * col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 43 FROM tab0 cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 33 + col1 FROM tab1 cor0 GROUP BY cor0.col1
----
39
77
90

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT tab1.col1 + ( tab1.col1 ) AS col2 FROM tab1, tab2 cor0 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT ALL - 60 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-60
-60
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 55 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-55
-55
-55

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col0 * 81 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
1782
2268
6642

query I rowsort
SELECT 91 + - 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT + ( cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 94 FROM tab1 cor0 GROUP BY cor0.col0
----
94
94
94

query I rowsort
SELECT - 92 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-92
-92
-92

query I rowsort
SELECT DISTINCT ( cor0.col2 + col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3356
SELECT + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3356
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT 21 FROM tab1 AS cor0 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT ALL - 41 * + 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-984
-984

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 87 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + - 43 * 21 FROM tab0 GROUP BY col2
----
-903
-903
-903

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + + 96 AS col1 FROM tab1 GROUP BY tab1.col0
----
96
96
96

query I rowsort
SELECT ALL 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT ALL + 63 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2583
3717
3843

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3369
SELECT ALL - CAST( 13 AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

skipif mysql # not compatible
query I rowsort label-3369
SELECT ALL - CAST ( 13 AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13
-13
-13

query I rowsort
SELECT ALL - 98 * - cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
4410
6958
784

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col0
----
45
71
8

query I rowsort
SELECT - 90 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-90
-90
-90

query I rowsort
SELECT ALL + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 19 FROM tab0 AS cor0 GROUP BY col2
----
-19
-19
-19

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL ( - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT 19 FROM tab1 AS cor0 GROUP BY col1
----
19
19
19

query I rowsort
SELECT ALL 45 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * 36 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1476
2124
2196

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT cor0.col2 + - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + col1 AS col0 FROM tab0 cor0 GROUP BY col1, col1
----
0
81

query I rowsort
SELECT + col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL - - 25 FROM tab0 GROUP BY col2
----
25
25
25

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT + 78 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
78
78
78

query I rowsort
SELECT ALL + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL 72 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
163
164
87

query I rowsort
SELECT - 70 * tab2.col1 + 68 * + col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
89
89

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-40
-40
-40

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT + 16 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
16
16
16

query I rowsort
SELECT + 55 FROM tab2 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT + 65 FROM tab1 cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT ALL ( cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
44
44

query I rowsort
SELECT - 2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

query I rowsort
SELECT col1 * 75 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6075

query I rowsort
SELECT ALL + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT - cor0.col2 + 45 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-34
21
7

query I rowsort
SELECT + 48 FROM tab2 AS cor0 GROUP BY cor0.col1
----
48
48
48

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3417
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3417
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 11 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT - 76 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3420
SELECT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3420
SELECT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 21 * 80 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
1680

query I rowsort
SELECT DISTINCT ( - 93 * + cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3813
-5487
-5673

query I rowsort
SELECT DISTINCT 70 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
70

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY col1, cor0.col0, cor0.col2
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT 50 FROM tab2 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT 48 FROM tab0 AS cor0 GROUP BY cor0.col1
----
48
48

query I rowsort
SELECT 89 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5162
7031
7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 84 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-84

query I rowsort
SELECT + 16 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
16
16
16

query I rowsort
SELECT ALL - + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ALL 27 FROM tab2 cor0 GROUP BY col0
----
27
27
27

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-3435
SELECT ALL cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3435
SELECT ALL cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - 72 FROM tab1 GROUP BY tab1.col1
----
-72

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - cor0.col1 * - 14 + 48 FROM tab0 AS cor0 GROUP BY col1
----
1182
48

query I rowsort
SELECT DISTINCT + 48 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
48

query I rowsort
SELECT 96 + - 68 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
28
28
28

query I rowsort
SELECT 9 - 72 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-63
-63
-63

query I rowsort
SELECT 58 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
58
58
58

query I rowsort
SELECT cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - + ( col1 ) FROM tab2 GROUP BY col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT 63 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
63
63
63

query I rowsort
SELECT 86 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
86
86

query I rowsort
SELECT + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 6 * cor0.col0 + cor0.col0 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
-130
-215
-415

query I rowsort
SELECT DISTINCT 64 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT DISTINCT cor0.col1 * 75 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3300
4275
450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - 13 AS col2 FROM tab0 GROUP BY col0
----
-13
-13
-13

query I rowsort
SELECT + 6 FROM tab1 GROUP BY col1
----
6
6
6

query I rowsort
SELECT DISTINCT 95 FROM tab0 AS cor0 GROUP BY col0
----
95

query I rowsort
SELECT + 0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + 73 FROM tab0 cor0 GROUP BY cor0.col1
----
73

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3461
SELECT - CAST( NULL AS SIGNED ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3461
SELECT - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT 77 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - - cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT - col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-3468
SELECT ALL - cor0.col2 DIV 80 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3468
SELECT ALL - cor0.col2 / 80 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT DISTINCT 23 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2093
2116
345

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + 25 AS col1 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT + 50 FROM tab2 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT ALL - cor0.col2 - 40 * 68 FROM tab1 AS cor0 GROUP BY col2
----
-2728
-2765
-2791

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col2 FROM tab1, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 15 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 61 * cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1, col2
----
-2684
-3477
-366

query I rowsort
SELECT DISTINCT cor0.col2 + + 1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59
80
88

query I rowsort
SELECT - 95 AS col2 FROM tab2 GROUP BY col0
----
-95
-95
-95

query I rowsort
SELECT cor0.col2 + + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL - 32 AS col0 FROM tab1 GROUP BY tab1.col0
----
-32
-32
-32

query I rowsort
SELECT - 5 + + tab0.col0 * - ( - col0 ) FROM tab0 GROUP BY tab0.col0
----
1844
671
6884

query I rowsort
SELECT 88 + 72 AS col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
160
160

query I rowsort
SELECT DISTINCT 24 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
24

query I rowsort
SELECT + ( + cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3490
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3490
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT 17 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT - 4 FROM tab2 cor0 GROUP BY cor0.col2
----
-4

query I rowsort
SELECT + 67 FROM tab1 AS cor0 GROUP BY cor0.col2
----
67
67
67

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT 26 AS col1 FROM tab1 GROUP BY tab1.col0
----
26
26
26

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

onlyif mysql # DIV for integer division: 
query I rowsort label-3502
SELECT ALL cor0.col0 DIV - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3502
SELECT ALL cor0.col0 / - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ( - 75 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-75
-75
-75

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 17 + + col2 col1 FROM tab1 GROUP BY tab1.col2
----
25
62
88

query I rowsort
SELECT ALL col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT + 16 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT + col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 60 FROM tab1 cor0 GROUP BY cor0.col0
----
60
60
60

query I rowsort
SELECT DISTINCT - cor0.col2 * - 65 FROM tab1 AS cor0 GROUP BY col2
----
2925
4615
520

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3512
SELECT DISTINCT - tab1.col2 * + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY col2
----
NULL

skipif mysql # not compatible
query I rowsort label-3512
SELECT DISTINCT - tab1.col2 * + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY col2
----
NULL

query I rowsort
SELECT DISTINCT 49 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + tab1.col1 - + tab1.col1 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab0 GROUP BY col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT col2 * - col2 AS col0 FROM tab0 GROUP BY col2
----
-1444
-576
-6241

query I rowsort
SELECT + 78 FROM tab0 AS cor0 GROUP BY cor0.col1
----
78
78

query I rowsort
SELECT 88 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT col1 + - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
0

query I rowsort
SELECT + tab2.col0 + col0 AS col0 FROM tab2 GROUP BY col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-58
-79
-87

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-3527
SELECT col2 DIV col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3527
SELECT col2 / col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT 68 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1496
1904
5576

query I rowsort
SELECT - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT ALL 46 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
104
125
133

query I rowsort
SELECT DISTINCT - ( col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 46 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT 15 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query III rowsort
SELECT DISTINCT * FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
9 values hashing to 8cac454cf7c3f07ac90f79daddc839ae

query I rowsort
SELECT ALL + col2 FROM tab2 AS cor0 GROUP BY col1, col2
----
58
79
87

query I rowsort
SELECT 14 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
14
14
14

query I rowsort
SELECT - 29 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-29
-29
-29

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL + 73 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT 61 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1586
2623
5063

query I rowsort
SELECT ALL - 87 * - cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
5046
6873
7569

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT - col2 AS col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3546
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3546
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col2 * 58 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-2610
-4118
-464

query I rowsort
SELECT + + 9 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
9
9
9

query I rowsort
SELECT 12 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
12
12
12

query I rowsort
SELECT ALL + 91 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
91
91
91

query I rowsort
SELECT ( + 96 ) * + cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
1440
8736
8832

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
-81
0
0

query I rowsort
SELECT - 38 * ( cor0.col2 ) AS col2 FROM tab0 cor0 GROUP BY cor0.col2, col0
----
-1444
-3002
-912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 67 * - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1474
-1876
-5494

query I rowsort
SELECT 84 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
84
84
84

query I rowsort
SELECT ( + 4 ) FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
4
4
4

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT 43 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
43
43
43

query I rowsort
SELECT ALL 53 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
135
75
81

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
41
59
61

query I rowsort
SELECT 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT - 77 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-62
14
15

query I rowsort
SELECT - 5 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5
-5
-5

query I rowsort
SELECT ALL + 50 FROM tab2 AS cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT ALL 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 61 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
61
61
61

query I rowsort
SELECT DISTINCT 56 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
56

query I rowsort
SELECT DISTINCT - 5 AS col2 FROM tab2 GROUP BY tab2.col0
----
-5

query I rowsort
SELECT DISTINCT - 48 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-48

query I rowsort
SELECT - cor0.col0 + 67 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-24
-25
52

query I rowsort
SELECT 47 FROM tab0 AS cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT + 22 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1254
132
968

query I rowsort
SELECT cor0.col1 * 19 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1083
114
836

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT 8 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
8
8
8

query I rowsort
SELECT ALL 89 AS col1 FROM tab2 GROUP BY tab2.col0
----
89
89
89

query I rowsort
SELECT DISTINCT 13 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
533
767
793

query I rowsort
SELECT - col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4
-4
-4

query I rowsort
SELECT + 5 FROM tab0 GROUP BY tab0.col0
----
5
5
5

query I rowsort
SELECT 14 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + tab2.col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 15 FROM tab2 AS cor0 GROUP BY cor0.col2
----
15
15
15

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3589
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3589
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 0 col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3591
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3591
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT + 23 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
23
23
23

query I rowsort
SELECT cor0.col2 + 57 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-3248
-4424
-4872

query I rowsort
SELECT - 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 53 FROM tab1 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - ( - cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 82 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
82

query I rowsort
SELECT - + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 30 FROM tab1 GROUP BY col2
----
30

query I rowsort
SELECT - 98 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-98
-98
-98

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT - 82 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-82
-82
-82

query I rowsort
SELECT 91 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
91
91
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3615
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-3615
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 61 FROM tab1 cor0 GROUP BY cor0.col1
----
-61
-61
-61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3617
SELECT ALL CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-3617
SELECT ALL CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-114
-12
-88

query I rowsort
SELECT 5 FROM tab0 cor0 GROUP BY cor0.col1
----
5
5

query I rowsort
SELECT ALL + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
1
1

query I rowsort
SELECT col2 + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
-44
-57
-6

query I rowsort
SELECT ALL + col2 * 19 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1160
1580
1740

query I rowsort
SELECT ALL - - tab0.col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-3627
SELECT + col2 * col2 DIV 52 AS col2 FROM tab0 cor0 GROUP BY col2
----
11
120
27

skipif mysql # not compatible
query I rowsort label-3627
SELECT + col2 * col2 / 52 AS col2 FROM tab0 cor0 GROUP BY col2
----
11
120
27

query I rowsort
SELECT ALL + 24 FROM tab2 AS cor0 GROUP BY cor0.col2
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 39 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

query I rowsort
SELECT + 99 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 25 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
25
25
25

query I rowsort
SELECT DISTINCT - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 36 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1548
-2988
-936

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

query I rowsort
SELECT DISTINCT - col1 FROM tab1 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 18 FROM tab2 GROUP BY tab2.col1
----
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT - 89 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-10
-2
-31

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT + 88 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL 30 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT + 18 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
18
18

query I rowsort
SELECT - 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-43
-43
-43

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 ( - cor0.col2 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-24
-38
-79

query I rowsort
SELECT 12 FROM tab1 AS cor0 GROUP BY cor0.col1
----
12
12
12

query I rowsort
SELECT + 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96
96
96

query I rowsort
SELECT 84 FROM tab0 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT cor0.col0 + - 39 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-24
52
53

query I rowsort
SELECT + - col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 87 AS col0 FROM tab0 GROUP BY tab0.col2
----
87
87
87

query I rowsort
SELECT ALL + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT + col2 + 44 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
123
68
82

query I rowsort
SELECT ALL + 26 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col0 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 75 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3075
4425
4575

query I rowsort
SELECT ALL + 37 FROM tab2 cor0 GROUP BY col0
----
37
37
37

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col0 ) * 13 col0 FROM tab1 AS cor0 GROUP BY col0
----
1066
286
364

query I rowsort
SELECT - ( cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
14

onlyif mysql # DIV for integer division: 
query I rowsort label-3676
SELECT - cor0.col1 DIV + 53 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3676
SELECT - cor0.col1 / + 53 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1
0
0

query I rowsort
SELECT DISTINCT + ( + 1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

query I rowsort
SELECT ( - 93 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT ALL - - 99 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL + ( - tab0.col0 ) FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 39 AS col2 FROM tab2 GROUP BY tab2.col1
----
39
39
39

query I rowsort
SELECT + + 12 * 13 FROM tab1, tab2 AS cor0, tab0 AS cor1 GROUP BY tab1.col1
----
156
156
156

query I rowsort
SELECT DISTINCT 45 FROM tab0 AS cor0 GROUP BY cor0.col1
----
45

query I rowsort
SELECT - 40 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-40
-40
-40

query I rowsort
SELECT ALL + - 38 * cor0.col0 AS col1 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
-3458
-3496
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 97 * - tab0.col1 col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
0
7857

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT ALL + 53 + + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
135
75
81

query I rowsort
SELECT 10 FROM tab1 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT ALL + col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT 78 FROM tab0 AS cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT - 4 * 71 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-284
-284
-284

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3700
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3700
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 50 * - tab0.col0 AS col2 FROM tab0 GROUP BY col0
----
-1300
-2150
-4150

query I rowsort
SELECT 78 FROM tab0 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
97

query I rowsort
SELECT DISTINCT - 51 * 15 AS col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-765

query I rowsort
SELECT ALL + - 83 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
-83
-83
-83

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
----
26
43
83

query I rowsort
SELECT - 68 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-68
-68
-68

query I rowsort
SELECT ( - cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - ( + col1 ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3710
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-3710
SELECT DISTINCT CAST ( NULL AS REAL ) AS col0 FROM tab1 GROUP BY tab1.col0
----
NULL

query I rowsort
SELECT DISTINCT - - 57 FROM tab0 GROUP BY tab0.col2
----
57

query I rowsort
SELECT ALL - 18 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-109
-110
-33

query I rowsort
SELECT DISTINCT - + tab2.col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT ( cor0.col0 ) * + 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
264
336
984

query I rowsort
SELECT ALL - ( - 79 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
79
79
79

query I rowsort
SELECT DISTINCT 22 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
28
66
79

query I rowsort
SELECT ALL 74 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT + 91 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
91
91
91

query I rowsort
SELECT DISTINCT 15 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
15

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ( cor0.col1 ) + 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
77
95
97

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT + cor0.col1 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-16
-38
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT - tab0.col0 AS col1 FROM tab0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col1 * 89 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
3916
5073
534

query I rowsort
SELECT cor0.col0 * 61 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
5551
5612
915

query I rowsort
SELECT DISTINCT 90 FROM tab0 AS cor0 GROUP BY cor0.col2
----
90

query I rowsort
SELECT + 14 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
14
14
14

query I rowsort
SELECT ( cor0.col2 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 col0 FROM tab1 GROUP BY tab1.col1
----
59
59
59

query I rowsort
SELECT + 10 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
10
10
10

query I rowsort
SELECT 58 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
1
14
52

query I rowsort
SELECT DISTINCT ( 10 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
10

query I rowsort
SELECT ALL - 18 AS col2 FROM tab1 GROUP BY tab1.col0
----
-18
-18
-18

query I rowsort
SELECT ALL tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - - col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 95 col2 FROM tab0 AS cor0 GROUP BY col0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-83
-83
-83

query I rowsort
SELECT ALL 91 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
91
91
91

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT + 22 FROM tab0 cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-3748
SELECT DISTINCT cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-3748
SELECT DISTINCT cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT 95 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 55 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-55

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + 8 * - cor0.col2 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-464
-632
-696

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
3483

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

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 ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-3762
SELECT ALL - cor0.col0 DIV - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3762
SELECT ALL - cor0.col0 / - col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-3763
SELECT + cor0.col0 DIV - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3763
SELECT + cor0.col0 / - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 73 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3767
SELECT ALL 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-3767
SELECT ALL CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 25 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-25
-25
-25

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
2025
5041
64

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
41
59
61

query I rowsort
SELECT - + 62 FROM tab0 GROUP BY tab0.col0
----
-62
-62
-62

query I rowsort
SELECT - 54 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT ALL 59 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 88 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
88

query I rowsort
SELECT 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
5
5

query I rowsort
SELECT - 64 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-64
-64
-64

query I rowsort
SELECT 42 + + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
123
42

query I rowsort
SELECT 85 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
85
85
85

query I rowsort
SELECT DISTINCT - 28 FROM tab2 GROUP BY tab2.col2
----
-28

query I rowsort
SELECT 12 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT ALL + 38 * 63 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
141246
146034
98154

query I rowsort
SELECT DISTINCT 70 FROM tab0 AS cor0 GROUP BY cor0.col2
----
70

query I rowsort
SELECT - 0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + 4 FROM tab0 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-3791
SELECT - + ( - cor0.col2 ) * 25 DIV 1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
1450
1975
2175

skipif mysql # not compatible
query I rowsort label-3791
SELECT - + ( - cor0.col2 ) * 25 / 1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
1450
1975
2175

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3792
SELECT + + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3792
SELECT + + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT col1 + + tab2.col1 * - 75 AS col2 FROM tab2 GROUP BY tab2.col1
----
-3034
-4366
-4514

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3797
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3797
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT ( 73 ) FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
73

query I rowsort
SELECT ALL - 20 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-20
-20
-20

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1
----
1681
3481
3721

query I rowsort
SELECT - 57 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-57
-57
-57

query I rowsort
SELECT + cor0.col0 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - + cor0.col2 + cor0.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 43 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT DISTINCT - 15 * 92 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1380

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 32 FROM tab0 AS cor0 GROUP BY cor0.col1
----
32
32

query I rowsort
SELECT ALL - 97 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 10 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
101
102
25

query I rowsort
SELECT ALL - cor0.col1 + - 6 FROM tab2 cor0 GROUP BY cor0.col1
----
-47
-65
-67

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

onlyif mysql # DIV for integer division: 
query I rowsort label-3815
SELECT ALL cor0.col1 DIV - col1 FROM tab1 cor0 GROUP BY col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3815
SELECT ALL cor0.col1 / - col1 FROM tab1 cor0 GROUP BY col1
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col1 + 45 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-14
-16
4

query I rowsort
SELECT 59 FROM tab1 cor0 GROUP BY cor0.col2
----
59
59
59

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3818
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3818
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 32 FROM tab0 AS cor0 GROUP BY cor0.col2
----
32

query I rowsort
SELECT 81 - tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
20
22
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 57 col2 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-57
-57
-57

query I rowsort
SELECT ALL 24 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
24
24

query I rowsort
SELECT ALL 78 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1170
7098
7176

query I rowsort
SELECT DISTINCT cor0.col2 + 43 FROM tab0 cor0 GROUP BY cor0.col2
----
122
67
81

query I rowsort
SELECT ALL + cor0.col2 * 48 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1152
1824
3792

query I rowsort
SELECT ALL - col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 63 FROM tab2 AS cor0 GROUP BY cor0.col1
----
63

query I rowsort
SELECT ALL - + 36 FROM tab2 GROUP BY col0
----
-36
-36
-36

query I rowsort
SELECT ALL + - 17 FROM tab2 GROUP BY tab2.col0
----
-17
-17
-17

query I rowsort
SELECT + 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
87
87

query I rowsort
SELECT - + cor0.col2 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - 64 + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-23
-3
-5

query I rowsort
SELECT ALL + 47 FROM tab2 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT ALL cor0.col1 - 59 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-18
0
2

query I rowsort
SELECT 49 FROM tab2 AS cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT DISTINCT + 53 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
53

query I rowsort
SELECT ALL 90 + + tab1.col1 * 70 FROM tab1 GROUP BY tab1.col1
----
3170
4080
510

query I rowsort
SELECT ALL + 29 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1682
2291
2523

query I rowsort
SELECT 65 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
2860
3705
390

query I rowsort
SELECT ALL + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
0
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.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - + cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 64 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-26
-40
15

query III rowsort
SELECT ALL * FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col2
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 56 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1344
2128
4424

query I rowsort
SELECT DISTINCT + col2 + + 67 FROM tab1 GROUP BY tab1.col2
----
112
138
75

onlyif mysql # DIV for integer division: 
query I rowsort label-3854
SELECT DISTINCT cor0.col0 DIV 80 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-3854
SELECT DISTINCT cor0.col0 / 80 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT ALL - 36 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-36
-36
-36

query I rowsort
SELECT ALL + 79 AS col0 FROM tab2 GROUP BY tab2.col1
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 39 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
39
39

query I rowsort
SELECT DISTINCT - 12 FROM tab0, tab1 cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-12

query I rowsort
SELECT ALL + col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
7
7
7

query I rowsort
SELECT ALL + 70 - - cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-414
-6654
-714

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + cor0.col2 * col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 33 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
33

query I rowsort
SELECT 69 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 95 FROM tab2 GROUP BY tab2.col2
----
95

query I rowsort
SELECT ALL 50 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT DISTINCT 81 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
81

query I rowsort
SELECT 35 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
35
35
35

query I rowsort
SELECT + 56 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
56
56
56

query I rowsort
SELECT + 91 FROM tab2 AS cor0 GROUP BY col2
----
91
91
91

query I rowsort
SELECT + 19 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
19
19

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-3876
SELECT - CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3876
SELECT - CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - 20 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-20
-20
-20

query I rowsort
SELECT ALL + 5 AS col2 FROM tab0 GROUP BY tab0.col2
----
5
5
5

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 86 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
86

query I rowsort
SELECT DISTINCT - 60 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-60

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
1444
576
6241

query I rowsort
SELECT DISTINCT + 56 FROM tab1 GROUP BY tab1.col0
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
105
121
67

query I rowsort
SELECT ALL 56 FROM tab0 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT - 46 FROM tab1 cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT ALL - cor0.col0 * col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - ( 89 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-89

query I rowsort
SELECT DISTINCT - 0 * - 75 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT ALL + + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 42 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 14 FROM tab2 AS cor0 GROUP BY col0
----
14

query I rowsort
SELECT 85 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - - 72 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
72
72
72

query III rowsort
SELECT * FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
9 values hashing to bbcd4a6dd8965cff3d718a5b7154e488

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 * + 76 col2 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
1824
2888
6004

query I rowsort
SELECT ALL 11 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT ALL 38 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1672
2166
228

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT 76 FROM tab1 AS cor0 GROUP BY cor0.col1
----
76
76
76

query I rowsort
SELECT DISTINCT 31 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
31

query I rowsort
SELECT ALL 52 FROM tab0 GROUP BY col2
----
52
52
52

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-3912
SELECT + CAST( - 96 AS SIGNED ) FROM tab0 GROUP BY tab0.col2
----
-96
-96
-96

skipif mysql # not compatible
query I rowsort label-3912
SELECT + CAST ( - 96 AS INTEGER ) FROM tab0 GROUP BY tab0.col2
----
-96
-96
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
27

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + cor0.col1 + - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL col2 + + ( 22 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
101
46
60

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT ALL 30 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
30
30
30

query I rowsort
SELECT 15 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
15
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT - 78 FROM tab2 cor0 GROUP BY cor0.col0
----
-78
-78
-78

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT + 92 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2392
3956
7636

query I rowsort
SELECT ALL - - ( col0 ) FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + 42 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT DISTINCT + 71 FROM tab0 AS cor0 GROUP BY cor0.col1
----
71

query I rowsort
SELECT ALL 3 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT - cor0.col1 + + 20 * 29 AS col1 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
519
521
539

query I rowsort
SELECT DISTINCT - + 80 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
-80

query I rowsort
SELECT DISTINCT 60 FROM tab0 AS cor0 GROUP BY col1
----
60

query I rowsort
SELECT cor0.col2 + - 53 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-8
18

query I rowsort
SELECT - 31 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - 70 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-70

query I rowsort
SELECT + 91 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
91
91

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY col2, cor0.col1, col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query III rowsort
SELECT * FROM tab0 AS cor0 GROUP BY col2, col1, cor0.col0
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT + 26 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
26
26
26

query I rowsort
SELECT DISTINCT - 42 FROM tab0 AS cor0 GROUP BY col1
----
-42

query I rowsort
SELECT ALL cor0.col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col2 * + 42 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1890
2982
336

query I rowsort
SELECT DISTINCT cor0.col1 + - 54 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-54
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT ( 93 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
93

query I rowsort
SELECT - ( 61 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT DISTINCT 77 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
77

query I rowsort
SELECT + col2 + - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 76 FROM tab2 AS cor0 GROUP BY col0
----
76
76
76

query I rowsort
SELECT ALL 60 * cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1560
2580
4980

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + 12 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12

query I rowsort
SELECT + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + - cor0.col0 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + ( 10 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT ALL 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT 21 FROM tab0 AS cor0 GROUP BY cor0.col1
----
21
21

query I rowsort
SELECT DISTINCT 90 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
90

query I rowsort
SELECT cor0.col1 + - 96 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3895
-5605
-5795

query I rowsort
SELECT DISTINCT + ( + col0 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 22 AS col0 FROM tab2 GROUP BY tab2.col0
----
-22

query I rowsort
SELECT + 79 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
79
79
79

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
22
28
82

query I rowsort
SELECT 45 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT 55 FROM tab1 AS cor0 GROUP BY cor0.col1
----
55
55
55

onlyif mysql # DIV for integer division: 
query I rowsort label-3968
SELECT + cor0.col0 DIV - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3968
SELECT + cor0.col0 / - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT 93 FROM tab2 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL cor0.col0 * + cor0.col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT ALL + 79 + tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
170
171
94

query I rowsort
SELECT DISTINCT - 7 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

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 ALL 81 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
81
81
81

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT + cor0.col0 - cor0.col0 * + 35 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1462
-2822
-884

query I rowsort
SELECT DISTINCT - cor0.col1 * + 8 FROM tab0 AS cor0 GROUP BY col1
----
-648
0

query I rowsort
SELECT ALL tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT + 19 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
19
19
19

query I rowsort
SELECT DISTINCT - - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - - tab0.col2 * col2 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1482
600
6320

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL ( ( - cor0.col1 ) ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 8 FROM tab1 AS cor0 GROUP BY cor0.col0
----
8
8
8

query I rowsort
SELECT - 2 + 45 AS col1 FROM tab1 GROUP BY tab1.col0
----
43
43
43

query I rowsort
SELECT + 74 * + cor0.col0 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
1924
3182
6142

query I rowsort
SELECT + 4 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
4
4

query I rowsort
SELECT ALL 79 FROM tab1 cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT ALL 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT ALL cor0.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 25 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-25
-25
-25

query I rowsort
SELECT 14 * + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
1162
364
602

query I rowsort
SELECT DISTINCT - - 10 FROM tab1, tab2 cor0, tab1 AS cor1 GROUP BY tab1.col1
----
10

query I rowsort
SELECT + 16 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
16
16

query I rowsort
SELECT ALL - 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - cor0.col1 ) col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57
57
57

query I rowsort
SELECT - cor0.col0 * - 6 FROM tab0 AS cor0 GROUP BY cor0.col0
----
156
258
498

query I rowsort
SELECT DISTINCT + 97 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
97

query I rowsort
SELECT + cor0.col1 * 67 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5427

query I rowsort
SELECT ALL 34 * cor0.col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
1462
2822
884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 68 col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
68
68
68

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 39 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
39

query I rowsort
SELECT ALL 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT + 85 + + col1 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1766
3566
3806

query I rowsort
SELECT 6 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
6
6
6

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 79 * cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
13904
459938
99540

query I rowsort
SELECT ALL - 93 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 41 + col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
-33
30
4

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT cor0.col0 * + 15 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
1230
330
420

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4026
SELECT + CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4026
SELECT + CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - - 76 + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
100
114
155

query I rowsort
SELECT DISTINCT - 34 FROM tab0 AS cor0 GROUP BY col2
----
-34

query I rowsort
SELECT cor0.col2 * 0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 * + 15 FROM tab0 cor0 GROUP BY cor0.col2
----
-1185
-360
-570

query I rowsort
SELECT DISTINCT 12 FROM tab0 AS cor0 GROUP BY col0
----
12

query I rowsort
SELECT col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - 93 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT + 28 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 93 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 * - cor0.col2 + + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
114
237
72

query I rowsort
SELECT ALL - 99 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-99
-99
-99

onlyif mysql # DIV for integer division: 
query I rowsort label-4042
SELECT DISTINCT + 15 + - 9 DIV cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
15

skipif mysql # not compatible
query I rowsort label-4042
SELECT DISTINCT + 15 + - 9 / cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col0 * - 61 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1342
-1708
-5002

query I rowsort
SELECT DISTINCT + 46 FROM tab0 AS cor0 GROUP BY cor0.col2
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 23 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT + - cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4050
SELECT ALL ( col1 ) DIV 12 FROM tab1 GROUP BY tab1.col1
----
0
3
4

skipif mysql # not compatible
query I rowsort label-4050
SELECT ALL ( col1 ) / 12 FROM tab1 GROUP BY tab1.col1
----
0
3
4

query I rowsort
SELECT - col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 22 * cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1276
1738
1914

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT col0 * 88 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1936
2464
7216

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT 75 + - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6
75

query I rowsort
SELECT - 69 - - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-69
12

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - 28 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-28
-28
-28

query I rowsort
SELECT ALL 52 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2132
3068
3172

query I rowsort
SELECT ALL - 18 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT + cor0.col1 * + 16 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
1296

query I rowsort
SELECT + cor0.col1 - - ( 84 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
125
143
145

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + + 26 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
34
71
97

query I rowsort
SELECT cor0.col2 * cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
13824
493039
54872

query I rowsort
SELECT DISTINCT + 16 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
16

query I rowsort
SELECT DISTINCT 85 FROM tab2 AS cor0 GROUP BY cor0.col2
----
85

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT ( + cor0.col2 ) * + 68 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
3060
4828
544

query I rowsort
SELECT ALL 36 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
36
36

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL + 34 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
34
34
34

query I rowsort
SELECT DISTINCT + 33 * 76 AS col2 FROM tab2 GROUP BY tab2.col0
----
2508

query I rowsort
SELECT DISTINCT 37 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
37

query I rowsort
SELECT 22 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT - tab2.col1 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ( - tab0.col1 ) AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT 8 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 40 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL - - 8 * cor0.col1 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
328
472
488

query I rowsort
SELECT - 5 FROM tab1 cor0 GROUP BY cor0.col1
----
-5
-5
-5

query I rowsort
SELECT 1 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT ALL + cor0.col0 - - 26 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
108
48
54

query III rowsort
SELECT ALL * FROM tab0 AS cor0 GROUP BY col0, cor0.col1, cor0.col2
----
9 values hashing to 8ad40ad40eb1e471572580fddc8d2aaf

query I rowsort
SELECT - 98 AS col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-98
-98
-98

query I rowsort
SELECT 27 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
27
27

query I rowsort
SELECT DISTINCT + ( - cor0.col2 * - 60 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
1440
2280
4740

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
92

query I rowsort
SELECT DISTINCT + 56 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
56

query I rowsort
SELECT ALL + tab0.col0 + + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
59

onlyif mysql # DIV for integer division: 
query I rowsort label-4099
SELECT ALL 91 DIV cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-4099
SELECT ALL 91 / cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
2

query I rowsort
SELECT + 24 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1080
1704
192

query I rowsort
SELECT DISTINCT - col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + ( + col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 92 + cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
116
130
171

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab1 cor0 GROUP BY col0, cor0.col1, cor0.col1
----
484
6724
784

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 90 FROM tab2 cor0 GROUP BY col1
----
90
90
90

query I rowsort
SELECT DISTINCT + col2 * - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + 18 FROM tab2 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT - cor0.col2 + 26 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-19
-45
18

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + - col1 FROM tab0 GROUP BY col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 36 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
36
36
36

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 + ( cor0.col1 ) * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - 69 + - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-112
-152
-95

query I rowsort
SELECT - 57 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1482
-2451
-4731

query I rowsort
SELECT cor0.col0 * col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT - cor0.col0 + + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-12
-34
72

query I rowsort
SELECT DISTINCT + - col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT + 99 * cor0.col1 * - 83 + 17 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-361531
-468352
-49285

query I rowsort
SELECT ALL - 9 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-216
-342
-711

query I rowsort
SELECT DISTINCT + 96 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96

query I rowsort
SELECT ALL - 42 * 91 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-3822
-3822
-3822

onlyif mysql # DIV for integer division: 
query I rowsort label-4128
SELECT - cor0.col2 DIV cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4128
SELECT - cor0.col2 / cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 63 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
63
63
63

query I rowsort
SELECT ALL ( cor0.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 cor0.col0 + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-50
-50

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
24
38
79

query I rowsort
SELECT 54 FROM tab2 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 40 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT 63 FROM tab0 cor0 GROUP BY cor0.col1
----
63
63

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
64

query I rowsort
SELECT ALL - 77 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-77
-77
-77

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0 cor0 GROUP BY col2, cor0.col2
----
24
38
79

query I rowsort
SELECT + 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
36
36
36

onlyif mysql # DIV for integer division: 
query I rowsort label-4147
SELECT 33 DIV - 59 col1 FROM tab0 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-4147
SELECT 33 / - 59 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - 21 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-21
-21
-21

query I rowsort
SELECT ALL - 32 * - 38 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1216
1216
1216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 37 + 98 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
135
135
135

query I rowsort
SELECT + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

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
----
0
81

query I rowsort
SELECT DISTINCT - 97 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-97

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + cor0.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 + 25 col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
25
25
25

query I rowsort
SELECT ( - 92 ) + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-107
-183
-184

query I rowsort
SELECT DISTINCT - 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-56

query I rowsort
SELECT + col0 + - cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY col0
----
-462
-6642
-756

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + - 45 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-45
-45
-45

query I rowsort
SELECT ALL + 99 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT ALL 93 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 65 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 1 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - ( cor0.col2 ) FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 3 FROM tab1 cor0 GROUP BY cor0.col1
----
3

query I rowsort
SELECT cor0.col2 * + ( cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 40 AS col0 FROM tab1, tab0 cor0, tab0 AS cor1 GROUP BY cor0.col2
----
40
40
40

onlyif mysql # DIV for integer division: 
query I rowsort label-4175
SELECT ALL 6 DIV 32 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4175
SELECT ALL 6 / 32 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT + + col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + 19 FROM tab2 AS cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT ( - 76 ) FROM tab1 GROUP BY tab1.col2
----
-76
-76
-76

query I rowsort
SELECT DISTINCT 39 FROM tab2 AS cor0 GROUP BY cor0.col0
----
39

query I rowsort
SELECT - ( 72 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT ( 30 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
30

query I rowsort
SELECT col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - ( cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + + cor0.col2 + cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT ALL - + 4 AS col0 FROM tab2 GROUP BY col2
----
-4
-4
-4

query I rowsort
SELECT - - 11 FROM tab1 GROUP BY tab1.col0
----
11
11
11

query I rowsort
SELECT + 64 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT 42 AS col1 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
42
42
42

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col0 - - 54 FROM tab1 cor0 GROUP BY cor0.col0
----
136
76
82

query I rowsort
SELECT col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT DISTINCT 98 FROM tab1 AS cor0 GROUP BY cor0.col1
----
98

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
86

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col0, cor0.col0 ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1 GROUP BY tab1.col1
----
2844
2882
2895

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, - cor0.col2 ) * - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
0
0
6561

query I rowsort
SELECT + cor0.col2 + COALESCE ( - cor0.col2, - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT cor0.col1 - + cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
-1892
-30
-3192

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT col0 AS col2 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT tab2.col0 AS col1 FROM tab2 WHERE + tab2.col2 IS NOT NULL GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT NULL IS NOT NULL
----
15
91
92

query I rowsort
SELECT DISTINCT - col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT + col1 + + col1 FROM tab2 GROUP BY tab2.col1 HAVING NOT NULL IS NOT NULL
----
118
122
82

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 AS col2 FROM tab1 AS cor0 WHERE NOT ( NULL ) IN ( cor0.col1 ) GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NULL
----
-41
-59
-61

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
484
6724
784

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL CASE - cor0.col1 WHEN + cor0.col2 THEN 63 END + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 + + CASE + cor0.col1 WHEN cor0.col1 THEN NULL WHEN cor0.col1 THEN 37 END FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab0 GROUP BY col1 HAVING NOT ( NULL ) IS NULL
----

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4217
SELECT DISTINCT + ( + CASE + 64 WHEN cor0.col0 THEN NULL WHEN 77 THEN cor0.col2 END * cor0.col0 ) + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col0
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-4217
SELECT DISTINCT + ( + CASE + 64 WHEN cor0.col0 THEN NULL WHEN 77 THEN cor0.col2 END * cor0.col0 ) + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col0
----
NULL

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 ALL - CASE col0 WHEN 57 THEN cor0.col2 END * - 23 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab0, tab2 AS cor0 WHERE NOT NULL IS NOT NULL GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT + CASE - 37 WHEN + cor0.col1 THEN - NULLIF ( + 2, cor0.col1 ) ELSE NULL END * + 83 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1 GROUP BY col2 HAVING NULL IS NULL
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING ( NULL ) IS NULL
----
45
71
8

query I rowsort
SELECT tab1.col2 + + tab1.col2 AS col1 FROM tab1 GROUP BY col2 HAVING ( - col2 ) IS NOT NULL
----
142
16
90

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + CASE - cor0.col0 WHEN - cor0.col1 THEN - cor0.col0 WHEN + ( cor0.col0 ) THEN NULL ELSE - cor0.col1 END + col0 + - col0 * cor0.col0 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-13771
-346973
-488547

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col0 - - CASE + ( cor0.col2 ) WHEN - cor0.col2 THEN NULL WHEN 30 + - 10 THEN col0 WHEN cor0.col2 THEN NULL END AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * cor0.col0 + - CASE - cor0.col0 WHEN cor0.col0 * cor0.col0 THEN NULL WHEN + cor0.col0 THEN - cor0.col0 WHEN cor0.col0 THEN - col1 ELSE + cor0.col1 END - - col0 FROM tab1 AS cor0 GROUP BY col1, col0
----
500
6762
755

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - CASE - cor0.col2 WHEN + cor0.col0 THEN NULL WHEN - cor0.col0 THEN + cor0.col2 END + 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 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 + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1 HAVING NOT ( cor0.col1 ) IS NULL
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT + tab0.col0 + - col0 FROM tab0 WHERE NULL IS NULL GROUP BY tab0.col0
----
0
0
0

query I rowsort
SELECT col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL + CASE - cor0.col0 WHEN 17 THEN NULL ELSE cor0.col0 + - ( cor0.col1 ) END FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-29
16
38

query I rowsort
SELECT ALL col2 FROM tab2 WHERE tab2.col0 IS NULL GROUP BY tab2.col2
----

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
----

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 76 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 78 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78

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
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4249
SELECT cor0.col1 + CAST( - 16 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-16
65

skipif mysql # not compatible
query I rowsort label-4249
SELECT cor0.col1 + CAST ( - 16 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-16
65

query I rowsort
SELECT ALL + 28 - - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
111
54
71

query I rowsort
SELECT cor0.col2 + - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-12
2
27

query I rowsort
SELECT ALL + + cor0.col0 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - 42 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-42
-42
-42

query I rowsort
SELECT ALL - 25 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0, cor0.col1
----
-25
-25
-25

query I rowsort
SELECT cor0.col1 FROM tab0, tab2 cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NULL IS NOT NULL
----

onlyif mysql # DIV for integer division: 
query I rowsort label-4261
SELECT - 89 DIV - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14
2

skipif mysql # not compatible
query I rowsort label-4261
SELECT - 89 / - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
14
2

onlyif mysql # DIV for integer division: 
query I rowsort label-4262
SELECT DISTINCT - tab0.col0 DIV + col0 + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
25
42
82

skipif mysql # not compatible
query I rowsort label-4262
SELECT DISTINCT - tab0.col0 / + col0 + col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
25
42
82

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT DISTINCT 0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
0

query I rowsort
SELECT - 74 FROM tab1 GROUP BY tab1.col0
----
-74
-74
-74

query I rowsort
SELECT 38 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT + col2 + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT + col2 FROM tab0 GROUP BY col2 HAVING NOT NULL > NULL
----

query I rowsort
SELECT DISTINCT tab0.col1 + - tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT + cor0.col2 * cor0.col2 * - 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-226845
-2880
-91125

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 48 FROM tab0, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT + cor0.col0 * - 89 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-1335
-8099
-8188

query I rowsort
SELECT ALL + cor0.col1 - cor0.col1 * + 25 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
-1944
0

query I rowsort
SELECT ALL - cor0.col0 - + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
-164
-44
-56

query I rowsort
SELECT - cor0.col0 * + 88 FROM tab0 AS cor0 GROUP BY col0
----
-2288
-3784
-7304

query I rowsort
SELECT - - tab1.col1 * + col1 + - 23 FROM tab1 GROUP BY col1
----
13
1913
3226

query I rowsort
SELECT - CASE col1 WHEN + cor0.col1 THEN 48 ELSE - 0 END AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT DISTINCT CASE - cor0.col1 WHEN + cor0.col2 THEN + cor0.col2 ELSE 24 END + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
105
24

query I rowsort
SELECT + 14 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1134

query I rowsort
SELECT + 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT - ( 73 ) + + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
-73
8

query I rowsort
SELECT - + col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col1 FROM tab2, tab0 AS cor0, tab1 cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - 16 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2, cor0.col1
----
9 values hashing to be22ac76b42c6f7212ecc0ba7c89eb34

query I rowsort
SELECT + 87 FROM tab2 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT + 14 * 58 FROM tab1 AS cor0 GROUP BY cor0.col2
----
812
812
812

query I rowsort
SELECT - 36 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-36
-36
-36

query I rowsort
SELECT COALESCE ( + cor0.col2, cor0.col2 * cor0.col0, cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + ( - col1 ) * + cor0.col1 ) col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-4295
SELECT ALL - cor0.col0 DIV 2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-45
-46
-7

skipif mysql # not compatible
query I rowsort label-4295
SELECT ALL - cor0.col0 / 2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-45
-46
-7

query I rowsort
SELECT + cor0.col1 * + 86 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6966

query I rowsort
SELECT cor0.col2 + + 70 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
115
141
78

query I rowsort
SELECT + ( 8 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
8

query I rowsort
SELECT + cor0.col0 + - cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT + + 46 FROM tab1 GROUP BY col0
----
46

query I rowsort
SELECT ALL 52 AS col1 FROM tab0 cor0 GROUP BY col0
----
52
52
52

query I rowsort
SELECT ALL 98 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
98
98
98

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + - COALESCE ( 59, - cor0.col1 ) * 64 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
-3776
-3776
-3776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + tab2.col0 col0 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL cor0.col0 + + col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT col0 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-1260
-176
-5822

query I rowsort
SELECT col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
-45
-71
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 col2 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
-13
-13
-13

query I rowsort
SELECT + col2 + 88 * + 47 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
4160
4174
4215

query I rowsort
SELECT DISTINCT cor0.col1 * + 18 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1062
1098
738

query I rowsort
SELECT DISTINCT tab1.col1 - - tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NOT NULL
----
114
12
88

query I rowsort
SELECT ALL - 26 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1144
1482
156

query I rowsort
SELECT DISTINCT - 26 AS col0 FROM tab0, tab2 cor0 GROUP BY tab0.col0
----
-26

query I rowsort
SELECT DISTINCT - - 19 FROM tab2 GROUP BY col1
----
19

query I rowsort
SELECT DISTINCT 53 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
53

query I rowsort
SELECT + ( cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + 99 * - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-4059
-5841
-6039

query I rowsort
SELECT ALL + 46 AS col2 FROM tab1 GROUP BY tab1.col1
----
46
46
46

query I rowsort
SELECT ALL cor0.col2 + 90 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
114
128
169

query I rowsort
SELECT ALL cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col1 * - 91 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-7371
0

query I rowsort
SELECT DISTINCT + 92 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT + cor0.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 11 col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
11
11
11

query I rowsort
SELECT DISTINCT 65 - - 61 FROM tab2 AS cor0 GROUP BY cor0.col2
----
126

query I rowsort
SELECT - 29 + + 0 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-29
52

query I rowsort
SELECT DISTINCT - col1 - + 0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT - 12 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-540
-852
-96

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 * 84 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
162624
272916
3024

query I rowsort
SELECT DISTINCT + NULLIF ( - cor0.col2, - cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT DISTINCT 9 FROM tab0 AS cor0 GROUP BY cor0.col2
----
9

query I rowsort
SELECT 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT DISTINCT 63 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1386
-1764
-5166

query I rowsort
SELECT 90 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 84 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3696
4788
504

query I rowsort
SELECT ALL + + 28 FROM tab0 GROUP BY col2
----
28
28
28

query I rowsort
SELECT + NULLIF ( + 24, col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
24
24

query I rowsort
SELECT ALL - 0 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 33 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
124
125
48

query I rowsort
SELECT - + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT + 14 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 65 * + col2 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
2925
4615
520

query I rowsort
SELECT DISTINCT + tab1.col1 - 32 AS col0 FROM tab1 GROUP BY col1
----
-26
12
25

query I rowsort
SELECT - 24 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-24
-24
-24

query I rowsort
SELECT ALL - 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4358
SELECT ALL - CAST( NULL AS SIGNED ) * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4358
SELECT ALL - CAST ( NULL AS INTEGER ) * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
-15
-91
-92

query I rowsort
SELECT ALL 2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
2
2

query I rowsort
SELECT - 81 AS col1 FROM tab2 GROUP BY tab2.col1
----
-81
-81
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 44 * 68 col1 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
2992

query I rowsort
SELECT ALL + + cor0.col0 * 73 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
1606
2044
5986

query I rowsort
SELECT + cor0.col0 + cor0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT 60 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
60

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT 77 FROM tab1 cor0 GROUP BY cor0.col1
----
77
77
77

query I rowsort
SELECT DISTINCT - 29 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-29

onlyif mysql # DIV for integer division: 
query I rowsort label-4369
SELECT DISTINCT cor0.col0 DIV + cor0.col0 + col0 * 12 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
313
517
997

skipif mysql # not compatible
query I rowsort label-4369
SELECT DISTINCT cor0.col0 / + cor0.col0 + col0 * 12 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
313
517
997

query I rowsort
SELECT ALL 21 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
21
21
21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4371
SELECT CAST( 62 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62
62
62

skipif mysql # not compatible
query I rowsort label-4371
SELECT CAST ( 62 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT - 43 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-43
-43
-43

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
6561

query I rowsort
SELECT ALL cor0.col0 + col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
166
52
86

query I rowsort
SELECT + 96 FROM tab0 AS cor0 GROUP BY col1
----
96
96

query I rowsort
SELECT col2 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT ALL cor0.col1 + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
105
38
79

query I rowsort
SELECT 90 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
90
90
90

query I rowsort
SELECT DISTINCT - cor0.col1 * 72 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3168
-4104
-432

query I rowsort
SELECT DISTINCT 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
18

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + + cor0.col2 * + 9 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
216
342
711

query I rowsort
SELECT - 92 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-92
-92
-92

query I rowsort
SELECT DISTINCT 32 * - 64 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2048

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 40 + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
131
132
55

query I rowsort
SELECT DISTINCT + 80 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
80

query I rowsort
SELECT ( cor0.col2 ) * 13 FROM tab1 AS cor0 GROUP BY col2
----
104
585
923

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4391
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4391
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 54 - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor0.col2
----
-17
46
9

query I rowsort
SELECT cor0.col0 + + 48 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
212
92

query I rowsort
SELECT - - col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 35 * - 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
490
490

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 40 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-40
-40
-40

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 34 * + 20 FROM tab1 cor0 GROUP BY cor0.col0
----
680
680
680

query I rowsort
SELECT ALL COALESCE ( cor0.col2, + cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - + 67 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-67
-67
-67

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL - cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 WHERE NOT NULL IN ( cor0.col0 * cor0.col0 / - cor0.col2 ) GROUP BY cor0.col2
----

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 tab2.col2 col0 FROM tab2 AS cor0 CROSS JOIN tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 68 FROM tab2 AS cor0 GROUP BY cor0.col1
----
68

query I rowsort
SELECT ALL + 42 FROM tab2 AS cor0 GROUP BY cor0.col2
----
42
42
42

query I rowsort
SELECT ALL - + 80 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-80
-80
-80

onlyif mysql # DIV for integer division: 
query I rowsort label-4414
SELECT ALL + 7 DIV cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4414
SELECT ALL + 7 / cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 34 * cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1292
2686
816

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT - cor0.col0 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-11
-14
17

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4421
SELECT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4421
SELECT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4423
SELECT DISTINCT CAST( + 78 AS SIGNED ) AS col2 FROM tab1 cor0 GROUP BY col1
----
78

skipif mysql # not compatible
query I rowsort label-4423
SELECT DISTINCT CAST ( + 78 AS INTEGER ) AS col2 FROM tab1 cor0 GROUP BY col1
----
78

query I rowsort
SELECT ( + 74 ) FROM tab1 AS cor0 GROUP BY col2
----
74
74
74

query I rowsort
SELECT ALL 5 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
5
5

query I rowsort
SELECT ALL + 68 + col1 FROM tab0 cor0 GROUP BY cor0.col1
----
149
68

query I rowsort
SELECT ALL - 44 AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-44
-44

query I rowsort
SELECT - + 38 + - 10 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT DISTINCT col2 + 83 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
141
162
170

query I rowsort
SELECT cor0.col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT + 30 * 60 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
1800

query I rowsort
SELECT DISTINCT + + cor0.col0 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4433
SELECT ( 52 ) DIV cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4433
SELECT ( 52 ) / cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
2

query I rowsort
SELECT 37 FROM tab0 GROUP BY tab0.col2
----
37
37
37

query I rowsort
SELECT - - 95 FROM tab0 GROUP BY tab0.col2
----
95
95
95

query I rowsort
SELECT ALL + cor0.col1 + 12 AS col0 FROM tab1 cor0 GROUP BY col1
----
18
56
69

query I rowsort
SELECT - ( cor0.col1 ) + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 20 * 77 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
1540
1540
1540

query I rowsort
SELECT - 75 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT ALL + 91 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 30 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-30
-30

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-4444
SELECT - cor0.col1 DIV - cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4444
SELECT - cor0.col1 / - cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 2 + col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
60
81
89

onlyif mysql # DIV for integer division: 
query I rowsort label-4446
SELECT + col0 DIV + 93 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

skipif mysql # not compatible
query I rowsort label-4446
SELECT + col0 / + 93 + - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + + cor0.col0 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + - 14 FROM tab1 GROUP BY tab1.col0
----
-14
-14
-14

query I rowsort
SELECT - 24 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-24
-24
-24

query I rowsort
SELECT ALL 98 FROM tab0 cor0 GROUP BY cor0.col1
----
98
98

query I rowsort
SELECT 52 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
109
58
96

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col0 + 58 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
149
150
73

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, col1
----
-484
-6724
-784

query I rowsort
SELECT ALL - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT 95 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
95

query I rowsort
SELECT DISTINCT - 54 - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
-125
-62
-99

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + col2 AS col0 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 73 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
73

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NOT ( NULL ) IS NOT NULL
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 33 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-33
-33
-33

query I rowsort
SELECT ALL 54 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT ALL - 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + 18 + 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT DISTINCT 11 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col2 + - 31 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
27
48
56

query I rowsort
SELECT + 77 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
77
77

query I rowsort
SELECT ALL - - 91 * - 49 FROM tab2, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col1
----
-4459
-4459

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col1
----
9 values hashing to ad2e5fa6d094292bda21bf46c78171b8

query I rowsort
SELECT - cor0.col2 * 77 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-1848
-2926
-6083

query I rowsort
SELECT 53 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2332
-3021
-318

query I rowsort
SELECT ( 43 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43
43
43

query I rowsort
SELECT - cor0.col2 + - cor0.col2 * - ( col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
3306
6162
7482

query I rowsort
SELECT - 33 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-33
-33
-33

query I rowsort
SELECT - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
24
38
79

query I rowsort
SELECT - cor0.col2 * - col2 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
3306
6162
7482

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 70 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
70
70

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 6 * - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-156
-258
-498

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col2 + 38 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2, col1
----
2603
3162
86

query I rowsort
SELECT + cor0.col2 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-11
-14
17

query I rowsort
SELECT ALL cor0.col0 * - 69 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1035
-6279
-6348

query I rowsort
SELECT + 27 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
27
27
27

onlyif mysql # DIV for integer division: 
query I rowsort label-4491
SELECT + 80 DIV cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
44
83

skipif mysql # not compatible
query I rowsort label-4491
SELECT + 80 / cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
29
44
83

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 5 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT ALL + + tab0.col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT - 96 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-96

query I rowsort
SELECT 36 * 34 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1224
1224
1224

query I rowsort
SELECT DISTINCT + 11 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
11

query I rowsort
SELECT + cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT ( + 25 * 98 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
2450
2450
2450

query I rowsort
SELECT ALL + CASE cor0.col2 WHEN + cor0.col0 THEN - cor0.col0 WHEN - cor0.col0 THEN - 60 END FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 * + 18 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1044
1422
1566

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT + 25 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col2 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 7 * tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
-287
-413
-427

query I rowsort
SELECT 30 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1290
-2490
-780

query I rowsort
SELECT DISTINCT + + tab1.col0 * + 36 AS col2 FROM tab1 GROUP BY col0
----
1008
2952
792

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col1 + - COALESCE ( + 57, + col2 ) FROM tab1 AS cor0 GROUP BY col1
----
-13
-51
0

query I rowsort
SELECT + cor0.col1 * + ( + 63 ) FROM tab0 AS cor0 GROUP BY col1
----
0
5103

query I rowsort
SELECT + 35 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
35
35
35

query I rowsort
SELECT 4 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - + 39 FROM tab1 GROUP BY col1
----
-39
-39
-39

query I rowsort
SELECT cor0.col2 + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
138
148
99

query I rowsort
SELECT - cor0.col0 * - 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1638
1656
270

query I rowsort
SELECT col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 73 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
73

query I rowsort
SELECT tab0.col1 * + 92 AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
0
7452

query I rowsort
SELECT - 28 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

query I rowsort
SELECT ALL - col2 FROM tab0 AS cor0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT ALL 90 + 42 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
132
132

query I rowsort
SELECT DISTINCT 53 * - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-4293
0

query I rowsort
SELECT DISTINCT - 75 * - 92 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
6900

query I rowsort
SELECT ALL col2 * 51 - cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1200
1900
3950

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 10 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-10
-10
-10

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4528
SELECT + CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4528
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT + 86 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
112
129
169

query I rowsort
SELECT DISTINCT + col2 - cor0.col1 * - cor0.col2 * + 10 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
25695
31311
488

query I rowsort
SELECT ALL 74 FROM tab0 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT DISTINCT - col2 * col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL cor0.col2 * col2 * col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
195170
493118
658590

query I rowsort
SELECT ( 7 ) AS col2 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
7
7
7

query I rowsort
SELECT ALL COALESCE ( - 12, - cor0.col1, + cor0.col1 ) * + cor0.col1 * + 58 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-30624
-39672
-4176

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( - 88, + cor0.col0, cor0.col1 ) + 51 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 18 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-18

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col2 * - 68 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-3060
-4828
-544

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
33

query I rowsort
SELECT + - cor0.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-4544
SELECT - 58 DIV + cor1.col0 + ( 95 ) FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
93
93
95

skipif mysql # not compatible
query I rowsort label-4544
SELECT - 58 / + cor1.col0 + ( 95 ) FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
93
93
95

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-3
-43
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * - col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-2025
-5041
-64

query I rowsort
SELECT - 92 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-92
-92
-92

query I rowsort
SELECT + 1 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 22 + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
16
2
57

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
26
43
83

query I rowsort
SELECT 39 * + 24 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
936
936
936

query I rowsort
SELECT DISTINCT 39 FROM tab1 AS cor0 GROUP BY col1
----
39

query I rowsort
SELECT DISTINCT - 49 AS col1 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
-49

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col0 + - ( + cor0.col0 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 * 39 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1092
3198
858

query I rowsort
SELECT DISTINCT 27 + 82 FROM tab1 cor0 GROUP BY cor0.col1
----
109

query I rowsort
SELECT ( cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL + col0 * 95 FROM tab2 GROUP BY col0
----
1425
8645
8740

query I rowsort
SELECT 23 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT 78 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT - 73 AS col0 FROM tab1 GROUP BY tab1.col2
----
-73
-73
-73

query I rowsort
SELECT ( + 55 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT DISTINCT cor0.col1 + 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
74
87

query I rowsort
SELECT DISTINCT - 35 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-35

query I rowsort
SELECT cor0.col2 * + 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1254
2607
792

query I rowsort
SELECT - 47 + cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-17
135
137

query I rowsort
SELECT ALL + 92 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT 14 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col1 FROM tab2 GROUP BY col0 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - - tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT - + 3 FROM tab2 GROUP BY tab2.col2
----
-3
-3
-3

query I rowsort
SELECT ALL col2 AS col1 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 * - col2 * - 8 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
11552
4608
49928

query I rowsort
SELECT ALL - cor0.col0 * 22 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-2002
-2024
-330

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT - 89 FROM tab0 cor0 GROUP BY cor0.col2
----
-89
-89
-89

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( COALESCE ( - 86, tab1.col2 ), - tab1.col0, tab1.col1 ) AS col1 FROM tab1 GROUP BY tab1.col1
----
-86
-86
-86

query I rowsort
SELECT ALL - 37 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT - + 3 AS col0 FROM tab2 GROUP BY col1
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - cor0.col2 + 82 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
-5
24
3

query I rowsort
SELECT DISTINCT + 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72

query I rowsort
SELECT DISTINCT cor0.col1 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

query I rowsort
SELECT 31 + - cor0.col0 + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-52
5
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT cor0.col1 * + 21 - cor0.col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
1180
1220
820

query I rowsort
SELECT ALL + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 8 * 55 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
440

query I rowsort
SELECT DISTINCT - ( 14 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-14

query I rowsort
SELECT + 66 FROM tab1 AS cor0 GROUP BY cor0.col2
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 48 col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
48

query I rowsort
SELECT 52 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 cor0 GROUP BY col0, cor0.col1
----
44
57
6

query I rowsort
SELECT + 66 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
66
66
66

query I rowsort
SELECT + + cor0.col2 - - 44 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
123
68
82

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - - cor0.col1 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - cor0.col1 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-126
-28
-85

query I rowsort
SELECT 10 FROM tab0 cor0 GROUP BY cor0.col1
----
10
10

query I rowsort
SELECT 44 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
44
44
44

query I rowsort
SELECT + cor0.col0 + col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT - 23 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-23
-23
-23

query I rowsort
SELECT 95 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 78 FROM tab1 AS cor0 GROUP BY cor0.col0
----
78

query I rowsort
SELECT DISTINCT - 22 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-22

query I rowsort
SELECT DISTINCT 0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4618
SELECT DISTINCT + 23 DIV cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-4618
SELECT DISTINCT + 23 / cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 3 FROM tab2 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
-3
-3
-3

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
484
6724
784

query I rowsort
SELECT col1 * tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
6561

query I rowsort
SELECT 90 FROM tab2 AS cor0 GROUP BY col1
----
90
90
90

query I rowsort
SELECT ( + cor0.col0 ) + + 42 FROM tab0 AS cor0 GROUP BY cor0.col0
----
125
68
85

query I rowsort
SELECT DISTINCT 32 FROM tab2 AS cor0 GROUP BY cor0.col0
----
32

query I rowsort
SELECT DISTINCT cor0.col1 * - 90 + - 58 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-4018
-5188
-598

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT + 10 FROM tab0 AS cor0 GROUP BY cor0.col0
----
10

query I rowsort
SELECT DISTINCT cor0.col0 * 3 FROM tab0 AS cor0 GROUP BY cor0.col0
----
129
249
78

query I rowsort
SELECT ALL + 86 * + 15 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1316
1333
1373

query I rowsort
SELECT cor0.col1 * - 14 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-616
-798
-84

query I rowsort
SELECT cor0.col0 + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT 96 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT + 32 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
31

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
1681
3481
3721

onlyif mysql # DIV for integer division: 
query I rowsort label-4638
SELECT DISTINCT + 4 * cor0.col0 + cor0.col1 DIV 67 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
104
173
332

skipif mysql # not compatible
query I rowsort label-4638
SELECT DISTINCT + 4 * cor0.col0 + cor0.col1 / 67 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
104
173
332

query I rowsort
SELECT - 72 FROM tab2 GROUP BY tab2.col0
----
-72
-72
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-26
-26
-26

query I rowsort
SELECT 46 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46
46
46

onlyif mysql # DIV for integer division: 
query I rowsort label-4642
SELECT cor0.col1 DIV + 40 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4642
SELECT cor0.col1 / + 40 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
0
1
1

query I rowsort
SELECT cor0.col2 * col2 * cor0.col0 - + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
113448
309430
567852

query I rowsort
SELECT DISTINCT 86 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
86

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
116
158
174

query I rowsort
SELECT ALL ( - col2 + 61 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
-26
3

query I rowsort
SELECT 71 FROM tab0 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col2 * 24 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
1896
576
912

query I rowsort
SELECT ALL + col1 + 69 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
150
69

query I rowsort
SELECT + 13 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
13
13
13

query I rowsort
SELECT 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
10
10
10

query I rowsort
SELECT 37 + 63 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
100
100
100

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

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4655
SELECT CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4655
SELECT CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 57 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
57
57
57

query I rowsort
SELECT - 90 * cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-2160
-3420
-7110

query I rowsort
SELECT cor0.col1 + cor0.col1 - + cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-23
-23

query I rowsort
SELECT + 26 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT ALL - 36 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-36
-36
-36

query I rowsort
SELECT - 20 AS col1 FROM tab2 GROUP BY tab2.col2
----
-20
-20
-20

query I rowsort
SELECT ALL - col0 * cor0.col0 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3375
753571
778688

query I rowsort
SELECT 37 * - cor1.col2 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
-1665
-2627
-296

query I rowsort
SELECT - cor0.col0 * - cor0.col0 - - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
240
8372
8556

query I rowsort
SELECT col2 AS col1 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - tab0.col1 AS col1 FROM tab0 GROUP BY col1 HAVING NULL <= NULL
----

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
21
21
21

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
42

query I rowsort
SELECT - 7 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-7
-7
-7

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 cor0 GROUP BY col2, cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - - tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT + + cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 * 49 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1274
2107
4067

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - ( NULLIF ( - cor0.col2, ( col2 ) ) ) * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 45 - 45 FROM tab1 AS cor0 GROUP BY col1
----
0

query I rowsort
SELECT DISTINCT 96 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
96

query I rowsort
SELECT ALL cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT cor0.col1 * 14 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
660
855
90

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT + cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 77 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
77
77
77

query I rowsort
SELECT ALL + 98 AS col1 FROM tab0 GROUP BY tab0.col1
----
98
98

query I rowsort
SELECT 50 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-4690
SELECT - 32 DIV cor0.col0 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4690
SELECT - 32 / cor0.col0 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
-1
0
0

query I rowsort
SELECT ALL 69 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT cor0.col0 + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 63 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-4696
SELECT + 86 DIV - 10 - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-66
-87
-95

skipif mysql # not compatible
query I rowsort label-4696
SELECT + 86 / - 10 - cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-66
-87
-95

query I rowsort
SELECT cor0.col1 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
1944

query I rowsort
SELECT 48 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
48
48
48

query I rowsort
SELECT ALL + - 34 FROM tab1 GROUP BY tab1.col1
----
-34
-34
-34

query I rowsort
SELECT DISTINCT - + 35 FROM tab2 GROUP BY tab2.col2
----
-35

query I rowsort
SELECT ALL + 64 FROM tab2 GROUP BY col0
----
64
64
64

query I rowsort
SELECT ALL 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT ALL 35 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 * + 80 col2 FROM tab2 cor0 GROUP BY cor0.col2
----
880
880
880

query I rowsort
SELECT 93 FROM tab2 AS cor0 GROUP BY col1
----
93
93
93

query I rowsort
SELECT - cor0.col2 * cor0.col2 + + 43 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1982
-21
-4998

query I rowsort
SELECT ALL 98 FROM tab1 AS cor0 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT ALL 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT ALL - 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + 71 * + cor0.col2 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
3150
4970
560

onlyif mysql # DIV for integer division: 
query I rowsort label-4712
SELECT DISTINCT - 71 DIV + cor0.col1 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-1
-11

skipif mysql # not compatible
query I rowsort label-4712
SELECT DISTINCT - 71 / + cor0.col1 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-1
-11

query I rowsort
SELECT 92 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT + col0 + cor0.col0 * cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
154
1624
3690

query I rowsort
SELECT ALL NULLIF ( + cor0.col0, cor0.col2 ) * cor0.col0 + cor0.col0 - + 82 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
1810
620
6890

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-4716
SELECT + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4716
SELECT + CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT 21 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
21
21
21

query I rowsort
SELECT ALL 88 * - 63 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-5544
-5544
-5544

query I rowsort
SELECT ALL 97 FROM tab0 GROUP BY tab0.col1
----
97
97

query I rowsort
SELECT + 8 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
8

query I rowsort
SELECT - col1 + 27 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-54
27
27

query I rowsort
SELECT + 7 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT + 5 FROM tab1 cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2378
-4661
-5307

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 82 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
3362
4838
5002

query I rowsort
SELECT ALL 0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-4729
SELECT ALL + col1 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4729
SELECT ALL + col1 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
3

query I rowsort
SELECT 75 FROM tab1 GROUP BY tab1.col1
----
75
75
75

query I rowsort
SELECT 89 * + col1 + + tab2.col1 AS col0 FROM tab2 GROUP BY tab2.col1
----
3690
5310
5490

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col1 ) + cor0.col1 col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT - + 93 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT col0 * cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ( 40 ) AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
56

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-4742
SELECT ALL col1 DIV 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-4742
SELECT ALL col1 / 77 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT ALL - + ( 53 ) FROM tab0 GROUP BY col1
----
-53
-53

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL 98 * - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4410
-6958
-784

query I rowsort
SELECT + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 70 + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4002
-5451
-6003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( 42 ) col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
42

query I rowsort
SELECT 12 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-31
-71

query I rowsort
SELECT DISTINCT + 20 + 31 AS col1 FROM tab2 GROUP BY col1
----
51

query I rowsort
SELECT ALL + + 22 * + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1738
528
836

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-4754
SELECT 78 DIV tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-4754
SELECT 78 / tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
0
1
3

query I rowsort
SELECT - NULLIF ( - 8, 95 ) FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
8
8
8

query I rowsort
SELECT ALL 44 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
44
44

query I rowsort
SELECT DISTINCT - 76 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-15
-17
-35

query I rowsort
SELECT - cor0.col1 * 25 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-1100
-1425
-150

query I rowsort
SELECT ALL 65 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT 81 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
81

query I rowsort
SELECT ALL 75 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
75
75
75

query I rowsort
SELECT - 75 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT - - 12 AS col2 FROM tab2 GROUP BY tab2.col1
----
12
12
12

query I rowsort
SELECT - - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT - ( + cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col0 + - 12 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
10
16
70

query I rowsort
SELECT DISTINCT 53 FROM tab0 AS cor0 GROUP BY cor0.col0
----
53

query I rowsort
SELECT 30 FROM tab2 AS cor0 GROUP BY cor0.col0
----
30
30
30

query I rowsort
SELECT + 90 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90
90
90

query I rowsort
SELECT 70 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-13
27
44

query I rowsort
SELECT ALL - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4772
SELECT + + 62 * tab0.col1 - - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4772
SELECT + + 62 * tab0.col1 - - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 95 col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-95
-95

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor1.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-4775
SELECT DISTINCT + col0 DIV 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4775
SELECT DISTINCT + col0 / 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

onlyif mysql # DIV for integer division: 
query I rowsort label-4776
SELECT col0 DIV + col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4776
SELECT col0 / + col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-4777
SELECT DISTINCT cor0.col1 + + col1 + - cor0.col2 DIV - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
115
12
88

skipif mysql # not compatible
query I rowsort label-4777
SELECT DISTINCT cor0.col1 + + col1 + - cor0.col2 / - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
115
12
88

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab1 cor0 GROUP BY col2, col2
----
2025
5041
64

query I rowsort
SELECT - col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
10648
21952
551368

query I rowsort
SELECT tab0.col2 + + col2 AS col0 FROM tab0 WHERE NOT col1 NOT BETWEEN NULL AND ( NULL ) GROUP BY tab0.col2
----

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - NULLIF ( + 71, - 0 ) FROM tab0 GROUP BY tab0.col0
----
-71
-71
-71

query I rowsort
SELECT DISTINCT + 30 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30

query I rowsort
SELECT + ( 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 DISTINCT 67 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
67

query I rowsort
SELECT + + 73 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
73
73
73

query I rowsort
SELECT DISTINCT 31 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
31

query I rowsort
SELECT - 99 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
-99
-99
-99

query I rowsort
SELECT - ( 65 + + cor0.col0 ) * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1200
14196
14444

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4791
SELECT ALL - col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4791
SELECT ALL - col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT + 14 + cor0.col0 * ( 40 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1054
1734
3334

query I rowsort
SELECT - 53 FROM tab0 AS cor0 GROUP BY col1
----
-53
-53

query I rowsort
SELECT + - 74 AS col0 FROM tab1, tab1 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
-74
-74
-74

query I rowsort
SELECT - - 89 FROM tab0 GROUP BY tab0.col0
----
89
89
89

query I rowsort
SELECT cor0.col2 + + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT cor1.col0 AS col1 FROM tab1, tab2 cor0, tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT 30 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT - 96 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-96
-96
-96

query I rowsort
SELECT ALL + 54 FROM tab1 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT 0 - - col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 51 + cor0.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
122
59
96

query I rowsort
SELECT + cor0.col2 + cor0.col2 * 40 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1845
2911
328

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 75 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 + - cor0.col0 * cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1849
-676
-6889

query I rowsort
SELECT - col1 - + cor0.col1 * ( + 47 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1968
-2832
-2928

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT + tab0.col0 AS col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( - 4, - cor0.col0 ) * cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, col2, cor0.col1
----
180
284
32

query I rowsort
SELECT ALL 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col2, cor0.col1
----
47
47
47

query I rowsort
SELECT + cor0.col2 * + COALESCE ( + cor0.col2, - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - tab2.col0 * col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - cor0.col1 - - cor0.col1 AS col0 FROM tab2 AS cor0 WHERE NOT ( cor0.col0 ) BETWEEN ( - cor0.col0 ) AND NULL GROUP BY cor0.col1
----

query I rowsort
SELECT ALL tab1.col2 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-2025
-5041
-64

onlyif mysql # DIV for integer division: 
query I rowsort label-4822
SELECT ALL - cor0.col2 DIV - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4822
SELECT ALL - cor0.col2 / - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT - col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT + col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT cor0.col0 * cor0.col0 + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
312
8360
8522

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL - 73 * - 48 AS col0 FROM tab0 GROUP BY col2
----
3504
3504
3504

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col1 * + 88 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7128

onlyif mysql # DIV for integer division: 
query I rowsort label-4831
SELECT ALL 52 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4831
SELECT ALL 52 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8
8

query I rowsort
SELECT DISTINCT + 38 FROM tab1 AS cor0 GROUP BY cor0.col2
----
38

onlyif mysql # DIV for integer division: 
query I rowsort label-4834
SELECT + col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4834
SELECT + col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 - - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
166
52
86

query I rowsort
SELECT ALL - - 48 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT - 80 AS col0 FROM tab0 GROUP BY tab0.col0
----
-80
-80
-80

query I rowsort
SELECT ( 48 ) * - 24 + cor0.col2 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-1081
-1107
-1144

query I rowsort
SELECT - 51 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-51
-51
-51

query I rowsort
SELECT - 43 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - 34 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-34

query I rowsort
SELECT ALL cor0.col1 - - cor0.col1 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3564

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, col0
----
26
43
83

query I rowsort
SELECT - 22 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1562
176
990

query I rowsort
SELECT ALL 36 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
36
36
36

query I rowsort
SELECT ALL + cor0.col1 + - 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-29
52

query I rowsort
SELECT ALL + 69 FROM tab1 cor0 GROUP BY cor0.col2
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 52 col0 FROM tab1 AS cor0 GROUP BY col2
----
52
52
52

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0, col0
----
-26
-43
-83

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.col0
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4853
SELECT DISTINCT cor0.col2 * CAST( 99 AS SIGNED ) + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2400
3800
7900

skipif mysql # not compatible
query I rowsort label-4853
SELECT DISTINCT cor0.col2 * CAST ( 99 AS INTEGER ) + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
2400
3800
7900

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
89
89
89

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-4857
SELECT DISTINCT - cor0.col2 DIV 52 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-4857
SELECT DISTINCT - cor0.col2 / 52 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-1
0

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 93 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-93

query I rowsort
SELECT ALL 4 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
28
42
83

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col2 * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 * + col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-4866
SELECT DISTINCT - cor0.col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-4866
SELECT DISTINCT - cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
81

query I rowsort
SELECT ALL - 66 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-66
-66
-66

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 90 + - 86 FROM tab2 GROUP BY tab2.col2
----
-176

query I rowsort
SELECT - - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL - tab0.col0 FROM tab0 GROUP BY col0
----
-26
-43
-83

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.col1 ) + col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT 66 FROM tab0 AS cor0 GROUP BY cor0.col1
----
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 32 col0 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - 84 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2016
-3192
-6636

query I rowsort
SELECT - 27 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + 28 + + col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
69
87
89

query I rowsort
SELECT 97 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT ALL + 47 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
47
47
47

onlyif mysql # DIV for integer division: 
query I rowsort label-4884
SELECT - cor0.col2 * 72 DIV cor0.col1 + - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-142
-155
-163

skipif mysql # not compatible
query I rowsort label-4884
SELECT - cor0.col2 * 72 / cor0.col1 + - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-142
-155
-163

query I rowsort
SELECT ALL cor0.col0 * - ( + cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT cor0.col2 + col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT - 71 FROM tab2 cor0 GROUP BY cor0.col0
----
-71
-71
-71

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) + cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1806
-650
-6806

query I rowsort
SELECT - 60 * 78 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4680
-4680
-4680

query I rowsort
SELECT ALL 50 FROM tab2 GROUP BY col1
----
50
50
50

query I rowsort
SELECT 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 + col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
147
148
71

query I rowsort
SELECT col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT - - tab2.col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col1 - cor0.col2 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 col1 + + 89 * - cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-7128
0

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4898
SELECT DISTINCT CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0 GROUP BY col2
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4898
SELECT DISTINCT CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0 GROUP BY col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
62
62

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
95
95
95

query I rowsort
SELECT 3 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
61
82
90

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4903
SELECT + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4903
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( 74 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT - 8 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 95 col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
95
95
95

query I rowsort
SELECT + 54 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT ALL - 62 * col1 AS col0 FROM tab0 GROUP BY col1
----
-5022
0

query I rowsort
SELECT DISTINCT + 4 FROM tab0 GROUP BY col0
----
4

query I rowsort
SELECT cor0.col0 * 87 + - cor0.col0 * 5 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
2132
3526
6806

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-45
-71
-8

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 6 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
6
6
6

query I rowsort
SELECT DISTINCT col1 * col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 15 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15

query I rowsort
SELECT ALL col0 - + 16 FROM tab1 AS cor0 GROUP BY col0
----
12
6
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 + 61 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-4919
SELECT + + cor1.col2 DIV - cor1.col2 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4919
SELECT + + cor1.col2 / - cor1.col2 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-4921
SELECT + cor0.col2 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4921
SELECT + cor0.col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + 61 FROM tab1 GROUP BY col0
----
61
61
61

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 4 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-176
-228
-24

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4925
SELECT + cor0.col0 * + CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-4925
SELECT + cor0.col0 * + CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT 0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + 18 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
18
18
18

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 cor0.col0 FROM tab0 AS cor0 WHERE NULL IS NULL GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 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 + + tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - tab0.col0 * col0 FROM tab0 GROUP BY tab0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 23 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
23
23
23

query I rowsort
SELECT ALL 92 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
4048
5244
552

query I rowsort
SELECT + NULLIF ( cor0.col2, + cor0.col1 ) + col2 FROM tab1 AS cor0 GROUP BY col1, col2, cor0.col1
----
142
16
90

query I rowsort
SELECT ALL 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
85
85
85

query I rowsort
SELECT - 17 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - 67 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-67

query I rowsort
SELECT 9 FROM tab1 AS cor0 GROUP BY col0
----
9
9
9

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY col1, col2
----
41
59
61

query I rowsort
SELECT DISTINCT + 39 * + 43 FROM tab1, tab1 cor0 GROUP BY cor0.col1
----
1677

query I rowsort
SELECT - - 98 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - - tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 38 FROM tab1 AS cor0 GROUP BY cor0.col1
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
56
56
56

onlyif mysql # DIV for integer division: 
query I rowsort label-4950
SELECT DISTINCT cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-4950
SELECT DISTINCT cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1

query I rowsort
SELECT cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 31 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT ALL + 49 FROM tab2 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT ALL - 51 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-51
-51
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-29
-29
-29

query I rowsort
SELECT cor0.col2 + - ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + 16 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
16
16
16

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 55, - tab0.col1, - tab0.col1, tab0.col0 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
55
55

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - col1 * + 9 FROM tab1 AS cor0 GROUP BY col1
----
-396
-513
-54

query I rowsort
SELECT 59 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
0
6561

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 + cor0.col2 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2115
5183
80

query I rowsort
SELECT ALL 3 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3
3
3

query I rowsort
SELECT 21 + 56 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
77
77
77

query I rowsort
SELECT 2 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
2
2
2

query I rowsort
SELECT - 4 FROM tab1 AS cor0 GROUP BY col0
----
-4
-4
-4

query I rowsort
SELECT - 24 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-24
-24
-24

query I rowsort
SELECT 66 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
66
66
66

query I rowsort
SELECT DISTINCT - tab1.col2 AS col1 FROM tab1 WHERE NOT ( NULL ) >= ( NULL ) GROUP BY tab1.col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - 61 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT DISTINCT + + 34 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT 78 FROM tab1 AS cor0 GROUP BY cor0.col2
----
78
78
78

query I rowsort
SELECT DISTINCT + - 26 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
-26

query I rowsort
SELECT DISTINCT NULLIF ( cor0.col0, - cor0.col0 ) - 47 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-32
44
45

query I rowsort
SELECT DISTINCT - 14 + - cor0.col2 * + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3378
-6255
-7583

onlyif mysql # DIV for integer division: 
query I rowsort label-4981
SELECT DISTINCT - - 75 DIV 32 AS col0 FROM tab0 GROUP BY col2
----
2

skipif mysql # not compatible
query I rowsort label-4981
SELECT DISTINCT - - 75 / 32 AS col0 FROM tab0 GROUP BY col2
----
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-4982
SELECT CAST( NULL AS SIGNED ) + - 69 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4982
SELECT CAST ( NULL AS INTEGER ) + - 69 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - COALESCE ( - cor0.col1, cor0.col1 ) * cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 77 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-77
-77
-77

query I rowsort
SELECT 83 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
83
83
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( 99, cor0.col2, cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
99
99
99

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col0
----
73

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - 15 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-15
-15
-15

query I rowsort
SELECT + NULLIF ( 40, - cor0.col1 * + 36 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
40
40

query I rowsort
SELECT 69 FROM tab2 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT ALL + 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
14
14
14

onlyif mysql # DIV for integer division: 
query I rowsort label-4993
SELECT cor0.col2 DIV 87 + + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

skipif mysql # not compatible
query I rowsort label-4993
SELECT cor0.col2 / 87 + + col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 43 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-43
38

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col2 * 96 + cor0.col2 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1, col2
----
-184680
0

query I rowsort
SELECT DISTINCT + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT + - 29 + col2 FROM tab0 GROUP BY col2
----
-5
50
9

query I rowsort
SELECT ALL + 92 + + col0 FROM tab0 GROUP BY col0
----
118
135
175

query I rowsort
SELECT - tab0.col1 + + 13 AS col0 FROM tab0 GROUP BY col1
----
-68
13

query I rowsort
SELECT + 92 FROM tab1 AS cor0 GROUP BY col1
----
92
92
92

query I rowsort
SELECT DISTINCT + 54 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
54

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + cor0.col0 + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-5004
SELECT + 61 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5004
SELECT + 61 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - col0 * + 92 AS col2 FROM tab2 GROUP BY tab2.col0
----
-1380
-8372
-8464

query I rowsort
SELECT ALL 33 AS col1 FROM tab1 GROUP BY tab1.col2
----
33
33
33

query I rowsort
SELECT DISTINCT - 24 FROM tab0 GROUP BY tab0.col2
----
-24

query I rowsort
SELECT 16 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
16
16

query I rowsort
SELECT 83 FROM tab0 AS cor0 GROUP BY cor0.col1
----
83
83

query I rowsort
SELECT DISTINCT - 1 - cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-58
-7

query I rowsort
SELECT 76 - 93 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-17
-17
-17

query I rowsort
SELECT ALL cor0.col1 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-3483
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5013
SELECT ALL - cor0.col2 DIV + 38 FROM tab0 cor0 GROUP BY cor0.col2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5013
SELECT ALL - cor0.col2 / + 38 FROM tab0 cor0 GROUP BY cor0.col2
----
-1
-2
0

query I rowsort
SELECT ALL + COALESCE ( + col2, cor0.col2 ) AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT ALL + 13 AS col2 FROM tab0 GROUP BY tab0.col2
----
13
13
13

query I rowsort
SELECT ALL - 26 FROM tab1 GROUP BY tab1.col1
----
-26
-26
-26

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL ( + cor0.col2 + 18 ) * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
208
2835
6319

query I rowsort
SELECT 31 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
2511

query I rowsort
SELECT ALL - 3 FROM tab0 GROUP BY tab0.col2
----
-3
-3
-3

onlyif mysql # DIV for integer division: 
query I rowsort label-5021
SELECT DISTINCT cor0.col2 DIV + col1 - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-7
-70

skipif mysql # not compatible
query I rowsort label-5021
SELECT DISTINCT cor0.col2 / + col1 - col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-7
-70

query I rowsort
SELECT ALL - COALESCE ( + 57, 93, cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-57
-57

query I rowsort
SELECT DISTINCT - 60 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
-60

query I rowsort
SELECT + 56 * 92 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
5152
5152
5152

query I rowsort
SELECT - COALESCE ( cor0.col2, cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-5026
SELECT col2 DIV 73 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5026
SELECT col2 / 73 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col1 * + ( + 22 ) * cor0.col1 FROM tab1 AS cor0 GROUP BY col1, col1
----
42592
71478
792

onlyif mysql # DIV for integer division: 
query I rowsort label-5028
SELECT + cor0.col1 + 61 DIV cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
42
60
62

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5028
SELECT + cor0.col1 + 61 / cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
42
60
62

query I rowsort
SELECT ALL + cor0.col2 * col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL cor0.col0 * col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT DISTINCT + 7 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
7

query I rowsort
SELECT ALL + 53 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT + col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-5034
SELECT - cor0.col0 + + col0 DIV 97 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

skipif mysql # not compatible
query I rowsort label-5034
SELECT - cor0.col0 + + col0 / 97 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT 83 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
83
83
83

query I rowsort
SELECT + 2 * cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
10082
128
4050

query I rowsort
SELECT 20 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
20
20
20

query I rowsort
SELECT ALL - col2 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-5039
SELECT DISTINCT + 52 DIV 36 - + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-14
-90
-91

skipif mysql # not compatible
query I rowsort label-5039
SELECT DISTINCT + 52 / 36 - + cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-14
-90
-91

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
81

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT cor0.col2 * + col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - 63 AS col1 FROM tab1, tab1 cor0 GROUP BY cor0.col1
----
-63
-63
-63

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5045
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5045
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 45 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
45
45
45

query I rowsort
SELECT DISTINCT + ( 49 ) * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1078
-1372
-4018

query I rowsort
SELECT - 85 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - cor0.col0 * - 85 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1870
2380
6970

query I rowsort
SELECT + cor0.col0 * 61 FROM tab2 AS cor0 GROUP BY col0
----
5551
5612
915

query I rowsort
SELECT + 78 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 15 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
162

onlyif mysql # DIV for integer division: 
query I rowsort label-5056
SELECT + 79 DIV - 35 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-5056
SELECT + 79 / - 35 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 3 col0 FROM tab2 AS cor0 GROUP BY col1
----
3
3
3

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL 37 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43
81
94

onlyif mysql # DIV for integer division: 
query I rowsort label-5060
SELECT cor0.col0 * cor0.col0 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-5060
SELECT cor0.col0 * cor0.col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - col2 + + cor0.col2 - + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col0 * + 68 - ( cor0.col2 ) * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-53
-6549
2892

query I rowsort
SELECT ALL cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
24
38
79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 26, cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-26

query I rowsort
SELECT ALL + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col2, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT 0 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT + cor0.col0 + - col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + tab0.col2 FROM tab0 GROUP BY col2 HAVING NULL <= NULL
----

query I rowsort
SELECT tab2.col0 FROM tab2 WHERE NULL IS NULL GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT ( - cor0.col0 + col0 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5073
SELECT ALL + cor0.col1 DIV + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5073
SELECT ALL + cor0.col1 / + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
1

query I rowsort
SELECT + 59 AS col0 FROM tab1 GROUP BY tab1.col1
----
59
59
59

query I rowsort
SELECT DISTINCT 34 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
34

query I rowsort
SELECT cor0.col1 * + 14 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1134

query I rowsort
SELECT - 74 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-74
-74
-74

query I rowsort
SELECT DISTINCT - 73 FROM tab0 GROUP BY tab0.col0
----
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 10 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT ALL + 30 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
30
30

query I rowsort
SELECT 50 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT DISTINCT - cor0.col2 * 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1170
-1846
-208

query I rowsort
SELECT DISTINCT + 77 * - 51 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3927

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col1
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 33 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
-33
-33

query I rowsort
SELECT ALL cor0.col1 * 82 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3608
4674
492

query I rowsort
SELECT 4 FROM tab0 AS cor0 GROUP BY cor0.col1
----
4
4

query I rowsort
SELECT ALL + ( 41 ) + + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
47
85
98

query I rowsort
SELECT + 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT ALL + 45 FROM tab1 cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-1232
-154
-5740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 + - 96 col2 FROM tab0 GROUP BY tab0.col1
----
-15
-96

query I rowsort
SELECT ALL + 96 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 45 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-45

query I rowsort
SELECT ALL col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT + 32 FROM tab2 AS cor0 GROUP BY col0
----
32
32
32

onlyif mysql # DIV for integer division: 
query I rowsort label-5098
SELECT DISTINCT - 58 DIV - col1 FROM tab2 cor0 GROUP BY col1
----
0
1

skipif mysql # not compatible
query I rowsort label-5098
SELECT DISTINCT - 58 / - col1 FROM tab2 cor0 GROUP BY col1
----
0
1

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2, col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT 0 + cor0.col0 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT ALL - + tab1.col2 + - tab1.col2 + - tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
-135
-213
-24

query I rowsort
SELECT - cor0.col0 * + col0 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-240
-8372
-8556

query I rowsort
SELECT 14 + - cor0.col0 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
239
8295
8478

query I rowsort
SELECT DISTINCT + 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT - + 23 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-23
-23
-23

query I rowsort
SELECT ALL + 37 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 61 + - 41 col0 FROM tab2 GROUP BY col2
----
-102
-102
-102

query I rowsort
SELECT ALL + col2 + + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT DISTINCT - 9 * - cor0.col0 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2025
-74529
-76176

query I rowsort
SELECT cor0.col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - 14 + - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col1 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 90 AS col2 FROM tab0 GROUP BY tab0.col2
----
90
90
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 DISTINCT col1 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + 67 + tab2.col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
125
146
154

query I rowsort
SELECT 5 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-5123
SELECT - 38 + - tab1.col1 - tab1.col1 DIV COALESCE ( + 20, - tab1.col0 ) FROM tab1 GROUP BY tab1.col1
----
-44
-84
-97

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5123
SELECT - 38 + - tab1.col1 - tab1.col1 / COALESCE ( + 20, - tab1.col0 ) FROM tab1 GROUP BY tab1.col1
----
-44
-84
-97

query I rowsort
SELECT - 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-94
-94
-94

query I rowsort
SELECT ALL 64 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT ALL + cor0.col2 * + 36 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
1620
2556
288

query I rowsort
SELECT ALL 86 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
86
86

query I rowsort
SELECT DISTINCT 31 * 34 AS col2 FROM tab2 GROUP BY tab2.col2
----
1054

query I rowsort
SELECT DISTINCT - 5 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5

query I rowsort
SELECT ALL 94 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
94
94

query I rowsort
SELECT + 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT 14 * - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1162
-364
-602

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - cor0.col0 * CASE + cor0.col2 WHEN cor0.col0 THEN NULL ELSE - cor0.col0 END AS col1 FROM tab1 cor0 GROUP BY col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT ALL - cor0.col1 + 29 AS col2 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
-12
-30
-32

query I rowsort
SELECT DISTINCT - ( + 14 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-14

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT cor0.col2 + 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
117
138
146

query I rowsort
SELECT DISTINCT + - 21 * + 31 AS col0 FROM tab1 GROUP BY tab1.col1
----
-651

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT ALL + 67 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
67
67
67

query I rowsort
SELECT 15 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT 80 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
80
80
80

query I rowsort
SELECT ALL + 80 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT ALL 63 FROM tab0 AS cor0 GROUP BY col0
----
63
63
63

query I rowsort
SELECT ALL cor0.col2 - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12
-34
72

query I rowsort
SELECT - + 76 FROM tab1, tab0 AS cor0 GROUP BY tab1.col0
----
-76
-76
-76

onlyif mysql # DIV for integer division: 
query I rowsort label-5149
SELECT ALL cor0.col1 DIV + ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5149
SELECT ALL cor0.col1 / + ( cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1
1
1

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5150
SELECT DISTINCT + CAST( NULL AS DECIMAL ) col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5150
SELECT DISTINCT + CAST ( NULL AS REAL ) col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT + 43 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 + tab1.col2 col0 FROM tab1 GROUP BY tab1.col2
----
120
57
94

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor0.col1 ) col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0

query I rowsort
SELECT DISTINCT - 63 FROM tab2 AS cor0 GROUP BY col2
----
-63

query I rowsort
SELECT + ( + 94 ) AS col1 FROM tab2 AS cor0 GROUP BY col0
----
94
94
94

query I rowsort
SELECT + 87 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2
----
87
87
87

query I rowsort
SELECT DISTINCT + 25 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 5 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT - 89 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2136
-3382
-7031

query I rowsort
SELECT 61 + 11 - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-11
29
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
86
86
86

query I rowsort
SELECT DISTINCT - 78 + - 76 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3498
-5474
-686

query I rowsort
SELECT DISTINCT + 60 FROM tab1 AS cor0 GROUP BY cor0.col2
----
60

query I rowsort
SELECT - cor0.col1 * col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-6561
0

onlyif mysql # DIV for integer division: 
query I rowsort label-5167
SELECT cor0.col0 DIV 41 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5167
SELECT cor0.col0 / 41 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 16 + 38 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT + 42 * cor0.col2 + - 40 * - 26 + + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
1384
2975
4093

query I rowsort
SELECT - 31 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - 7 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-7

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + + col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT ALL + 78 FROM tab2 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT + cor0.col0 * + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5178
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5178
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT ALL - 82 FROM tab0 GROUP BY tab0.col2
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - cor0.col1 - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-162
0

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
-58
-79
-87

query I rowsort
SELECT ALL + cor0.col2 + 40 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
119
64
78

query I rowsort
SELECT ALL 30 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1350
2130
240

query I rowsort
SELECT ALL - 12 + - cor0.col2 * - 16 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1252
372
596

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT DISTINCT 77 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
77

query I rowsort
SELECT ALL - 88 * - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
7128

query I rowsort
SELECT 67 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
67
67
67

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT - 6 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-6

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT cor0.col2 AS col0 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 DISTINCT cor0.col1 col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL COALESCE ( cor0.col1, cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + 2 + - cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1934
-3247
-34

query I rowsort
SELECT ALL - + cor0.col0 AS col2 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-5197
SELECT - + 40 DIV + 69 FROM tab0 GROUP BY col1
----
0
0

skipif mysql # not compatible
query I rowsort label-5197
SELECT - + 40 / + 69 FROM tab0 GROUP BY col1
----
0
0

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + 33 FROM tab1 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT DISTINCT 85 + 51 FROM tab1 AS cor0 GROUP BY cor0.col1
----
136

query I rowsort
SELECT ALL - ( cor0.col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 51 FROM tab0 cor0 GROUP BY cor0.col0
----
51

query I rowsort
SELECT ALL - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT 17 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
17
17
17

query I rowsort
SELECT ALL col1 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
44
57
6

query I rowsort
SELECT ALL - 86 FROM tab0 AS cor0 GROUP BY col2
----
-86
-86
-86

query I rowsort
SELECT ALL cor0.col2 * ( cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5212
SELECT - - col1 + CAST( NULL AS SIGNED ) * + ( - 12 ) FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5212
SELECT - - col1 + CAST ( NULL AS INTEGER ) * + ( - 12 ) FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT - 7 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

query I rowsort
SELECT ALL + col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5216
SELECT cor0.col1 DIV - cor0.col1 + - 35 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5216
SELECT cor0.col1 / - cor0.col1 + - 35 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT - 52 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-52
-52
-52

query I rowsort
SELECT + 99 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
99
99
99

query I rowsort
SELECT - NULLIF ( + cor0.col2, 23 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - ( - cor0.col1 ) * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1, cor0.col0
----
-3483
0
0

query I rowsort
SELECT + 71 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT 92 FROM tab1 AS cor0 GROUP BY col2
----
92
92
92

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2, tab0 AS cor0, tab2 cor1 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 52 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT ALL - 30 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT + 29 FROM tab0 GROUP BY tab0.col2
----
29
29
29

onlyif mysql # DIV for integer division: 
query I rowsort label-5231
SELECT DISTINCT cor0.col0 * - col0 DIV - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

skipif mysql # not compatible
query I rowsort label-5231
SELECT DISTINCT cor0.col0 * - col0 / - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 73 FROM tab2 AS cor0 GROUP BY col1
----
73
73
73

query I rowsort
SELECT cor0.col1 * + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2378
4661
5307

query I rowsort
SELECT + col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
15
91
92

query I rowsort
SELECT - ( 92 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-92
-92
-92

query I rowsort
SELECT DISTINCT 34 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
34

query I rowsort
SELECT ALL col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT ALL + 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
-58
-79
-87

query I rowsort
SELECT 17 * - cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1, cor1.col2
----
9 values hashing to 6d92768a2576dfb9be36878da36ec530

query I rowsort
SELECT col0 * 44 AS col2 FROM tab1 cor0 GROUP BY col0
----
1232
3608
968

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING cor0.col1 = ( NULL )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-5244
SELECT ALL cor0.col1 DIV ( - 89 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5244
SELECT ALL cor0.col1 / ( - 89 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 30 * - 11 * + cor0.col1 col2 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
-13530
-19470
-20130

query I rowsort
SELECT ALL 64 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT 52 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
52
52
52

query I rowsort
SELECT DISTINCT 77 + + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
122
148
85

query I rowsort
SELECT + 34 * - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-1530
-2414
-272

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 0 * cor0.col1 * + 79 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
142
16
90

query I rowsort
SELECT - cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-162
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * col0 col1 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 42 * 73 AS col0 FROM tab1 cor0 GROUP BY col1
----
-3066

query I rowsort
SELECT 34 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1394
-2006
-2074

query I rowsort
SELECT + 43 AS col2 FROM tab2 cor0 GROUP BY col0
----
43
43
43

query I rowsort
SELECT col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL + 71 FROM tab2 GROUP BY tab2.col2
----
71
71
71

query I rowsort
SELECT DISTINCT - - 35 + 51 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
86

query I rowsort
SELECT 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - 7 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * 51 - cor0.col2 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2250
3550
400

query I rowsort
SELECT ALL + + 55 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
55
55
55

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5266
SELECT CAST( NULL AS SIGNED ) * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5266
SELECT CAST ( NULL AS INTEGER ) * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, col0
----
41
59
61

query I rowsort
SELECT + - tab2.col1 AS col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-5272
SELECT - 95 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-6

skipif mysql # not compatible
query I rowsort label-5272
SELECT - 95 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-1
-6

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5273
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * - 64 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5273
SELECT DISTINCT + CAST ( NULL AS REAL ) * - 64 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT - 46 AS col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
-46
-46
-46

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( - 11, cor0.col0, + cor0.col0 ) FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
11
11
11

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 * + 37 FROM tab0 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
-25012
-254893
-68413

query I rowsort
SELECT ALL 98 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
98
98
98

query I rowsort
SELECT DISTINCT - 90 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-90

query I rowsort
SELECT ALL - 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-18
-18
-18

query I rowsort
SELECT - - 25 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT - 70 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-70
-70
-70

query I rowsort
SELECT ALL 63 FROM tab0 cor0 GROUP BY col0
----
63
63
63

query I rowsort
SELECT ALL 76 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
76
76
76

onlyif mysql # DIV for integer division: 
query I rowsort label-5285
SELECT ALL cor0.col0 + cor0.col0 DIV cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
16
92
93

skipif mysql # not compatible
query I rowsort label-5285
SELECT ALL cor0.col0 + cor0.col0 / cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
16
92
93

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

query I rowsort
SELECT 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
6
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 98 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
98

query I rowsort
SELECT 64 * + 3 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
192
192
192

query I rowsort
SELECT + 62 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2, cor0.col1
----
2790
4402
496

query I rowsort
SELECT - 29 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-29
-29
-29

onlyif mysql # DIV for integer division: 
query I rowsort label-5292
SELECT DISTINCT cor0.col1 DIV + 92 + + 32 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
32

skipif mysql # not compatible
query I rowsort label-5292
SELECT DISTINCT cor0.col1 / + 92 + + 32 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
32

query I rowsort
SELECT DISTINCT + 62 - 49 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY tab0.col0
----
13

query I rowsort
SELECT DISTINCT + 97 FROM tab1 AS cor0 GROUP BY cor0.col1
----
97

query I rowsort
SELECT DISTINCT 53 FROM tab0 AS cor0 GROUP BY col0
----
53

query I rowsort
SELECT - cor0.col2 + - cor0.col2 * 59 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1440
-2280
-4740

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-15
-91
-92

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
----
15
91
92

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 27 AS col2 FROM tab1 cor0 GROUP BY col1
----
27
27
27

query I rowsort
SELECT + col0 * col0 FROM tab1 AS cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT 74 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
74
74
74

query I rowsort
SELECT ALL 50 FROM tab1, tab1 cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT 90 FROM tab0 AS cor0 GROUP BY cor0.col1
----
90
90

query I rowsort
SELECT + cor0.col2 * 6 FROM tab2 AS cor0 GROUP BY col2
----
348
474
522

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL + - tab0.col1 * + 12 FROM tab0 GROUP BY tab0.col1
----
-972
0

query I rowsort
SELECT cor0.col1 + - 22 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-22
59

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) + cor0.col0 * 68 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
1794
2967
5727

query I rowsort
SELECT cor0.col1 + - 75 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
-14
-16
-34

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col2
----
15
91
92

query I rowsort
SELECT DISTINCT - col0 * col2 + - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1056
-2133
-3192

query I rowsort
SELECT + 47 AS col2 FROM tab1 GROUP BY tab1.col2
----
47
47
47

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 + - 30 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11
29
31

query I rowsort
SELECT + 58 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58
58
58

query I rowsort
SELECT 23 FROM tab0 cor0 GROUP BY cor0.col1
----
23
23

query I rowsort
SELECT DISTINCT 60 + cor0.col1 * - NULLIF ( cor0.col0, cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
NULL

query I rowsort
SELECT col2 + - 94 AS col1 FROM tab1 GROUP BY tab1.col2
----
-23
-49
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + 42 ) col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT ALL - 78 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-78
-78
-78

query I rowsort
SELECT - 86 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-86
-86
-86

query I rowsort
SELECT + 58 FROM tab0 AS cor0 GROUP BY cor0.col1
----
58
58

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5331
SELECT CAST( NULL AS SIGNED ) * 62 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5331
SELECT CAST ( NULL AS INTEGER ) * 62 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL
NULL

query I rowsort
SELECT DISTINCT - 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-30

query I rowsort
SELECT ALL - 69 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-1035
-6279
-6348

onlyif mysql # DIV for integer division: 
query I rowsort label-5334
SELECT DISTINCT + 85 DIV - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-3

skipif mysql # not compatible
query I rowsort label-5334
SELECT DISTINCT + 85 / - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-1
-3

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1 cor0 GROUP BY col0, col2
----
45
71
8

query I rowsort
SELECT - 38 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-38
-38
-38

query I rowsort
SELECT DISTINCT 97 FROM tab2 AS cor0 GROUP BY col2
----
97

query I rowsort
SELECT - 34 FROM tab1 GROUP BY tab1.col2
----
-34
-34
-34

query I rowsort
SELECT + 25 FROM tab2 GROUP BY tab2.col1
----
25
25
25

query I rowsort
SELECT - col1 * 30 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1320
-1710
-180

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col0
----
58
79
87

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 ALL cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - 61 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-61
-61
-61

query I rowsort
SELECT + 52 * col1 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
4293

query I rowsort
SELECT 43 FROM tab0 AS cor0 GROUP BY cor0.col1
----
43
43

query I rowsort
SELECT DISTINCT + + tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col2 * ( - 81 * cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY col2, col0
----
-116964
-46656
-505521

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, col1
----
-81
0

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT cor0.col0 + - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-17
11
14

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-5356
SELECT ALL cor0.col0 DIV + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5356
SELECT ALL cor0.col0 / + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 39 * + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3549
3588
585

query I rowsort
SELECT - 56 AS col1 FROM tab2 GROUP BY col2
----
-56
-56
-56

query I rowsort
SELECT + 58 AS col0 FROM tab0 GROUP BY col2
----
58
58
58

query I rowsort
SELECT ALL cor0.col0 * - 48 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1056
-1344
-3936

query I rowsort
SELECT 22 AS col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
22
22
22

query I rowsort
SELECT DISTINCT col1 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT + 32 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
32

query I rowsort
SELECT DISTINCT - 39 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-39

query I rowsort
SELECT - 51 * + 61 FROM tab0 cor0 GROUP BY cor0.col1
----
-3111
-3111

query I rowsort
SELECT DISTINCT 96 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
96

query I rowsort
SELECT - cor0.col1 * 73 + - col2 * - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-615
354
854

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 45 col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-45

query I rowsort
SELECT ALL - 53 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + col1 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 56 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
5096
5152
840

query I rowsort
SELECT ALL + 21 FROM tab0 GROUP BY tab0.col0
----
21
21
21

query I rowsort
SELECT cor0.col2 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT - cor1.col1 + 97 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2, cor1.col1
----
36
38
56

query I rowsort
SELECT 35 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT - 50 * - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
4550
4600
750

query I rowsort
SELECT 39 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
39
39
39

query I rowsort
SELECT DISTINCT cor0.col2 - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0

query I rowsort
SELECT ALL 40 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
40
40
40

query I rowsort
SELECT - + 16 FROM tab0, tab2 cor0, tab0 AS cor1 GROUP BY tab0.col2
----
-16
-16
-16

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - 78 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
-78
-78
-78

query I rowsort
SELECT ALL 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT 90 FROM tab1 GROUP BY col1
----
90
90
90

query I rowsort
SELECT 87 FROM tab1 AS cor0 GROUP BY cor0.col1
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab2, tab0 cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT 40 FROM tab1 AS cor0 GROUP BY cor0.col2
----
40
40
40

query I rowsort
SELECT col1 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - 84 AS col0 FROM tab2 GROUP BY tab2.col2
----
-84
-84
-84

query I rowsort
SELECT 81 * + 7 FROM tab1 AS cor0 GROUP BY cor0.col2
----
567
567
567

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + 19 AS col2 FROM tab0 cor0 GROUP BY col1
----
19
19

query I rowsort
SELECT ALL 1 FROM tab0 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT + 54 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
54

query I rowsort
SELECT 45 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL - 32 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col2
----
-32
-32
-32

query I rowsort
SELECT - 89 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-89
-89
-89

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + 25 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL + ( col0 ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT 44 * 5 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
220
220
220

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 18 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
18

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NULL
----
58
79
87

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NULL <= NULL
----

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT - - tab1.col2 * - tab1.col2 * 71 FROM tab1 GROUP BY col2
----
-143775
-357911
-4544

query I rowsort
SELECT ALL - 45 * - cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
1170
1935
3735

query I rowsort
SELECT cor0.col1 * - 37 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2997
0

query I rowsort
SELECT 85 FROM tab2 AS cor0 GROUP BY col0
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 24 col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
24
24
24

query I rowsort
SELECT DISTINCT + 43 AS col0 FROM tab0, tab1 cor0, tab1 AS cor1 GROUP BY cor1.col1
----
43

query I rowsort
SELECT ALL + col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT 57 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3306
4503
4959

onlyif mysql # DIV for integer division: 
query I rowsort label-5418
SELECT ALL - - 88 DIV - 91 FROM tab0 GROUP BY tab0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5418
SELECT ALL - - 88 / - 91 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT ALL 98 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2548
4214
8134

query I rowsort
SELECT DISTINCT + 84 FROM tab1 AS cor0 GROUP BY cor0.col1
----
84

query I rowsort
SELECT - cor0.col0 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT + 5 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT ALL + col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL + 67 FROM tab0 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT ALL 72 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT col0 AS col0 FROM tab1 AS cor0 GROUP BY col0, col1
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 * 3 FROM tab1 AS cor0 GROUP BY col0
----
246
66
84

query I rowsort
SELECT 12 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
12
12
12

query I rowsort
SELECT ALL cor0.col2 + 72 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
110
151
96

onlyif mysql # DIV for integer division: 
query I rowsort label-5431
SELECT ALL 2 DIV - 15 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5431
SELECT ALL 2 / - 15 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT 86 * + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1, col0
----
0
6966

query I rowsort
SELECT ALL + - 8 + - 30 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-38
-38
-38

query I rowsort
SELECT - + 91 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-91
-91
-91

query I rowsort
SELECT - cor0.col2 + - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
-158
-48
-76

query I rowsort
SELECT - 94 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-94
-94
-94

query I rowsort
SELECT + 63 FROM tab0 AS cor0 GROUP BY col2
----
63
63
63

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT + 25 FROM tab2 AS cor0 GROUP BY cor0.col2
----
25
25
25

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT + CASE + 20 WHEN cor0.col2 THEN + ( 55 ) + + cor0.col2 WHEN cor0.col2 THEN NULL ELSE + 50 END * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2900
3950
4350

query I rowsort
SELECT DISTINCT CASE - 71 WHEN - cor0.col1 THEN 63 END FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-80

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1305
5336
7189

query I rowsort
SELECT cor0.col1 * + 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
6480

query I rowsort
SELECT ALL cor0.col2 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 cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT 71 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
71

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + col2 + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-5454
SELECT ALL + cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5454
SELECT ALL + cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-5456
SELECT col0 DIV + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5456
SELECT col0 / + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT DISTINCT 11 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
11

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL + 29 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY tab2.col2
----
29
29
29

query I rowsort
SELECT DISTINCT + 25 FROM tab0 cor0 GROUP BY cor0.col2
----
25

query I rowsort
SELECT - 15 * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-1185
-1305
-870

query I rowsort
SELECT DISTINCT + 93 FROM tab2 AS cor0 GROUP BY cor0.col2
----
93

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-5464
SELECT DISTINCT cor0.col2 DIV - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-5464
SELECT DISTINCT cor0.col2 / - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 * - 64 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1386
-1764
-5166

query I rowsort
SELECT ALL + 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT - 17 - + cor0.col1 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-23
-61
-74

query I rowsort
SELECT col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT + 88 * cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
7209

query I rowsort
SELECT 32 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
32
32
32

query I rowsort
SELECT + 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 22 + + 31 col0 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5477
SELECT ( 31 + + col2 ) * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5477
SELECT ( 31 + + col2 ) * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT ALL + 39 FROM tab2 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT 4 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-152
-316
-96

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + cor0.col2 * 29 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
1305
2059
232

query I rowsort
SELECT ALL 56 FROM tab2 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT ALL - + cor0.col2 * cor0.col2 * - 88 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
127072
50688
549208

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1 AS cor0 GROUP BY col2, col1
----
45
71
8

query I rowsort
SELECT DISTINCT 57 FROM tab2 cor0 GROUP BY cor0.col1
----
57

query I rowsort
SELECT - col0 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-31
-44
7

query I rowsort
SELECT + 73 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
73
73
73

query I rowsort
SELECT 68 FROM tab2 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT DISTINCT + 97 + + tab0.col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col2
----
121
135
176

query I rowsort
SELECT cor0.col0 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1305
-5336
-7189

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col1 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 60 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-60
-60
-60

onlyif mysql # DIV for integer division: 
query I rowsort label-5498
SELECT ALL + 49 DIV cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5498
SELECT ALL + 49 / cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
0
1
2

query I rowsort
SELECT 20 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
20
20
20

query I rowsort
SELECT ALL + 12 - - 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + - 13 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
11
25
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
44
44

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - cor0.col1 * 8 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-352
-456
-48

query I rowsort
SELECT cor0.col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL + - cor0.col2 * + 0 + 65 FROM tab0, tab1 cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT - 25 FROM tab1 AS cor0 GROUP BY col1
----
-25
-25
-25

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT 10 * - 57 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
-570
-570
-570

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 93, cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col2
----
93

query I rowsort
SELECT DISTINCT - 30 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-30

query I rowsort
SELECT DISTINCT 34 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
125
126
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 + + col2 * - cor0.col1 * cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-137877
-368172
-461662

query I rowsort
SELECT ALL 95 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
95
95

query I rowsort
SELECT DISTINCT - 74 * 6 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-444

query I rowsort
SELECT DISTINCT - 58 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-43
33
34

onlyif mysql # DIV for integer division: 
query I rowsort label-5519
SELECT DISTINCT - + 66 DIV 7 AS col0 FROM tab1 GROUP BY tab1.col0
----
-9

skipif mysql # not compatible
query I rowsort label-5519
SELECT DISTINCT - + 66 / 7 AS col0 FROM tab1 GROUP BY tab1.col0
----
-9

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
0
81

query I rowsort
SELECT col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 25 * - 84 col0 FROM tab1 cor0 GROUP BY cor0.col1
----
2100
2100
2100

query I rowsort
SELECT ALL 49 FROM tab2 AS cor0 GROUP BY cor0.col1
----
49
49
49

query I rowsort
SELECT + 15 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT 28 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
28
28
28

query I rowsort
SELECT cor0.col2 * col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col2
----
1444
576
6241

query I rowsort
SELECT ALL - 80 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-80
-80
-80

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5529
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5529
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 83 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
83
83
83

query I rowsort
SELECT DISTINCT - 17 AS col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
-17

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - 38 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
-38
-38
-38

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT 43 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
43
43
43

query I rowsort
SELECT + 90 FROM tab2 AS cor0 GROUP BY col2
----
90
90
90

query I rowsort
SELECT ALL - ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 57 + - cor0.col2 FROM tab0 AS cor0 GROUP BY col2
----
-22
19
33

query I rowsort
SELECT + 20 FROM tab2 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT ALL + - 83 FROM tab1 GROUP BY col0
----
-83
-83
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 - col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT 76 FROM tab2 AS cor0 GROUP BY cor0.col1
----
76

query I rowsort
SELECT ALL cor0.col2 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + 98 AS col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5547
SELECT ALL CAST( NULL AS SIGNED ) + + 56 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5547
SELECT ALL CAST ( NULL AS INTEGER ) + + 56 FROM tab0 cor0 GROUP BY cor0.col1
----
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 22 + 88 col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT - 48 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-48
-48
-48

query I rowsort
SELECT ALL - 82 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-82
-82
-82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5551
SELECT ALL - CAST( + 97 AS SIGNED ) * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1455
-8827
-8924

skipif mysql # not compatible
query I rowsort label-5551
SELECT ALL - CAST ( + 97 AS INTEGER ) * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1455
-8827
-8924

query I rowsort
SELECT DISTINCT - 28 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-34
-72
-85

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 60 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT - 35 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1505
2905
910

query I rowsort
SELECT DISTINCT 97 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 42 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42

query I rowsort
SELECT DISTINCT 45 FROM tab1 AS cor0 GROUP BY col1
----
45

query I rowsort
SELECT + 44 FROM tab1 AS cor0 GROUP BY col0
----
44
44
44

query I rowsort
SELECT + 23 AS col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
23
23
23

query I rowsort
SELECT DISTINCT 92 FROM tab1 AS cor0 GROUP BY cor0.col2
----
92

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT + col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT cor0.col1 * + cor0.col1 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT - tab1.col2 * tab1.col2 + tab1.col2 FROM tab1 GROUP BY col2
----
-1980
-4970
-56

query I rowsort
SELECT DISTINCT - col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

query I rowsort
SELECT ALL NULLIF ( 73, + col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col1 * - 16 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-30976
-51984
-576

query I rowsort
SELECT ALL ( 68 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL cor0.col2 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col1, col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 32 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-32
-32
-32

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT 59 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL + cor0.col1 * 47 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
3807

query I rowsort
SELECT DISTINCT 95 + 2 AS col2 FROM tab1 GROUP BY tab1.col0
----
97

query I rowsort
SELECT DISTINCT - cor0.col0 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT cor0.col0 + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 51 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
51

query I rowsort
SELECT + 71 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT - 39 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2262
-3081
-3393

query I rowsort
SELECT ALL cor0.col0 - col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-5591
SELECT - cor0.col0 DIV col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5591
SELECT - cor0.col0 / col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT 18 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT + + ( tab0.col0 ) AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - 41 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-41

onlyif mysql # DIV for integer division: 
query I rowsort label-5595
SELECT ALL 9 DIV + 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5595
SELECT ALL 9 / + 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT NULLIF ( + 87, cor0.col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
87
87
87

query I rowsort
SELECT DISTINCT - 19 + - 44 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-63

query I rowsort
SELECT DISTINCT 22 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT 41 FROM tab0 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 3 col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
-3
-3
-3

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - NULLIF ( cor0.col0, cor0.col0 ) FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - 34 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-34
-34
-34

query I rowsort
SELECT + ( + 41 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 64 * + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2816
3648
384

query I rowsort
SELECT ALL + 68 FROM tab0 AS cor0 GROUP BY cor0.col1
----
68
68

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5610
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-5610
SELECT DISTINCT - CAST ( NULL AS REAL ) * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5611
SELECT ALL + CAST( NULL AS SIGNED ) * + ( - col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5611
SELECT ALL + CAST ( NULL AS INTEGER ) * + ( - col0 ) AS col1 FROM tab2 GROUP BY tab2.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 5 FROM tab1 GROUP BY tab1.col2
----
5

query I rowsort
SELECT DISTINCT + 96 FROM tab0 GROUP BY tab0.col2
----
96

query I rowsort
SELECT ALL - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 * tab2.col1 col0 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - col0 FROM tab2 AS cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col1 * 61 + + 5 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-2904
-3762
-396

query I rowsort
SELECT ALL - 38 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-38
-38

query I rowsort
SELECT + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 33 FROM tab2 AS cor0 GROUP BY cor0.col2
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 col0 FROM tab0, tab2 cor0 GROUP BY tab0.col0
----
-83
-83
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 * + 76 * + cor1.col1 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
147136
246924
2736

query I rowsort
SELECT ALL + 20 FROM tab1 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT ALL - 85 + 68 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT - 49 FROM tab1 GROUP BY tab1.col1
----
-49
-49
-49

query I rowsort
SELECT ALL - 41 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-41
-41
-41

query I rowsort
SELECT ALL + 43 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT - cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT DISTINCT + + 54 + 88 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
142

query I rowsort
SELECT ALL + 77 + - 88 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1397
8085
8173

query I rowsort
SELECT ALL - 39 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-39
-39

query I rowsort
SELECT ALL - 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT ALL 49 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
49
49
49

onlyif mysql # DIV for integer division: 
query I rowsort label-5635
SELECT 11 DIV - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5635
SELECT 11 / - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col1 * - cor0.col1 + 66 FROM tab2 cor0 GROUP BY cor0.col1
----
-1615
-3415
-3655

query I rowsort
SELECT + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-205379
-226981
-68921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 70 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col1 * NULLIF ( - 68, + cor0.col1 + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5508
0

query I rowsort
SELECT - col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 45 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT ALL - 78 AS col2 FROM tab2, tab0 AS cor0, tab2 cor1 GROUP BY tab2.col2
----
-78
-78
-78

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 40 * 90 col1 FROM tab2 AS cor0 GROUP BY col1
----
3600

query I rowsort
SELECT ALL - 72 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - col2 * - 60 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1, cor0.col2
----
153900
187440
2880

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-3772
-5369
-915

query I rowsort
SELECT + col0 + 58 * cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
5369
5428
885

query I rowsort
SELECT - 99 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-99
-99
-99

query I rowsort
SELECT 99 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
99
99
99

query I rowsort
SELECT + 96 FROM tab2 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT - cor0.col0 * - 48 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
4368
4416
720

query I rowsort
SELECT ALL + 28 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
28
28
28

query I rowsort
SELECT 65 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 0 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT 18 * - cor0.col2 * cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-112338
-136242
-60552

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT + cor0.col2 - 60 * + 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4249
-4275
-4312

query I rowsort
SELECT + 64 FROM tab0, tab2 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
64
64
64

query I rowsort
SELECT DISTINCT + + 0 FROM tab2 GROUP BY tab2.col1
----
0

query I rowsort
SELECT ALL 48 * tab2.col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
1968
2832
2928

query I rowsort
SELECT ALL + - cor0.col2 + cor0.col2 AS col0 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 col1 FROM tab2 AS cor0 GROUP BY col2
----
44

query I rowsort
SELECT ALL + cor0.col0 * + 28 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2548
2576
420

query I rowsort
SELECT - cor0.col0 * - 34 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2788
748
952

query I rowsort
SELECT ALL + 26 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
2366
2392
390

query I rowsort
SELECT ALL cor0.col0 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - NULLIF ( cor0.col2, cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 35 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
35
35
35

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-41
-59
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 * - 38 col1 FROM tab0, tab1 cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-3724
-3724
-3724

onlyif mysql # DIV for integer division: 
query I rowsort label-5677
SELECT + cor0.col2 DIV cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5677
SELECT + cor0.col2 / cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 32 AS col1 FROM tab1 GROUP BY tab1.col1
----
-32
-32
-32

query I rowsort
SELECT 90 FROM tab0 GROUP BY tab0.col1
----
90
90

query I rowsort
SELECT DISTINCT 90 FROM tab0 AS cor0 GROUP BY cor0.col0
----
90

query I rowsort
SELECT DISTINCT + 13 + cor0.col2 * 90 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
2173
3433
7123

onlyif mysql # DIV for integer division: 
query I rowsort label-5683
SELECT DISTINCT - cor0.col0 DIV - 73 + COALESCE ( 83, cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col0
----
83
84

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-5683
SELECT DISTINCT - cor0.col0 / - 73 + COALESCE ( 83, cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col0
----
83
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 + cor0.col0 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
103
43
49

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-5686
SELECT ALL + 18 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5686
SELECT ALL + 18 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL 10 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
10
10
10

query I rowsort
SELECT DISTINCT + 88 + - 9 AS col0 FROM tab0 cor0 GROUP BY col2
----
79

query I rowsort
SELECT - col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + 47 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + cor0.col0 col1 FROM tab2 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT ALL - 74 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-74
-74
-74

query I rowsort
SELECT DISTINCT NULLIF ( + cor0.col2, - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT DISTINCT col1 + - 81 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-67
21
34

query I rowsort
SELECT ALL + 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
14
14
14

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT 63 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0, cor0.col2
----
63
63
63

query I rowsort
SELECT 21 * tab0.col1 AS col1 FROM tab0 GROUP BY col1
----
0
1701

query I rowsort
SELECT DISTINCT - 3 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-3

query I rowsort
SELECT cor0.col0 - cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 73 AS col1 FROM tab1 GROUP BY col0
----
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 + 92 col1 FROM tab0, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
13
54
68

query I rowsort
SELECT 79 FROM tab1 cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT DISTINCT cor0.col1 + - col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 + + 34 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-5187
-5336
285

query I rowsort
SELECT ( 6 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT - 66 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-66

query I rowsort
SELECT 50 FROM tab1 cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT DISTINCT cor0.col2 * 43 FROM tab0 AS cor0 GROUP BY col2
----
1032
1634
3397

query I rowsort
SELECT ALL + 18 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT 96 FROM tab1 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT - cor0.col1 * 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2706
-3894
-4026

query I rowsort
SELECT - 83 + + 61 FROM tab0 GROUP BY tab0.col0
----
-22
-22
-22

query I rowsort
SELECT ALL - - cor0.col0 + + cor0.col0 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT + + 42 FROM tab2, tab2 cor0 GROUP BY tab2.col1
----
42
42
42

query I rowsort
SELECT 16 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
16
16
16

query I rowsort
SELECT ALL ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT - 10 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-10
-10
-10

query I rowsort
SELECT 22 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT - 31 * + 30 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-930
-930
-930

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 14 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1274
1288
210

onlyif mysql # DIV for integer division: 
query I rowsort label-5724
SELECT ALL 2 * 62 DIV cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
4
5

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5724
SELECT ALL 2 * 62 / cor0.col0 col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
4
5

query I rowsort
SELECT ALL 16 FROM tab0 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT + 67 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT 94 FROM tab2 GROUP BY tab2.col1
----
94
94
94

query I rowsort
SELECT ALL - cor0.col1 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT + cor0.col1 - + cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

query I rowsort
SELECT DISTINCT + 79 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
79

query I rowsort
SELECT + + 97 FROM tab1 GROUP BY tab1.col1
----
97
97
97

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT 10 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
10
10
10

query I rowsort
SELECT 33 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, col1
----
33
33
33

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + cor0.col2 - 82 FROM tab1 AS cor0 GROUP BY col2
----
-11
-37
-74

query I rowsort
SELECT DISTINCT COALESCE ( + 2, cor0.col0 * + col0 ) - - 22 AS col1 FROM tab0 cor0 GROUP BY col0
----
24

query I rowsort
SELECT - 48 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-48
-48
-48

query I rowsort
SELECT ALL + 81 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
81
81
81

query I rowsort
SELECT ALL + 97 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT ALL 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT - 47 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-47
-47
-47

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
-3483
0

query I rowsort
SELECT DISTINCT - 72 FROM tab0 cor0 GROUP BY col2
----
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - 69 * + cor1.col0 FROM tab2, tab2 AS cor0, tab0 cor1 GROUP BY cor1.col0
----
-1794
-2967
-5727

query I rowsort
SELECT DISTINCT - 34 * - 58 FROM tab0 cor0 GROUP BY cor0.col2
----
1972

query I rowsort
SELECT DISTINCT cor0.col2 * 45 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
3195
360

query I rowsort
SELECT 14 FROM tab0 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT 97 AS col1 FROM tab0 GROUP BY tab0.col1
----
97
97

query I rowsort
SELECT DISTINCT - 65 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-65

query I rowsort
SELECT 74 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT ALL col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL 35 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
35
35
35

onlyif mysql # DIV for integer division: 
query I rowsort label-5758
SELECT DISTINCT cor0.col0 DIV + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-5758
SELECT DISTINCT cor0.col0 / + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
1

query I rowsort
SELECT 52 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
52
52
52

query I rowsort
SELECT ALL - 43 * - 80 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3440
3440
3440

query I rowsort
SELECT ALL + 13 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
35
41
95

query I rowsort
SELECT DISTINCT - 18 + tab1.col2 + + 68 AS col2 FROM tab1 GROUP BY tab1.col2
----
121
58
95

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5764
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-5764
SELECT ALL - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5765
SELECT ALL - + CAST( 25 AS SIGNED ) + tab0.col1 FROM tab0 GROUP BY col1
----
-25
56

skipif mysql # not compatible
query I rowsort label-5765
SELECT ALL - + CAST ( 25 AS INTEGER ) + tab0.col1 FROM tab0 GROUP BY col1
----
-25
56

query I rowsort
SELECT + + 13 + - col1 FROM tab0 GROUP BY col1
----
-68
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT ALL 62 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
62
62
62

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 + - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor0.col0
----
210
8190
8372

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL + ( cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

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 cor0.col1 * 96 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
3936
5664
5856

query I rowsort
SELECT DISTINCT - 58 FROM tab0 cor0 GROUP BY cor0.col2, col1
----
-58

onlyif mysql # DIV for integer division: 
query I rowsort label-5776
SELECT + 18 DIV - 22 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5776
SELECT + 18 / - 22 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 61 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT ALL cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + + cor0.col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 14 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5781
SELECT - col0 * NULLIF ( col0, CAST( NULL AS SIGNED ) ) col2 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5781
SELECT - col0 * NULLIF ( col0, CAST ( NULL AS INTEGER ) ) col2 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT - col0 + tab1.col0 FROM tab1 GROUP BY col0
----
0

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.col1 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT ALL 44 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-15
-91
-92

query I rowsort
SELECT cor0.col1 * + 30 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
1230
1770
1830

query I rowsort
SELECT - cor0.col2 + + cor0.col1 + cor0.col2 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2553
-3151
-50

query I rowsort
SELECT DISTINCT col2 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT ALL + col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT + col2 - - 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
117
143
80

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 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 col2 col1 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL 67 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT DISTINCT + 35 FROM tab2 cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT 15 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT 48 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
48
48
48

query I rowsort
SELECT ALL - 48 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-48
-48
-48

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2, tab2 cor0, tab2 cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 * - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5805
SELECT DISTINCT cor0.col0 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-5805
SELECT DISTINCT cor0.col0 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL

query I rowsort
SELECT cor0.col1 + - 7 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
34
52
54

query I rowsort
SELECT - 66 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-66
-66
-66

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-5808
SELECT + CAST( NULL AS SIGNED ) * 4 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5808
SELECT + CAST ( NULL AS INTEGER ) * 4 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
NULL
NULL

query I rowsort
SELECT ALL - 6 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT + 26 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
26

query I rowsort
SELECT ALL + - 3 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT ALL 73 FROM tab2 cor0 GROUP BY col2
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 27 col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-27

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5814
SELECT + cor0.col0 * CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5814
SELECT + cor0.col0 * CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * 85 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-1870
-2380
-6970

query I rowsort
SELECT ALL + 76 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT 89 + cor0.col2 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
134
160
97

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ( - cor0.col2 ) * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT DISTINCT - 66 FROM tab0 cor0 GROUP BY cor0.col1
----
-66

query I rowsort
SELECT 82 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
82
82
82

query I rowsort
SELECT ALL + NULLIF ( col2, - 51 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 * + 37 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1036
3034
814

query I rowsort
SELECT DISTINCT + 72 FROM tab1 AS cor0 GROUP BY cor0.col2
----
72

query I rowsort
SELECT ( - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - - col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT ALL 72 FROM tab2 AS cor0 GROUP BY col1
----
72
72
72

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 col2 FROM tab0 cor0 GROUP BY cor0.col1
----
89
89

query I rowsort
SELECT - 51 + - tab1.col1 AS col1 FROM tab1 GROUP BY col1
----
-108
-57
-95

query I rowsort
SELECT - col1 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT 16 FROM tab1 GROUP BY tab1.col2
----
16
16
16

query I rowsort
SELECT + - cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-5836
SELECT DISTINCT - 61 DIV - 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2

skipif mysql # not compatible
query I rowsort label-5836
SELECT DISTINCT - 61 / - 26 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
3364
6241
7569

query I rowsort
SELECT + ( col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-5839
SELECT COALESCE ( + 77 + + cor0.col1, cor0.col1 ) DIV - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
-2
-2

skipif mysql # not compatible
query I rowsort label-5839
SELECT COALESCE ( + 77 + + cor0.col1, cor0.col1 ) / - col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
-2
-2

query I rowsort
SELECT - 54 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-54
-54
-54

query I rowsort
SELECT - 34 FROM tab0 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-34
-34
-34

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-5843
SELECT col1 DIV + 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3

skipif mysql # not compatible
query I rowsort label-5843
SELECT col1 / + 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

query I rowsort
SELECT - 36 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
15
91
92

query I rowsort
SELECT + ( 9 ) FROM tab1 AS cor0 GROUP BY col0
----
9
9
9

query I rowsort
SELECT ALL ( + cor0.col0 ) * + col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-5851
SELECT - 53 DIV cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-8
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-5851
SELECT - 53 / cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-8
0

query I rowsort
SELECT DISTINCT 46 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT - 16 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-16
-16
-16

query I rowsort
SELECT DISTINCT - + 59 + - cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-150
-151
-74

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-5856
SELECT DISTINCT cor0.col2 - 61 DIV 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif mysql # not compatible
query I rowsort label-5856
SELECT DISTINCT cor0.col2 - 61 / 84 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + ( + 67 ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
67
67
67

query I rowsort
SELECT 21 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
21
21
21

query I rowsort
SELECT ALL - - 42 AS col0 FROM tab2 GROUP BY col2
----
42
42
42

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 * - ( - cor0.col0 ) * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-17550
-571704
-79464

query I rowsort
SELECT ALL + 7 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
7
7
7

query I rowsort
SELECT ALL - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT cor0.col1 * - ( 62 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-2542
-3658
-3782

query I rowsort
SELECT - 4 FROM tab1 AS cor0 GROUP BY col2, col1
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
-3364
-6241
-7569

query I rowsort
SELECT + tab2.col2 * 48 AS col0 FROM tab2 GROUP BY tab2.col2
----
2784
3792
4176

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 40 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40
40
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + NULLIF ( cor0.col0 * + col0, - COALESCE ( - 48, col0 ) ) col2 FROM tab1 cor0 GROUP BY col0
----
484
6724
784

query I rowsort
SELECT 21 * 43 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
903
903
903

query I rowsort
SELECT DISTINCT + 87 AS col2 FROM tab0 cor0 GROUP BY col1
----
87

query I rowsort
SELECT - 44 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-44
-44
-44

query I rowsort
SELECT DISTINCT col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 63 col0 FROM tab0, tab1 cor0 GROUP BY tab0.col2
----
63

query I rowsort
SELECT DISTINCT 97 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
112
188
189

query I rowsort
SELECT - cor0.col0 * ( + 43 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1204
-3526
-946

query I rowsort
SELECT + ( NULLIF ( + 93, - cor0.col1 ) ) + + 68 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
161
161
161

query I rowsort
SELECT DISTINCT ( - 29 ) * + 87 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-2523

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 79 col0 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
-79
-79
-79

query I rowsort
SELECT 33 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

query I rowsort
SELECT + tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 97 FROM tab0 AS cor0 GROUP BY col2
----
97
97
97

query I rowsort
SELECT col2 * 31 - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1140
2370
720

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 61 AS col0 FROM tab1 GROUP BY tab1.col1
----
61
61
61

query I rowsort
SELECT - 23 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
15
56

query I rowsort
SELECT DISTINCT + 98 FROM tab2 AS cor0 GROUP BY cor0.col2
----
98

query I rowsort
SELECT DISTINCT + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 32 FROM tab1 GROUP BY tab1.col1
----
-32

query I rowsort
SELECT + 98 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
98
98

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL cor0.col1 * - 37 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-1628
-2109
-222

query I rowsort
SELECT 33 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
33
33
33

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 + 6 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT DISTINCT + - 38 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
-38

query I rowsort
SELECT tab0.col2 * + 72 AS col2 FROM tab0 GROUP BY col2
----
1728
2736
5688

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
41
59
61

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + col2 - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-12
2
27

query I rowsort
SELECT ALL cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 + + col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT - col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT + cor0.col0 + - 29 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-7
53

query I rowsort
SELECT + col0 * + ( + cor0.col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL 28 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT DISTINCT - 49 FROM tab0 cor0 GROUP BY cor0.col0
----
-49

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5912
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab0 GROUP BY tab0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-5912
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab0 GROUP BY tab0.col1
----
NULL

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 98, cor0.col2, + col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
98

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 DISTINCT 38 FROM tab2 cor0 GROUP BY cor0.col2
----
38

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL + 20 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT - 57 FROM tab2 cor0 GROUP BY cor0.col1
----
-57
-57
-57

query I rowsort
SELECT DISTINCT cor0.col0 * 67 FROM tab1 AS cor0 GROUP BY col0
----
1474
1876
5494

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 46 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
46

query I rowsort
SELECT DISTINCT - col0 * + cor0.col0 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-13725
-347024
-488579

query I rowsort
SELECT DISTINCT col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT DISTINCT + 62 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
62

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5926
SELECT - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5926
SELECT - CAST ( NULL AS REAL ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 89 FROM tab0 AS cor0 GROUP BY cor0.col1
----
89
89

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL 96 FROM tab2 AS cor0 GROUP BY cor0.col1
----
96
96
96

query I rowsort
SELECT 38 + + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
121
64
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + NULLIF ( - cor0.col0, + col0 ) + 62 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-20
34
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 29 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 * + 71 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3621
3621
3621

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 96 col1 FROM tab1 AS cor0 GROUP BY col2
----
96

query I rowsort
SELECT cor0.col2 + col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
116
158
174

query I rowsort
SELECT DISTINCT ( 38 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
38

query I rowsort
SELECT ALL + 85 AS col1 FROM tab1 GROUP BY col2
----
85
85
85

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NULL
----
26
43
83

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 col1 HAVING NOT NULL IN ( - col1 * cor0.col1 )
----

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) IN ( cor0.col1 ) GROUP BY cor0.col0 HAVING NOT NULL IS NOT NULL
----

query I rowsort
SELECT + cor0.col2 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
15

query I rowsort
SELECT ALL - cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
-45
-71
-8

query I rowsort
SELECT + 92 * 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6532
6532
6532

query I rowsort
SELECT DISTINCT 22 FROM tab0 cor0 GROUP BY cor0.col0, col1
----
22

query I rowsort
SELECT DISTINCT - - tab1.col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - 52 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1144
-1456
-4264

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col2, cor0.col1
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 19 col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT ALL + 12 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT + + 38 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
38
38
38

query I rowsort
SELECT + cor0.col2 * - 84 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-170100
-423444
-5376

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 5 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
5

query I rowsort
SELECT ALL 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
12
12
12

query I rowsort
SELECT 11 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-5957
SELECT ALL - col2 * cor0.col2 + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5957
SELECT ALL - col2 * cor0.col2 + CAST ( NULL AS REAL ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 3 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + 46 * 29 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1358
1372
1413

query I rowsort
SELECT ALL + NULLIF ( + col2, - cor0.col2 + cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 88 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
112
126
167

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

query I rowsort
SELECT DISTINCT 81 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
4698
6399
7047

query I rowsort
SELECT + 71 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT 97 * col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
187792
315153
3492

query I rowsort
SELECT DISTINCT + 23 - col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-20
-3
-60

query I rowsort
SELECT DISTINCT - ( cor0.col2 + col2 ) * + 77 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-12166
-13398
-8932

query I rowsort
SELECT DISTINCT 69 FROM tab0 AS cor0 GROUP BY cor0.col2
----
69

query I rowsort
SELECT ALL 50 FROM tab2 AS cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT DISTINCT cor0.col0 - 29 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
-3
14
54

onlyif mysql # DIV for integer division: 
query I rowsort label-5973
SELECT cor0.col2 DIV + 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5973
SELECT cor0.col2 / + 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
1

query I rowsort
SELECT 66 * + 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3828
3828
3828

query I rowsort
SELECT 2 AS col1 FROM tab0 GROUP BY tab0.col1
----
2
2

query I rowsort
SELECT ALL - cor1.col2 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + 15 * + 36 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
540
540
540

query I rowsort
SELECT - ( col0 + + 47 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-129
-69
-75

query I rowsort
SELECT + 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35
35
35

query I rowsort
SELECT - 42 FROM tab1 GROUP BY col0
----
-42
-42
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ALL + tab2.col0 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + + 14 FROM tab2 GROUP BY col0
----
14
14
14

query I rowsort
SELECT + 30 FROM tab0 GROUP BY tab0.col1
----
30
30

query I rowsort
SELECT ALL 76 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
76
76

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT 47 FROM tab1 AS cor0 GROUP BY col1
----
47
47
47

query I rowsort
SELECT + 55 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * cor0.col0 col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT 95 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
95
95

query I rowsort
SELECT ALL cor0.col1 - + col1 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - - cor0.col0 AS col0 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT 43 + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-15
-36
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * 26 + cor0.col2 col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-1125
-1775
-200

query I rowsort
SELECT + 94 FROM tab2, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col2
----
94
94
94

query I rowsort
SELECT + 57 + cor0.col1 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
101
114
63

query I rowsort
SELECT ALL - + 52 FROM tab0 GROUP BY tab0.col0
----
-52
-52
-52

query I rowsort
SELECT 51 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
51
51
51

query I rowsort
SELECT ALL + 89 - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
18
44
81

query I rowsort
SELECT DISTINCT - 19 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-13
25
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 * col2 col1 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL + tab2.col2 AS col0 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
225
8281
8464

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, col1
----
-56

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 GROUP BY col1, col0
----
41
59
61

query I rowsort
SELECT - 20 AS col0 FROM tab0 GROUP BY col2
----
-20
-20
-20

query I rowsort
SELECT + 54 FROM tab1 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT ALL 25 FROM tab1 AS cor0 GROUP BY cor0.col1
----
25
25
25

query I rowsort
SELECT 19 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT DISTINCT 15 FROM tab0 AS cor0 GROUP BY cor0.col2
----
15

query I rowsort
SELECT DISTINCT 93 * + 41 * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
156333
224967
232593

query I rowsort
SELECT + 86 FROM tab0 cor0 GROUP BY cor0.col1
----
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col2 + 82 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
127
153
90

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
40

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT + 92 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 - 8 * 1 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-34
-51
-91

query I rowsort
SELECT DISTINCT - ( - 95 + 80 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
15

query I rowsort
SELECT 93 FROM tab2 AS cor0 GROUP BY cor0.col2
----
93
93
93

query I rowsort
SELECT ALL 17 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT ALL - + 76 - + cor0.col2 * 42 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-2512
-3394
-3730

query I rowsort
SELECT + 89 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3649
5251
5429

query I rowsort
SELECT col0 * 50 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
24200
336200
39200

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT 51 + cor0.col1 + - ( 59 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
51
53

query I rowsort
SELECT - 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-8
-8
-8

query I rowsort
SELECT - 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-38
-38
-38

query I rowsort
SELECT col0 * 74 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1924
3182
6142

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
2378
4661
5307

query I rowsort
SELECT DISTINCT 56 * 31 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
1736

query I rowsort
SELECT ALL + - 46 + + 45 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-1
-1

query I rowsort
SELECT + 77 FROM tab1 GROUP BY tab1.col0
----
77
77
77

onlyif mysql # DIV for integer division: 
query I rowsort label-6039
SELECT ALL - 94 DIV - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6039
SELECT ALL - 94 / - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
1
2
3

query I rowsort
SELECT + NULLIF ( - col0, + 50 ) * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col0 * + 18 FROM tab2 AS cor0 GROUP BY col0
----
1638
1656
270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 18 FROM tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT 57 FROM tab2 AS cor0 GROUP BY cor0.col0
----
57
57
57

onlyif mysql # DIV for integer division: 
query I rowsort label-6045
SELECT ALL 46 DIV 60 - - cor0.col0 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
26
43
83

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6045
SELECT ALL 46 / 60 - - 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.col2 * - ( - cor0.col2 ) FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - + cor0.col1 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - cor0.col2 - cor0.col2 * 79 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-4640
-6320
-6960

query I rowsort
SELECT cor0.col2 - 2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
43
6
69

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 69 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
69
69
69

query I rowsort
SELECT DISTINCT - cor0.col1 * + 0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT - 30 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
-30
-30
-30

query I rowsort
SELECT 27 * - 98 FROM tab2 cor0 GROUP BY cor0.col0
----
-2646
-2646
-2646

query I rowsort
SELECT - 53 * - 34 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1802
1802
1802

query I rowsort
SELECT - 90 AS col1 FROM tab1 GROUP BY tab1.col2
----
-90
-90
-90

query I rowsort
SELECT ALL + + cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + cor0.col0 * 39 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3549
3588
585

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT - tab0.col2 FROM tab0, tab2 cor0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT - cor0.col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT 97 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
-5626
-7663
-8439

onlyif mysql # DIV for integer division: 
query I rowsort label-6066
SELECT DISTINCT + cor0.col0 DIV col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6066
SELECT DISTINCT + cor0.col0 / col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
0
1
2

query I rowsort
SELECT 29 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT + cor0.col2 * + 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1320
2090
4345

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT + col1 + - col1 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT + cor0.col0 * 40 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1120
3280
880

query I rowsort
SELECT DISTINCT 44 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
44

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - cor1.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

query I rowsort
SELECT ALL - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
-45
-71
-8

query I rowsort
SELECT 55 FROM tab2 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT DISTINCT - 78 * cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1170
-7098
-7176

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - cor0.col2 FROM tab2 cor0 GROUP BY col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL 3 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT DISTINCT + + cor1.col2 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT ALL - 59 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-16
-33
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 79 col0 FROM tab2 AS cor0 GROUP BY col0
----
79

onlyif mysql # DIV for integer division: 
query I rowsort label-6085
SELECT ALL - col0 DIV col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6085
SELECT ALL - col0 / col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2378
4661
5307

query I rowsort
SELECT - 59 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-59
-59
-59

query I rowsort
SELECT 70 FROM tab2 AS cor0 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT - 66 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-66
-66
-66

query I rowsort
SELECT - 31 * + cor0.col2 - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1440
-2272
-256

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2, tab1 cor0, tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

query I rowsort
SELECT + tab0.col1 * - 80 FROM tab0 GROUP BY tab0.col1
----
-6480
0

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 * col0 + - cor0.col2 + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
35263
3886
477415

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 * - tab2.col2 col2 FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT + 2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2
2
2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6097
SELECT - CAST( NULL AS SIGNED ) + - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6097
SELECT - CAST ( NULL AS INTEGER ) + - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6098
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6098
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT ALL tab1.col0 * 95 FROM tab1 GROUP BY tab1.col0
----
2090
2660
7790

query I rowsort
SELECT + 66 * - cor0.col1 FROM tab1, tab0 cor0, tab1 AS cor1 GROUP BY cor0.col1
----
-5346
0

query I rowsort
SELECT ALL 31 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1178
2449
744

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6102
SELECT + cor0.col2 + CAST( NULL AS SIGNED ) + 52 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6102
SELECT + cor0.col2 + CAST ( NULL AS INTEGER ) + 52 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, col1
----
0
81

query I rowsort
SELECT DISTINCT col2 + - 28 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-20
17
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 87 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6107
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-6107
SELECT CAST ( NULL AS INTEGER ) * cor0.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 - tab0.col2 col0 FROM tab0 GROUP BY tab0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 21 * + cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1804
484
616

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT DISTINCT - cor0.col0 * 83 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1848
-2352
-6888

query I rowsort
SELECT + 17 AS col1 FROM tab0 GROUP BY tab0.col0
----
17
17
17

query I rowsort
SELECT ALL - 56 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-56
-56
-56

query I rowsort
SELECT - cor0.col2 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2565
3124
48

query I rowsort
SELECT + col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT + cor0.col2 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

query I rowsort
SELECT - 47 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col0 col2 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col1, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT 50 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
50
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-6125
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-6125
SELECT + cor0.col2 / + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT + 18 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
24
62
75

query I rowsort
SELECT + 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
47
47
47

query I rowsort
SELECT 88 FROM tab1 AS cor0 GROUP BY cor0.col0
----
88
88
88

query I rowsort
SELECT 6 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT + + 95 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT - 67 * + tab1.col2 + + 19 FROM tab1 GROUP BY col2
----
-2996
-4738
-517

query I rowsort
SELECT + tab1.col0 AS col2 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL 53 * cor0.col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
2173
3127
3233

query I rowsort
SELECT ALL + col1 + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT 13 FROM tab2 AS cor0 GROUP BY col2
----
13
13
13

query I rowsort
SELECT + 60 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1, col0
----
2460
3540
3660

query I rowsort
SELECT 67 * + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1
----
2948
3819
402

query I rowsort
SELECT - 96 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
-96
-96
-96

query I rowsort
SELECT - 76 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-76
-76
-76

query I rowsort
SELECT 86 FROM tab0 cor0 GROUP BY col0
----
86
86
86

query I rowsort
SELECT ALL 9 FROM tab0 AS cor0 GROUP BY col1
----
9
9

query I rowsort
SELECT 8 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT + 23 FROM tab1 cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT + + cor0.col0 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6146
SELECT DISTINCT cor0.col0 / CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6146
SELECT DISTINCT cor0.col0 / CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT cor0.col0 - - 8 FROM tab2 AS cor0 GROUP BY cor0.col0
----
100
23
99

query I rowsort
SELECT DISTINCT col2 - - 4 * + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
290
395
435

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT + 18 * 53 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
862
863
939

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 88 + - col0 * - cor0.col0 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
10560
21864
551280

query I rowsort
SELECT 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6155
SELECT CAST( NULL AS DECIMAL ) AS col2 FROM tab0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6155
SELECT CAST ( NULL AS REAL ) AS col2 FROM tab0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT DISTINCT + 43 * + 7 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
301

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + 73 FROM tab2 GROUP BY tab2.col0
----
73
73
73

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 DISTINCT + col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + tab2.col2 AS col2 FROM tab2, tab0 cor0 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - 10 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-10
-10

query I rowsort
SELECT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT + 45 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT cor0.col1 * 67 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
2948
3819
402

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + 55 * cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
4455

query I rowsort
SELECT DISTINCT - col2 * 77 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3465
-5467
-616

query I rowsort
SELECT - cor0.col1 * - cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3483

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT + col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 59 + - 12 col0 FROM tab2 GROUP BY tab2.col1
----
47

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 cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
182
184
30

query I rowsort
SELECT DISTINCT + 11 * - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
-638
-869
-957

query I rowsort
SELECT DISTINCT - 15 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-15

query I rowsort
SELECT + 55 FROM tab2 AS cor0 GROUP BY col0
----
55
55
55

query I rowsort
SELECT DISTINCT + + 9 * - 44 FROM tab0, tab1 cor0 GROUP BY cor0.col1
----
-396

query I rowsort
SELECT - 22 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-22
-22
-22

query I rowsort
SELECT ALL cor1.col1 * 73 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
3212
4161
438

query I rowsort
SELECT - 93 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-93
-93
-93

query I rowsort
SELECT 14 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
14
14
14

query I rowsort
SELECT ALL + 42 AS col2 FROM tab2 GROUP BY col0
----
42
42
42

query I rowsort
SELECT + 47 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
47
47
47

query I rowsort
SELECT ALL - 80 FROM tab0, tab1 AS cor0, tab0 cor1 GROUP BY cor0.col0
----
-80
-80
-80

query I rowsort
SELECT col2 * - 86 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-3870
-6106
-688

query I rowsort
SELECT - + cor0.col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL + 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + 0 FROM tab0, tab0 cor0, tab0 AS cor1 GROUP BY cor1.col0
----
0
0
0

query I rowsort
SELECT 77 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77
77

query I rowsort
SELECT + - tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT - 29 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1 GROUP BY tab0.col1
----
-29
-29

query I rowsort
SELECT ALL - + tab1.col0 + - tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-164
-44
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 1 FROM tab0 cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 55 + - 46 col1 FROM tab2 GROUP BY tab2.col0
----
-101

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
24
38
79

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( 85, + cor0.col2, - cor0.col2, cor0.col1 ) * + col2 FROM tab0 cor0 GROUP BY cor0.col2
----
2040
3230
6715

query I rowsort
SELECT ALL - 72 FROM tab1 cor0 GROUP BY col2
----
-72
-72
-72

query I rowsort
SELECT 82 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 15 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
15
15
15

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col2 * 39 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-123006
-40248
-80106

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 + 11 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
91
91

query I rowsort
SELECT DISTINCT ( col2 ) AS col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT tab0.col2 * - 67 FROM tab0 GROUP BY tab0.col2
----
-1608
-2546
-5293

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - 14 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
45
47

query I rowsort
SELECT + 51 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT - cor0.col2 + col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT 73 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3285
5183
584

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - 14 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1106
-336
-532

query I rowsort
SELECT ALL + tab2.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT cor0.col0 * 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
130
215
415

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6227
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6227
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT col1 * cor0.col2 * + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
274999
323727
97498

query I rowsort
SELECT + 80 * - 42 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-3360
-3360

query I rowsort
SELECT + + cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + + 68 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL ( - 25 ) * - cor0.col1 * + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
42025
87025
93025

query I rowsort
SELECT + col1 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT + 54 FROM tab1 GROUP BY tab1.col1
----
54
54
54

query I rowsort
SELECT + 76 FROM tab2 GROUP BY tab2.col0
----
76
76
76

query I rowsort
SELECT ALL + 43 - - cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
107
2068
5084

onlyif mysql # DIV for integer division: 
query I rowsort label-6239
SELECT + col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6239
SELECT + col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT 8 + - 22 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 9 FROM tab1 AS cor0 GROUP BY cor0.col0
----
9

query I rowsort
SELECT DISTINCT - 12 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-12

onlyif mysql # DIV for integer division: 
query I rowsort label-6243
SELECT - cor0.col0 DIV col0 + cor0.col0 DIV - ( 2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-22
-42

skipif mysql # not compatible
query I rowsort label-6243
SELECT - cor0.col0 / col0 + cor0.col0 / - ( 2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-22
-42

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 ( 74 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
74
74
74

query I rowsort
SELECT 89 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 20 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-20

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
3483

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT - 17 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-17

query I rowsort
SELECT - ( COALESCE ( 37, + col1 ) ) * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1517
-2183
-2257

query I rowsort
SELECT DISTINCT ( + cor0.col1 + - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT col0 + - 68 AS col1 FROM tab0 cor0 GROUP BY col1, col0
----
-25
-42
15

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 34 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT + cor0.col2 * - 1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL 89 * - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1335
-8099
-8188

query I rowsort
SELECT ALL + 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
52
52
52

query I rowsort
SELECT + - 34 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
-34
-34
-34

query I rowsort
SELECT cor0.col1 * + 67 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2992
3876
408

query I rowsort
SELECT 15 + + cor1.col0 + - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2, cor1.col0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT + cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
0
0

query I rowsort
SELECT + 72 FROM tab0 cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 45 AS col1 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
45

query I rowsort
SELECT cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
-15
-91
-92

query I rowsort
SELECT ALL 68 FROM tab1 AS cor0 GROUP BY col0
----
68
68
68

query I rowsort
SELECT ALL 83 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
83
83
83

query I rowsort
SELECT DISTINCT + - cor0.col1 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 50 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT ALL 28 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT ALL 93 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT - 77 - + cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-103
-120
-160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 14 col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT 45 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 col1 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY tab0.col1
----
-36
-36

query I rowsort
SELECT ALL 63 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT + COALESCE ( - cor0.col0 * 54, - cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-1404
-2322
-4482

query I rowsort
SELECT ALL cor0.col0 - cor0.col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-17
11
14

query I rowsort
SELECT ( - cor0.col2 ) + + col2 - col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-6284
SELECT 54 DIV + 2 - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-18
-44
19

skipif mysql # not compatible
query I rowsort label-6284
SELECT 54 / + 2 - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-18
-44
19

query I rowsort
SELECT 13 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
13
13
13

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - + 11 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-11
-11
-11

query I rowsort
SELECT DISTINCT col0 + + 83 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
174
175
98

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-6290
SELECT + cor0.col0 DIV cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6290
SELECT + cor0.col0 / cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

onlyif mysql # DIV for integer division: 
query I rowsort label-6291
SELECT cor0.col2 DIV + cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6291
SELECT cor0.col2 / + cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT + cor0.col2 + 36 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
107
44
81

query I rowsort
SELECT 25 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
25
25
25

query I rowsort
SELECT + 31 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT - 82 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-82

query I rowsort
SELECT + 41 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
41
41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6297
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6297
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 + cor0.col1 AS col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - + 17 * - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
1207
136
765

query I rowsort
SELECT ALL - 86 AS col1 FROM tab1 GROUP BY tab1.col2
----
-86
-86
-86

query I rowsort
SELECT + 56 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT ALL + + tab1.col0 + tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
164
44
56

query I rowsort
SELECT ALL + col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT + cor0.col1 + - 9 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-648
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 7 col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-44
-57
-6

query I rowsort
SELECT 45 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT ( col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 0 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6311
SELECT ALL CASE - 79 WHEN cor0.col2 THEN + cor0.col2 WHEN CAST( NULL AS SIGNED ) THEN NULL END * + 60 + col2 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6311
SELECT ALL CASE - 79 WHEN cor0.col2 THEN + cor0.col2 WHEN CAST ( NULL AS INTEGER ) THEN NULL END * + 60 + col2 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 11 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
11
11
11

query I rowsort
SELECT ALL 90 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
90
90
90

query I rowsort
SELECT ALL + 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
86
86
86

query I rowsort
SELECT cor0.col0 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT col1 FROM tab2 GROUP BY col1 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 WHERE NOT cor0.col1 - - cor0.col0 BETWEEN NULL AND ( + cor0.col0 / col0 ) GROUP BY cor0.col1
----
41
59
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 - 33 + - 56 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-89
-89
-89

query I rowsort
SELECT + 29 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
35
73
86

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 27 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-27
-27
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 68 col0 FROM tab0 AS cor0 GROUP BY col0
----
111
151
94

query I rowsort
SELECT ALL + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT col1 * cor0.col0 - + 84 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1512
3524
48

onlyif mysql # DIV for integer division: 
query I rowsort label-6326
SELECT DISTINCT - cor0.col0 * + cor0.col0 DIV cor0.col0 col2 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-6326
SELECT DISTINCT - cor0.col0 * + cor0.col0 / cor0.col0 col2 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-6327
SELECT - cor0.col1 DIV 4 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-1
-11
-14

skipif mysql # not compatible
query I rowsort label-6327
SELECT - cor0.col1 / 4 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-1
-11
-14

query I rowsort
SELECT + + 40 FROM tab0 GROUP BY tab0.col0
----
40
40
40

query I rowsort
SELECT ALL cor0.col2 * 28 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
1064
2212
672

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT ALL + 32 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT ALL - 13 + cor0.col0 * + ( + col0 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
212
8268
8451

query I rowsort
SELECT ALL 31 FROM tab0 GROUP BY tab0.col1
----
31
31

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT ( 84 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
84
84
84

query I rowsort
SELECT DISTINCT + 82 FROM tab0 AS cor0 GROUP BY col2, cor0.col2
----
82

query I rowsort
SELECT DISTINCT 86 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6338
SELECT DISTINCT tab2.col1 / CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-6338
SELECT DISTINCT tab2.col1 / CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0 GROUP BY tab2.col1
----
NULL

query I rowsort
SELECT DISTINCT + 72 AS col0 FROM tab2 GROUP BY tab2.col0
----
72

query I rowsort
SELECT + 28 + 14 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 * - tab1.col1 col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT + 25 FROM tab0 GROUP BY tab0.col1
----
25

query I rowsort
SELECT ALL col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
26
43
83

query I rowsort
SELECT + 29 FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL 14 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14
14
14

onlyif mysql # DIV for integer division: 
query I rowsort label-6346
SELECT cor0.col1 DIV + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6346
SELECT cor0.col1 / + col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT + + col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - - cor0.col0 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - 82 + cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-67
10
9

query I rowsort
SELECT ALL cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT cor0.col1 * 33 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1353
1947
2013

query I rowsort
SELECT 55 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT ALL 17 + 3 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
20
20
20

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 75, cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
75

query I rowsort
SELECT 22 * col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1782

query I rowsort
SELECT + 50 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 68 + cor0.col2 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
-10
11
19

query I rowsort
SELECT 8 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL 57 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1368
-2166
-4503

query I rowsort
SELECT ALL + 33 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
33
33
33

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 - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + 37 FROM tab2 AS cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT - cor0.col1 - - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT cor0.col2 - - 92 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
100
137
163

query I rowsort
SELECT - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - 57 * 45 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-2565
-2565
-2565

onlyif mysql # DIV for integer division: 
query I rowsort label-6371
SELECT ALL - 48 DIV - cor0.col2 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6371
SELECT ALL - 48 / - cor0.col2 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
0
1
2

query I rowsort
SELECT ALL 49 FROM tab0 AS cor0 GROUP BY cor0.col2
----
49
49
49

onlyif mysql # DIV for integer division: 
query I rowsort label-6373
SELECT cor1.col1 DIV - 30 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-6373
SELECT cor1.col1 / - 30 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-1
-1
-2

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col1, cor0.col1
----
-44
-57
-6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6375
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6375
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT 25 - + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-18
-58

query I rowsort
SELECT ALL 84 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
106
112
166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 * - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-2288
-3784
-7304

query I rowsort
SELECT + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + col1 + 77 * cor0.col1 + 73 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
6391
73

query I rowsort
SELECT ALL + 43 FROM tab0 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT DISTINCT + 89 FROM tab2 AS cor0 GROUP BY cor0.col1
----
89

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + 38 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1558
2242
2318

query I rowsort
SELECT 38 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1558
-2242
-2318

query I rowsort
SELECT ALL - 43 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-43
-43
-43

query I rowsort
SELECT - 92 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-92
-92
-92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6389
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-6389
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT + cor0.col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
142
16
90

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col2 - cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-1482
-600
-6320

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0, cor0.col1
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
-41
-59
-61

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-6396
SELECT CAST( 80 AS SIGNED ) DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6396
SELECT CAST ( 80 AS INTEGER ) / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - 49 + 60 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
11
11
11

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - 62 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-47
29
30

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT - 76 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-76
-76
-76

query I rowsort
SELECT DISTINCT - 55 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-55

query I rowsort
SELECT + 28 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6405
SELECT col0 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6405
SELECT col0 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor1.col1 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT - 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-63

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 23 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT DISTINCT 3 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44
62
64

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
116
158
174

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6412
SELECT + cor0.col1 + - CAST( NULL AS SIGNED ) + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6412
SELECT + cor0.col1 + - CAST ( NULL AS INTEGER ) + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 * - cor0.col0 + - 52 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-1901
-6941
-728

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 50 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT ALL 33 FROM tab1 AS cor0 GROUP BY cor0.col1
----
33
33
33

onlyif mysql # DIV for integer division: 
query I rowsort label-6417
SELECT + cor0.col0 - + cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
27
81

skipif mysql # not compatible
query I rowsort label-6417
SELECT + cor0.col0 - + cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
21
27
81

query I rowsort
SELECT 71 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
71
71
71

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - 68 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-68
-68
-68

query I rowsort
SELECT + tab1.col1 + - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-22
-28
-82

query I rowsort
SELECT ALL 0 FROM tab2 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + - 97 AS col0 FROM tab0 GROUP BY col2
----
-97
-97
-97

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 + + cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT COALESCE ( col0, cor0.col0 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0, col2
----
92
92
92

query I rowsort
SELECT + 15 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
15
15
15

query I rowsort
SELECT ALL - 17 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-17
-17
-17

query I rowsort
SELECT + 90 FROM tab2 AS cor0 GROUP BY cor0.col1
----
90
90
90

query I rowsort
SELECT DISTINCT + 73 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73

query I rowsort
SELECT 77 AS col2 FROM tab1 GROUP BY tab1.col1
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 27 col1 FROM tab0, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-27

query I rowsort
SELECT DISTINCT - 65 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
-65

query I rowsort
SELECT + 51 FROM tab2 GROUP BY tab2.col1
----
51
51
51

query I rowsort
SELECT DISTINCT - cor0.col0 + 75 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-7
47
53

query I rowsort
SELECT ALL - 47 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-47
-47
-47

query I rowsort
SELECT DISTINCT - 81 AS col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
-81

query I rowsort
SELECT - + 82 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-82
-82
-82

query I rowsort
SELECT ALL + + 2 AS col1 FROM tab1 GROUP BY tab1.col1
----
2
2
2

query I rowsort
SELECT DISTINCT COALESCE ( 38, + cor0.col1 * + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY col1
----
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
-81
0
0

query I rowsort
SELECT ALL - 30 FROM tab1 GROUP BY tab1.col2
----
-30
-30
-30

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 60 * + cor0.col1 - 48 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2412
3492
3612

query I rowsort
SELECT + cor0.col2 - + 33 FROM tab0 AS cor0 GROUP BY col2
----
-9
46
5

query I rowsort
SELECT + 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT + cor0.col1 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT 79 FROM tab0 cor0 GROUP BY col0
----
79

query I rowsort
SELECT - 37 AS col1 FROM tab2 GROUP BY tab2.col0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT - 24 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-24

query I rowsort
SELECT cor0.col2 * - 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1330
-2765
-840

query I rowsort
SELECT + - 9 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-9
-9

query I rowsort
SELECT ALL 7 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
7
7

query I rowsort
SELECT - 14 + + cor0.col1 * - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-14
-6575

query I rowsort
SELECT 7 + - col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
-8
-84
-85

query I rowsort
SELECT 42 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42
42
42

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 + + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY col0 HAVING NOT NULL <> NULL
----

query I rowsort
SELECT + + tab0.col1 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT 47 FROM tab2 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
182
184
30

query I rowsort
SELECT DISTINCT + ( 77 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
61
61
61

query I rowsort
SELECT + 30 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 80 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT ALL - tab2.col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT tab2.col0 + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT ALL + cor0.col2 + + 42 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
100
121
129

query I rowsort
SELECT DISTINCT tab2.col0 * - tab2.col0 FROM tab2 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT cor0.col1 + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
162

query I rowsort
SELECT ALL 27 FROM tab1 cor0 GROUP BY cor0.col2
----
27
27
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
22
28
82

query I rowsort
SELECT + 43 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 9 + 68 col1 FROM tab1 GROUP BY tab1.col1
----
77
77
77

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - 14 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, col2
----
1148
308
392

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( 29, + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT 8 AS col2 FROM tab1 cor0 GROUP BY col2
----
8

query I rowsort
SELECT DISTINCT + - 87 AS col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-87

query I rowsort
SELECT DISTINCT 93 FROM tab2 AS cor0 GROUP BY col2
----
93

query I rowsort
SELECT 91 FROM tab1 AS cor0 GROUP BY col0
----
91
91
91

query I rowsort
SELECT ALL + + 31 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
31
31
31

query I rowsort
SELECT 65 * col2 * + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col2, col1
----
154570
302965
344955

query I rowsort
SELECT DISTINCT 55 FROM tab1 GROUP BY tab1.col0
----
55

onlyif mysql # DIV for integer division: 
query I rowsort label-6491
SELECT DISTINCT 24 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1

skipif mysql # not compatible
query I rowsort label-6491
SELECT DISTINCT 24 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
1

query I rowsort
SELECT DISTINCT - 67 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-67

query I rowsort
SELECT ALL 99 + 16 * 38 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
707
707

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6495
SELECT + CAST( NULL AS SIGNED ) + + 18 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6495
SELECT + CAST ( NULL AS INTEGER ) + + 18 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 * - ( - col0 ) + - cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
-1320
-5428
-7280

query I rowsort
SELECT - 50 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-50
-50
-50

query I rowsort
SELECT ALL + NULLIF ( - cor0.col0, - cor0.col1 ) - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1, col0
----
-182
-184
-30

onlyif mysql # DIV for integer division: 
query I rowsort label-6499
SELECT + col2 DIV 89 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6499
SELECT + col2 / 89 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 AS col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - 25 AS col2 FROM tab1 GROUP BY tab1.col1
----
-25
-25
-25

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT + 21 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
21

query I rowsort
SELECT DISTINCT - 58 - + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-140
-80
-86

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 + cor0.col1 * - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT - 97 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-97

query I rowsort
SELECT DISTINCT cor0.col0 + + 71 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
153
93
99

query I rowsort
SELECT + 60 FROM tab0 cor0 GROUP BY cor0.col1
----
60
60

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6510
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6510
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 87 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + cor0.col1 * + 64 + - 40 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
4264
6136
6344

query I rowsort
SELECT + cor0.col0 * + 44 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1260
3690
990

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2, col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6516
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6516
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 68 FROM tab2 AS cor0 GROUP BY cor0.col1
----
68
68
68

query I rowsort
SELECT tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL 79 FROM tab0 AS cor0 GROUP BY cor0.col1
----
79
79

query I rowsort
SELECT ALL 99 FROM tab1 AS cor0 GROUP BY cor0.col0
----
99
99
99

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6521
SELECT ALL + CAST( NULL AS DECIMAL ) 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-6521
SELECT ALL + CAST ( NULL AS REAL ) col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab1.col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col2 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

onlyif mysql # DIV for integer division: 
query I rowsort label-6525
SELECT + cor0.col1 * 49 + cor0.col1 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2155
2792
293

skipif mysql # not compatible
query I rowsort label-6525
SELECT + cor0.col1 * 49 + cor0.col1 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2155
2792
293

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 - cor0.col0 * + cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - 5 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
-5

query I rowsort
SELECT - 32 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-32
-32
-32

query I rowsort
SELECT DISTINCT - 63 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-63

query I rowsort
SELECT ALL - tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL col1 + + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL - col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT + 87 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87
87
87

query I rowsort
SELECT 5 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - 6 * + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-270
-426
-48

query I rowsort
SELECT DISTINCT 37 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
37

query I rowsort
SELECT ALL - col1 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT - 33 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-33
-33
-33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + NULLIF ( - 74, - cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-74

query I rowsort
SELECT ALL cor0.col2 + cor0.col1 * + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
2610
3195
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT + - 60 AS col1 FROM tab0 GROUP BY tab0.col2
----
-60

query I rowsort
SELECT - 20 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-20
-20
-20

query I rowsort
SELECT ALL cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL 78 FROM tab1 AS cor0 GROUP BY cor0.col1
----
78
78
78

query I rowsort
SELECT 83 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
83
83
83

onlyif mysql # DIV for integer division: 
query I rowsort label-6551
SELECT col2 DIV 55 + - 33 FROM tab1 AS cor0 GROUP BY col2
----
-32
-33
-33

skipif mysql # not compatible
query I rowsort label-6551
SELECT col2 / 55 + - 33 FROM tab1 AS cor0 GROUP BY col2
----
-32
-33
-33

query I rowsort
SELECT cor0.col0 + - 29 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1
-7
53

query I rowsort
SELECT DISTINCT 20 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20

query I rowsort
SELECT ALL + 11 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
11
11
11

query I rowsort
SELECT ALL + tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT + tab2.col2 * + col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT ( + cor0.col2 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
45
71
8

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL + col2 * cor0.col2 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
600
6320

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
138
148
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - 85 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-85
-85
-85

query I rowsort
SELECT + cor0.col2 * col2 * + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
13824
493039
54872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
31
31

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1 HAVING NULL NOT IN ( - cor0.col1 )
----

query I rowsort
SELECT + tab1.col2 * col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT 36 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
117
36

query I rowsort
SELECT ALL 3 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT DISTINCT + 31 * + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1271
1829
1891

query I rowsort
SELECT DISTINCT - 74 AS col0 FROM tab1 GROUP BY tab1.col0
----
-74

query I rowsort
SELECT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
-15
-91
-92

query I rowsort
SELECT + - 66 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
-66
-66
-66

query I rowsort
SELECT DISTINCT + + 56 AS col1 FROM tab2, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col0
----
56

query I rowsort
SELECT - cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
-1260
-176
-5822

query I rowsort
SELECT DISTINCT - - 34 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
34

query I rowsort
SELECT DISTINCT 87 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
7047

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT + col1 - tab1.col1 AS col0 FROM tab1 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 82 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1230
-7462
-7544

query I rowsort
SELECT DISTINCT - + 35 + 19 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-16

query I rowsort
SELECT DISTINCT 94 * cor0.col0 * - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, col0
----
-327402
0

query I rowsort
SELECT col0 * tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
1849
676
6889

query I rowsort
SELECT - 78 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-78
-78
-78

query I rowsort
SELECT ALL 88 + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
132
145
94

query I rowsort
SELECT 86 FROM tab2 AS cor0 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT 77 FROM tab0 AS cor0 GROUP BY col0
----
77
77
77

query I rowsort
SELECT ALL - cor0.col0 - 3 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-29
-46
-86

query I rowsort
SELECT DISTINCT 56 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
56

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL CASE + 8 WHEN 76 THEN - cor0.col1 * + 8 WHEN 9 THEN NULL ELSE NULL END FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0

query I rowsort
SELECT ALL + 54 * - 43 AS col2 FROM tab0 GROUP BY tab0.col2
----
-2322
-2322
-2322

query I rowsort
SELECT ALL 98 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
98
98
98

query I rowsort
SELECT - 11 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-11
-11
-11

query I rowsort
SELECT 77 + col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
168
169
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + COALESCE ( + 86, - cor0.col2 ) * cor1.col1 + + cor1.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor0.col1, cor1.col1
----
9 values hashing to 632aae78dbfb549c713e2d28f1e22d7f

query I rowsort
SELECT DISTINCT + 61 FROM tab1, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col1
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 27 col0 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
27

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6601
SELECT ALL CAST( cor0.col1 AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-6601
SELECT ALL CAST ( cor0.col1 AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - 83 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-83
-83
-83

query I rowsort
SELECT + cor0.col0 + 67 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
158
159
82

query I rowsort
SELECT DISTINCT 40 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1640
2360
2440

query I rowsort
SELECT 66 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
66
66

query I rowsort
SELECT - 8 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-6607
SELECT ALL cor0.col2 + 76 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
58
79
82

skipif mysql # not compatible
query I rowsort label-6607
SELECT ALL cor0.col2 + 76 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col0
----
58
79
82

query I rowsort
SELECT + 21 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
21
21
21

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT DISTINCT - tab0.col1 AS col1 FROM tab0 GROUP BY tab0.col1
----
-81
0

query I rowsort
SELECT ALL 96 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 54 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
54

query I rowsort
SELECT ALL 14 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT cor0.col1 * col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1936
3249
36

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-24
-38
-79

query I rowsort
SELECT ALL + cor0.col1 * col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
0
0
6561

query I rowsort
SELECT 50 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT DISTINCT tab1.col1 * - 11 AS col1 FROM tab1 GROUP BY tab1.col1
----
-484
-627
-66

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col1
----
44
57
6

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 tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT 8 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8

query I rowsort
SELECT - col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + col1 + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
114
12
88

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 * 35 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1505
2905
910

query I rowsort
SELECT DISTINCT 91 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
91

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col1
----
0
162

query I rowsort
SELECT ALL cor0.col1 * - col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + 8 FROM tab1 AS cor0 GROUP BY cor0.col1
----
8
8
8

query I rowsort
SELECT ALL - 10 FROM tab0 cor0 GROUP BY cor0.col2
----
-10
-10
-10

query I rowsort
SELECT 87 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
87
87
87

query I rowsort
SELECT - 93 * cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-4092
-5301
-558

query I rowsort
SELECT ALL - 24 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
-24
-24
-24

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col0
----
0
0
81

query I rowsort
SELECT + 88 FROM tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT DISTINCT + 51 * + 94 FROM tab2 GROUP BY col1
----
4794

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-6644
SELECT - col0 DIV cor0.col0 + 50 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49
49
49

skipif mysql # not compatible
query I rowsort label-6644
SELECT - col0 / cor0.col0 + 50 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49
49
49

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + 6 * tab1.col0 AS col0 FROM tab1 GROUP BY col0
----
132
168
492

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT - cor0.col0 * cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10648
-21952
-551368

onlyif mysql # DIV for integer division: 
query I rowsort label-6650
SELECT ALL + + tab0.col2 DIV tab0.col2 + - 82 + col2 FROM tab0 GROUP BY tab0.col2
----
-2
-43
-57

skipif mysql # not compatible
query I rowsort label-6650
SELECT ALL + + tab0.col2 / tab0.col2 + - 82 + col2 FROM tab0 GROUP BY tab0.col2
----
-2
-43
-57

query I rowsort
SELECT col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
24
38
79

query I rowsort
SELECT + col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - cor0.col1 + 76 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
15
17
35

query I rowsort
SELECT DISTINCT - cor0.col0 * + 57 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
-5187
-5244
-855

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + cor0.col0 * - col0 * + cor0.col0 + + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-10604
-21896
-551204

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - - tab2.col2 AS col0 FROM tab2 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 26 * - ( + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
2366
2392
390

query I rowsort
SELECT ALL - 53 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
-53
-53
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col1 FROM tab2 GROUP BY tab2.col2
----
93
93
93

onlyif mysql # DIV for integer division: 
query I rowsort label-6661
SELECT ALL cor0.col0 DIV 95 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6661
SELECT ALL cor0.col0 / 95 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
0
0
0

query I rowsort
SELECT ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT 34 FROM tab2 GROUP BY tab2.col2
----
34

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 * + 2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT + - tab0.col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + NULLIF ( cor0.col0, 35 ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT col1 * + 73 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2993
4307
4453

query I rowsort
SELECT - col0 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
225
8281
8464

query I rowsort
SELECT ALL + 54 FROM tab1 AS cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT ALL 63 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT ALL + ( + 12 * cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
540
852
96

query I rowsort
SELECT ALL 22 FROM tab2 AS cor0 GROUP BY cor0.col1
----
22
22
22

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col0 * + 7 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
154
196
574

query I rowsort
SELECT DISTINCT - 22 + 89 FROM tab0 cor0 GROUP BY cor0.col1
----
67

query I rowsort
SELECT DISTINCT cor0.col0 + + col1 * 33 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1534
1909
220

query I rowsort
SELECT + 84 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
84
84
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 88 col2 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
88
88
88

query I rowsort
SELECT - 90 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT 60 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3480
4740
5220

query I rowsort
SELECT ALL + 80 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
125
151
88

query I rowsort
SELECT + - 45 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-45
-45

query I rowsort
SELECT - 70 FROM tab2 GROUP BY col0
----
-70
-70
-70

query I rowsort
SELECT ALL + - 27 + col2 * 66 AS col1 FROM tab2 GROUP BY col2
----
3801
5187
5715

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
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 5, - 11, cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
5
5
5

query I rowsort
SELECT - 56 * cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2296
-3304
-3416

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
38

query I rowsort
SELECT ALL + 43 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
43
43
43

query I rowsort
SELECT ( col2 + - cor0.col2 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( + 6, cor0.col2 * - ( cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT DISTINCT + 90 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
90

query I rowsort
SELECT ALL - 55 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-55
-55
-55

query I rowsort
SELECT DISTINCT 57 - + cor0.col0 * cor0.col0 * 6 FROM tab1 cor0 GROUP BY cor0.col0
----
-2847
-40287
-4647

query I rowsort
SELECT ALL 76 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3
38
52

query I rowsort
SELECT col2 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-6702
SELECT - cor0.col0 DIV cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6702
SELECT - cor0.col0 / cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT 75 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) col1 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6705
SELECT CAST( NULL AS SIGNED ) + + 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6705
SELECT CAST ( NULL AS INTEGER ) + + 5 FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 41 FROM tab2 cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 63 col1 FROM tab2 AS cor0 GROUP BY col2
----
63
63
63

query I rowsort
SELECT ALL 83 AS col0 FROM tab2 cor0 GROUP BY col1
----
83
83
83

query I rowsort
SELECT - cor0.col2 + + 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-11
-3
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 26 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-26

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6711
SELECT DISTINCT - cor0.col0 * + cor0.col1 + - CAST( + cor0.col0 AS SIGNED ) + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-3502
-45
53

skipif mysql # not compatible
query I rowsort label-6711
SELECT DISTINCT - cor0.col0 * + cor0.col1 + - CAST ( + cor0.col0 AS INTEGER ) + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
-3502
-45
53

onlyif mysql # DIV for integer division: 
query I rowsort label-6712
SELECT cor0.col1 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6712
SELECT cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - ( 44 ) FROM tab2 cor0 GROUP BY cor0.col1
----
-44

query I rowsort
SELECT DISTINCT + - 47 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-47

query I rowsort
SELECT DISTINCT 94 FROM tab2 AS cor0 GROUP BY cor0.col2
----
94

query I rowsort
SELECT ALL 24 - + 40 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT ALL 39 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
39
39

query I rowsort
SELECT 43 - + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
-15
-36
-44

query I rowsort
SELECT - 45 FROM tab2 cor0 GROUP BY cor0.col2
----
-45
-45
-45

query I rowsort
SELECT ALL cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT 47 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
47
47
47

query I rowsort
SELECT DISTINCT - 60 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-60

query I rowsort
SELECT + cor0.col1 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT ALL tab2.col1 + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT ALL tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT tab2.col2 * tab2.col2 FROM tab2 GROUP BY tab2.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
40

query I rowsort
SELECT DISTINCT col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY col1 HAVING cor0.col1 * col1 IS NULL
----

query I rowsort
SELECT ALL 97 FROM tab0 AS cor0 GROUP BY cor0.col2
----
97
97
97

query I rowsort
SELECT 73 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
73
73
73

query I rowsort
SELECT - 47 FROM tab2 GROUP BY tab2.col2
----
-47
-47
-47

query I rowsort
SELECT - 45 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-45
-45
-45

query I rowsort
SELECT ALL - col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL - 72 FROM tab2 cor0 GROUP BY cor0.col2
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - 28 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-28

query I rowsort
SELECT DISTINCT - 41 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
-41

query I rowsort
SELECT DISTINCT - 56 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-56

query I rowsort
SELECT ( + cor0.col1 ) FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6746
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6746
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT - 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 56 AS col2 FROM tab2 cor0 GROUP BY col2, col1
----
56

query I rowsort
SELECT DISTINCT + 33 FROM tab0 AS cor0 GROUP BY cor0.col2
----
33

query I rowsort
SELECT - 75 FROM tab2 cor0 GROUP BY cor0.col1
----
-75
-75
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT ( tab2.col0 ) FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT 8 * cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
176
224
656

query I rowsort
SELECT 41 + 9 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0, cor0.col2
----
26
43
83

query I rowsort
SELECT ALL + 0 + + 23 FROM tab0 cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT - 79 FROM tab2 GROUP BY tab2.col0
----
-79
-79
-79

query I rowsort
SELECT 69 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
69
69
69

query I rowsort
SELECT DISTINCT + 11 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col0
----
11

query I rowsort
SELECT ALL + 92 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
92
92
92

query I rowsort
SELECT DISTINCT - COALESCE ( + cor0.col0, cor0.col0 ) FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-77

query I rowsort
SELECT ALL + + cor0.col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col2 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 28 FROM tab0 AS cor0 GROUP BY cor0.col1
----
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 30, cor0.col1 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT + 4 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
4

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-44
-57
-6

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0, cor1.col0
----
9 values hashing to f32c20d5ee6a5d0dbf41b03dd82c0edd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 19 + - tab1.col1 * tab1.col1 col1 FROM tab1 GROUP BY tab1.col1
----
-17
-1917
-3230

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1 GROUP BY col2 HAVING NOT NULL IS NOT NULL
----
45
71
8

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-6778
SELECT ALL + - cor0.col0 DIV + cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6778
SELECT ALL + - cor0.col0 / + cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL - ( + cor0.col0 ) FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL 6 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT - tab0.col2 + 95 - 32 AS col2 FROM tab0 GROUP BY tab0.col2
----
-16
25
39

query I rowsort
SELECT ALL - col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT ( 76 + - cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
32
70

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY col1, col2
----
24
38
79

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT - cor0.col1 * - 42 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
3402

query I rowsort
SELECT DISTINCT + 51 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
51

query I rowsort
SELECT DISTINCT - 33 + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
-27
11
24

query I rowsort
SELECT ALL 7 * col0 FROM tab2 cor0 GROUP BY cor0.col0
----
105
637
644

query I rowsort
SELECT 50 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT DISTINCT 91 FROM tab2 AS cor0 GROUP BY cor0.col2
----
91

query I rowsort
SELECT 32 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
32
32
32

query I rowsort
SELECT DISTINCT + - 95 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-95

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT 16 + + cor0.col1 - COALESCE ( 88, - col0 ) * + 76 FROM tab0 AS cor0 GROUP BY col1
----
-6591
-6672

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT 12 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
53
71
73

query I rowsort
SELECT ALL 50 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
141
142
65

query I rowsort
SELECT ALL 42 + - 89 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-47
-47
-47

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 * 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2115
3337
376

query I rowsort
SELECT ALL 35 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT 91 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col1 FROM tab0 cor0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL - COALESCE ( 99, - cor0.col2 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-99
-99
-99

query I rowsort
SELECT 5 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
31
48
88

query I rowsort
SELECT ALL + + cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT 47 AS col1 FROM tab0 GROUP BY col2
----
47
47
47

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6811
SELECT DISTINCT COALESCE ( - cor0.col2 + CAST( - 59 AS SIGNED ), cor0.col2 ) * - cor0.col1 * 17 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
138414
151402
81549

skipif mysql # not compatible
query I rowsort label-6811
SELECT DISTINCT COALESCE ( - cor0.col2 + CAST ( - 59 AS INTEGER ), cor0.col2 ) * - cor0.col1 * 17 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
138414
151402
81549

query I rowsort
SELECT ALL - - col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT ALL + col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 62 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

query I rowsort
SELECT - ( - 65 ) + + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
106
124
126

query I rowsort
SELECT + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6818
SELECT ALL + 73 DIV - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-6818
SELECT ALL + 73 / - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
-3
0

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT - 42 FROM tab2 cor0 GROUP BY cor0.col2
----
-42
-42
-42

query I rowsort
SELECT ALL + cor0.col0 + + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT cor0.col0 * ( 19 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1577
494
817

query I rowsort
SELECT 11 FROM tab1 AS cor0 GROUP BY cor0.col1
----
11
11
11

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-6825
SELECT DISTINCT - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6825
SELECT DISTINCT - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
68
68
68

query I rowsort
SELECT - cor0.col2 * + 11 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-264
-418
-869

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6828
SELECT ALL tab1.col1 * + CAST( 44 AS SIGNED ) FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
1936
2508
264

skipif mysql # not compatible
query I rowsort label-6828
SELECT ALL tab1.col1 * + CAST ( 44 AS INTEGER ) FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
1936
2508
264

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col1 * + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT - + cor0.col1 - - 9 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-35
-48
3

query I rowsort
SELECT ALL 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
13
13
13

query I rowsort
SELECT 59 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
59
59
59

query I rowsort
SELECT 92 + - cor0.col1 - + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-22
4
80

query I rowsort
SELECT - col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-81
0
0

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab0, tab2 AS cor0, tab0 cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT + cor0.col1 - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT 45 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
45
45
45

query I rowsort
SELECT cor0.col0 * col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + 96 * - 83 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-7968

query I rowsort
SELECT - 75 FROM tab2 cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT + 88 AS col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col1
----
88
88

query I rowsort
SELECT - 18 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1458
0

query I rowsort
SELECT ALL 45 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
45
45
45

query I rowsort
SELECT - cor0.col2 + cor0.col1 FROM tab0 AS cor0 GROUP BY col2, col1
----
-38
-79
57

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col2 * 4 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
232
316
348

query I rowsort
SELECT ALL - cor0.col0 - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-182
-184
-30

query I rowsort
SELECT 87 FROM tab2 AS cor0 GROUP BY col0
----
87
87
87

query I rowsort
SELECT 33 FROM tab0 AS cor0 GROUP BY cor0.col0
----
33
33
33

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT + 96 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT ALL - 38 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-1064
-3116
-836

query I rowsort
SELECT 47 AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1
----
47
47

query I rowsort
SELECT ALL - 24 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-24
-24
-24

query I rowsort
SELECT 80 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT - cor0.col0 - + 82 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-104
-110
-164

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 col1 FROM tab2, tab0 cor0, tab1 AS cor1 GROUP BY cor0.col0
----
41
41
41

query I rowsort
SELECT DISTINCT 36 FROM tab1 cor0 GROUP BY cor0.col2
----
36

query I rowsort
SELECT cor0.col0 * + cor0.col0 + 53 - col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
217
8275
8476

query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col1, NULLIF ( 47, cor0.col1 ) ) - - cor0.col1 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
6480

query I rowsort
SELECT + 56 FROM tab2 AS cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab0 cor0 GROUP BY col2
----
82

query I rowsort
SELECT - 45 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT - 12 * tab0.col2 AS col2 FROM tab0 GROUP BY tab0.col2
----
-288
-456
-948

query I rowsort
SELECT ALL + ( cor0.col2 ) * cor0.col2 + + cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
3456
6332
7584

query I rowsort
SELECT ALL 44 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44
44
44

query I rowsort
SELECT cor0.col1 + - cor0.col1 * + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT ALL + 15 AS col0 FROM tab0 cor0 GROUP BY col1
----
15
15

query I rowsort
SELECT ALL 53 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY col1, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-6878
SELECT ALL - 70 DIV cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
44
71

skipif mysql # not compatible
query I rowsort label-6878
SELECT ALL - 70 / cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
44
71

query I rowsort
SELECT ALL 36 - col0 AS col0 FROM tab2 cor0 GROUP BY col0
----
-55
-56
21

query I rowsort
SELECT DISTINCT 46 FROM tab1 AS cor0 GROUP BY cor0.col1
----
46

query I rowsort
SELECT DISTINCT - 37 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-37

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT - cor0.col0 * + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL + cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col0 * cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
240
8372
8556

query I rowsort
SELECT ALL - - 73 AS col1 FROM tab0 GROUP BY col2
----
73
73
73

onlyif mysql # DIV for integer division: 
query I rowsort label-6888
SELECT - + 67 + + tab1.col2 DIV + tab1.col2 FROM tab1 GROUP BY col2
----
-66
-66
-66

skipif mysql # not compatible
query I rowsort label-6888
SELECT - + 67 + + tab1.col2 / + tab1.col2 FROM tab1 GROUP BY col2
----
-66
-66
-66

query I rowsort
SELECT ALL - 97 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-97
-97
-97

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6890
SELECT CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6890
SELECT CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT 59 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT + - 31 AS col1 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
-31
-31
-31

query I rowsort
SELECT + cor0.col1 * col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - + col0 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 57 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT DISTINCT - + 29 * + cor0.col0 * + cor0.col0 + - 50 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-19654
-199831
-53671

query I rowsort
SELECT + + 28 * - 88 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-2464
-2464
-2464

query I rowsort
SELECT DISTINCT - 91 * 42 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-3822

query I rowsort
SELECT - 13 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-13
-13
-13

query I rowsort
SELECT - 50 AS col2 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
-50
-50

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT cor0.col0 * COALESCE ( + 81, + cor0.col2 ) + 66 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1281
7437
7518

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6902
SELECT DISTINCT + cor0.col0 / + CAST( NULL AS SIGNED ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-6902
SELECT DISTINCT + cor0.col0 / + CAST ( NULL AS INTEGER ) FROM tab2 cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT 72 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
72

query I rowsort
SELECT ALL + NULLIF ( cor0.col0, cor0.col0 ) + cor0.col1 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
105
121
67

query I rowsort
SELECT 42 + - 84 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT 28 + cor0.col0 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0, cor0.col1
----
210
212
58

query I rowsort
SELECT col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
24
38
79

query I rowsort
SELECT - 48 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-48
-48
-48

query I rowsort
SELECT ALL - - col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 41 col0 FROM tab1 cor0 GROUP BY col0, cor0.col0
----
41
41
41

query I rowsort
SELECT ALL + - cor0.col1 FROM tab2, tab0 cor0 GROUP BY cor0.col1
----
-81
0

onlyif mysql # DIV for integer division: 
query I rowsort label-6913
SELECT 73 DIV col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6913
SELECT 73 / col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0
2
3

query I rowsort
SELECT 98 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
98
98

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 AS col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT - cor0.col2 + + 40 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-39
16
2

query I rowsort
SELECT DISTINCT + 29 * - 46 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
-1334

query I rowsort
SELECT ALL tab0.col1 + - 25 AS col2 FROM tab0 GROUP BY tab0.col1
----
-25
56

query I rowsort
SELECT ALL 9 FROM tab0 AS cor0 GROUP BY cor0.col0
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 34 col0 FROM tab2 cor0 GROUP BY col2
----
34
34
34

query I rowsort
SELECT ALL - 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-43
-43
-43

onlyif mysql # DIV for integer division: 
query I rowsort label-6922
SELECT DISTINCT + cor0.col1 DIV - 16 FROM tab0 AS cor0 GROUP BY col1
----
-5
0

skipif mysql # not compatible
query I rowsort label-6922
SELECT DISTINCT + cor0.col1 / - 16 FROM tab0 AS cor0 GROUP BY col1
----
-5
0

query I rowsort
SELECT DISTINCT - 24 AS col0 FROM tab1 GROUP BY tab1.col2
----
-24

query I rowsort
SELECT DISTINCT + ( - 48 ) AS col1 FROM tab1 AS cor0 GROUP BY col0
----
-48

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + - 59 AS col2 FROM tab2 GROUP BY tab2.col2
----
-59
-59
-59

query I rowsort
SELECT 60 * - 1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-60
-60
-60

query I rowsort
SELECT - cor0.col1 - + cor0.col1 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-3813
-5428
-976

query I rowsort
SELECT ALL + 49 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
49
49
49

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
22
28
82

query I rowsort
SELECT + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT - 49 FROM tab1, tab1 cor0 GROUP BY cor0.col1
----
-49

query I rowsort
SELECT + 77 + - 80 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-3
-3
-3

query I rowsort
SELECT - cor0.col0 * cor0.col0 FROM tab2 cor0 GROUP BY col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL 71 * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3195
5041
568

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-22
-28
-82

query I rowsort
SELECT ALL col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-6939
SELECT ALL + cor0.col0 DIV + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6939
SELECT ALL + cor0.col0 / + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
1
1
1

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col0 FROM tab0 GROUP BY col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
50
50
50

query I rowsort
SELECT ALL + tab0.col2 + 20 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
44
58
99

query I rowsort
SELECT DISTINCT col2 * col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + 82 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT 56 FROM tab1 cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT - 94 * cor0.col0 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1425
-8645
-8740

onlyif mysql # DIV for integer division: 
query I rowsort label-6948
SELECT + cor0.col2 DIV + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6948
SELECT + cor0.col2 / + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1
1
1

query I rowsort
SELECT col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
44
57
6

query I rowsort
SELECT DISTINCT 46 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
46

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-6951
SELECT CAST( cor0.col2 AS SIGNED ) * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif mysql # not compatible
query I rowsort label-6951
SELECT CAST ( cor0.col2 AS INTEGER ) * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT - - tab0.col1 * - tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL + 94 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
94
94
94

query I rowsort
SELECT ALL + 35 * 68 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
2380
2380
2380

onlyif mysql # DIV for integer division: 
query I rowsort label-6955
SELECT DISTINCT - tab2.col1 + 38 DIV 50 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

skipif mysql # not compatible
query I rowsort label-6955
SELECT DISTINCT - tab2.col1 + 38 / 50 AS col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT + 14 AS col1 FROM tab0, tab2 cor0 GROUP BY tab0.col0
----
14
14
14

onlyif mysql # DIV for integer division: 
query I rowsort label-6957
SELECT ALL 61 DIV + cor0.col1 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
45
58

skipif mysql # not compatible
query I rowsort label-6957
SELECT ALL 61 / + cor0.col1 - - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
45
58

query I rowsort
SELECT + 6 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
348
474
522

query I rowsort
SELECT 33 + col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
112
57
71

query I rowsort
SELECT DISTINCT - 31 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-31

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL 63 FROM tab0 AS cor0 GROUP BY cor0.col1
----
63
63

query I rowsort
SELECT + 24 + - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-14
-55
0

query I rowsort
SELECT - 49 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-49
-49
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

onlyif mysql # DIV for integer division: 
query I rowsort label-6966
SELECT cor0.col0 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6966
SELECT cor0.col0 / - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT + 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
98
98
98

query I rowsort
SELECT ALL 60 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
60
60
60

query I rowsort
SELECT - 14 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT DISTINCT 84 FROM tab2 AS cor0 GROUP BY cor0.col0
----
84

query I rowsort
SELECT DISTINCT cor0.col1 - 41 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
40

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-41
-59
-61

query I rowsort
SELECT DISTINCT col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
24
38
79

query I rowsort
SELECT + + 23 FROM tab0 GROUP BY col0
----
23
23
23

query I rowsort
SELECT DISTINCT - - 27 FROM tab2 GROUP BY col0
----
27

query I rowsort
SELECT 1 FROM tab1 GROUP BY tab1.col2
----
1
1
1

query I rowsort
SELECT ALL - COALESCE ( cor0.col1 * cor0.col0, cor0.col2, - 60 ) FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
-132
-1596
-3608

query I rowsort
SELECT ( col0 ) FROM tab2 cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT ALL - 46 FROM tab2 GROUP BY col1
----
-46
-46
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - 18 * 13 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-19188
-5148
-6552

query I rowsort
SELECT ALL col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + tab0.col2 * + tab0.col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT ALL COALESCE ( 15, col1 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
15
15
15

onlyif mysql # DIV for integer division: 
query I rowsort label-6985
SELECT - cor0.col2 DIV + 9 + + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
37
52
6

skipif mysql # not compatible
query I rowsort label-6985
SELECT - cor0.col2 / + 9 + + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
37
52
6

query I rowsort
SELECT DISTINCT 31 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
31

query I rowsort
SELECT + 31 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col1
----
31
31
31

query I rowsort
SELECT DISTINCT 43 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
43

query I rowsort
SELECT + col0 + - ( 30 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-2
-8
52

query I rowsort
SELECT ALL cor0.col0 + + ( cor0.col0 * + col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

query I rowsort
SELECT ALL + 7 * 19 FROM tab2 AS cor0 GROUP BY cor0.col2
----
133
133
133

query I rowsort
SELECT DISTINCT + 86 AS col2 FROM tab2 cor0 GROUP BY col2
----
86

query I rowsort
SELECT 31 FROM tab2 AS cor0 GROUP BY col2
----
31
31
31

query I rowsort
SELECT - 80 FROM tab2 AS cor0 GROUP BY col2
----
-80
-80
-80

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT + 71 + col2 FROM tab2 GROUP BY tab2.col2
----
129
150
158

query I rowsort
SELECT col0 * - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-484
-6724
-784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT - 60 FROM tab0 GROUP BY tab0.col1
----
-60
-60

query I rowsort
SELECT ALL 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
80
80
80

query I rowsort
SELECT + cor0.col0 - 25 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1
18
58

query I rowsort
SELECT ALL - CASE - cor0.col1 WHEN + cor0.col2 THEN 63 END + cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + - 47 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-47
-47
-47

query I rowsort
SELECT ALL cor0.col1 + - 53 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-53
28

query I rowsort
SELECT ALL 66 FROM tab1 cor0 GROUP BY col1
----
66
66
66

query I rowsort
SELECT ALL 45 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
45
45
45

query I rowsort
SELECT - 90 + 38 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT + 52 FROM tab2, tab1 cor0, tab0 AS cor1 GROUP BY tab2.col1
----
52

query I rowsort
SELECT + ( - cor0.col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT col1 - 72 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-72
9

query I rowsort
SELECT DISTINCT + 57 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
57

query I rowsort
SELECT ALL 98 FROM tab2 cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT - 47 FROM tab1 GROUP BY tab1.col1
----
-47
-47
-47

query I rowsort
SELECT 84 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
108
122
163

onlyif mysql # DIV for integer division: 
query I rowsort label-7017
SELECT - 74 DIV 98 AS col2 FROM tab0 GROUP BY col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7017
SELECT - 74 / 98 AS col2 FROM tab0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT - 47 - col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-129
-69
-75

onlyif mysql # DIV for integer division: 
query I rowsort label-7019
SELECT + col0 DIV cor0.col0 - 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-59
-59
-59

skipif mysql # not compatible
query I rowsort label-7019
SELECT + col0 / cor0.col0 - 60 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-59
-59
-59

query I rowsort
SELECT 91 FROM tab0 AS cor0 GROUP BY cor0.col1
----
91
91

query I rowsort
SELECT - ( + 0 * 31 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL - 33 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-33
-33
-33

query I rowsort
SELECT + 20 + + col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
26
64
77

query I rowsort
SELECT ALL cor0.col0 + 36 FROM tab2 AS cor0 GROUP BY col0
----
127
128
51

query I rowsort
SELECT 21 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1491
168
945

query I rowsort
SELECT DISTINCT - COALESCE ( - 65, col1 ) * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5265

query I rowsort
SELECT DISTINCT 54 FROM tab2 AS cor0 GROUP BY cor0.col2
----
54

query I rowsort
SELECT ALL 14 FROM tab2 AS cor0 GROUP BY cor0.col2
----
14
14
14

query I rowsort
SELECT + 4 + - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-2
-40
-53

query I rowsort
SELECT DISTINCT - tab0.col2 AS col2 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL 8 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT + 14 * + cor0.col0 + - 5 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1143
303
387

query I rowsort
SELECT ALL col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-7034
SELECT - cor0.col1 + cor0.col1 DIV + cor0.col0 + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-37
26
83

skipif mysql # not compatible
query I rowsort label-7034
SELECT - cor0.col1 + cor0.col1 / + cor0.col0 + cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-37
26
83

query I rowsort
SELECT DISTINCT + 62 FROM tab0 AS cor0 GROUP BY cor0.col1
----
62

query I rowsort
SELECT DISTINCT 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71

query I rowsort
SELECT 72 FROM tab2 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT DISTINCT + 90 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
90

onlyif mysql # DIV for integer division: 
query I rowsort label-7039
SELECT - cor0.col0 DIV col0 FROM tab0 cor0 GROUP BY col0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7039
SELECT - cor0.col0 / col0 FROM tab0 cor0 GROUP BY col0
----
-1
-1
-1

query I rowsort
SELECT 79 AS col1 FROM tab2, tab2 AS cor0, tab0 cor1 GROUP BY tab2.col0
----
79
79
79

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
43
43

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col2, cor0.col0
----
58
79
87

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col1 * - 42 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-3402
0

query I rowsort
SELECT ALL COALESCE ( col1, cor0.col2 * 17 ) + 89 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
130
148
150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 16 + cor1.col2 col0 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
22
63
8

query I rowsort
SELECT 88 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT DISTINCT - - 17 - + cor1.col1 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
-27
-40
11

query I rowsort
SELECT - 11 * + 88 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
-968
-968

query I rowsort
SELECT ALL + 49 FROM tab0 GROUP BY col0
----
49
49
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - NULLIF ( 3, tab1.col2 ) col1 FROM tab1 GROUP BY tab1.col2
----
-3

query I rowsort
SELECT ALL + 66 FROM tab2 AS cor0 GROUP BY cor0.col1
----
66
66
66

query I rowsort
SELECT ALL 43 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3913
3956
645

onlyif mysql # DIV for integer division: 
query I rowsort label-7056
SELECT cor0.col1 DIV 54 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7056
SELECT cor0.col1 / 54 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
0
0
1

query I rowsort
SELECT ALL 30 + - 87 AS col1 FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
-57
-57
-57

query I rowsort
SELECT ALL + tab1.col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT ALL + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 GROUP BY col0, col2
----
15
91
92

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 56 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
56

query I rowsort
SELECT ALL + 66 * 56 AS col0 FROM tab1 GROUP BY tab1.col1
----
3696
3696
3696

query I rowsort
SELECT + cor0.col0 - - 58 FROM tab2 AS cor0 GROUP BY cor0.col0
----
149
150
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 * cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1980
4970
56

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7066
SELECT + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7066
SELECT + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - 11 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-11
-11
-11

query I rowsort
SELECT + 71 * cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
3195
5041
568

query I rowsort
SELECT ALL + 95 + 94 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
189
189
189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7072
SELECT cor0.col1 DIV 70 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7072
SELECT cor0.col1 / 70 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - + col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + cor0.col1 + COALESCE ( 61, - cor0.col1 ) + + 90 FROM tab0 AS cor0 GROUP BY cor0.col1
----
151
232

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col0 * 83 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1826
2324
6806

query I rowsort
SELECT DISTINCT + 5 FROM tab1 AS cor0 GROUP BY cor0.col2
----
5

query I rowsort
SELECT DISTINCT - 51 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-51

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT + + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 + + cor0.col0 * - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1776
-603
-6816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT tab2.col0 + col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 col1 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-7087
SELECT DISTINCT - cor0.col0 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1

skipif mysql # not compatible
query I rowsort label-7087
SELECT DISTINCT - cor0.col0 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1

query I rowsort
SELECT DISTINCT 50 FROM tab0 GROUP BY tab0.col0
----
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 63 col2 FROM tab1 cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT ALL 24 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
24
24
24

query I rowsort
SELECT DISTINCT - 58 + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-20
-34
21

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
64

query I rowsort
SELECT - 20 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + 74 FROM tab0 AS cor0 GROUP BY cor0.col1
----
74

query I rowsort
SELECT + 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT DISTINCT 12 * 5 AS col1 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
60

query I rowsort
SELECT DISTINCT tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT - 71 FROM tab2 AS cor0 GROUP BY col0
----
-71

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT - tab1.col2 AS col0 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - 12 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-12
-12
-12

query I rowsort
SELECT DISTINCT 82 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
104
110
164

query I rowsort
SELECT 99 + cor0.col1 * ( - 82 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-3509
-393
-4575

query I rowsort
SELECT DISTINCT 51 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
51

query I rowsort
SELECT + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-7106
SELECT 51 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7106
SELECT 51 / cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
1

query I rowsort
SELECT ALL + + tab2.col0 FROM tab2, tab1 AS cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + tab0.col2 AS col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT 97 * col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
7857

onlyif mysql # DIV for integer division: 
query I rowsort label-7110
SELECT col1 DIV - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7110
SELECT col1 / - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT - 7 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-7
-7
-7

query I rowsort
SELECT ALL col2 FROM tab2 cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0, cor0.col2
----
0
81

query I rowsort
SELECT - 35 AS col0 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
-35
-35
-35

query I rowsort
SELECT 46 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
46
46

query I rowsort
SELECT DISTINCT 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 * + tab1.col1 col2 FROM tab1 GROUP BY col1
----
1936
3249
36

query I rowsort
SELECT ALL 83 FROM tab0 GROUP BY tab0.col1
----
83
83

query I rowsort
SELECT DISTINCT - - cor0.col1 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

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

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT ALL ( - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 + 58 FROM tab1 AS cor0 GROUP BY cor0.col2
----
103
129
66

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7127
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7127
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT DISTINCT + 35 FROM tab0 AS cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT DISTINCT - tab0.col1 * + col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT DISTINCT tab1.col2 AS col0 FROM tab1 WHERE NULL IS NULL GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL - col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT - cor0.col1 + - col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
-102
-115
-14

onlyif mysql # DIV for integer division: 
query I rowsort label-7133
SELECT 26 DIV - 34 AS col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7133
SELECT 26 / - 34 AS col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL 47 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col2 * ( + 44 ) FROM tab0 cor0 GROUP BY cor0.col2
----
1056
1672
3476

query I rowsort
SELECT - 39 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-39
-39
-39

query I rowsort
SELECT - 90 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-90
-90
-90

query I rowsort
SELECT 44 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
44
44
44

query I rowsort
SELECT ALL 78 - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
40
54

query I rowsort
SELECT + 99 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
99
99
99

query I rowsort
SELECT ALL - 91 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
-91
-91

query I rowsort
SELECT ALL 44 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col0
----
44
44
44

query I rowsort
SELECT DISTINCT - 7 FROM tab2 cor0 GROUP BY cor0.col0
----
-7

query I rowsort
SELECT ALL - COALESCE ( - cor0.col0, - cor0.col1, - 68 ) FROM tab2 AS cor0 GROUP BY cor0.col1, col1, cor0.col0
----
15
91
92

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
44
57
6

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
38

query I rowsort
SELECT - tab1.col0 + + 4 FROM tab1 GROUP BY tab1.col0
----
-18
-24
-78

query I rowsort
SELECT 81 + - 50 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab1 cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT DISTINCT 93 * 31 AS col2 FROM tab1 GROUP BY tab1.col1
----
2883

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0, cor1.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col0 * + ( + 62 ) - - cor0.col0 * col0 FROM tab2 cor0 GROUP BY cor0.col0
----
1155
13923
14168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 26 * + cor1.col1 col0 FROM tab1, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-1066
-1534
-1586

query I rowsort
SELECT 42 FROM tab0 AS cor0 GROUP BY cor0.col0
----
42
42
42

query I rowsort
SELECT - col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT tab1.col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT - 99 * cor0.col1 - - 20 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-3239
-4661
-4819

onlyif mysql # DIV for integer division: 
query I rowsort label-7160
SELECT ALL - 20 + + cor0.col1 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-19
-19
-19

skipif mysql # not compatible
query I rowsort label-7160
SELECT ALL - 20 + + cor0.col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT - 15 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-15

query I rowsort
SELECT DISTINCT - 54 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT ALL + cor0.col2 + - 53 FROM tab2 AS cor0 GROUP BY cor0.col2
----
26
34
5

onlyif mysql # DIV for integer division: 
query I rowsort label-7165
SELECT 91 DIV cor0.col2 - 84 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-81
-82
-83

skipif mysql # not compatible
query I rowsort label-7165
SELECT 91 / cor0.col2 - 84 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-81
-82
-83

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + - ( tab1.col1 ) AS col0 FROM tab1 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - 33 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-33
-33
-33

query I rowsort
SELECT DISTINCT 87 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3567
5133
5307

query I rowsort
SELECT - 0 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL - col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT 95 + - 21 FROM tab2 AS cor0 GROUP BY col0
----
74
74
74

query I rowsort
SELECT ALL + 29 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
29
29
29

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL cor0.col0 + - cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 42 AS col1 FROM tab2 GROUP BY tab2.col0
----
-42
-42
-42

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL + 52 + 36 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT 56 FROM tab1 cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-6561
0
0

query I rowsort
SELECT 14 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT DISTINCT 27 * 83 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2241

query I rowsort
SELECT - 24 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-24
-24

query I rowsort
SELECT NULLIF ( + 70, + 21 ) AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
70
70
70

query I rowsort
SELECT DISTINCT - 22 AS col0 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
-22

query I rowsort
SELECT + col2 * + 72 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1728
2736
5688

query I rowsort
SELECT - 15 AS col0 FROM tab0 GROUP BY tab0.col1
----
-15
-15

query I rowsort
SELECT - - 70 FROM tab1 GROUP BY tab1.col1
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 + - 15 col1 FROM tab2 GROUP BY col1
----
-56
-74
-76

query I rowsort
SELECT ALL 64 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT - ( 17 ) FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-17
-17
-17

query I rowsort
SELECT ( NULLIF ( - 45, - cor0.col0 ) ) AS col1 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
-45
-45
-45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7194
SELECT DISTINCT - CAST( - cor0.col1 AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-7194
SELECT DISTINCT - CAST ( - cor0.col1 AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT 43 FROM tab2 cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT DISTINCT + cor0.col1 + + cor0.col1 AS col2 FROM tab1 cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 87 FROM tab0 GROUP BY tab0.col0
----
-87
-87
-87

onlyif mysql # DIV for integer division: 
query I rowsort label-7199
SELECT + ( 29 ) DIV + 45 FROM tab2 GROUP BY tab2.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7199
SELECT + ( 29 ) / + 45 FROM tab2 GROUP BY tab2.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
63

query I rowsort
SELECT - + cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - 79 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
-79

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT 7 * cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
182
301
581

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - 42 ) col0 FROM tab1, tab2 cor0 GROUP BY cor0.col0
----
-42

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT ( cor0.col1 ) FROM tab2 AS cor0 GROUP BY col1, col1
----
41
59
61

query I rowsort
SELECT 34 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
34
34
34

query I rowsort
SELECT DISTINCT + 35 * - CASE + cor0.col1 + cor0.col2 WHEN + cor0.col2 THEN NULL WHEN col1 THEN cor0.col1 END * + ( 10 + + cor0.col2 * + col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
NULL

query I rowsort
SELECT ( - 55 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT - 55 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 94 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
94
94

query I rowsort
SELECT ALL + CASE - 59 WHEN - cor0.col2 THEN NULL ELSE ( 53 ) END AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT + 13 * 0 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col2 FROM tab1, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col1 + - col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ( + cor0.col0 * + cor0.col2 ) - - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
1392
5394
7268

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 95 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-95

query I rowsort
SELECT 84 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
84
84
84

query I rowsort
SELECT col1 * - tab2.col1 AS col1 FROM tab2 GROUP BY col1
----
-1681
-3481
-3721

query I rowsort
SELECT 0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT DISTINCT - 10 * + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-220
-280
-820

query I rowsort
SELECT + cor0.col0 * cor0.col0 + - 57 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1792
619
6832

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 + - 79 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-64
12
13

query I rowsort
SELECT + 85 FROM tab0 cor0 GROUP BY cor0.col1
----
85
85

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1
----
0
81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7231
SELECT ALL CAST( NULL AS SIGNED ) * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7231
SELECT ALL CAST ( NULL AS INTEGER ) * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 97 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
97

query I rowsort
SELECT - - ( 50 ) FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
50
50
50

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + cor0.col1 * 56 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2296
3304
3416

query I rowsort
SELECT ALL - 84 * + cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4814
-6557
-7221

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - ( + 39 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

query I rowsort
SELECT + cor0.col0 * 11 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
1001
1012
165

query I rowsort
SELECT - 75 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
-75
-75
-75

query I rowsort
SELECT ALL - 32 * col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1408
-1824
-192

query I rowsort
SELECT - 53 FROM tab0 cor0 GROUP BY cor0.col0
----
-53
-53
-53

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7244
SELECT + cor0.col0 DIV cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7244
SELECT + cor0.col0 / cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT tab0.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 14 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1162
364
602

query I rowsort
SELECT + - tab2.col1 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT 34 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
34
34
34

query I rowsort
SELECT - cor0.col2 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT ALL cor0.col2 + + col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT ALL - COALESCE ( 48, - cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + cor0.col2 - + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-19
-45
53

query I rowsort
SELECT + + tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT cor0.col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT + col1 + - tab0.col1 AS col2 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT DISTINCT + 26 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
26

query I rowsort
SELECT DISTINCT 25 FROM tab2 AS cor0 GROUP BY cor0.col2
----
25

query I rowsort
SELECT ALL + + 92 AS col2 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
92
92
92

query I rowsort
SELECT DISTINCT cor0.col1 * 69 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
2829
4071
4209

query I rowsort
SELECT DISTINCT - 41 FROM tab1 cor0 GROUP BY col2, cor0.col2
----
-41

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7263
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7263
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab2, tab1 cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - 60 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
-60
-60
-60

query I rowsort
SELECT cor0.col2 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT + cor0.col1 * 35 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1540
1995
210

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL = NULL
----

query I rowsort
SELECT + 9 FROM tab2 cor0 GROUP BY cor0.col1
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + NULLIF ( cor0.col1, + cor0.col1 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT - + tab1.col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + + 11 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
11

query I rowsort
SELECT DISTINCT - 53 AS col1 FROM tab1 GROUP BY tab1.col0
----
-53

query I rowsort
SELECT ALL cor0.col2 * + 66 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
1584
2508
5214

query I rowsort
SELECT - 50 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-50
-50
-50

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 * - 32 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-15488
-215168
-25088

query I rowsort
SELECT DISTINCT + ( - 3 ) FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-3

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 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NULL <= NULL
----

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT NULL IS NOT NULL
----
58
79
87

query I rowsort
SELECT DISTINCT - COALESCE ( cor0.col2, 33 ) * - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - ( cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 12 col0 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
12

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7284
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7284
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
71
71

query I rowsort
SELECT ALL - 66 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-124
-145
-153

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + 54 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
54
54
54

query I rowsort
SELECT + 8 * 99 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
792
792
792

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col2, cor1.col1
----
45
71
8

query I rowsort
SELECT - cor0.col2 * 56 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1344
-2128
-4424

query I rowsort
SELECT + 43 * 34 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1462
1462
1462

query I rowsort
SELECT - 12 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-12
-12
-12

query I rowsort
SELECT + 18 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
18
18
18

query I rowsort
SELECT + 27 * - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
-1161
-2241
-702

query I rowsort
SELECT ( - 11 + 12 ) FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
1
1
1

query I rowsort
SELECT DISTINCT - 72 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-72

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - 89 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-89
-89
-89

query I rowsort
SELECT ALL - 75 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-75
-75
-75

query I rowsort
SELECT 14 AS col0 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
14
14
14

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT + 16 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
16
16
16

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 * + 70 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15750
579670
592480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-7308
SELECT DISTINCT cor0.col2 DIV col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7308
SELECT DISTINCT cor0.col2 / col2 col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
1

query I rowsort
SELECT DISTINCT ( 74 + cor0.col0 ) * ( + 62 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5952
6324
9672

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7310
SELECT DISTINCT CAST( cor0.col0 AS SIGNED ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7310
SELECT DISTINCT CAST ( cor0.col0 AS INTEGER ) col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + - 1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-1
-1
-1

query I rowsort
SELECT + tab0.col1 * 59 AS col1 FROM tab0 GROUP BY tab0.col1
----
0
4779

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 32 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT 36 FROM tab0 AS cor0 GROUP BY col0
----
36
36
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7316
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7316
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 12, + cor0.col0 * + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY col1
----
12

query I rowsort
SELECT DISTINCT + 92 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
92

query I rowsort
SELECT 48 FROM tab1 cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT DISTINCT + + cor0.col1 * + cor0.col1 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT ALL - - 49 + tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
132
75
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7324
SELECT CAST( NULL AS DECIMAL ) / - 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7324
SELECT CAST ( NULL AS REAL ) / - 66 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + cor0.col2 ) * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT 50 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
50

query I rowsort
SELECT + 90 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
90
90
90

query I rowsort
SELECT ALL - 93 + - tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
-137
-150
-99

query I rowsort
SELECT + cor0.col2 + 35 FROM tab0 AS cor0 GROUP BY cor0.col2
----
114
59
73

query I rowsort
SELECT + tab2.col0 - + 85 FROM tab2 GROUP BY col0
----
-70
6
7

query I rowsort
SELECT + - 41 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-41
-41
-41

query I rowsort
SELECT + - 68 FROM tab0 GROUP BY col1
----
-68
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-7333
SELECT ALL col1 DIV - 85 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7333
SELECT ALL col1 / - 85 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - 81 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-81
-81
-81

query I rowsort
SELECT 97 FROM tab1 cor0 GROUP BY cor0.col1
----
97
97
97

query I rowsort
SELECT ALL + - 88 AS col0 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT 20 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT - 40 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-40

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, col0
----
15
91
92

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3772
5369
915

query I rowsort
SELECT ALL + NULLIF ( + 61, cor0.col2 ) * + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3538
4819
5307

query I rowsort
SELECT ALL 98 AS col0 FROM tab1 cor0 GROUP BY col0, cor0.col0
----
98
98
98

query I rowsort
SELECT - + cor0.col1 * ( - 16 ) FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col1
----
656
944
976

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL - 51 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
-51
-51
-51

query I rowsort
SELECT + + NULLIF ( - col2, 86 ) AS col2 FROM tab0 GROUP BY col2
----
-24
-38
-79

query I rowsort
SELECT + 31 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
31
31
31

onlyif mysql # DIV for integer division: 
query I rowsort label-7350
SELECT - cor0.col1 DIV - 62 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7350
SELECT - cor0.col1 / - 62 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 97 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
97

query I rowsort
SELECT 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
25
25

query I rowsort
SELECT DISTINCT 20 + 70 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
90

query I rowsort
SELECT + 12 FROM tab2 cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT 24 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-98
-98
-98

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7357
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7357
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab2, tab1 AS cor0 GROUP BY tab2.col2
----
NULL

query I rowsort
SELECT 73 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT 4 + 19 + + cor0.col2 * - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2002
-41
-5018

query I rowsort
SELECT + 82 * 36 FROM tab1 GROUP BY tab1.col1
----
2952
2952
2952

query I rowsort
SELECT - 22 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7362
SELECT - CAST( NULL AS SIGNED ) + + 66 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7362
SELECT - CAST ( NULL AS INTEGER ) + + 66 / - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
NULL
NULL
NULL

query I rowsort
SELECT - 16 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-16
-16
-16

query I rowsort
SELECT - 1 FROM tab0 GROUP BY tab0.col2
----
-1
-1
-1

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT DISTINCT + - 73 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-73

query I rowsort
SELECT ALL - NULLIF ( - 88, - 40 ) + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
129
147
149

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) + + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, col2
----
-38
-79
57

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT ALL 24 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
24
24

onlyif mysql # DIV for integer division: 
query I rowsort label-7371
SELECT - cor0.col1 + + cor0.col2 DIV - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-42
-60
-62

skipif mysql # not compatible
query I rowsort label-7371
SELECT - cor0.col1 + + cor0.col2 / - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
-42
-60
-62

query I rowsort
SELECT 65 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3770
5135
5655

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0

query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT + cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - ( cor0.col1 ) FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT + 16 FROM tab2 AS cor0 GROUP BY cor0.col0
----
16
16
16

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + 72 * cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3168
4104
432

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT ALL ( - cor0.col1 ) FROM tab1 cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT + 17 FROM tab1 GROUP BY col0
----
17
17
17

query I rowsort
SELECT 40 * + tab1.col2 AS col1 FROM tab1 GROUP BY col2
----
1800
2840
320

query I rowsort
SELECT cor0.col1 * + 0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT - col2 + + 63 * + 16 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
921
929
950

onlyif mysql # DIV for integer division: 
query I rowsort label-7388
SELECT DISTINCT + col2 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-7388
SELECT DISTINCT + col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT col0 FROM tab1 WHERE ( NULL ) NOT BETWEEN NULL AND NULL GROUP BY tab1.col0 HAVING ( NULL ) = ( NULL )
----

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT ALL - tab0.col1 * col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NOT NULL
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - - 81 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
81

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
81

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-7400
SELECT ALL cor0.col0 DIV - col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-7400
SELECT ALL cor0.col0 / - col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-1
-3
0

query I rowsort
SELECT ALL + + 54 FROM tab0, tab0 cor0, tab1 AS cor1 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
45
71
8

query I rowsort
SELECT + 80 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 44 col1 FROM tab2 cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT ( + 2 * - cor0.col2 ) + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT - 2 * + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-142
-16
-90

query I rowsort
SELECT 90 * - cor0.col2 - ( cor0.col2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-4095
-6461
-728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
-81
0
0

query I rowsort
SELECT ALL - - 59 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

query I rowsort
SELECT + 35 FROM tab0 AS cor0 GROUP BY cor0.col1
----
35
35

query I rowsort
SELECT DISTINCT + 25 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1100
1425
150

query I rowsort
SELECT DISTINCT cor0.col0 - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
0

query I rowsort
SELECT cor0.col1 * + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col2, cor0.col2
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 99 + 97 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7419
SELECT DISTINCT - cor0.col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-7419
SELECT DISTINCT - cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL

query I rowsort
SELECT 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
94
94
94

query I rowsort
SELECT + 0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT ALL 78 AS col2 FROM tab1 cor0 GROUP BY col0
----
78
78
78

query I rowsort
SELECT ALL 34 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT + 84 FROM tab0 AS cor0 GROUP BY col2
----
84
84
84

query I rowsort
SELECT 39 AS col1 FROM tab2 GROUP BY tab2.col0
----
39
39
39

onlyif mysql # DIV for integer division: 
query I rowsort label-7427
SELECT + NULLIF ( cor0.col1 * + cor0.col2, cor0.col1 ) - 48 DIV cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2377
4661
5307

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7427
SELECT + NULLIF ( cor0.col1 * + cor0.col2, cor0.col1 ) - 48 / cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2377
4661
5307

query I rowsort
SELECT ALL 82 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
82
82
82

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + 39 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2262
3081
3393

query I rowsort
SELECT 19 * - col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-1558
-418
-532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT COALESCE ( - cor0.col2, CASE NULLIF ( + 77, cor0.col2 ) WHEN cor0.col1 THEN NULL WHEN - cor0.col1 THEN NULL ELSE - cor0.col1 END, 28, + cor0.col1 + cor0.col1 ) * col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 53 FROM tab2 AS cor0 GROUP BY col2
----
-53
-53
-53

query I rowsort
SELECT col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col1 * cor0.col1 + col1 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-168
-4845
-5544

query I rowsort
SELECT DISTINCT cor0.col1 * - 78 FROM tab1 cor0 GROUP BY cor0.col1
----
-3432
-4446
-468

query I rowsort
SELECT ALL 7 + 46 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT ALL 1 AS col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
1
1
1

query I rowsort
SELECT 50 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
50
50
50

query I rowsort
SELECT ALL - ( + col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL - cor0.col1 * - 19 * cor0.col1 + + NULLIF ( cor0.col1, cor0.col1 + - col1 ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
31980
66198
70760

query I rowsort
SELECT DISTINCT + 19 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
19

query I rowsort
SELECT col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT 66 AS col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
66
66
66

query I rowsort
SELECT DISTINCT - ( - 22 ) AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY tab0.col1
----
22

query I rowsort
SELECT 55 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT - 72 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-72

query I rowsort
SELECT 33 AS col2 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
33
33
33

query I rowsort
SELECT + 93 FROM tab0 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT DISTINCT + 73 AS col1 FROM tab0 GROUP BY tab0.col1
----
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + ( - 27 ) - - col0 FROM tab0 GROUP BY tab0.col0
----
-1
16
56

query I rowsort
SELECT 65 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT ALL - 44 + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-20
-6
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col2 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + 99 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT DISTINCT 8 FROM tab2 cor0 GROUP BY cor0.col0, col1
----
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 + + cor0.col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
-6
70
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 58 + 84 col2 FROM tab1 GROUP BY tab1.col1
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 73 FROM tab2 cor0 GROUP BY col1
----
73
73
73

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
16

query I rowsort
SELECT + + 17 - + 26 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-9
-9
-9

query I rowsort
SELECT ALL 4 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
232
316
348

query I rowsort
SELECT ALL - col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + cor0.col2 * cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-7472
SELECT - 89 DIV + 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-7472
SELECT - 89 / + 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 * cor0.col1 * 63 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
0
413424

query I rowsort
SELECT DISTINCT ( cor0.col1 + + cor0.col1 ) * 14 FROM tab2 AS cor0 GROUP BY col1
----
1148
1652
1708

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT ALL - 70 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
-70
-70
-70

query I rowsort
SELECT 52 + col1 AS col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
133
52
52

query I rowsort
SELECT cor0.col1 + 36 FROM tab0 AS cor0 GROUP BY cor0.col1
----
117
36

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 - 39 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-39
-39
-39

query I rowsort
SELECT ALL cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT DISTINCT + ( - 66 ) FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY tab2.col1
----
-66

query I rowsort
SELECT + 7 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
7
7
7

query I rowsort
SELECT DISTINCT - 77 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-77

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-7486
SELECT ALL cor0.col2 DIV + cor0.col1 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
59
80
88

skipif mysql # not compatible
query I rowsort label-7486
SELECT ALL cor0.col2 / + cor0.col1 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
59
80
88

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL 32 + cor0.col1 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
113
32

query I rowsort
SELECT ALL + 85 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 19 col2 FROM tab0, tab1 AS cor0, tab0 cor1 GROUP BY tab0.col1
----
19

query I rowsort
SELECT ALL - + cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT tab1.col0 + + col0 FROM tab1 GROUP BY col0
----
164
44
56

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT 75 FROM tab2 AS cor0 GROUP BY cor0.col2
----
75
75
75

query I rowsort
SELECT DISTINCT 36 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
36

query I rowsort
SELECT ALL cor0.col1 - 2 AS col0 FROM tab1 cor0 GROUP BY col1
----
4
42
55

query I rowsort
SELECT ALL + 98 FROM tab1 AS cor0 GROUP BY cor0.col0
----
98
98
98

query I rowsort
SELECT ALL - cor0.col2 + - 51 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
-122
-59
-96

query I rowsort
SELECT DISTINCT ( - 96 * - 2 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
192

query I rowsort
SELECT DISTINCT - 70 FROM tab2 cor0 GROUP BY cor0.col0
----
-70

query I rowsort
SELECT 52 * col1 - - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2370
2992
334

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
114
12
88

query I rowsort
SELECT + 26 FROM tab2 GROUP BY tab2.col0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 - - 89 col2 FROM tab2 GROUP BY tab2.col0
----
94
94
94

query I rowsort
SELECT - - cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - + cor0.col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT cor0.col2 * - 55 FROM tab2 AS cor0 GROUP BY col2
----
-3190
-4345
-4785

query I rowsort
SELECT DISTINCT 13 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
13

query I rowsort
SELECT - 76 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-76
-76
-76

query I rowsort
SELECT 41 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT 54 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT COALESCE ( cor0.col1 * - col1 + - cor0.col2, + ( + cor0.col2 ) ) FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2007
-3294
-44

query I rowsort
SELECT ALL 54 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
2214
3186
3294

query I rowsort
SELECT col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT - col0 * 82 AS col0 FROM tab0 GROUP BY tab0.col0
----
-2132
-3526
-6806

query I rowsort
SELECT - ( 57 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-57
-57

query I rowsort
SELECT - cor0.col1 + 13 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-68
13

query I rowsort
SELECT ALL + 17 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT DISTINCT + 85 FROM tab2 GROUP BY col2
----
85

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY col2
----
142
16
90

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL 97 * - 73 AS col1 FROM tab2 GROUP BY tab2.col1
----
-7081
-7081
-7081

query I rowsort
SELECT ALL + 25 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 5 FROM tab1 GROUP BY col2
----
5
5
5

query I rowsort
SELECT + 34 + 92 FROM tab1 GROUP BY col1
----
126
126
126

onlyif mysql # DIV for integer division: 
query I rowsort label-7527
SELECT ALL + 71 DIV + 97 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7527
SELECT ALL + 71 / + 97 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL + 57 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1482
2451
4731

onlyif mysql # DIV for integer division: 
query I rowsort label-7529
SELECT DISTINCT - cor0.col0 DIV + 72 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7529
SELECT DISTINCT - cor0.col0 / + 72 col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col0 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
2025
5041
64

query I rowsort
SELECT 44 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
44
44
44

onlyif mysql # DIV for integer division: 
query I rowsort label-7534
SELECT DISTINCT + ( cor0.col0 ) + col1 DIV col0 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
44
83

skipif mysql # not compatible
query I rowsort label-7534
SELECT DISTINCT + ( cor0.col0 ) + col1 / col0 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
26
44
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 61 * - 8 col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
488
488
488

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 40 col1 FROM tab2, tab1 cor0 GROUP BY tab2.col0
----
40
40
40

query I rowsort
SELECT ALL + tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7538
SELECT + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7538
SELECT + CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 * + tab0.col2 col0 FROM tab0 GROUP BY col2
----
-1608
-2546
-5293

query I rowsort
SELECT + 56 AS col2 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
56
56
56

query I rowsort
SELECT 72 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
72
72
72

query I rowsort
SELECT 84 FROM tab1 cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT col0 * 48 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
4368
4416
720

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab2 AS cor0, tab1 cor1 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT 17 * - tab0.col0 AS col2 FROM tab0 GROUP BY tab0.col0
----
-1411
-442
-731

query I rowsort
SELECT DISTINCT + 7 FROM tab2 GROUP BY tab2.col2
----
7

query I rowsort
SELECT cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * 41 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-2378
-3239
-3567

query I rowsort
SELECT 55 FROM tab2 AS cor0 GROUP BY cor0.col1
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 12 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
12
12
12

query I rowsort
SELECT DISTINCT 12 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
12

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT + 79 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
79
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 70 * + cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1050
6370
6440

query I rowsort
SELECT DISTINCT + 21 FROM tab2 AS cor0 GROUP BY cor0.col0
----
21

query I rowsort
SELECT DISTINCT - 0 * + 76 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT 93 FROM tab0 AS cor0 GROUP BY cor0.col0
----
93
93
93

query I rowsort
SELECT - + 61 AS col1 FROM tab1, tab1 cor0 GROUP BY tab1.col0
----
-61
-61
-61

query I rowsort
SELECT cor0.col0 * cor0.col0 * 8 FROM tab0 AS cor0 GROUP BY cor0.col0
----
14792
5408
55112

query I rowsort
SELECT DISTINCT + cor0.col0 - - 74 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
100
117
157

query I rowsort
SELECT ALL cor1.col0 + cor1.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
166
52
86

query I rowsort
SELECT + 26 FROM tab0, tab0 cor0 GROUP BY cor0.col2
----
26
26
26

query I rowsort
SELECT 25 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7566
SELECT DISTINCT CAST( NULL AS SIGNED ) / + cor0.col1 - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7566
SELECT DISTINCT CAST ( NULL AS INTEGER ) / + cor0.col1 - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + 56 - 33 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
23
23
23

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY col0, col2
----
-22
-28
-82

query I rowsort
SELECT ALL + 41 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
41
41

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7571
SELECT ALL CAST( NULL AS SIGNED ) * 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7571
SELECT ALL CAST ( NULL AS INTEGER ) * 75 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor1.col1
----
0
0
81

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 66 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
66

query I rowsort
SELECT ALL 28 AS col0 FROM tab1 GROUP BY tab1.col0
----
28
28
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 * tab1.col0 col1 FROM tab1 GROUP BY col0
----
-484
-6724
-784

onlyif mysql # DIV for integer division: 
query I rowsort label-7578
SELECT DISTINCT cor0.col2 DIV - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-7578
SELECT DISTINCT cor0.col2 / - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1

query I rowsort
SELECT DISTINCT 91 FROM tab2 AS cor0 GROUP BY cor0.col1
----
91

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 ALL 54 FROM tab1 AS cor0 GROUP BY col1
----
54
54
54

query I rowsort
SELECT DISTINCT + 88 FROM tab1 GROUP BY tab1.col0
----
88

query I rowsort
SELECT DISTINCT - 9 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-9

query I rowsort
SELECT - 82 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-82
-82
-82

query I rowsort
SELECT col0 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1032
-2054
-3154

query I rowsort
SELECT 4 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT - 8 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-8
-8
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-7588
SELECT DISTINCT + 48 DIV 38 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
query I rowsort label-7588
SELECT DISTINCT + 48 / 38 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT 78 - + 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-7
-7
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col0 FROM tab0 GROUP BY col1 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL - 14 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-14
-14
-14

query I rowsort
SELECT tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2 HAVING ( NULL ) IS NOT NULL
----

query I rowsort
SELECT ALL tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 96 + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
137
155
157

query I rowsort
SELECT 7 AS col2 FROM tab1 AS cor0 GROUP BY col1
----
7
7
7

query I rowsort
SELECT DISTINCT 8 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT - 57 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-57
-57
-57

query I rowsort
SELECT - - 51 FROM tab1, tab1 AS cor0 GROUP BY tab1.col2
----
51
51
51

query I rowsort
SELECT DISTINCT - 19 * cor0.col2 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
-1501
-456
-722

query I rowsort
SELECT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT + 80 FROM tab0, tab0 cor0 GROUP BY tab0.col0
----
80
80
80

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1 GROUP BY cor1.col2, cor0.col0, cor1.col0
----
9 values hashing to 559da8f454c4e5599b87319641a4f49a

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 74 col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 60 ) col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-60
-60
-60

query I rowsort
SELECT + 87 AS col1 FROM tab0 GROUP BY tab0.col0
----
87
87
87

query I rowsort
SELECT ALL 74 FROM tab1 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT 22 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
22
22
22

query I rowsort
SELECT DISTINCT 74 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
-182
-184
-30

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7614
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-7614
SELECT - cor0.col1 / - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1
1
1

query I rowsort
SELECT ALL 98 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2548
4214
8134

onlyif mysql # DIV for integer division: 
query I rowsort label-7616
SELECT DISTINCT cor0.col1 DIV 58 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7616
SELECT DISTINCT cor0.col1 / 58 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT + 34 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT DISTINCT + 65 FROM tab2 AS cor0 GROUP BY cor0.col1
----
65

query I rowsort
SELECT DISTINCT - 88 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-88

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7620
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-7620
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 GROUP BY tab2.col0
----
NULL

query I rowsort
SELECT ALL 71 * 70 FROM tab1 AS cor0 GROUP BY cor0.col0
----
4970
4970
4970

query I rowsort
SELECT DISTINCT + 47 * cor0.col0 + - ( 19 ) FROM tab2 cor0 GROUP BY cor0.col0
----
4258
4305
686

query I rowsort
SELECT ALL - 84 FROM tab2 GROUP BY tab2.col1
----
-84
-84
-84

query I rowsort
SELECT + 68 + - 55 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2
-78
-79

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT DISTINCT 1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7627
SELECT DISTINCT CAST( + cor0.col1 AS SIGNED ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif mysql # not compatible
query I rowsort label-7627
SELECT DISTINCT CAST ( + cor0.col1 AS INTEGER ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - 49 FROM tab0 cor0 GROUP BY cor0.col1
----
-49
-49

query I rowsort
SELECT DISTINCT cor0.col1 * + ( cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
6561

query I rowsort
SELECT - cor0.col2 AS col1 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 col2 col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL tab2.col0 FROM tab2 GROUP BY tab2.col0 HAVING NOT ( NULL ) IS NOT NULL
----
15
91
92

query I rowsort
SELECT + cor0.col2 * + cor0.col2 * - 40 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-201640
-2560
-81000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 38 col1 FROM tab0, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-38

query I rowsort
SELECT + - 60 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-60
-60
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - + 49 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-49
-49
-49

query I rowsort
SELECT + col1 - + 7 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-7
74

query I rowsort
SELECT COALESCE ( + 43, + col0, - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT - - 47 AS col2 FROM tab0 GROUP BY tab0.col1
----
47
47

query I rowsort
SELECT + 30 * + 98 + - col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
2848
2849
2925

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7644
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7644
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 - + 87 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-132
-158
-95

query I rowsort
SELECT DISTINCT + 28 FROM tab2, tab1 AS cor0, tab0 cor1 GROUP BY cor0.col1
----
28

query I rowsort
SELECT 63 AS col0 FROM tab2 GROUP BY tab2.col0
----
63
63
63

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
-15
-91
-92

query I rowsort
SELECT ALL - 87 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-87
-87
-87

query I rowsort
SELECT DISTINCT 20 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
20

onlyif mysql # DIV for integer division: 
query I rowsort label-7651
SELECT ALL - + tab1.col2 DIV + 54 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7651
SELECT ALL - + tab1.col2 / + 54 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-1
0
0

query I rowsort
SELECT DISTINCT - 57 AS col1 FROM tab0 GROUP BY col0
----
-57

query I rowsort
SELECT + 94 FROM tab0 cor0 GROUP BY cor0.col1
----
94
94

query I rowsort
SELECT - cor0.col0 + + 6 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-85
-86
-9

query I rowsort
SELECT ALL + 46 FROM tab1 AS cor0 GROUP BY cor0.col0
----
46
46
46

query I rowsort
SELECT 15 FROM tab2 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT DISTINCT - 4 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4

query I rowsort
SELECT DISTINCT + 73 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
73

query I rowsort
SELECT - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT ALL cor0.col1 * col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

query I rowsort
SELECT ALL ( 11 + - col1 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
-70
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 91 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
91

query I rowsort
SELECT - 24 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
-24
-24

onlyif mysql # DIV for integer division: 
query I rowsort label-7664
SELECT ALL + cor0.col2 DIV + 4 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
6
9

skipif mysql # not compatible
query I rowsort label-7664
SELECT ALL + cor0.col2 / + 4 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
6
9

query I rowsort
SELECT ALL + 51 * 11 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
561
561
561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
11
11
11

query I rowsort
SELECT ALL 65 FROM tab0 GROUP BY tab0.col1
----
65
65

query I rowsort
SELECT ALL + 75 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-16
-17
60

query I rowsort
SELECT ALL + 95 FROM tab2 AS cor0 GROUP BY cor0.col2
----
95
95
95

query I rowsort
SELECT + 63 - + col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-19
35
41

query I rowsort
SELECT cor1.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col1 + - 80 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-124
-137
-86

query I rowsort
SELECT DISTINCT - 21 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-15
23
36

query I rowsort
SELECT 19 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, col2
----
110
111
34

query I rowsort
SELECT - 85 FROM tab2 cor0 GROUP BY cor0.col0
----
-85
-85
-85

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7676
SELECT DISTINCT CAST( col0 * cor0.col0 AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

skipif mysql # not compatible
query I rowsort label-7676
SELECT DISTINCT CAST ( col0 * cor0.col0 AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT - 58 FROM tab0 cor0 GROUP BY cor0.col1
----
-58
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 19 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT 99 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
99
99

query I rowsort
SELECT + + cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

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 + ( + 83 ) AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT DISTINCT + 21 FROM tab2 cor0 GROUP BY cor0.col2
----
21

query I rowsort
SELECT - 36 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-36
-36
-36

query I rowsort
SELECT ALL + 25 FROM tab2 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT ALL 0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT ALL - 54 * 27 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-1458
-1458

query I rowsort
SELECT DISTINCT + - tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0
0

query I rowsort
SELECT + cor0.col0 * 52 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4732
4784
780

query I rowsort
SELECT + + ( + cor0.col0 ) AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 AS col1 FROM tab2 cor0 GROUP BY col1, cor0.col0
----
3772
5369
915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
65
65
65

query I rowsort
SELECT DISTINCT + + cor0.col2 FROM tab1, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT + 52 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT DISTINCT - 59 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 14 col2 FROM tab0 GROUP BY tab0.col0
----
14
14
14

query I rowsort
SELECT cor0.col2 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - 82 AS col0 FROM tab2, tab0 AS cor0 GROUP BY tab2.col0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - cor0.col0 * 40 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-3640
-3680
-600

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
92

query I rowsort
SELECT 12 * cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
492
708
732

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - NULLIF ( 48, cor0.col1 ) * - cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
3888

query I rowsort
SELECT ALL - + 38 + 47 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT 84 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
84
84
84

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col0 FROM tab2 cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
85
85
85

query I rowsort
SELECT 50 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT + + cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT 92 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
92
92
92

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT 57 FROM tab0 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT - 59 FROM tab0, tab1 AS cor0 GROUP BY tab0.col0
----
-59
-59
-59

query I rowsort
SELECT + + 3 + 34 FROM tab0 GROUP BY col2
----
37
37
37

query I rowsort
SELECT ALL - 2 AS col0 FROM tab0 GROUP BY tab0.col1
----
-2
-2

query I rowsort
SELECT 26 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
26
26

query I rowsort
SELECT - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL NULLIF ( + 91, - cor0.col0 ) + - ( cor0.col0 + - col2 * cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1452
624
6306

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT - 48 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
10

query I rowsort
SELECT 22 FROM tab2 GROUP BY col0
----
22
22
22

query I rowsort
SELECT - 62 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-62
-62
-62

onlyif mysql # DIV for integer division: 
query I rowsort label-7731
SELECT ALL cor0.col1 DIV - 22 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-7731
SELECT ALL cor0.col1 / - 22 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-2
-2

query I rowsort
SELECT 38 + - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-41
0
14

query I rowsort
SELECT DISTINCT cor0.col2 - + cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
0

query I rowsort
SELECT DISTINCT + 38 AS col0 FROM tab2 GROUP BY tab2.col1
----
38

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 34 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
34
34
34

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT - 55 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col0 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) <> NULL
----

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

query I rowsort
SELECT - 24 FROM tab2 GROUP BY tab2.col1
----
-24
-24
-24

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
0
0
162

query I rowsort
SELECT 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT + 89 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
89
89
89

query I rowsort
SELECT + 26 * + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
1118
2158
676

query I rowsort
SELECT - 85 FROM tab0, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-85
-85
-85

query I rowsort
SELECT 23 FROM tab1 AS cor0 GROUP BY col1
----
23
23
23

query I rowsort
SELECT 55 FROM tab2 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT CASE cor0.col2 WHEN cor0.col2 THEN cor0.col0 WHEN - 84 + - col2 THEN col2 ELSE NULL END * - 22 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1804
-484
-616

query I rowsort
SELECT + NULLIF ( 45, + 31 ) + tab2.col0 AS col1 FROM tab2 GROUP BY tab2.col0
----
136
137
60

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT DISTINCT + 9 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
234
387
747

query I rowsort
SELECT DISTINCT - cor0.col0 * + col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT cor0.col1 * 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
2296
3304
3416

query I rowsort
SELECT ALL cor0.col1 * - 10 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-440
-570
-60

query I rowsort
SELECT 79 FROM tab2 AS cor0 GROUP BY cor0.col1
----
79
79
79

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT ALL + 16 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
16
16

query I rowsort
SELECT ALL 66 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
66
66
66

query I rowsort
SELECT + 26 FROM tab1 AS cor0 GROUP BY cor0.col0
----
26
26
26

query I rowsort
SELECT ALL 54 * + cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0
----
4914
4968
810

query I rowsort
SELECT + ( + 65 ) FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
65
65
65

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 cor0 GROUP BY col1
----
44
57
6

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 cor0.col0 * + col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3375
753571
778688

query I rowsort
SELECT 75 FROM tab0 cor0 GROUP BY cor0.col0
----
75
75
75

query I rowsort
SELECT DISTINCT + 88 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
88

query I rowsort
SELECT - 52 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY tab2.col0
----
-52
-52
-52

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 - tab2.col2 * 53 AS col2 FROM tab2 GROUP BY col2
----
-3074
-4187
-4611

query I rowsort
SELECT DISTINCT - cor0.col1 * - col1 * col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
154652
316771
55815

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT DISTINCT 84 - - cor0.col2 * - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1941
-4957
20

query I rowsort
SELECT ALL - 37 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-37
-37
-37

query I rowsort
SELECT ALL 64 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
5824
5888
960

query I rowsort
SELECT ALL + 15 FROM tab0 AS cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT ALL - 42 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-42
-42
-42

query I rowsort
SELECT DISTINCT + tab0.col0 AS col2 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT 32 * - 1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-32

query I rowsort
SELECT DISTINCT 5 FROM tab0 cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT + cor0.col0 + - 60 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-17
-34
23

query I rowsort
SELECT - col1 AS col0 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NOT NULL
----
-44
-57
-6

onlyif mysql # DIV for integer division: 
query I rowsort label-7785
SELECT - cor0.col1 + cor0.col1 DIV - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-45
-58
-7

skipif mysql # not compatible
query I rowsort label-7785
SELECT - cor0.col1 + cor0.col1 / - col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-45
-58
-7

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT ALL + col0 * - col0 + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col2 * + 99 FROM tab1 AS cor0 GROUP BY cor0.col2
----
4455
7029
792

query I rowsort
SELECT cor0.col0 + - col0 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
3526
83

query I rowsort
SELECT 43 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
43
43
43

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 89 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
89
89
89

query I rowsort
SELECT + cor1.col2 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 7 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-7

query I rowsort
SELECT - 64 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-64
-64
-64

query I rowsort
SELECT DISTINCT + 24 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 39 col0 FROM tab0 AS cor0 GROUP BY col2
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL tab2.col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col2 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + - cor0.col0 + 1 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-25
-42
-82

query I rowsort
SELECT ALL cor0.col2 * 27 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
1215
1917
216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 * - cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1230
-1770
-1830

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT ALL 6 FROM tab0 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT ALL 82 - 48 FROM tab2 cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT ALL + 83 FROM tab1 AS cor0 GROUP BY cor0.col2
----
83
83
83

query I rowsort
SELECT - col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 4 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
104
172
332

query I rowsort
SELECT DISTINCT + 95 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
95

query I rowsort
SELECT + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT + - 26 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-2054
-624
-988

query I rowsort
SELECT ALL + ( + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-7815
SELECT ALL + cor0.col1 + cor0.col1 DIV + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
58
7

skipif mysql # not compatible
query I rowsort label-7815
SELECT ALL + cor0.col1 + cor0.col1 / + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
45
58
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 col2 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col1 * cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

onlyif mysql # DIV for integer division: 
query I rowsort label-7818
SELECT ALL 63 DIV - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-7
0

skipif mysql # not compatible
query I rowsort label-7818
SELECT ALL 63 / - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1
-7
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7819
SELECT + 80 DIV + 2 FROM tab0 cor0 GROUP BY cor0.col0
----
40
40
40

skipif mysql # not compatible
query I rowsort label-7819
SELECT + 80 / + 2 FROM tab0 cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT DISTINCT COALESCE ( cor0.col2, col2 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * ( + col2 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1444
-576
-6241

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1, cor0.col1
----
118
122
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 10 col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
10

query I rowsort
SELECT DISTINCT 79 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
79

query I rowsort
SELECT cor0.col2 - 91 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-12
-33
-4

query I rowsort
SELECT DISTINCT col2 * 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
1248
1976
4108

query I rowsort
SELECT ALL - 56 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-56
-56
-56

query I rowsort
SELECT - col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL + 98 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 14 AS col2 FROM tab1 GROUP BY tab1.col0
----
14
14
14

query I rowsort
SELECT 35 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
35
35
35

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( + 49, cor0.col1 ) + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
132
75
92

query I rowsort
SELECT - + cor0.col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT cor0.col2 * + 21 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
1491
168
945

query I rowsort
SELECT 44 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY col0, col2
----
-22
-28
-82

query I rowsort
SELECT ALL - 78 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-78
-78

query I rowsort
SELECT DISTINCT - 49 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-49

query I rowsort
SELECT DISTINCT - 99 FROM tab1 cor0 GROUP BY cor0.col2
----
-99

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + 5, cor0.col2, + col0 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5

query I rowsort
SELECT - col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT ALL + cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
484
6724
784

query I rowsort
SELECT + cor0.col2 * 85 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2040
3230
6715

query I rowsort
SELECT ALL + col1 AS col0 FROM tab1 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 30 col1 FROM tab0 GROUP BY tab0.col1
----
-30
-30

query I rowsort
SELECT 95 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT + 37 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
37
37

query I rowsort
SELECT DISTINCT + col2 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + 3 FROM tab0 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT - + cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - ( 5 ) FROM tab0 cor0 GROUP BY col2
----
-5
-5
-5

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-81
0
0

query I rowsort
SELECT 7 + - 1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

onlyif mysql # DIV for integer division: 
query I rowsort label-7859
SELECT + 56 + col0 DIV - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
55
55
55

skipif mysql # not compatible
query I rowsort label-7859
SELECT + 56 + col0 / - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT 15 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
15
15
15

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + + 8 + - 27 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + 66 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
66

query I rowsort
SELECT ALL 72 * + cor0.col2 * - cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-103968
-41472
-449352

query I rowsort
SELECT 39 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
39
39
39

query I rowsort
SELECT + 66 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
66
66
66

query I rowsort
SELECT DISTINCT 48 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
48

query I rowsort
SELECT DISTINCT + 76 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor1.col0
----
76

query I rowsort
SELECT + + cor0.col0 + cor0.col0 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - tab0.col0 AS col0 FROM tab0 GROUP BY tab0.col0
----
-26
-43
-83

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 GROUP BY col2 HAVING ( NULL ) IS NULL
----
45
71
8

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT 53 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT ALL 70 FROM tab0 GROUP BY col2
----
70
70
70

query I rowsort
SELECT 78 + - 65 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
13
13
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
80
80
80

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1, col0
----
3772
5369
915

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 35 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
35

query I rowsort
SELECT ALL - cor0.col2 * + ( cor0.col2 ) FROM tab0 cor0 GROUP BY cor0.col2
----
-1444
-576
-6241

query I rowsort
SELECT - 71 * cor0.col0 FROM tab2, tab2 cor0 GROUP BY cor0.col0
----
-1065
-6461
-6532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
45
71
8

query I rowsort
SELECT 30 + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
113
56
73

query I rowsort
SELECT ALL - 29 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-29
-29
-29

query I rowsort
SELECT DISTINCT - ( + 0 ) FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT - ( + 90 ) FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
-90
-90
-90

query I rowsort
SELECT DISTINCT + COALESCE ( - cor0.col1, col1 ) + + 8 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-33
-51
-53

onlyif mysql # DIV for integer division: 
query I rowsort label-7889
SELECT cor0.col1 DIV - 25 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-7889
SELECT cor0.col1 / - 25 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-2
-2

query I rowsort
SELECT ( - cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT + cor0.col2 + - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT 89 - col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-136
-8192
-8375

query I rowsort
SELECT ALL 20 * tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
1660
520
860

query I rowsort
SELECT DISTINCT + cor0.col2 * 10 FROM tab1 AS cor0 GROUP BY col2
----
450
710
80

query I rowsort
SELECT DISTINCT - 92 FROM tab2 AS cor0 GROUP BY col2
----
-92

query I rowsort
SELECT DISTINCT + col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL + 12 FROM tab1 cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col1, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT 27 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
27

query I rowsort
SELECT + 5 FROM tab1 AS cor0 GROUP BY cor0.col0
----
5
5
5

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7901
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7901
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
NULL
NULL
NULL

query I rowsort
SELECT 97 + 10 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
107
107
107

query I rowsort
SELECT ALL + 70 FROM tab0 AS cor0 GROUP BY cor0.col0
----
70
70
70

query I rowsort
SELECT 48 * + col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
2112
2736
288

query I rowsort
SELECT + 1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-15
-91
-92

query I rowsort
SELECT 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78
78
78

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7909
SELECT + CAST( NULL AS SIGNED ) * 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7909
SELECT + CAST ( NULL AS INTEGER ) * 8 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-81
0

query I rowsort
SELECT cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-44
-57
-6

query I rowsort
SELECT ALL tab2.col0 + 19 FROM tab2 GROUP BY tab2.col0
----
110
111
34

query I rowsort
SELECT ALL + 14 FROM tab1 AS cor0 GROUP BY col2
----
14
14
14

query I rowsort
SELECT DISTINCT + tab2.col1 + + 44 AS col0 FROM tab2 GROUP BY col1
----
103
105
85

query I rowsort
SELECT 64 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
64
64
64

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1849
-676
-6889

onlyif mysql # DIV for integer division: 
query I rowsort label-7920
SELECT DISTINCT - 93 DIV + cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-1
-2

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7920
SELECT DISTINCT - 93 / + cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-1
-2

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT cor0.col2 * 85 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
3825
6035
680

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + + col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT 55 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
55
55
55

query I rowsort
SELECT ALL - + col0 AS col2 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
1444
576
6241

query I rowsort
SELECT + cor0.col0 * - COALESCE ( - cor0.col0, 59 + + cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT ALL + + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT ALL col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
44
57
6

query I rowsort
SELECT cor0.col1 * 75 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
6075

query I rowsort
SELECT DISTINCT + + cor0.col0 + + cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
68
68
68

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
44
57
6

query I rowsort
SELECT ( NULLIF ( 40, - col0 ) ) FROM tab0 cor0 GROUP BY cor0.col0
----
40
40
40

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.col2
----
15
91
92

query I rowsort
SELECT + cor0.col2 * cor0.col0 + 73 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1378
5409
7262

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 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-81
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-7943
SELECT ALL + cor0.col2 DIV 79 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7943
SELECT ALL + cor0.col2 / 79 AS col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * COALESCE ( 49, cor0.col0 + col0, cor0.col1 * + cor0.col0 ) col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2842
3871
4263

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-7945
SELECT CAST( NULL AS DECIMAL ) * 94 col1 FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-7945
SELECT CAST ( NULL AS REAL ) * 94 col1 FROM tab1 AS cor0 GROUP BY col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 51 FROM tab0 AS cor0 GROUP BY cor0.col0
----
51

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7948
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-7948
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT DISTINCT + + tab0.col0 * - 90 FROM tab0 GROUP BY tab0.col0
----
-2340
-3870
-7470

query I rowsort
SELECT + col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT cor0.col2 + 97 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
121
135
176

query I rowsort
SELECT ALL cor0.col1 * col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
6561

query I rowsort
SELECT - cor0.col1 * 68 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
-2788
-4012
-4148

query I rowsort
SELECT + 15 AS col1 FROM tab2 GROUP BY tab2.col0
----
15
15
15

query I rowsort
SELECT + 19 * cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1349
152
855

onlyif mysql # DIV for integer division: 
query I rowsort label-7956
SELECT ALL cor0.col2 DIV - 79 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7956
SELECT ALL cor0.col2 / - 79 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1
0
0

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-44
-57
-6

query I rowsort
SELECT + col2 * + cor0.col2 * + col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1408
413362
56700

query I rowsort
SELECT + 18 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
18
18
18

onlyif mysql # DIV for integer division: 
query I rowsort label-7960
SELECT 67 + cor0.col2 DIV - 70 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
66
67
67

skipif mysql # not compatible
query I rowsort label-7960
SELECT 67 + cor0.col2 / - 70 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
66
67
67

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col0, col2
----
58
79
87

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT - cor0.col1 + + cor0.col1 * + cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1
----
1892
30
3192

query I rowsort
SELECT DISTINCT + 70 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
70

query I rowsort
SELECT DISTINCT - NULLIF ( cor0.col1, - 68 ) * + cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT 62 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
62
62
62

query I rowsort
SELECT ALL ( + cor0.col2 ) AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + + 46 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 94 * + cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
135736
54144
586654

query I rowsort
SELECT ALL col0 * - ( - 41 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1066
1763
3403

query I rowsort
SELECT ALL - + 2 FROM tab2 GROUP BY col0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
93

query I rowsort
SELECT ALL 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
54
54
54

query I rowsort
SELECT COALESCE ( 36 + cor0.col1, + cor0.col1 * + 30 ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
77
95
97

query I rowsort
SELECT - 59 FROM tab1 cor0 GROUP BY cor0.col1
----
-59
-59
-59

query I rowsort
SELECT ALL + 63 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
63
63
63

query I rowsort
SELECT DISTINCT - 90 FROM tab1 GROUP BY tab1.col2
----
-90

query I rowsort
SELECT ALL + 10 FROM tab2 AS cor0 GROUP BY col0
----
10
10
10

onlyif mysql # DIV for integer division: 
query I rowsort label-7980
SELECT - cor0.col1 DIV 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7980
SELECT - cor0.col1 / 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1
0
0

query I rowsort
SELECT ALL - + 51 + - 38 FROM tab1 GROUP BY tab1.col0
----
-89
-89
-89

query I rowsort
SELECT ALL 0 + + cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT + 91 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
91
91
91

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-7984
SELECT CAST( NULL AS SIGNED ) * - col2 - - 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7984
SELECT CAST ( NULL AS INTEGER ) * - col2 - - 80 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT DISTINCT + 32 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1376
2656
832

query I rowsort
SELECT + 13 + + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
21
58
84

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
45
71
8

query I rowsort
SELECT + 92 + tab0.col2 AS col0 FROM tab0 GROUP BY tab0.col2
----
116
130
171

query I rowsort
SELECT + 22 AS col1 FROM tab2 GROUP BY tab2.col2
----
22
22
22

query I rowsort
SELECT ALL 7 * - cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-105
-637
-644

onlyif mysql # DIV for integer division: 
query I rowsort label-7992
SELECT ALL - 84 DIV cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-7992
SELECT ALL - 84 / cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1
-1
-2

query I rowsort
SELECT ALL 99 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
99
99
99

query I rowsort
SELECT DISTINCT - 3 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-3

query I rowsort
SELECT - col1 + - cor0.col1 FROM tab1 AS cor0 GROUP BY col1
----
-114
-12
-88

query I rowsort
SELECT DISTINCT col2 + + cor0.col2 FROM tab2 AS cor0 GROUP BY col2
----
116
158
174

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab1 cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT 24 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1032
1992
624

query I rowsort
SELECT DISTINCT + 88 FROM tab1 GROUP BY tab1.col1
----
88

query I rowsort
SELECT ALL 81 FROM tab1 AS cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT ALL + 19 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
19
19
19

query I rowsort
SELECT - 54 FROM tab2, tab1 AS cor0, tab1 cor1 GROUP BY cor0.col1
----
-54
-54
-54

query I rowsort
SELECT DISTINCT - 25 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-25

onlyif mysql # DIV for integer division: 
query I rowsort label-8004
SELECT + col0 DIV + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8004
SELECT + col0 / + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT ALL tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL < NULL
----

query I rowsort
SELECT tab1.col1 * col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT tab0.col0 FROM tab0 GROUP BY tab0.col0 HAVING NULL IS NULL
----
26
43
83

query I rowsort
SELECT DISTINCT tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT + 29 + + NULLIF ( - cor0.col2, - ( + cor0.col0 ) ) AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-16
-42
21

query I rowsort
SELECT 75 FROM tab0, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col1
----
75
75
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col1 FROM tab1 GROUP BY tab1.col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-8012
SELECT cor0.col2 DIV col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8012
SELECT cor0.col2 / col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT cor0.col2 * cor0.col2 + 30 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3394
6271
7599

query I rowsort
SELECT + cor0.col1 + 43 FROM tab2 cor0 GROUP BY cor0.col1
----
102
104
84

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT COALESCE ( 3, - cor0.col1 * + cor0.col1, 76, + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
3
3
3

query I rowsort
SELECT ALL - 14 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
-14
-14
-14

query I rowsort
SELECT - 25 FROM tab0 cor0 GROUP BY cor0.col2
----
-25
-25
-25

query I rowsort
SELECT + 42 FROM tab1 cor0 GROUP BY col1, cor0.col1
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT 71 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT 46 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT 36 FROM tab2 AS cor0 GROUP BY cor0.col2
----
36
36
36

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8024
SELECT + cor0.col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8024
SELECT + cor0.col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * - col1 + + col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1, col2
----
38
6585
79

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + cor0.col0 * - 26 + 91 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1027
-2067
-585

query I rowsort
SELECT - 61 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
75
75
75

query I rowsort
SELECT DISTINCT 23 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
23

query I rowsort
SELECT DISTINCT + 95 AS col0 FROM tab2 GROUP BY col1
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-24
-38
-79

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

onlyif mysql # DIV for integer division: 
query I rowsort label-8036
SELECT ALL - ( NULLIF ( + cor0.col0, 97 ) ) DIV + COALESCE ( cor0.col1, + cor0.col1, 30, + 30 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-8036
SELECT ALL - ( NULLIF ( + cor0.col0, 97 ) ) / + COALESCE ( cor0.col1, + cor0.col1, 30, + 30 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1
-3
0

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 col0 FROM tab0, tab1 AS cor0 GROUP BY tab0.col1
----
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 35 + 57 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
92
92
92

query I rowsort
SELECT ALL tab0.col2 FROM tab0, tab1 cor0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 12 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 31 col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
31
31
31

query I rowsort
SELECT + 29 FROM tab1 cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT 82 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
82
82
82

query I rowsort
SELECT DISTINCT 84 * cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1260
7644
7728

query I rowsort
SELECT 82 FROM tab1 AS cor0 GROUP BY cor0.col0
----
82
82
82

query I rowsort
SELECT DISTINCT 84 FROM tab2, tab0 cor0 GROUP BY cor0.col0
----
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0, cor0.col2
----
0
3483

query I rowsort
SELECT ALL tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT ALL 45 * cor0.col2 * 8 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
16200
25560
2880

query I rowsort
SELECT + col1 FROM tab1 AS cor0 WHERE NOT - cor0.col0 IS NOT NULL GROUP BY col1
----

query I rowsort
SELECT ALL + - tab1.col2 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT ALL 40 + - cor0.col0 + cor0.col0 * 51 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1340
2190
4190

query I rowsort
SELECT ALL - tab0.col2 + + col2 FROM tab0 GROUP BY tab0.col2
----
0
0
0

query I rowsort
SELECT col1 * + 53 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
2173
3127
3233

query I rowsort
SELECT DISTINCT 31 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT ALL + 87 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
102
178
179

query I rowsort
SELECT ALL - cor0.col0 + + cor0.col0 * 11 FROM tab2 AS cor0 GROUP BY cor0.col0
----
150
910
920

query I rowsort
SELECT 43 FROM tab2 GROUP BY tab2.col0
----
43
43
43

query I rowsort
SELECT ALL + 9 FROM tab2 AS cor0 GROUP BY cor0.col2
----
9
9
9

query I rowsort
SELECT - 47 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-19
-25
35

query I rowsort
SELECT - cor0.col2 - - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT - 31 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-31

query I rowsort
SELECT 24 FROM tab1, tab0 AS cor0 GROUP BY tab1.col1
----
24
24
24

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col2 * + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
-1305
-184
-5893

query I rowsort
SELECT DISTINCT 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
-118
-122
-82

query I rowsort
SELECT ALL 77 AS col2 FROM tab0 cor0 GROUP BY col1
----
77
77

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8075
SELECT ALL - tab2.col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8075
SELECT ALL - tab2.col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + - 6 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
35
53
55

query I rowsort
SELECT 14 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
14
14
14

query I rowsort
SELECT ALL col1 + 57 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
138
57

query I rowsort
SELECT ALL + 59 FROM tab0 GROUP BY tab0.col2
----
59
59
59

query I rowsort
SELECT + - 17 * tab2.col0 FROM tab2 GROUP BY col0
----
-1547
-1564
-255

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT ALL + cor0.col1 - + 58 * + cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-4617
0

query I rowsort
SELECT 15 FROM tab2 cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
78
78
78

query I rowsort
SELECT ALL 99 * + 67 * cor0.col2 + cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
298530
471014
53072

query I rowsort
SELECT DISTINCT 29 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
70
88
90

query I rowsort
SELECT ALL 47 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
47
47
47

query I rowsort
SELECT DISTINCT + 76 FROM tab1, tab1 AS cor0, tab2 cor1 GROUP BY tab1.col2
----
76

query I rowsort
SELECT + + tab0.col2 * tab0.col2 FROM tab0 GROUP BY tab0.col2
----
1444
576
6241

query I rowsort
SELECT DISTINCT 85 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - 33 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-33
-33
-33

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
1936
3249
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 93 col2 FROM tab0 GROUP BY tab0.col0
----
93

query I rowsort
SELECT 39 * - 90 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3510
-3510

query I rowsort
SELECT 40 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1760
2280
240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col1 - 93 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-36
-49
-87

query I rowsort
SELECT + 8 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
8
8
8

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col2, cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT col0 + - col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
-53
19
45

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT - cor0.col2 - ( 51 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
-109
-130
-138

query I rowsort
SELECT DISTINCT + 78 + - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-13
-14
63

query I rowsort
SELECT DISTINCT + 15 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
15

query I rowsort
SELECT ALL 39 FROM tab1 AS cor0 GROUP BY cor0.col0
----
39
39
39

query I rowsort
SELECT DISTINCT 24 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
24

query I rowsort
SELECT DISTINCT 11 FROM tab2 AS cor0 GROUP BY cor0.col1
----
11

query I rowsort
SELECT DISTINCT 53 FROM tab1 cor0 GROUP BY cor0.col0
----
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
43
43
43

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL cor0.col1 + - cor0.col1 * - cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1980
3306
42

query I rowsort
SELECT - 38 AS col2 FROM tab0, tab2 cor0, tab0 cor1 GROUP BY cor1.col0
----
-38
-38
-38

query I rowsort
SELECT - - ( 67 ) AS col2 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * ( 9 ) - cor0.col0 * - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2088
5858
7900

query I rowsort
SELECT - cor0.col0 * col0 AS col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col1
----
-24
-38
-79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8121
SELECT DISTINCT tab1.col1 + - 68 * - col1 + CAST( NULL AS SIGNED ) FROM tab1 GROUP BY tab1.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8121
SELECT DISTINCT tab1.col1 + - 68 * - col1 + CAST ( NULL AS INTEGER ) FROM tab1 GROUP BY tab1.col1
----
NULL

query I rowsort
SELECT ALL - - 42 FROM tab2 GROUP BY tab2.col1
----
42
42
42

query I rowsort
SELECT + 38 AS col2 FROM tab1 GROUP BY tab1.col2
----
38
38
38

query I rowsort
SELECT - 1 + - 94 AS col2 FROM tab2, tab2 AS cor0, tab2 cor1 GROUP BY cor1.col1
----
-95
-95
-95

query I rowsort
SELECT ALL cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
41
59
61

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 60 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
60
60
60

query I rowsort
SELECT + 22 FROM tab0 AS cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT ALL 63 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
5103

query I rowsort
SELECT - 7 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-567
0

query I rowsort
SELECT DISTINCT - 93 FROM tab2 cor0 GROUP BY col1, col2, cor0.col0
----
-93

query I rowsort
SELECT - 75 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-75
-75
-75

query I rowsort
SELECT cor0.col1 * cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
132
1596
3608

query I rowsort
SELECT ALL + 30 AS col0 FROM tab0 GROUP BY tab0.col0
----
30
30
30

query I rowsort
SELECT 55 * 44 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
2420
2420
2420

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6561
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - - cor0.col2 FROM tab1, tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col2 + + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8142
SELECT + 34 DIV 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8142
SELECT + 34 / 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 69 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
69
69
69

query I rowsort
SELECT ALL 56 FROM tab1 cor0 GROUP BY cor0.col1
----
56
56
56

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT - col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT ALL cor0.col0 + col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
240
8372
8556

query I rowsort
SELECT + 46 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
46
46
46

query I rowsort
SELECT ( + cor0.col2 ) + + cor0.col2 - + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-6
60
62

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8152
SELECT DISTINCT CAST( NULL AS SIGNED ) * 75 AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8152
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 75 AS col2 FROM tab2 GROUP BY tab2.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 17 col0 FROM tab0 GROUP BY tab0.col2
----
17
17
17

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8154
SELECT DISTINCT - CAST( + 42 AS SIGNED ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-42

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-8154
SELECT DISTINCT - CAST ( + 42 AS INTEGER ) col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-42

query I rowsort
SELECT ALL 16 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
16
16
16

query I rowsort
SELECT DISTINCT - 97 + + cor0.col1 AS col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-40
-53
-91

query I rowsort
SELECT 96 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
96
96

query I rowsort
SELECT DISTINCT - - 77 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
77

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT - 40 AS col0 FROM tab2 GROUP BY tab2.col1
----
-40
-40
-40

query I rowsort
SELECT DISTINCT 45 FROM tab0 AS cor0 GROUP BY cor0.col2
----
45

query I rowsort
SELECT ALL - 95 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
-95
-95
-95

query I rowsort
SELECT - 99 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-99
-99
-99

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
70

query I rowsort
SELECT DISTINCT + 89 FROM tab1 cor0 GROUP BY cor0.col2
----
89

query I rowsort
SELECT DISTINCT 72 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 + cor1.col2 col1 FROM tab0, tab0 AS cor0, tab1 cor1 GROUP BY cor1.col2
----
122
59
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 97 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - 77 col2 FROM tab0 AS cor0 GROUP BY col1
----
-158
-77

query I rowsort
SELECT + 36 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
36
36
36

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING NOT ( NULL ) < NULL
----

query I rowsort
SELECT DISTINCT - col0 + col0 FROM tab2 GROUP BY tab2.col0
----
0

query I rowsort
SELECT + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
45
71
8

query I rowsort
SELECT + 58 FROM tab1 AS cor0 GROUP BY cor0.col2
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 col0 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT + tab1.col2 * tab1.col2 AS col2 FROM tab1 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT 87 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
87

query I rowsort
SELECT DISTINCT + 69 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
69

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL + cor0.col2 * + col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
1944

onlyif mysql # DIV for integer division: 
query I rowsort label-8183
SELECT DISTINCT cor0.col0 DIV - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-1

skipif mysql # not compatible
query I rowsort label-8183
SELECT DISTINCT cor0.col0 / - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-1

query I rowsort
SELECT col0 * NULLIF ( - 94 + + 7, - cor0.col2 + + cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-2262
-3741
-7221

query I rowsort
SELECT + 57 + - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
13
51

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT - col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col1 * 0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT + ( COALESCE ( col2, - cor0.col2 ) ) * cor0.col2 + 18 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1462
594
6259

query I rowsort
SELECT DISTINCT 96 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
96

query I rowsort
SELECT 17 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
0
0
0

query I rowsort
SELECT + 50 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT - cor0.col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, col1
----
15
91
92

query I rowsort
SELECT - + tab1.col1 + - 48 AS col1 FROM tab1 GROUP BY tab1.col1
----
-105
-54
-92

query I rowsort
SELECT - 53 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-53
-53
-53

query I rowsort
SELECT DISTINCT 61 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
61

query I rowsort
SELECT - col0 * - 69 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
1035
6279
6348

query I rowsort
SELECT - 58 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-58
-58
-58

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2025
5041
64

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 2 col1 FROM tab0 GROUP BY tab0.col0
----
2
2
2

query I rowsort
SELECT ALL 7 FROM tab1 AS cor0 GROUP BY cor0.col2
----
7
7
7

query I rowsort
SELECT 80 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
80
80
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 55 * - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3190
-4345
-4785

query I rowsort
SELECT - ( + cor0.col0 ) * col0 FROM tab1 AS cor0 GROUP BY col0
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT + + 12 + - 12 FROM tab0 GROUP BY tab0.col1
----
0

query I rowsort
SELECT 27 * - col1 FROM tab0 GROUP BY tab0.col1
----
-2187
0

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT + 58 FROM tab1 AS cor0 GROUP BY cor0.col0
----
58

query I rowsort
SELECT ALL 46 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
46
46
46

query I rowsort
SELECT 98 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
98
98
98

query I rowsort
SELECT - 22 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-22
-22

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + NULLIF ( + cor0.col1, cor0.col1 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
NULL

query I rowsort
SELECT col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL = ( NULL )
----

query I rowsort
SELECT ALL - 19 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT ALL 30 FROM tab2 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT ALL 40 FROM tab0 AS cor0 GROUP BY cor0.col0
----
40
40
40

query I rowsort
SELECT 46 * col2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
2070
3266
368

query I rowsort
SELECT + 41 FROM tab0 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
22
28
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8229
SELECT CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8229
SELECT CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 - col1 * + col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT + 76 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY tab1.col2
----
76
76
76

query I rowsort
SELECT ALL 0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT cor0.col0 * + 36 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
1548
2988
936

query I rowsort
SELECT 22 FROM tab2 GROUP BY tab2.col1
----
22
22
22

query I rowsort
SELECT - + cor0.col0 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 32 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
32

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

query I rowsort
SELECT 67 * - cor0.col2 - - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-3828
-5214
-5742

query I rowsort
SELECT ALL + 49 * + col1 AS col2 FROM tab0 GROUP BY col1
----
0
3969

query I rowsort
SELECT DISTINCT 3 FROM tab1 cor0 GROUP BY col2
----
3

query I rowsort
SELECT cor0.col2 + - col0 * + NULLIF ( COALESCE ( cor0.col2, - 37, col2 ) + cor0.col0, cor0.col0 ) * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
-123859
-70901
-833531

query I rowsort
SELECT - 60 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-60
-60
-60

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT + 50 FROM tab1 AS cor0 GROUP BY cor0.col0
----
50
50
50

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
506
6806
812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-94
-94
-94

query I rowsort
SELECT - 48 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-48
-48
-48

query I rowsort
SELECT ALL col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT col1 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
126
28
85

query I rowsort
SELECT + 64 * cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, col1, cor0.col0
----
0
0
419904

query I rowsort
SELECT ALL ( cor0.col2 ) + cor0.col0 * cor0.col2 * - ( - cor0.col0 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
35325
3880
477475

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, col1
----
-12
2
27

onlyif mysql # DIV for integer division: 
query I rowsort label-8254
SELECT cor0.col1 DIV 25 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
3

skipif mysql # not compatible
query I rowsort label-8254
SELECT cor0.col1 / 25 AS col0 FROM tab0 AS cor0 GROUP BY col1
----
0
3

query I rowsort
SELECT ALL 47 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
47
47
47

query I rowsort
SELECT ALL + col0 * - cor0.col0 + 0 FROM tab0 AS cor0 GROUP BY col0
----
-1849
-676
-6889

query I rowsort
SELECT 78 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
78
78
78

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
----
15
91
92

query I rowsort
SELECT DISTINCT - 60 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-60

query I rowsort
SELECT ALL 28 + cor0.col2 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
36
73
99

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT + COALESCE ( + 83, cor0.col2, cor0.col1, - cor0.col0 * - col2 + + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
83
83
83

query I rowsort
SELECT - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

onlyif mysql # DIV for integer division: 
query I rowsort label-8263
SELECT DISTINCT cor0.col1 DIV - 82 AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
0

skipif mysql # not compatible
query I rowsort label-8263
SELECT DISTINCT cor0.col1 / - 82 AS col2 FROM tab1 cor0 GROUP BY col1, cor0.col0
----
0

query I rowsort
SELECT ALL + 45 * - cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1080
-1710
-3555

query I rowsort
SELECT 82 * tab2.col0 FROM tab2 GROUP BY tab2.col0
----
1230
7462
7544

query I rowsort
SELECT cor0.col0 * - cor0.col0 + + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1825
-597
-6851

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
22
28
82

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT - 60 FROM tab2 cor0 GROUP BY cor0.col2
----
-60

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-1032
-2054
-3154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 col0 FROM tab0 GROUP BY col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-8272
SELECT ( + cor0.col1 ) DIV cor0.col1 + 90 DIV cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
16
2
3

skipif mysql # not compatible
query I rowsort label-8272
SELECT ( + cor0.col1 ) / cor0.col1 + 90 / cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
16
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT - 69 AS col2 FROM tab0 cor0 GROUP BY cor0.col0
----
-69
-69
-69

query I rowsort
SELECT + 83 * + 66 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
5478
5478
5478

query I rowsort
SELECT DISTINCT 30 AS col0 FROM tab2 GROUP BY tab2.col0
----
30

query I rowsort
SELECT DISTINCT col2 * col2 + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
2070
5112
72

query I rowsort
SELECT DISTINCT - 91 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
-91

query I rowsort
SELECT + 34 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
34
34
34

query I rowsort
SELECT 90 FROM tab1 AS cor0 GROUP BY cor0.col0
----
90
90
90

query I rowsort
SELECT + 50 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
50
50
50

query I rowsort
SELECT - 10 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 48 col2 FROM tab1 cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT + cor0.col0 * - cor0.col0 + + 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
-1806
-633
-6846

query I rowsort
SELECT ALL + cor0.col0 + 17 * cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
1638
1656
270

onlyif mysql # DIV for integer division: 
query I rowsort label-8286
SELECT DISTINCT - cor0.col0 DIV - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-8286
SELECT DISTINCT - cor0.col0 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
1
2

query I rowsort
SELECT DISTINCT + 8 FROM tab0 AS cor0 GROUP BY cor0.col1
----
8

query I rowsort
SELECT DISTINCT 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
68

query I rowsort
SELECT + + cor0.col1 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 84 * + col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
3444
4956
5124

query I rowsort
SELECT 1 + 9 FROM tab0, tab2 AS cor0 GROUP BY tab0.col0
----
10
10
10

query I rowsort
SELECT 54 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
54
54

query I rowsort
SELECT + cor0.col2 + col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
158
48
76

query I rowsort
SELECT ALL 71 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
71
71
71

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-8295
SELECT DISTINCT - col0 * cor0.col0 + + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8295
SELECT DISTINCT - col0 * cor0.col0 + + CAST ( NULL AS REAL ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
NULL

query I rowsort
SELECT 21 * 54 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1134
1134
1134

query I rowsort
SELECT 94 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
118
132
173

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 55 col1 FROM tab1, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
-55
-55
-55

query I rowsort
SELECT cor0.col0 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + NULLIF ( + cor0.col2, cor0.col1 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
158
48
76

query I rowsort
SELECT - 32 AS col2 FROM tab2 AS cor0 GROUP BY col0
----
-32
-32
-32

query I rowsort
SELECT ALL 37 FROM tab0 AS cor0 GROUP BY cor0.col0
----
37
37
37

query I rowsort
SELECT DISTINCT + 98 AS col2 FROM tab2 GROUP BY col0
----
98

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8305
SELECT DISTINCT CAST( 19 AS SIGNED ) AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
19

skipif mysql # not compatible
query I rowsort label-8305
SELECT DISTINCT CAST ( 19 AS INTEGER ) AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
19

query I rowsort
SELECT ALL - - cor0.col1 + - 68 * 47 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-3135
-3137
-3155

query I rowsort
SELECT DISTINCT - + 90 FROM tab0, tab1 cor0, tab2 AS cor1 GROUP BY cor1.col2
----
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - 82 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-82
-82
-82

query I rowsort
SELECT DISTINCT - cor0.col1 + 82 AS col1 FROM tab2, tab0 cor0 GROUP BY cor0.col1
----
1
82

query I rowsort
SELECT + tab1.col2 + - col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
0
0
0

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 col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 col1 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT ALL - - 67 * tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
3015
4757
536

query I rowsort
SELECT DISTINCT - 26 * 29 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-43732
-59566
-65598

query I rowsort
SELECT DISTINCT ( col1 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL + 83 * + tab0.col0 * + 12 FROM tab0 GROUP BY tab0.col0
----
25896
42828
82668

query I rowsort
SELECT DISTINCT 72 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
44
57
6

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

onlyif mysql # DIV for integer division: 
query I rowsort label-8324
SELECT DISTINCT + col0 + 70 DIV + 88 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, col1
----
22
28
82

skipif mysql # not compatible
query I rowsort label-8324
SELECT DISTINCT + col0 + 70 / + 88 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, col1
----
22
28
82

query I rowsort
SELECT + cor0.col2 - - cor0.col2 * - cor0.col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-3306
-6162
-7482

query I rowsort
SELECT - 7 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

query I rowsort
SELECT - 67 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT 28 FROM tab2 AS cor0 GROUP BY cor0.col2
----
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + cor0.col2 col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
116
158
174

query I rowsort
SELECT ALL - 19 FROM tab0 cor0 GROUP BY cor0.col0
----
-19
-19
-19

query I rowsort
SELECT ALL - 21 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT 27 FROM tab1 AS cor0 GROUP BY cor0.col1
----
27

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
20

query I rowsort
SELECT cor0.col1 * - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT cor0.col1 + - col1 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL + 65 * + 77 + cor0.col1 * 15 FROM tab1 cor0 GROUP BY cor0.col1
----
5095
5665
5860

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 22 FROM tab1 cor0 GROUP BY col0
----
22
22
22

query I rowsort
SELECT ALL - 70 FROM tab0 AS cor0 GROUP BY col2
----
-70
-70
-70

query I rowsort
SELECT - - 7 FROM tab0 GROUP BY tab0.col2
----
7
7
7

query I rowsort
SELECT tab2.col1 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT 0 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 * + 45 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-810
-810
-810

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT DISTINCT 73 * col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col1
----
1898
3139
6059

query I rowsort
SELECT ALL - 43 FROM tab0 GROUP BY tab0.col0
----
-43
-43
-43

query I rowsort
SELECT ALL - 80 - + tab0.col2 FROM tab0 GROUP BY tab0.col2
----
-104
-118
-159

query I rowsort
SELECT ALL 24 AS col1 FROM tab2 GROUP BY tab2.col1
----
24
24
24

query I rowsort
SELECT cor0.col2 * cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT ALL 17 FROM tab1 AS cor0 GROUP BY cor0.col2
----
17
17
17

query I rowsort
SELECT ( - 41 ) * cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1845
-2911
-328

query I rowsort
SELECT DISTINCT cor0.col2 + - 0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - 68 * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1768
2924
5644

onlyif mysql # DIV for integer division: 
query I rowsort label-8358
SELECT - cor0.col1 DIV cor0.col1 + + 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
44
44

skipif mysql # not compatible
query I rowsort label-8358
SELECT - cor0.col1 / cor0.col1 + + 45 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
44
44

query I rowsort
SELECT ALL 77 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
77
77

query I rowsort
SELECT ALL + 10 AS col0 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
10
10

query I rowsort
SELECT col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-24
-38
-79

query I rowsort
SELECT ALL + 75 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
75
75
75

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 ALL - cor0.col2 * - cor0.col2 + - 10 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2015
5031
54

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 4 col1 FROM tab0 cor0 GROUP BY cor0.col0
----
4
4
4

query I rowsort
SELECT 72 FROM tab1 AS cor0 GROUP BY cor0.col0
----
72
72
72

query I rowsort
SELECT ALL - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + 28 * - cor0.col2 col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-1215
-1917
-216

query I rowsort
SELECT 4 * - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-180
-284
-32

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT + col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL + - col2 FROM tab0 GROUP BY tab0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL - 31 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-2821
-2852
-465

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT tab2.col1 + + tab2.col1 AS col1 FROM tab2 GROUP BY tab2.col1
----
118
122
82

query I rowsort
SELECT + 47 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
47
47
47

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 7 * - 48 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
336

query I rowsort
SELECT 68 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
68
68
68

query I rowsort
SELECT - 58 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT ALL + 75 * - cor0.col1 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-192375
-234300
-3600

query I rowsort
SELECT ALL + 47 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
47
47

query I rowsort
SELECT DISTINCT - 51 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-51

query I rowsort
SELECT DISTINCT + + 73 * 31 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
2263

query I rowsort
SELECT DISTINCT ( - 43 ) AS col2 FROM tab0 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 80 FROM tab2 GROUP BY tab2.col1
----
80
80
80

query I rowsort
SELECT 13 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT ALL col1 * 50 FROM tab1 cor0 GROUP BY col1, cor0.col2, cor0.col2
----
2200
2850
300

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - 64 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-64
-64
-64

query I rowsort
SELECT + 61 FROM tab0 AS cor0 GROUP BY col0
----
61
61
61

query I rowsort
SELECT ALL 7 + col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
15
52
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL - tab1.col1 + ( + 9 ) * tab1.col1 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
352
456
48

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8401
SELECT DISTINCT CAST( - 42 AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-42

skipif mysql # not compatible
query I rowsort label-8401
SELECT DISTINCT CAST ( - 42 AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col0
----
-42

query I rowsort
SELECT 72 FROM tab2 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col1 FROM tab0 AS cor0 GROUP BY col1
----
0
6561

query I rowsort
SELECT DISTINCT + tab1.col1 * tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT - 24 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-24
-24

query I rowsort
SELECT ALL 29 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
29
29
29

query I rowsort
SELECT ALL - - 67 + - tab2.col2 + 99 FROM tab2 GROUP BY tab2.col2
----
108
79
87

query I rowsort
SELECT cor0.col1 + - cor0.col1 * + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1640
-3422
-3660

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8409
SELECT + cor0.col0 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8409
SELECT + cor0.col0 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT 96 FROM tab2 AS cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT ALL + 30 AS col2 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
30
30
30

query I rowsort
SELECT + cor0.col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT 60 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY tab2.col2
----
60
60
60

query I rowsort
SELECT DISTINCT cor0.col2 + col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
116
158
174

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

onlyif mysql # DIV for integer division: 
query I rowsort label-8417
SELECT DISTINCT 92 DIV 36 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-20
-26
-80

skipif mysql # not compatible
query I rowsort label-8417
SELECT DISTINCT 92 / 36 - + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-20
-26
-80

query I rowsort
SELECT - 40 FROM tab1 cor0 GROUP BY cor0.col1
----
-40
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 32 col0 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT - 5 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 58 + + cor1.col1 col0 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-17
1
3

query I rowsort
SELECT DISTINCT - - cor0.col1 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT - cor0.col0 + cor0.col0 * 67 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
1716
2838
5478

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT - col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING NOT NULL <> ( NULL )
----

query I rowsort
SELECT - 61 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-61
-61
-61

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT 5 + - 65 + + 53 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-7
-7
-7

query I rowsort
SELECT ALL - 66 FROM tab0 AS cor0 GROUP BY col0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT - 38 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12
45
5

onlyif mysql # DIV for integer division: 
query I rowsort label-8434
SELECT - 55 DIV 65 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8434
SELECT - 55 / 65 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col0
----
0
0
0

query I rowsort
SELECT ALL 71 FROM tab0 AS cor0 GROUP BY col1
----
71
71

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
58
79
87

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col1 * - COALESCE ( + cor0.col1, - cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, col1
----
-41
-59
-61

query I rowsort
SELECT col0 + 94 * + col0 FROM tab1 GROUP BY tab1.col0
----
2090
2660
7790

query I rowsort
SELECT - 99 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-99
-99
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 6 col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
6
6
6

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col2 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-1849
-676
-6889

query I rowsort
SELECT + 46 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 43 col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-43
-43
-43

query I rowsort
SELECT ALL 7 + + 35 AS col0 FROM tab0 GROUP BY col1
----
42
42

query I rowsort
SELECT - 70 + + cor0.col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-11
-29
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
86

query I rowsort
SELECT ALL 78 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
78
78
78

query I rowsort
SELECT ALL + ( + 64 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
64
64
64

query I rowsort
SELECT + 52 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
52
52
52

query I rowsort
SELECT 99 FROM tab0 cor0 GROUP BY cor0.col1
----
99
99

query I rowsort
SELECT 69 - - cor0.col0 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-156
-8212
-8395

query I rowsort
SELECT + + 77 AS col0 FROM tab1 GROUP BY tab1.col1
----
77
77
77

query I rowsort
SELECT DISTINCT - 85 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-85

query I rowsort
SELECT - cor0.col1 * + ( 38 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1558
-2242
-2318

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 col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

onlyif mysql # DIV for integer division: 
query I rowsort label-8459
SELECT cor0.col0 DIV + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
3

skipif mysql # not compatible
query I rowsort label-8459
SELECT cor0.col0 / + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
1
3

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT + - 4 * - 13 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
52
52

query I rowsort
SELECT - 84 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-84
-84
-84

query I rowsort
SELECT DISTINCT + 99 FROM tab2 AS cor0 GROUP BY cor0.col0
----
99

onlyif mysql # DIV for integer division: 
query I rowsort label-8464
SELECT ALL 68 * + cor1.col2 DIV cor1.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
68
68
68

skipif mysql # not compatible
query I rowsort label-8464
SELECT ALL 68 * + cor1.col2 / cor1.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
68
68
68

query I rowsort
SELECT ALL 65 FROM tab0, tab2 AS cor0 GROUP BY tab0.col2
----
65
65
65

onlyif mysql # DIV for integer division: 
query I rowsort label-8466
SELECT + cor0.col0 DIV 88 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-8466
SELECT + cor0.col0 / 88 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1, cor0.col0
----
0
1
1

query I rowsort
SELECT ALL - col1 * 46 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-1886
-2714
-2806

query I rowsort
SELECT + ( cor0.col0 ) FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT + cor0.col2 * + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT ALL - 74 + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
-17
-30
-68

query I rowsort
SELECT - col2 + + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT ALL + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT 1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT cor0.col2 * 35 + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2088
2844
3132

query I rowsort
SELECT ALL cor0.col0 + + 18 FROM tab2 AS cor0 GROUP BY cor0.col0
----
109
110
33

query I rowsort
SELECT DISTINCT - 80 * 32 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-2560

query I rowsort
SELECT DISTINCT - 63 * cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-5103
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col1, cor0.col1
----
45
71
8

query I rowsort
SELECT - 75 + 97 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
22
22

query I rowsort
SELECT DISTINCT + 39 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
39

query I rowsort
SELECT ALL 91 + cor0.col0 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
117
134
174

query I rowsort
SELECT ALL col0 + cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

query I rowsort
SELECT DISTINCT - 92 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-92

query I rowsort
SELECT - 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-57
-57

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - cor0.col1 + COALESCE ( 61, cor0.col2 ) * 90 AS col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
5409
5490
5490

onlyif mysql # DIV for integer division: 
query I rowsort label-8488
SELECT DISTINCT - cor0.col1 DIV - 45 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1

skipif mysql # not compatible
query I rowsort label-8488
SELECT DISTINCT - cor0.col1 / - 45 FROM tab2 AS cor0 GROUP BY cor0.col1
----
0
1

query I rowsort
SELECT 13 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
13
13
13

query I rowsort
SELECT - cor1.col1 FROM tab2, tab1 cor0, tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT + tab1.col1 AS col2 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8494
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8494
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 62 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
62

query I rowsort
SELECT - col1 * - 5 + + 55 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
460
55
55

query I rowsort
SELECT col0 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 41 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-71
-8

query I rowsort
SELECT ALL + 15 FROM tab1 AS cor0 GROUP BY cor0.col1
----
15
15
15

query I rowsort
SELECT 70 + + 50 FROM tab1 AS cor0 GROUP BY cor0.col1
----
120
120
120

query I rowsort
SELECT ALL 59 FROM tab0 AS cor0 GROUP BY cor0.col1
----
59
59

query I rowsort
SELECT ALL + 23 FROM tab2 AS cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + 96 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
96
96

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8511
SELECT - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8511
SELECT - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY col1
----
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 * 38 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
-1444
-3002
-912

query I rowsort
SELECT + 64 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
64
64
64

query I rowsort
SELECT ( + 2 ) + - cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
-43
-6
-69

query I rowsort
SELECT + cor0.col0 + - 20 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-5
71
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 5 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-5
-5
-5

query I rowsort
SELECT cor1.col0 - 22 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0, cor0.col1
----
9 values hashing to ed17e4f1b1982895feab7d62a3752c00

query I rowsort
SELECT ALL + tab0.col1 AS col2 FROM tab0 GROUP BY col1
----
0
81

query I rowsort
SELECT - cor0.col1 + + 73 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
16
29
67

query I rowsort
SELECT ALL - 24 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-24
-24
-24

query I rowsort
SELECT + + cor0.col2 AS col1 FROM tab2, tab1 cor0 GROUP BY cor0.col2
----
45
71
8

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 + tab1.col2 FROM tab1, tab2 cor0 GROUP BY tab1.col2
----
45
71
8

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 DISTINCT + 71 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1065
6461
6532

query I rowsort
SELECT DISTINCT + 96 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
96

query I rowsort
SELECT DISTINCT 96 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
96

onlyif mysql # DIV for integer division: 
query I rowsort label-8528
SELECT DISTINCT cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

skipif mysql # not compatible
query I rowsort label-8528
SELECT DISTINCT cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT - col2 - + 81 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-4756
-6478
-7134

query I rowsort
SELECT 0 + 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + 19 FROM tab1 AS cor0 GROUP BY cor0.col1
----
19
19
19

query I rowsort
SELECT + 92 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
92
92
92

onlyif mysql # DIV for integer division: 
query I rowsort label-8535
SELECT cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8535
SELECT cor0.col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT ALL 25 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT - 46 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-46
-46
-46

query I rowsort
SELECT col1 + cor0.col1 + 84 * cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
6966

query I rowsort
SELECT col1 + + cor0.col2 * + 54 AS col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
3173
4325
4759

query I rowsort
SELECT DISTINCT 35 FROM tab1 AS cor0 GROUP BY cor0.col2
----
35

query I rowsort
SELECT DISTINCT + - 34 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
-34

query I rowsort
SELECT - + 69 FROM tab1 GROUP BY tab1.col1
----
-69
-69
-69

query I rowsort
SELECT 29 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
29
29
29

query I rowsort
SELECT ALL + 36 FROM tab0, tab2 cor0 GROUP BY cor0.col0
----
36
36
36

onlyif mysql # DIV for integer division: 
query I rowsort label-8546
SELECT DISTINCT - cor0.col1 DIV cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

skipif mysql # not compatible
query I rowsort label-8546
SELECT DISTINCT - cor0.col1 / cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8547
SELECT DISTINCT cor0.col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8547
SELECT DISTINCT cor0.col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

query I rowsort
SELECT ALL - cor0.col1 + + 77 FROM tab2 AS cor0 GROUP BY cor0.col1, col0
----
16
18
36

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 * cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
462
6642
756

query I rowsort
SELECT DISTINCT - 38 * 15 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-570

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 76, cor0.col0 ) FROM tab2 cor0 GROUP BY cor0.col1
----
76

query I rowsort
SELECT + 68 * - cor0.col1 + + 52 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
-2736
-3960
-4096

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col2 * + cor0.col2 AS col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
1980
4970
56

query I rowsort
SELECT - 64 FROM tab2 GROUP BY tab2.col0
----
-64
-64
-64

query I rowsort
SELECT - 45 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 34 col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
-34
-34
-34

query I rowsort
SELECT cor0.col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col0
----
26
43
83

query I rowsort
SELECT DISTINCT 51 FROM tab2 cor0 GROUP BY col2
----
51

query I rowsort
SELECT + cor0.col0 - - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY col0
----
164
44
56

query I rowsort
SELECT 3 AS col2 FROM tab2 cor0 GROUP BY cor0.col0
----
3
3
3

query I rowsort
SELECT DISTINCT + 41 FROM tab0 AS cor0 GROUP BY cor0.col0
----
41

query I rowsort
SELECT ALL 57 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL - - 78 AS col2 FROM tab2 GROUP BY tab2.col1
----
78
78
78

query I rowsort
SELECT - 87 - + 63 AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-150
-150
-150

query I rowsort
SELECT DISTINCT 44 FROM tab1 AS cor0 GROUP BY cor0.col2
----
44

query I rowsort
SELECT + 8 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
8
8
8

onlyif mysql # DIV for integer division: 
query I rowsort label-8572
SELECT cor0.col0 DIV cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8572
SELECT cor0.col0 / cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
1
1
1

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
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-8574
SELECT 35 DIV cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-8574
SELECT 35 / cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
0
0
2

query I rowsort
SELECT ALL col2 AS col2 FROM tab2 GROUP BY tab2.col2 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NOT NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col2 HAVING ( NULL ) IS NULL
----
45
71
8

query I rowsort
SELECT cor0.col0 * + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

onlyif mysql # DIV for integer division: 
query I rowsort label-8579
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-8579
SELECT cor0.col1 / cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1
1
1

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + 92 AS col1 FROM tab1 cor0 GROUP BY cor0.col2, col0
----
92
92
92

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.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + 98 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
11
19
40

query I rowsort
SELECT 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT - 83 * 95 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-7885
-7885
-7885

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT 36 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
36

query I rowsort
SELECT ALL - tab2.col0 FROM tab2, tab2 AS cor0 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT DISTINCT 7 + + 76 FROM tab0, tab0 cor0, tab0 AS cor1 GROUP BY cor0.col2
----
83

query I rowsort
SELECT - 88 AS col1 FROM tab1 cor0 GROUP BY col0
----
-88
-88
-88

onlyif mysql # DIV for integer division: 
query I rowsort label-8592
SELECT ALL + cor0.col1 DIV + 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5

skipif mysql # not compatible
query I rowsort label-8592
SELECT ALL + cor0.col1 / + 15 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5

query I rowsort
SELECT ALL 34 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
40
78
91

query I rowsort
SELECT - 17 - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-58
-76
-78

query I rowsort
SELECT + + ( - cor0.col0 ) FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT + ( - 69 ) FROM tab2 AS cor0 GROUP BY col0
----
-69
-69
-69

query I rowsort
SELECT cor0.col1 + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
138
148
99

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 64 + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
105
123
125

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT - 46 + + 12 FROM tab2 GROUP BY tab2.col2
----
-34
-34
-34

query I rowsort
SELECT DISTINCT 7 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
7

query I rowsort
SELECT ALL + cor0.col0 * + 61 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1586
2623
5063

query I rowsort
SELECT DISTINCT cor0.col0 + 22 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
104
44
50

query I rowsort
SELECT ALL 88 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
88
88
88

query I rowsort
SELECT + 33 FROM tab0 GROUP BY tab0.col2
----
33
33
33

query I rowsort
SELECT - cor0.col1 + cor0.col1 AS col1 FROM tab2 cor0 GROUP BY col1, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL + 4 FROM tab0 cor0 GROUP BY cor0.col2
----
4
4
4

query I rowsort
SELECT ALL 47 FROM tab0 AS cor0 GROUP BY cor0.col1
----
47
47

query I rowsort
SELECT ALL + - 35 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-35
-35
-35

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT - cor0.col1 * 47 * - 42 + cor0.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
112575
11850
86900

onlyif mysql # DIV for integer division: 
query I rowsort label-8613
SELECT + 23 DIV + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8613
SELECT + 23 / + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT - 93 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-93
-93
-93

query I rowsort
SELECT ( + 44 ) * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4004
4048
660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + cor0.col2 * cor0.col0 * cor0.col0 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
19590
491004
654290

query I rowsort
SELECT + + COALESCE ( 18, cor0.col1 ) FROM tab1, tab2 cor0 GROUP BY cor0.col1
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + cor0.col1 col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT cor0.col1 - 38 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
21
23
3

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 75, cor0.col2, cor0.col0 * + cor0.col1 ) + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
116
134
136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
58
58
58

query I rowsort
SELECT ALL + 19 * - 93 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-1767
-1767
-1767

onlyif mysql # DIV for integer division: 
query I rowsort label-8623
SELECT ALL + 70 DIV 17 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
4
4
4

skipif mysql # not compatible
query I rowsort label-8623
SELECT ALL + 70 / 17 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
4
4
4

query I rowsort
SELECT ALL + 7 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
7
7
7

query I rowsort
SELECT - 4 FROM tab0 GROUP BY tab0.col1
----
-4
-4

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 - 23 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-7
119
67

query I rowsort
SELECT 74 AS col2 FROM tab0 GROUP BY tab0.col1
----
74
74

query I rowsort
SELECT cor0.col0 * + 88 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2288
3784
7304

query I rowsort
SELECT - cor0.col0 + - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-164
-44
-56

query I rowsort
SELECT DISTINCT - - 71 * cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
3195
5041
568

query I rowsort
SELECT DISTINCT 13 * - 8 - + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-104
-185

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8633
SELECT DISTINCT - cor0.col1 + CAST( NULL AS SIGNED ) / 11 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
NULL

skipif mysql # not compatible
query I rowsort label-8633
SELECT DISTINCT - cor0.col1 + CAST ( NULL AS INTEGER ) / 11 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
NULL

query I rowsort
SELECT DISTINCT - 82 - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-127
-153
-90

query I rowsort
SELECT - 50 FROM tab0 cor0 GROUP BY col2
----
-50
-50
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - - tab2.col1 AS col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 96 * 39 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
3744
3744
3744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
58
79
87

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-2025
-5041
-64

query I rowsort
SELECT ALL col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
23

query I rowsort
SELECT 85 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
85
85
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 79 col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
79

query I rowsort
SELECT + + cor1.col0 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-8648
SELECT DISTINCT - 57 * + cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-57

skipif mysql # not compatible
query I rowsort label-8648
SELECT DISTINCT - 57 * + cor0.col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-57

query I rowsort
SELECT DISTINCT 24 + 92 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
116

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT + 20 AS col1 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
20
20
20

query I rowsort
SELECT DISTINCT 88 + + cor0.col0 * - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col1
----
-396
-6636
-696

query I rowsort
SELECT + col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 55 + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col2
----
100
126
63

query I rowsort
SELECT ALL + 36 * - 91 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-3276
-3276

query I rowsort
SELECT + cor0.col2 * - 61 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-3538
-4819
-5307

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 cor0 GROUP BY col0 HAVING NOT NULL NOT BETWEEN - col0 AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab1 AS cor0 GROUP BY col1
----
44
57
6

query I rowsort
SELECT + cor0.col1 * - cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-6561
0
0

query I rowsort
SELECT ALL + - tab0.col1 * tab0.col1 FROM tab0 GROUP BY tab0.col1
----
-6561
0

query I rowsort
SELECT - - 2 AS col1 FROM tab2 GROUP BY col2
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab0 AS cor0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT - cor0.col0 * col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-1849
-676
-6889

query I rowsort
SELECT DISTINCT - - cor0.col0 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 53 FROM tab0 AS cor0 GROUP BY cor0.col1
----
53
53

query I rowsort
SELECT DISTINCT ( - cor0.col0 * + cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT + 54 FROM tab2 cor0 GROUP BY cor0.col0
----
54
54
54

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + cor0.col1 col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL + 59 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col1 FROM tab1 cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col1 col0 FROM tab0 GROUP BY tab0.col1
----
0
81

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT 27 FROM tab1 AS cor0 GROUP BY cor0.col2
----
27

query I rowsort
SELECT ALL 43 AS col0 FROM tab1 GROUP BY tab1.col0
----
43
43
43

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT DISTINCT 35 FROM tab2 AS cor0 GROUP BY cor0.col0
----
35

query I rowsort
SELECT + cor0.col2 * + cor0.col2 * col2 + col2 * + cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
198534
499359
666159

query I rowsort
SELECT 60 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
60
60
60

query I rowsort
SELECT 58 + + 94 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
152
152
152

query I rowsort
SELECT - cor0.col1 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT cor0.col2 + col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
105
38
79

query I rowsort
SELECT cor0.col2 + cor0.col2 * cor0.col1 + col1 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1259
1673
755

query I rowsort
SELECT 79 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2054
3397
6557

query I rowsort
SELECT - + 11 FROM tab0 GROUP BY tab0.col2
----
-11
-11
-11

query I rowsort
SELECT 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
48
48

query I rowsort
SELECT 59 FROM tab2 AS cor0 GROUP BY cor0.col0
----
59
59
59

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-8693
SELECT ALL 93 + - 21 DIV - 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

skipif mysql # not compatible
query I rowsort label-8693
SELECT ALL 93 + - 21 / - 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
93
93
93

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0, tab0 AS cor0, tab2 cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 45 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
45
45
45

query I rowsort
SELECT DISTINCT + 74 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
74

query I rowsort
SELECT 91 * + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
4004
5187
546

query I rowsort
SELECT 84 FROM tab0 AS cor0 GROUP BY col2
----
84
84
84

query I rowsort
SELECT - ( 21 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
-44
-57
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 50 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
50

query I rowsort
SELECT DISTINCT 47 + 71 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2864
-4142
-4284

query I rowsort
SELECT - 80 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-80
-80
-80

query I rowsort
SELECT + cor0.col2 - + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8707
SELECT cor0.col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8707
SELECT cor0.col0 / cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT + cor0.col1 * 83 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6723

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NULL IS NOT NULL
----

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 + col0 FROM tab0 AS cor0 GROUP BY col0 HAVING NOT ( ( NULL ) IS NULL ) AND ( NULL ) IS NULL
----

query I rowsort
SELECT + 21 FROM tab1 AS cor0 GROUP BY cor0.col1
----
21
21
21

query I rowsort
SELECT DISTINCT + - cor0.col0 * - cor0.col0 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col2 col2 FROM tab1 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 ALL - tab2.col0 col1 FROM tab2 GROUP BY tab2.col0
----
-15
-91
-92

query I rowsort
SELECT 36 * + 18 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
648
648
648

query I rowsort
SELECT - 1 AS col2 FROM tab2, tab1 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT cor0.col0 * + 35 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
3185
3220
525

query I rowsort
SELECT ALL - + 84 FROM tab1, tab2 AS cor0, tab1 cor1 GROUP BY cor1.col2
----
-84
-84
-84

query I rowsort
SELECT DISTINCT + + cor0.col0 + + 22 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
113
114
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 19 + - cor0.col0 col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-102
-45
-62

query I rowsort
SELECT DISTINCT - col1 + tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT - COALESCE ( + 60, + cor0.col2 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-60

query I rowsort
SELECT 79 FROM tab2 AS cor0 GROUP BY cor0.col2
----
79
79
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8729
SELECT + CAST( NULL AS SIGNED ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8729
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( + 82 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
82

onlyif mysql # DIV for integer division: 
query I rowsort label-8731
SELECT ALL cor0.col2 DIV cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8731
SELECT ALL cor0.col2 / cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL - cor0.col2 + + cor0.col2 + + cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
41
59
61

query I rowsort
SELECT NULLIF ( cor0.col0, cor0.col1 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - tab0.col1 + 57 FROM tab0 GROUP BY col1
----
-24
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 57 col2 FROM tab1, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
57

query I rowsort
SELECT 30 FROM tab1 AS cor0 GROUP BY cor0.col2
----
30
30
30

query I rowsort
SELECT ALL - 86 + 36 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
-50
-50
-50

query I rowsort
SELECT DISTINCT - 13 FROM tab0, tab0 cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-13

query I rowsort
SELECT ALL 38 FROM tab0 cor0 GROUP BY cor0.col0
----
38
38
38

query I rowsort
SELECT - 8 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-8
-8
-8

query I rowsort
SELECT - tab1.col0 * 77 FROM tab1 GROUP BY col0
----
-1694
-2156
-6314

query I rowsort
SELECT DISTINCT - 43 * cor0.col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-3483
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8743
SELECT cor0.col1 DIV 42 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-8743
SELECT cor0.col1 / 42 FROM tab0, tab2 AS cor0 GROUP BY cor0.col1
----
0
1
1

query I rowsort
SELECT ALL ( 4 ) AS col1 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
4
4

query I rowsort
SELECT + 17 AS col0 FROM tab0 cor0 GROUP BY col2
----
17
17
17

query I rowsort
SELECT ALL + 99 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
42
55
93

onlyif mysql # DIV for integer division: 
query I rowsort label-8747
SELECT DISTINCT - 54 DIV - 24 FROM tab0 AS cor0 GROUP BY col1
----
2

skipif mysql # not compatible
query I rowsort label-8747
SELECT DISTINCT - 54 / - 24 FROM tab0 AS cor0 GROUP BY col1
----
2

query I rowsort
SELECT + 72 FROM tab0 GROUP BY tab0.col0
----
72
72
72

query I rowsort
SELECT ALL - 34 + + tab1.col2 FROM tab1 GROUP BY tab1.col2
----
-26
11
37

query I rowsort
SELECT DISTINCT - + 85 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
-85

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
58
79
87

query I rowsort
SELECT DISTINCT - 19 AS col0 FROM tab2 cor0 GROUP BY cor0.col2
----
-19

query I rowsort
SELECT 20 AS col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
20
20
20

query I rowsort
SELECT 43 FROM tab2 AS cor0 GROUP BY col1, cor0.col1, col0
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 92 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-92

query I rowsort
SELECT cor0.col0 + + cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
105
121
67

query I rowsort
SELECT 43 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT ALL cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1, cor1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + 90 FROM tab0 AS cor0 GROUP BY cor0.col1
----
90

query I rowsort
SELECT + 28 FROM tab1 AS cor0 GROUP BY cor0.col1
----
28
28
28

query I rowsort
SELECT - cor0.col0 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT 0 * cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
0

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8765
SELECT ALL CAST( cor0.col1 AS SIGNED ) * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

skipif mysql # not compatible
query I rowsort label-8765
SELECT ALL CAST ( cor0.col1 AS INTEGER ) * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 82 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT + 97 * + cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
4365
6887
776

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
38

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
-484
-6724
-784

query I rowsort
SELECT DISTINCT - 10 AS col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-10

query I rowsort
SELECT + cor0.col0 * cor0.col0 * 68 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32934
457314
53340

query I rowsort
SELECT 59 * - cor0.col0 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-5369
-5428
-885

query I rowsort
SELECT + 97 * + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2134
2716
7954

query I rowsort
SELECT - 63 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-63
-63
-63

query I rowsort
SELECT + 77 * + 85 FROM tab0, tab2 cor0 GROUP BY cor0.col2
----
6545
6545
6545

query I rowsort
SELECT DISTINCT + 49 FROM tab1 AS cor0 GROUP BY col2
----
49

query I rowsort
SELECT ALL + 67 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
67
67
67

query I rowsort
SELECT + 85 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
85
85
85

query I rowsort
SELECT 72 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
72
72
72

query I rowsort
SELECT 12 * - 68 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-816
-816
-816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + ( - 54 ) col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-13
5
7

query I rowsort
SELECT ALL + 30 FROM tab0 AS cor0 GROUP BY cor0.col1
----
30
30

query I rowsort
SELECT - 0 + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
-44
-57
-6

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 + + 21 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
100
45
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab0.col0 col1 FROM tab0 GROUP BY col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( - 98, col0, cor0.col1 + - 23 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
-98

query I rowsort
SELECT DISTINCT - 50 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-50

query I rowsort
SELECT 2 FROM tab1 cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT + 55 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT DISTINCT - 80 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-80

query I rowsort
SELECT - 72 AS col0 FROM tab1, tab2 AS cor0 GROUP BY tab1.col2
----
-72
-72
-72

query I rowsort
SELECT ALL 82 * cor0.col1 AS col2 FROM tab2 cor0 GROUP BY col1
----
3362
4838
5002

query I rowsort
SELECT ALL 1 FROM tab2 AS cor0 GROUP BY col0
----
1
1
1

query I rowsort
SELECT ALL cor0.col0 FROM tab1 cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT DISTINCT + 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
142
16
90

query I rowsort
SELECT ALL - col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT - col1 + - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-8804
SELECT - 1 DIV - 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8804
SELECT - 1 / - 55 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - - cor0.col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

onlyif mysql # DIV for integer division: 
query I rowsort label-8807
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-8807
SELECT cor0.col1 / - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - tab1.col2 AS col2 FROM tab1 GROUP BY tab1.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 69 + 70 AS col2 FROM tab2 GROUP BY col0
----
139
139
139

query I rowsort
SELECT ALL - 99 * + 11 AS col0 FROM tab0 GROUP BY col2
----
-1089
-1089
-1089

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
24
38
79

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8812
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8812
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 * 34 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
16456
228616
26656

query I rowsort
SELECT - 43 + + 6 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

query I rowsort
SELECT 14 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
14
14
14

query I rowsort
SELECT NULLIF ( col0, 60 ) FROM tab2 cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - + 1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col1 - + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
-162
0

onlyif mysql # DIV for integer division: 
query I rowsort label-8819
SELECT DISTINCT - 49 * - col0 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49

skipif mysql # not compatible
query I rowsort label-8819
SELECT DISTINCT - 49 * - col0 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
49

onlyif mysql # DIV for integer division: 
query I rowsort label-8820
SELECT ALL col2 DIV + ( - col2 * - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8820
SELECT ALL col2 / + ( - col2 * - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT - 56 FROM tab0 GROUP BY tab0.col2
----
-56
-56
-56

query I rowsort
SELECT ALL 96 * - 77 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
-7392
-7392
-7392

query I rowsort
SELECT ( 10 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT DISTINCT cor0.col2 - 29 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
1740
2370
2610

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0, col0
----
0
0
81

query I rowsort
SELECT DISTINCT 60 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
60

query I rowsort
SELECT DISTINCT col2 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT + cor0.col2 + + ( - NULLIF ( - cor0.col2, cor0.col2 ) + + 75 * cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
3465
5467
616

query I rowsort
SELECT ALL 73 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
73
73
73

query I rowsort
SELECT + 97 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col0
----
97
97
97

query I rowsort
SELECT + 81 AS col1 FROM tab2 cor0 GROUP BY cor0.col0
----
81
81
81

query I rowsort
SELECT ALL - 85 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-85
-85
-85

query I rowsort
SELECT - 56 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT + 26 - - 68 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
94

query I rowsort
SELECT - 10 FROM tab2 GROUP BY col2
----
-10
-10
-10

query I rowsort
SELECT 93 + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
12
93

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT ALL 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
20
20
20

query I rowsort
SELECT DISTINCT - col1 + - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-118
-122
-82

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
0
0
81

query I rowsort
SELECT ALL - cor0.col0 * - col0 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
225
8281
8464

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT + col0 FROM tab2 cor0 GROUP BY cor0.col0 HAVING NULL NOT IN ( cor0.col0 )
----

query I rowsort
SELECT + col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT + tab1.col1 FROM tab1 GROUP BY tab1.col1 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT - cor0.col1 + + cor0.col1 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL > ( NULL )
----

query I rowsort
SELECT cor0.col0 * col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING ( NULL ) IS NULL
----
10648
21952
551368

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 2 col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
2

query I rowsort
SELECT + col1 * 65 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5265

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab2 GROUP BY tab2.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 61 col2 FROM tab1 GROUP BY tab1.col0
----
-61

query I rowsort
SELECT DISTINCT + cor0.col2 - + cor0.col0 FROM tab0 AS cor0 GROUP BY col2, cor0.col0
----
-19
-45
53

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT + 12 AS col1 FROM tab0 AS cor0 GROUP BY col2
----
12
12
12

query I rowsort
SELECT 56 + 0 AS col0 FROM tab2 AS cor0 GROUP BY col2
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 41 col0 FROM tab0 AS cor0 GROUP BY col1
----
-41
-41

query I rowsort
SELECT - cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT - 26 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-26
-26

query I rowsort
SELECT + cor0.col0 + - cor0.col0 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-462
-6642
-756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 38 col0 FROM tab1 GROUP BY col2
----
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 61 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
61

query I rowsort
SELECT - 73 FROM tab1, tab0 cor0 GROUP BY cor0.col1
----
-73
-73

query I rowsort
SELECT cor0.col2 + 37 FROM tab0 AS cor0 GROUP BY cor0.col2
----
116
61
75

query I rowsort
SELECT ALL col2 + col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT - 74 * 7 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-518
-518
-518

query I rowsort
SELECT - 79 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-79
-79
-79

query I rowsort
SELECT ALL - cor0.col1 + + 57 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-24
57

query I rowsort
SELECT - 11 * + 85 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col1
----
-935
-935
-935

query I rowsort
SELECT - cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col1 * 17 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-40426
-79237
-90219

query I rowsort
SELECT ALL cor0.col2 * + cor0.col0 + - col0 + - cor0.col0 * cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT + 18 AS col1 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
18
18
18

query I rowsort
SELECT - 16 * col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-1136
-128
-720

query I rowsort
SELECT 30 * + cor0.col1 * + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, col1
----
0
196830

query I rowsort
SELECT ( 68 ) FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
68
68
68

query I rowsort
SELECT ALL + cor0.col0 * + 98 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1470
8918
9016

query I rowsort
SELECT DISTINCT 32 * - 54 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1728

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
225
8281
8464

query I rowsort
SELECT + 46 + cor0.col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
128
68
74

query I rowsort
SELECT DISTINCT 32 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32

query I rowsort
SELECT DISTINCT - 32 FROM tab0 GROUP BY tab0.col2
----
-32

query I rowsort
SELECT ALL - - tab0.col0 AS col0 FROM tab0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT ALL tab1.col0 FROM tab1 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
118
122
82

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT NULL IS NULL
----

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT DISTINCT tab0.col2 AS col1 FROM tab0 GROUP BY tab0.col2
----
24
38
79

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
91

query I rowsort
SELECT ALL ( - 42 ) FROM tab1 AS cor0 CROSS JOIN tab2 cor1 GROUP BY cor1.col2
----
-42
-42
-42

query I rowsort
SELECT 92 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
92
92

query I rowsort
SELECT - 25 * cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1075
-2075
-650

query I rowsort
SELECT DISTINCT + 88 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col0
----
88

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 col1 FROM tab2, tab2 cor0 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT + col1 * cor0.col1 * cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
205379
226981
68921

query I rowsort
SELECT DISTINCT - 63 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + 25 col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-13
-54
1

query I rowsort
SELECT DISTINCT + 68 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
68

query I rowsort
SELECT ALL 88 FROM tab0 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT - 72 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - 77 + - col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-168
-169
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL 18 FROM tab0 AS cor0 GROUP BY col1
----
18
18

query I rowsort
SELECT DISTINCT 0 * 49 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 * + 35 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
1575
2485
280

query I rowsort
SELECT 2 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
22
28
82

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0, tab0 cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 7 + cor0.col2 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
15
52
78

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT 73 - cor0.col0 * + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-152
-8208
-8391

query I rowsort
SELECT cor0.col0 + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
124
26
83

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + - col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 24 col1 FROM tab2, tab1 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
-24

query I rowsort
SELECT DISTINCT + 98 + - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
19
60
74

query I rowsort
SELECT DISTINCT - col1 + + col1 FROM tab1 cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT DISTINCT - cor0.col0 + 84 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1
41
58

onlyif mysql # DIV for integer division: 
query I rowsort label-8928
SELECT ALL col1 DIV + NULLIF ( - cor0.col2, 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-8928
SELECT ALL col1 / + NULLIF ( - cor0.col2, cor0.col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-1
0
0

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT cor0.col0 * ( + cor0.col2 ) + - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1218
5278
7110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 10 * cor0.col2 col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-450
-710
-80

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ALL - col0 + 92 FROM tab1 AS cor0 GROUP BY cor0.col0
----
10
64
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

onlyif mysql # DIV for integer division: 
query I rowsort label-8936
SELECT ALL + cor0.col1 DIV 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
16

skipif mysql # not compatible
query I rowsort label-8936
SELECT ALL + cor0.col1 / 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
16

query I rowsort
SELECT ALL 65 + + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
156
157
80

query I rowsort
SELECT + 52 * - ( + tab1.col2 ) FROM tab1 GROUP BY tab1.col2
----
-2340
-3692
-416

query I rowsort
SELECT DISTINCT - 34 FROM tab0 cor0 GROUP BY cor0.col1
----
-34

query I rowsort
SELECT - 81 + - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-125
-138
-87

query I rowsort
SELECT ALL 23 FROM tab1 AS cor0 GROUP BY cor0.col1
----
23
23
23

query I rowsort
SELECT 43 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43
43
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 col0 FROM tab0 AS cor0 GROUP BY col2
----
71
71
71

query I rowsort
SELECT ALL + 32 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1312
-1888
-1952

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ( - 66 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-66
-66
-66

query I rowsort
SELECT + NULLIF ( - tab2.col1, tab2.col1 ) + col1 FROM tab2 GROUP BY tab2.col1
----
0
0
0

query I rowsort
SELECT + ( 36 ) * - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1548
-2988
-936

query I rowsort
SELECT ALL + 5 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
5
5
5

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-8953
SELECT DISTINCT - cor0.col0 + col0 * COALESCE ( - cor0.col0, cor0.col1 ) DIV cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-18
-231
-298

skipif mysql # not compatible
query I rowsort label-8953
SELECT DISTINCT - cor0.col0 + col0 * COALESCE ( - cor0.col0, cor0.col1 ) / cor0.col1 FROM tab2 AS cor0 GROUP BY col1, cor0.col0
----
-18
-231
-298

query I rowsort
SELECT DISTINCT 5 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
5

query I rowsort
SELECT + - 10 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-10
-10
-10

query I rowsort
SELECT cor0.col0 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
22
28
82

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 + 48 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
48
48
48

query I rowsort
SELECT ALL 25 FROM tab2 AS cor0 GROUP BY col0
----
25
25
25

query I rowsort
SELECT + 59 FROM tab1 AS cor0 GROUP BY col1
----
59
59
59

query I rowsort
SELECT ALL + 15 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
15
15
15

query I rowsort
SELECT ALL cor0.col0 + + cor0.col0 FROM tab1 AS cor0 GROUP BY col0
----
164
44
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col2 col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT 93 + cor1.col1 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
137
150
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT ALL + - 37 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-37
-37
-37

query I rowsort
SELECT 3 - + 92 FROM tab2 GROUP BY col1
----
-89
-89
-89

query I rowsort
SELECT - 68 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-68
-68
-68

onlyif mysql # DIV for integer division: 
query I rowsort label-8970
SELECT - col2 * cor0.col1 DIV cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-45
0
0

skipif mysql # not compatible
query I rowsort label-8970
SELECT - col2 * cor0.col1 / cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col1
----
-45
0
0

query I rowsort
SELECT ALL + 84 FROM tab2 cor0 GROUP BY cor0.col2
----
84
84
84

onlyif mysql # DIV for integer division: 
query I rowsort label-8972
SELECT + cor0.col1 + cor0.col1 DIV ( - 31 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43
56
6

skipif mysql # not compatible
query I rowsort label-8972
SELECT + cor0.col1 + cor0.col1 / ( - 31 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
43
56
6

query I rowsort
SELECT + 30 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
30
30

query I rowsort
SELECT DISTINCT + ( CASE cor0.col2 WHEN + cor0.col2 THEN 41 END ) FROM tab2 cor0 GROUP BY cor0.col2
----
41

query I rowsort
SELECT DISTINCT - + 40 + + cor0.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-34
17
4

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT - COALESCE ( 22, - tab0.col0, - cor0.col1 ) FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
-22
-22

query I rowsort
SELECT 49 + cor0.col1 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
130
49

query I rowsort
SELECT DISTINCT - + 88 FROM tab0 GROUP BY tab0.col2
----
-88

query I rowsort
SELECT DISTINCT + 14 * col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
574
826
854

query I rowsort
SELECT + 64 FROM tab0 cor0 GROUP BY cor0.col0
----
64
64
64

query I rowsort
SELECT DISTINCT - col0 - + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-166
-52
-86

query I rowsort
SELECT + cor0.col1 * 65 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
2860
3705
390

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8983
SELECT DISTINCT - cor0.col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
NULL

skipif mysql # not compatible
query I rowsort label-8983
SELECT DISTINCT - cor0.col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 GROUP BY col0
----
NULL

query I rowsort
SELECT + NULLIF ( cor0.col0, + 25 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT 41 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
41
41
41

query I rowsort
SELECT cor0.col1 AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1, cor0.col1
----
0
0
81
81

query I rowsort
SELECT ALL cor0.col2 * - 63 FROM tab2 cor0 GROUP BY cor0.col2
----
-3654
-4977
-5481

query I rowsort
SELECT DISTINCT cor0.col1 + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
118
122
82

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-8989
SELECT DISTINCT - cor0.col2 / + CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL

skipif mysql # not compatible
query I rowsort label-8989
SELECT DISTINCT - cor0.col2 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + 71 FROM tab1 AS cor0 GROUP BY cor0.col0
----
71
71
71

query I rowsort
SELECT ALL 84 + + 51 FROM tab1 cor0 GROUP BY cor0.col0
----
135
135
135

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT + 88 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
88
88
88

query I rowsort
SELECT 12 * + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
1044
696
948

onlyif mysql # DIV for integer division: 
query I rowsort label-8996
SELECT ALL + col2 DIV + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8996
SELECT ALL + col2 / + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
1
1
1

query I rowsort
SELECT 43 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
43
43
43

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT - + 57 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-57

query I rowsort
SELECT - 56 FROM tab2 cor0 GROUP BY col0
----
-56
-56
-56

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col1
----
-81
0

query I rowsort
SELECT ALL cor0.col2 + - cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 95 FROM tab1 cor0 GROUP BY cor0.col0
----
95
95
95

query I rowsort
SELECT 65 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
65
65
65

query I rowsort
SELECT ALL tab1.col1 AS col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - 79 FROM tab2 GROUP BY tab2.col1
----
-79
-79
-79

query I rowsort
SELECT ALL 2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT + 16 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
16
16
16

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + col2 FROM tab1 GROUP BY col2
----
45
71
8

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2 HAVING ( NULL ) > NULL
----

query I rowsort
SELECT DISTINCT col1 * cor0.col1 AS col1 FROM tab2 cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT col2 AS col2 FROM tab2 AS cor0 GROUP BY col2
----
58
79
87

query I rowsort
SELECT ( cor0.col2 + - cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-11
-14
17

query I rowsort
SELECT DISTINCT 33 + 56 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
89

query I rowsort
SELECT ALL 95 * 99 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
9405
9405
9405

query I rowsort
SELECT - cor0.col0 * + 77 FROM tab2 cor0 GROUP BY cor0.col0
----
-1155
-7007
-7084

query I rowsort
SELECT ALL + ( 24 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
24
24
24

query I rowsort
SELECT ALL - ( - cor0.col0 ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 64 AS col1 FROM tab1 GROUP BY tab1.col0
----
64
64
64

query I rowsort
SELECT cor0.col1 * - 16 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-704
-912
-96

query I rowsort
SELECT DISTINCT - 79 FROM tab1 GROUP BY tab1.col0
----
-79

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1 cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT 5 FROM tab1 AS cor0 GROUP BY col1
----
5
5
5

query I rowsort
SELECT ALL + cor0.col0 + + 18 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
109
110
33

query I rowsort
SELECT 73 * 4 FROM tab0 AS cor0 GROUP BY cor0.col0
----
292
292
292

query I rowsort
SELECT - 32 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
41
59
61

query I rowsort
SELECT + cor0.col0 - cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT + cor0.col1 + + 42 FROM tab1 AS cor0 GROUP BY col1
----
48
86
99

query I rowsort
SELECT + cor0.col2 + 93 FROM tab1 AS cor0 GROUP BY cor0.col2
----
101
138
164

onlyif mysql # DIV for integer division: 
query I rowsort label-9035
SELECT 15 DIV + 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9035
SELECT 15 / + 77 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL - ( - 52 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
52
52
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 77 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 DISTINCT col0 col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
22
28
82

query I rowsort
SELECT - 53 FROM tab0 GROUP BY tab0.col1
----
-53
-53

query I rowsort
SELECT ALL col1 - - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
114
12
88

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 AS cor0 WHERE ( NULL ) NOT IN ( + cor0.col1 ) GROUP BY cor0.col2 HAVING NULL IS NULL
----

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 AS cor0 WHERE NULL NOT BETWEEN + cor0.col1 AND ( NULL ) GROUP BY cor0.col2
----

query I rowsort
SELECT cor0.col0 * - cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT ALL + tab1.col0 * tab1.col0 FROM tab1 GROUP BY tab1.col0
----
484
6724
784

query I rowsort
SELECT - 69 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-69
-69

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT ALL - cor0.col0 * - 52 - - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1166
1484
4346

onlyif mysql # DIV for integer division: 
query I rowsort label-9049
SELECT + cor0.col1 DIV cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-26
-42
-83

skipif mysql # not compatible
query I rowsort label-9049
SELECT + cor0.col1 / cor0.col0 + - cor0.col0 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
-26
-42
-83

query I rowsort
SELECT ALL - cor0.col2 * - 13 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
104
585
923

query I rowsort
SELECT ALL col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT 99 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
99
99
99

query I rowsort
SELECT ALL - col0 FROM tab2 GROUP BY col0 HAVING NOT ( NULL ) IS NULL
----

query I rowsort
SELECT DISTINCT + col2 FROM tab0 GROUP BY col2
----
24
38
79

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - - 23 FROM tab2 GROUP BY tab2.col1
----
23
23
23

query I rowsort
SELECT + + tab2.col2 FROM tab2, tab2 AS cor0 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT + + cor0.col1 * + 63 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
2772
3591
378

query I rowsort
SELECT + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 + + 88 FROM tab2 AS cor0 GROUP BY cor0.col1
----
170
206
210

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab2 cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT ALL + cor0.col2 * 44 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1056
1672
3476

query I rowsort
SELECT - + 72 FROM tab2 GROUP BY tab2.col1
----
-72
-72
-72

query I rowsort
SELECT + cor0.col2 - - 45 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
103
124
132

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab2.col1 col0 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT DISTINCT col0 + - 82 FROM tab2 GROUP BY tab2.col0
----
-67
10
9

query I rowsort
SELECT ALL + cor0.col0 + - ( cor0.col0 ) AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col2 FROM tab2 cor0 GROUP BY cor0.col0, col0
----
15
91
92

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab2 cor0 GROUP BY col0, cor0.col2
----
-15
-91
-92

query I rowsort
SELECT ALL cor0.col2 - col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, col0
----
-19
-45
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 28 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
28

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0, cor0.col1
----
-22
-28
-82

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT - col0 + + 24 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
2093
2116
345

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
81

query I rowsort
SELECT ALL + cor0.col0 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 52 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-52
-52
-52

query I rowsort
SELECT DISTINCT - 27 FROM tab2 GROUP BY tab2.col0
----
-27

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-225
-8281
-8464

query I rowsort
SELECT DISTINCT + col1 + + 45 + + 29 FROM tab2 AS cor0 GROUP BY cor0.col1
----
115
133
135

query I rowsort
SELECT ALL - ( + cor0.col1 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-81
0
0

query I rowsort
SELECT + 9 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2
----
9
9
9

query I rowsort
SELECT ALL + 96 FROM tab0 AS cor0 GROUP BY cor0.col0
----
96
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 45 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
45
45
45

query I rowsort
SELECT ALL + CASE - cor0.col2 WHEN col2 + + ( cor0.col2 ) THEN + cor0.col2 END AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + 30 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT ALL - tab1.col2 * tab1.col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL - 59 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-59
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 6 col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-6
-6
-6

query I rowsort
SELECT ALL + 77 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
77
77
77

query I rowsort
SELECT ALL - tab1.col2 AS col0 FROM tab1 GROUP BY col2
----
-45
-71
-8

query I rowsort
SELECT cor0.col2 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 - 57 col1 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col1
----
-57

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 * NULLIF ( - 28, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col1
----
1008
54208
90972

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
153
30
73

query I rowsort
SELECT - ( cor0.col2 * cor0.col2 ) AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-3364
-6241
-7569

onlyif mysql # DIV for integer division: 
query I rowsort label-9099
SELECT cor0.col1 DIV 83 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

skipif mysql # not compatible
query I rowsort label-9099
SELECT cor0.col1 / 83 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL - 22 + - col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-63
-81
-83

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col2 * COALESCE ( + 40, col1 ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
2320
3160
3480

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-9102
SELECT DISTINCT COALESCE ( - 82, - cor0.col0, - CAST( NULL AS SIGNED ) ) DIV - 70 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort label-9102
SELECT DISTINCT COALESCE ( - 82, - cor0.col0, - CAST ( NULL AS INTEGER ) ) / - 70 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1

query I rowsort
SELECT COALESCE ( - cor0.col1, cor0.col1 ) * + 31 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1364
-1767
-186

query I rowsort
SELECT ALL + 58 FROM tab0 AS cor0 GROUP BY col0
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT - tab1.col2 * + col2 FROM tab1 GROUP BY col2
----
-2025
-5041
-64

query I rowsort
SELECT ALL 93 FROM tab0 AS cor0 GROUP BY cor0.col1
----
93
93

query I rowsort
SELECT ALL + 17 FROM tab0 AS cor0 GROUP BY cor0.col0
----
17
17
17

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
3364
6241
7569

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
118
122
82

query I rowsort
SELECT DISTINCT 96 * + tab2.col0 + 11 AS col2 FROM tab2 GROUP BY tab2.col0
----
1451
8747
8843

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
1849
676
6889

query I rowsort
SELECT 41 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
41
41
41

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-45
-71
-8

query I rowsort
SELECT DISTINCT + col0 - cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col2
----
-17
11
14

query I rowsort
SELECT + 19 AS col1 FROM tab2 GROUP BY col0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
24

query I rowsort
SELECT - 44 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-44
-44

query I rowsort
SELECT ALL + 19 AS col2 FROM tab2 GROUP BY tab2.col0
----
19
19
19

query I rowsort
SELECT 11 FROM tab2 AS cor0 GROUP BY col2
----
11
11
11

query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT 99 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
99

query I rowsort
SELECT ALL 44 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
44
44
44

query I rowsort
SELECT + cor0.col2 * + cor0.col0 + cor0.col0 * - cor0.col2 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col0, cor0.col2
----
15
91
92

query I rowsort
SELECT DISTINCT - - 31 AS col1 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
31

query I rowsort
SELECT 64 * tab0.col0 + col0 AS col0 FROM tab0 GROUP BY col0
----
1690
2795
5395

query I rowsort
SELECT DISTINCT - 47 FROM tab1 cor0 GROUP BY col0
----
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 51 * cor0.col1 col1 FROM tab1 AS cor0 GROUP BY col1
----
2244
2907
306

query I rowsort
SELECT + - cor0.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT ALL ( + cor0.col0 ) * - 49 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-1078
-1372
-4018

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT + COALESCE ( 50, - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col1
----
50

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
82

query I rowsort
SELECT ALL - 10 AS col2 FROM tab2 cor0 GROUP BY col2, cor0.col0
----
-10
-10
-10

onlyif mysql # DIV for integer division: 
query I rowsort label-9134
SELECT cor0.col2 + cor0.col0 + 51 DIV - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
104
121
66

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9134
SELECT cor0.col2 + cor0.col0 + 51 / - cor0.col0 col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
104
121
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - ( - 3 ) * cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
267
38
79

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL 49 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
2842
3871
4263

query I rowsort
SELECT - 33 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col1
----
-33
-33
-33

query I rowsort
SELECT cor0.col1 * - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, col2
----
26
43
83

query I rowsort
SELECT col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2, cor0.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - cor0.col0 * cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-1008
-1975
-3116

onlyif mysql # DIV for integer division: 
query I rowsort label-9143
SELECT cor0.col0 + 16 DIV - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-9143
SELECT cor0.col0 + 16 / - cor0.col0 FROM tab0 AS cor0 GROUP BY col0
----
26
43
83

query I rowsort
SELECT ALL 57 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
57
57

query I rowsort
SELECT DISTINCT - 8 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-8

query I rowsort
SELECT DISTINCT + 44 FROM tab2 AS cor0 GROUP BY cor0.col1
----
44

query I rowsort
SELECT cor0.col2 + cor0.col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT cor0.col1 + + cor0.col1 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL 48 FROM tab1 AS cor0 GROUP BY cor0.col1
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 8 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
8
8
8

query I rowsort
SELECT cor0.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

query I rowsort
SELECT ALL + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2, col2
----
58
79
87

query I rowsort
SELECT 95 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
95
95
95

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col2
----
2025
5041
64

query I rowsort
SELECT cor0.col0 * + cor0.col0 + 21 FROM tab1 AS cor0 GROUP BY cor0.col0
----
505
6745
805

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9156
SELECT ALL CAST( NULL AS DECIMAL ) FROM tab2 cor0 GROUP BY col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9156
SELECT ALL CAST ( NULL AS REAL ) FROM tab2 cor0 GROUP BY col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 0 + - 77 FROM tab2 GROUP BY tab2.col0
----
-77
-77
-77

query I rowsort
SELECT 90 + 90 AS col1 FROM tab2 GROUP BY tab2.col2
----
180
180
180

query I rowsort
SELECT DISTINCT + 95 - - 99 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col0
----
194

query I rowsort
SELECT + cor0.col2 + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT 79 AS col0 FROM tab1 GROUP BY tab1.col1
----
79
79
79

query I rowsort
SELECT 28 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
28
28
28

query I rowsort
SELECT + 1 - + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-23
-37
-78

query I rowsort
SELECT DISTINCT + 43 FROM tab0 AS cor0 GROUP BY cor0.col0
----
43

query I rowsort
SELECT ALL - cor0.col0 * - cor0.col0 + col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1892
6972
702

query I rowsort
SELECT + 96 FROM tab1, tab1 cor0 GROUP BY cor0.col0
----
96
96
96

query I rowsort
SELECT ALL col0 FROM tab0 cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-1936
-3249
-36

query I rowsort
SELECT + ( + cor0.col1 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT ALL 6 FROM tab0 AS cor0 GROUP BY cor0.col1
----
6
6

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT - + cor0.col1 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

query I rowsort
SELECT - cor0.col1 * + 58 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-2378
-3422
-3538

query I rowsort
SELECT 19 * col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1729
1748
285

onlyif mysql # CAST syntax: DECIMAL type: 
query I rowsort label-9175
SELECT + NULLIF ( cor0.col0, - cor0.col0 * CAST( NULL AS DECIMAL ) + cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

skipif mysql # not compatible
query I rowsort label-9175
SELECT + NULLIF ( cor0.col0, - cor0.col0 * CAST ( NULL AS REAL ) + cor0.col0 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + + 92 * - 99 FROM tab1 GROUP BY col2
----
-9108
-9108
-9108

query I rowsort
SELECT 1 * + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT + cor0.col2 + + 54 FROM tab1 AS cor0 GROUP BY cor0.col2
----
125
62
99

query I rowsort
SELECT + cor0.col2 * col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
2565
3124
48

onlyif mysql # DIV for integer division: 
query I rowsort label-9181
SELECT 31 DIV cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9181
SELECT 31 / cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
1

query I rowsort
SELECT + COALESCE ( + cor0.col2, cor0.col2, + 50 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + 25 FROM tab2 AS cor0 GROUP BY col1
----
25
25
25

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
45
71
8

query I rowsort
SELECT DISTINCT + 50 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
50

query I rowsort
SELECT DISTINCT 3 * + col1 FROM tab1 GROUP BY col1
----
132
171
18

query I rowsort
SELECT ALL cor0.col0 + col0 * cor0.col0 FROM tab1 cor0 GROUP BY cor0.col0
----
506
6806
812

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT ALL 4 FROM tab1 AS cor0 GROUP BY cor0.col1
----
4
4
4

query I rowsort
SELECT DISTINCT cor0.col2 + - 62 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-4
17
25

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col0
----
-41
-59
-61

query I rowsort
SELECT cor0.col1 - + cor0.col1 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1892
-30
-3192

query I rowsort
SELECT ALL cor0.col1 * col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT ALL tab0.col0 AS col2 FROM tab0, tab0 cor0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT cor0.col2 + + col2 AS col1 FROM tab1 cor0 GROUP BY col2
----
142
16
90

onlyif mysql # DIV for integer division: 
query I rowsort label-9198
SELECT ALL - cor0.col2 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-9198
SELECT ALL - cor0.col2 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-5
0
0

query I rowsort
SELECT 28 FROM tab2 AS cor0 GROUP BY cor0.col0
----
28
28
28

query I rowsort
SELECT DISTINCT 49 FROM tab1 cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT 97 FROM tab2 cor0 GROUP BY col1
----
97
97
97

query I rowsort
SELECT + - 23 AS col1 FROM tab0 GROUP BY tab0.col2
----
-23
-23
-23

query I rowsort
SELECT ALL - 1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT 53 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
53
53
53

query I rowsort
SELECT - 93 * cor0.col0 + - 93 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-1488
-8556
-8649

query I rowsort
SELECT 31 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col0
----
31
31
31

query I rowsort
SELECT cor0.col0 * 35 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2870
770
980

query I rowsort
SELECT ALL cor0.col2 + cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
158
48
76

query I rowsort
SELECT DISTINCT 5 FROM tab1 AS cor0 GROUP BY cor0.col1
----
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL - col0 FROM tab1 AS cor0 GROUP BY col0, cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL 87 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
87
87
87

query I rowsort
SELECT ALL + 24 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
24
24

query I rowsort
SELECT ALL 79 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
79
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + cor0.col2 col2 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

onlyif mysql # DIV for integer division: 
query I rowsort label-9217
SELECT ALL cor0.col0 DIV cor0.col0 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9217
SELECT ALL cor0.col0 / cor0.col0 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
-22
-28
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 28 ) col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
28
28
28

query I rowsort
SELECT DISTINCT - 25 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-25

query I rowsort
SELECT DISTINCT + 90 * + 83 FROM tab1 AS cor0 GROUP BY cor0.col0
----
7470

query I rowsort
SELECT - + cor0.col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col0
----
-15
-91
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 col2 FROM tab2 GROUP BY tab2.col0
----
15
91
92

query I rowsort
SELECT ALL + tab1.col1 + 64 AS col1 FROM tab1 GROUP BY col1
----
108
121
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 + tab0.col0 col0 FROM tab0 GROUP BY tab0.col0
----
114
154
97

query I rowsort
SELECT 32 * 91 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2912
2912
2912

query I rowsort
SELECT ALL 95 FROM tab1 AS cor0 GROUP BY cor0.col1
----
95
95
95

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
24
38
79

query I rowsort
SELECT ALL 81 AS col0 FROM tab0 cor0 GROUP BY cor0.col1
----
81
81

query I rowsort
SELECT ALL - col0 - cor0.col0 * - 79 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1716
2184
6396

query I rowsort
SELECT ALL cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT DISTINCT + - 56 FROM tab1 GROUP BY tab1.col2
----
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 41 col0 FROM tab2 GROUP BY tab2.col1
----
41
41
41

query I rowsort
SELECT ALL 38 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
38
38
38

query I rowsort
SELECT DISTINCT + 0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col0
----
0

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
484
6724
784

query I rowsort
SELECT - 50 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col1, cor0.col2
----
-50
-50
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 87 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
87

query I rowsort
SELECT DISTINCT - 71 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-71

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9241
SELECT ALL + CAST( + cor0.col0 AS SIGNED ) * + 28 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
2296
616
784

skipif mysql # not compatible
query I rowsort label-9241
SELECT ALL + CAST ( + cor0.col0 AS INTEGER ) * + 28 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
2296
616
784

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1 GROUP BY tab1.col1
----
44
57
6

query I rowsort
SELECT + 95 AS col1 FROM tab2 AS cor0 GROUP BY col2
----
95
95
95

query I rowsort
SELECT - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1 HAVING NULL <> ( NULL )
----

query I rowsort
SELECT tab1.col0 FROM tab1 GROUP BY col0 HAVING NOT NULL IS NOT NULL
----
22
28
82

query I rowsort
SELECT - 17 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-17
-17
-17

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col1, col0
----
22
28
82

query I rowsort
SELECT ALL 23 AS col1 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
23
23
23

query I rowsort
SELECT 26 FROM tab0, tab0 AS cor0, tab1 cor1 GROUP BY cor1.col0
----
26
26
26

query I rowsort
SELECT + cor0.col0 + + ( - cor0.col0 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT DISTINCT 71 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
71

query I rowsort
SELECT DISTINCT - 76 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-76

query I rowsort
SELECT - 6 + + cor0.col2 * + cor0.col2 + 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1473
605
6270

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT 51 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
51
51

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col1 * 54 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
-2173
-3127
-3233

query I rowsort
SELECT - + 42 * cor0.col1 + cor0.col1 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-2419
-2501

query I rowsort
SELECT ALL + cor0.col1 FROM tab2 cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT cor0.col1 * + col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT - 76 * - cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3116
4484
4636

query I rowsort
SELECT ALL 73 FROM tab0 AS cor0 GROUP BY cor0.col1
----
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT ALL + 26 AS col2 FROM tab1, tab2 AS cor0, tab0 cor1 GROUP BY cor1.col1
----
26
26

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 AS cor0 GROUP BY col1, cor0.col0
----
0
81

query I rowsort
SELECT DISTINCT 17 FROM tab0 cor0 GROUP BY cor0.col2
----
17

query I rowsort
SELECT 66 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
66
66
66

onlyif mysql # DIV for integer division: 
query I rowsort label-9267
SELECT cor0.col2 + + cor0.col0 DIV 69 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
45
72
8

skipif mysql # not compatible
query I rowsort label-9267
SELECT cor0.col2 + + cor0.col0 / 69 FROM tab1 AS cor0 GROUP BY cor0.col0, col2, cor0.col1
----
45
72
8

query I rowsort
SELECT DISTINCT cor0.col0 - + 61 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-18
-35
22

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 87 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-87

query I rowsort
SELECT ALL 76 + col0 FROM tab1 GROUP BY tab1.col0
----
104
158
98

query I rowsort
SELECT ALL - tab2.col2 + + col2 FROM tab2 GROUP BY tab2.col2
----
0
0
0

query I rowsort
SELECT 95 AS col1 FROM tab2 GROUP BY col2
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 col0 FROM tab0 AS cor0 GROUP BY col2
----
-47
-47
-47

query I rowsort
SELECT DISTINCT + 43 + + cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
268
8324
8507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 32 + cor0.col1 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
91
93

query I rowsort
SELECT 48 + + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
105
54
92

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + ( + COALESCE ( 27, - cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col1
----
27
27
27

query I rowsort
SELECT DISTINCT cor0.col2 * 43 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
2494
3397
3741

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9280
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9280
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 19 FROM tab2 cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
19

query I rowsort
SELECT 15 - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-76
-77
0

query I rowsort
SELECT ALL + 79 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
79
79
79

query I rowsort
SELECT DISTINCT - col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT col0 * cor0.col2 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
1260
176
5822

query I rowsort
SELECT DISTINCT + + tab1.col1 FROM tab1 GROUP BY col1
----
44
57
6

query I rowsort
SELECT - 25 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col1
----
-25
-25
-25

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 DISTINCT 98 FROM tab0 AS cor0 GROUP BY cor0.col1
----
98

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2
----
22
28
82

query I rowsort
SELECT ALL 78 + - col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
21
34
72

query I rowsort
SELECT - cor0.col1 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
-3483
0
0

query I rowsort
SELECT 22 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + 24 FROM tab0 AS cor0 GROUP BY col1
----
24
24

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
45
71
8

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-81
0

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

query I rowsort
SELECT 48 AS col0 FROM tab0 cor0 GROUP BY col1, cor0.col0
----
48
48
48

query I rowsort
SELECT ALL + 34 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
34
34
34

query I rowsort
SELECT 2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
2
2
2

query I rowsort
SELECT ALL cor0.col1 * 11 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
484
627
66

query I rowsort
SELECT ALL + cor0.col1 * 85 FROM tab0 AS cor0 GROUP BY cor0.col0, col1
----
0
0
6885

query I rowsort
SELECT 91 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col1
----
91
91

query I rowsort
SELECT ALL 25 FROM tab1 AS cor0 GROUP BY cor0.col0
----
25
25
25

query I rowsort
SELECT DISTINCT - cor0.col0 + + 20 + - col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-10
-162
-164

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col2
----
44
57
6

query I rowsort
SELECT ALL - cor0.col0 + 53 - cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-129
-131
23

query I rowsort
SELECT ALL + cor0.col0 + - 20 * - cor0.col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
1911
1932
315

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 19 col2 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY tab0.col2
----
19
19
19

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9312
SELECT CAST( 19 AS SIGNED ) + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
102
45
62

skipif mysql # not compatible
query I rowsort label-9312
SELECT CAST ( 19 AS INTEGER ) + + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
102
45
62

query I rowsort
SELECT ALL ( 82 ) FROM tab1 AS cor0 GROUP BY col1
----
82
82
82

query I rowsort
SELECT 0 * 41 FROM tab0 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL 38 FROM tab2 AS cor0 GROUP BY cor0.col1
----
38
38
38

query I rowsort
SELECT cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9317
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-9317
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT 2 AS col1 FROM tab1 AS cor0 GROUP BY col2
----
2
2
2

query I rowsort
SELECT + 69 AS col0 FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
69
69
69

query I rowsort
SELECT ( + 53 ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
53
53

query I rowsort
SELECT - cor0.col1 * - 96 - 36 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3900
5628
5820

query I rowsort
SELECT 7 FROM tab0, tab0 AS cor0 GROUP BY tab0.col0
----
7
7
7

query I rowsort
SELECT ALL - 47 - - 21 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-26
-26
-26

query I rowsort
SELECT 45 AS col2 FROM tab0, tab0 cor0 GROUP BY cor0.col1
----
45
45

query I rowsort
SELECT + 50 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
50
50
50

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

onlyif mysql # DIV for integer division: 
query I rowsort label-9328
SELECT DISTINCT cor0.col2 DIV + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9328
SELECT DISTINCT cor0.col2 / + cor0.col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1

query I rowsort
SELECT + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

query I rowsort
SELECT col2 * - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-1944
0
0

query I rowsort
SELECT ALL + col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
58
79
87

query I rowsort
SELECT ALL 1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
1
1
1

query I rowsort
SELECT ALL col2 + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3422
6320
7656

query I rowsort
SELECT col2 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3364
6241
7569

query I rowsort
SELECT + 97 + 31 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
128
128
128

query I rowsort
SELECT ALL - NULLIF ( 38, cor0.col2 ) + + cor0.col2 FROM tab1 AS cor0 GROUP BY col2
----
-30
33
7

query I rowsort
SELECT ALL + 5 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
5
5
5

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, cor0.col1
----
0
0
0

query I rowsort
SELECT 30 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
30
30
30

query I rowsort
SELECT + 64 FROM tab1 AS cor0 GROUP BY cor0.col1
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT + 59 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
59

query I rowsort
SELECT + col1 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT 42 * - tab1.col1 FROM tab1 GROUP BY tab1.col1
----
-1848
-2394
-252

query I rowsort
SELECT DISTINCT - 13 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-13

query I rowsort
SELECT NULLIF ( - 16, - cor0.col2 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
-16
-16
-16

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 GROUP BY tab0.col0 HAVING + col0 IS NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab0 cor0 WHERE + cor0.col2 > NULL GROUP BY cor0.col0
----

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - + cor0.col2 AS col2 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL 39 + - col2 FROM tab0 GROUP BY col2
----
-40
1
15

query I rowsort
SELECT ALL cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col2
----
24
38
79

query I rowsort
SELECT ALL + 84 FROM tab1 AS cor0 GROUP BY cor0.col1
----
84
84
84

query I rowsort
SELECT - 39 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-39
-39

query I rowsort
SELECT - 75 AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-75
-75
-75

query I rowsort
SELECT 76 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
76
76
76

query I rowsort
SELECT + 39 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
39
39

query I rowsort
SELECT + - 22 * + cor0.col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
-1782
0

query I rowsort
SELECT + 74 * + cor0.col2 AS col1 FROM tab2 cor0 GROUP BY cor0.col2
----
4292
5846
6438

query I rowsort
SELECT ALL + 33 AS col2 FROM tab2 GROUP BY col0
----
33
33
33

query I rowsort
SELECT cor0.col1 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT cor0.col0 * + cor0.col2 * 3 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
17466
3780
528

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT COALESCE ( + cor0.col0, 72, + 29 * cor0.col2 ) AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + - cor0.col2 FROM tab0, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT - cor0.col1 * + col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT 77 FROM tab0 AS cor0 GROUP BY col2
----
77

query I rowsort
SELECT + 99 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col1
----
99
99
99

query I rowsort
SELECT - 69 * + cor0.col2 * + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-141726
-217626
-71208

query I rowsort
SELECT ALL + 23 FROM tab1 cor0 GROUP BY cor0.col2
----
23
23
23

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-44
-57
-6

query I rowsort
SELECT - 12 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
-12
-12
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 * cor0.col1 + 4 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
2569
3128
52

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 cor0 GROUP BY col1
----
-81
0

query I rowsort
SELECT DISTINCT 51 AS col2 FROM tab1 AS cor0 GROUP BY col0
----
51

query I rowsort
SELECT - cor0.col1 - + cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
-118
-122
-82

query I rowsort
SELECT DISTINCT col2 * + 46 FROM tab0 AS cor0 GROUP BY col2
----
1104
1748
3634

query I rowsort
SELECT DISTINCT 6 * cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
132
168
492

query I rowsort
SELECT DISTINCT - col2 + + cor0.col2 * cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
3306
6162
7482

query I rowsort
SELECT DISTINCT - 95 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-95

query I rowsort
SELECT - 12 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-12
-12
-12

query I rowsort
SELECT - 80 + + 83 * + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1, cor0.col0
----
3572
418
4651

query I rowsort
SELECT DISTINCT - + tab2.col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 + NULLIF ( + cor0.col2, cor0.col1 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
142
16
90

query I rowsort
SELECT ALL 60 + - cor0.col2 + col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
33
58
72

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL 30 * 72 * + cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1, cor1.col0
----
196560
198720
32400

query I rowsort
SELECT 35 FROM tab2, tab2 cor0 GROUP BY cor0.col1
----
35
35
35

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ALL cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2025
5041
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT cor0.col1 + - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col2 * + col2 * - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-195112
-493039
-658503

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col1 HAVING NOT + cor0.col1 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL cor0.col1 * COALESCE ( cor0.col1, - cor0.col2, - cor0.col2 ) AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
126
28
85

query I rowsort
SELECT ALL cor0.col1 - + cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
0
0
0

query I rowsort
SELECT ALL 27 FROM tab2 AS cor0 GROUP BY col1
----
27
27
27

query I rowsort
SELECT + cor0.col0 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
166
52
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2 cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL 56 FROM tab0 AS cor0 GROUP BY cor0.col1
----
56
56

query I rowsort
SELECT + cor0.col0 * ( cor0.col0 + + cor0.col0 ) AS col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col0
----
16562
16928
450

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
-44
-57
-6

query I rowsort
SELECT 55 FROM tab0 AS cor0 GROUP BY cor0.col0
----
55
55
55

query I rowsort
SELECT - 43 FROM tab0 AS cor0 GROUP BY col2
----
-43
-43
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 25 col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
25

query I rowsort
SELECT DISTINCT 52 * - tab1.col2 + + 73 FROM tab1 GROUP BY col2
----
-2267
-343
-3619

query I rowsort
SELECT 92 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
92
92
92

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - col0 FROM tab1 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT - 60 AS col2 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-60
-60
-60

query I rowsort
SELECT 49 AS col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
49
49
49

query I rowsort
SELECT DISTINCT + 5 * cor0.col2 FROM tab2 AS cor0 GROUP BY col2, cor0.col0
----
290
395
435

query I rowsort
SELECT ALL + cor0.col2 + COALESCE ( + 94 * - cor0.col2, - cor0.col0 + - cor0.col0, - 15 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-4185
-6603
-744

query I rowsort
SELECT 48 FROM tab0 AS cor0 GROUP BY cor0.col2
----
48
48
48

query I rowsort
SELECT 68 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2788
-4012
-4148

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1
----
44
57
6

query I rowsort
SELECT - 95 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-95
-95
-95

query I rowsort
SELECT DISTINCT + 22 FROM tab1 AS cor0 GROUP BY cor0.col2
----
22

query I rowsort
SELECT DISTINCT - 20 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-20

query I rowsort
SELECT ALL - 20 * cor0.col1 FROM tab0, tab1 AS cor0 GROUP BY cor0.col1
----
-1140
-120
-880

query I rowsort
SELECT - 78 FROM tab0 GROUP BY tab0.col1
----
-78
-78

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
116
158
174

query I rowsort
SELECT DISTINCT + 85 AS col1 FROM tab1 AS cor0 GROUP BY col0
----
85

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL - cor0.col0 + + 14 AS col1 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-1
-77
-78

query I rowsort
SELECT + + tab0.col0 FROM tab0 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT - col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT DISTINCT - 17 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
-17

query I rowsort
SELECT DISTINCT 69 AS col0 FROM tab1 AS cor0 GROUP BY col2
----
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 78 + col0 - cor0.col0 col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
78
78
78

query I rowsort
SELECT ALL 35 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col0
----
-2870
-770
-980

query I rowsort
SELECT - 64 * tab0.col2 FROM tab0, tab1 AS cor0 GROUP BY tab0.col2
----
-1536
-2432
-5056

query I rowsort
SELECT ALL 86 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
86
86
86

query I rowsort
SELECT cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col1
----
45
71
8

query I rowsort
SELECT ALL + 44 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col2
----
44
44
44

query I rowsort
SELECT DISTINCT 2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
2

query I rowsort
SELECT 55 * 46 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2530
2530
2530

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 * - cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-13824
-493039
-54872

onlyif mysql # DIV for integer division: 
query I rowsort label-9444
SELECT cor0.col2 * cor0.col1 DIV cor0.col1 + 50 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
108
129
137

skipif mysql # not compatible
query I rowsort label-9444
SELECT cor0.col2 * cor0.col1 / cor0.col1 + 50 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
108
129
137

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 GROUP BY cor0.col2, col0
----
22
28
82

query I rowsort
SELECT + - cor0.col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT + 45 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY tab1.col1
----
45
45
45

query I rowsort
SELECT - 43 AS col1 FROM tab0 cor0 GROUP BY cor0.col0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - 45 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-45

query I rowsort
SELECT col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
1681
3481
3721

query I rowsort
SELECT DISTINCT 70 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
70

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT col1 * - 34 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1394
-2006
-2074

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - 98 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-98
-98
-98

onlyif mysql # DIV for integer division: 
query I rowsort label-9456
SELECT DISTINCT col2 + 31 DIV - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
5
71

skipif mysql # not compatible
query I rowsort label-9456
SELECT DISTINCT col2 + 31 / - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2
----
45
5
71

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1 GROUP BY cor1.col1
----
-81
0

query I rowsort
SELECT DISTINCT - - ( - 91 ) AS col0 FROM tab0 GROUP BY tab0.col1
----
-91

query I rowsort
SELECT cor0.col0 + cor0.col0 * ( - cor0.col0 ) FROM tab1 cor0 GROUP BY cor0.col0
----
-462
-6642
-756

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT ALL cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT cor0.col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col0
----
15
91
92

query I rowsort
SELECT - 70 FROM tab1 cor0 GROUP BY cor0.col0
----
-70
-70
-70

query I rowsort
SELECT cor0.col0 * 17 FROM tab0 AS cor0 GROUP BY col0
----
1411
442
731

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
41
59
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * 98 col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1470
8918
9016

query I rowsort
SELECT ALL 33 AS col2 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
33
33
33

onlyif mysql # CAST syntax: SIGNED type: DIV for integer division: 
query I rowsort label-9468
SELECT DISTINCT + COALESCE ( cor0.col2, col2 ) DIV CAST( - 56 AS SIGNED ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
0

skipif mysql # not compatible
query I rowsort label-9468
SELECT DISTINCT + COALESCE ( cor0.col2, col2 ) / CAST ( - 56 AS INTEGER ) AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-1
0

query I rowsort
SELECT + 18 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col1
----
18
18
18

query I rowsort
SELECT DISTINCT 42 FROM tab2 AS cor0 GROUP BY col2
----
42

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9471
SELECT ALL + ( - 54 + cor0.col1 ) * CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9471
SELECT ALL + ( - 54 + cor0.col1 ) * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
NULL
NULL

query I rowsort
SELECT cor0.col0 * + cor0.col0 AS col2 FROM tab1 cor0 GROUP BY cor0.col0
----
484
6724
784

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

onlyif mysql # DIV for integer division: 
query I rowsort label-9474
SELECT ALL + cor0.col1 - - 90 DIV cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
10
45
60

skipif mysql # not compatible
query I rowsort label-9474
SELECT ALL + cor0.col1 - - 90 / cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
10
45
60

query I rowsort
SELECT 58 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor1.col2
----
58
58
58

onlyif mysql # DIV for integer division: 
query I rowsort label-9476
SELECT - cor0.col0 DIV + 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9476
SELECT - cor0.col0 / + 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 6 FROM tab1 AS cor0 GROUP BY cor0.col0
----
6
6
6

query I rowsort
SELECT ALL cor0.col0 + + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT cor1.col0 FROM tab2, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
22
28
82

query I rowsort
SELECT + COALESCE ( cor0.col2, cor0.col2 * + 13 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col1, cor0.col2, col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9481
SELECT DISTINCT 24 DIV 13 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

skipif mysql # not compatible
query I rowsort label-9481
SELECT DISTINCT 24 / 13 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1 GROUP BY cor0.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT + 48 FROM tab0 AS cor0 GROUP BY cor0.col2
----
48

query I rowsort
SELECT - 33 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-33
-33

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
45
71
8

query I rowsort
SELECT - 16 + cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
22
63
8

query I rowsort
SELECT 64 * - 14 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-896
-896
-896

query I rowsort
SELECT - 18 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-18
-18
-18

query I rowsort
SELECT - 38 FROM tab1 AS cor0 GROUP BY col0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT - - cor0.col2 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
45
71
8

query I rowsort
SELECT + - 10 AS col1 FROM tab0, tab0 cor0 GROUP BY tab0.col0
----
-10
-10
-10

query I rowsort
SELECT + 38 FROM tab1 GROUP BY tab1.col0
----
38
38
38

query I rowsort
SELECT + 89 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
89
89
89

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 GROUP BY col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2
----
26
43
83

query I rowsort
SELECT - col0 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col0
----
-19
-45
53

query I rowsort
SELECT ALL 99 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col1
----
99
99
99

query I rowsort
SELECT ALL + 31 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
31
31
31

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab0 GROUP BY col1
----
64

query I rowsort
SELECT + cor0.col1 AS col1 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 - cor0.col1 * - cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1681
3481
3721

query I rowsort
SELECT + 32 FROM tab2 AS cor0 GROUP BY cor0.col1
----
32
32
32

query I rowsort
SELECT - cor0.col2 FROM tab0 AS cor0 GROUP BY col0, cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2 HAVING NOT ( + cor0.col2 ) <> NULL
----

query I rowsort
SELECT - + tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT - 61 FROM tab1 cor0 GROUP BY cor0.col2
----
-61

query I rowsort
SELECT ALL cor1.col2 FROM tab2 AS 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 - 9 col2 FROM tab2 GROUP BY tab2.col2
----
-9
-9
-9

query I rowsort
SELECT cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0, cor0.col1
----
26
43
83

query I rowsort
SELECT cor0.col2 + + 65 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
103
144
89

query I rowsort
SELECT cor0.col1 * + 74 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
5994

query I rowsort
SELECT DISTINCT + 57 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
57

query I rowsort
SELECT - 78 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-78
-78
-78

query I rowsort
SELECT 38 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0
----
38
38
38

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT DISTINCT cor0.col2 * COALESCE ( 65, cor0.col0 + + cor0.col1 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1560
2470
5135

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 GROUP BY tab2.col1
----
41
59
61

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 30 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
30

query I rowsort
SELECT ALL 76 FROM tab0 cor0 GROUP BY col2
----
76
76
76

query I rowsort
SELECT col2 * cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
1032
2054
3154

query I rowsort
SELECT + 26 * + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
1066
1534
1586

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT DISTINCT + - cor0.col0 + cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
0

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
15
91
92

query I rowsort
SELECT - 4 * + 55 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-220
-220
-220

query I rowsort
SELECT DISTINCT - + tab1.col0 AS col1 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - col2 FROM tab0 cor0 GROUP BY cor0.col2
----
-24
-38
-79

query I rowsort
SELECT ALL col2 * + 82 FROM tab2 AS cor0 GROUP BY cor0.col2
----
4756
6478
7134

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
15
91
92

query I rowsort
SELECT ALL + 99 FROM tab0 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT DISTINCT cor0.col0 * + 1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
26
43
83

query I rowsort
SELECT + tab0.col0 FROM tab0, tab1 AS cor0, tab1 AS cor1 GROUP BY tab0.col0
----
26
43
83

query I rowsort
SELECT 2 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
2
2
2

query I rowsort
SELECT cor0.col1 + + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT - cor0.col1 * 29 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-2349
0

query I rowsort
SELECT cor0.col1 * - 56 AS col0 FROM tab1 AS cor0 GROUP BY col1
----
-2464
-3192
-336

query I rowsort
SELECT DISTINCT + 19 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col1
----
19

query I rowsort
SELECT ALL 74 + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
118
131
80

query I rowsort
SELECT ALL + 74 FROM tab1 AS cor0 GROUP BY cor0.col1
----
74
74
74

query I rowsort
SELECT ALL + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT cor0.col0 + - cor0.col0 + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col0 + cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT col2 + 81 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1, cor0.col2
----
126
152
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-58
-79
-87

query I rowsort
SELECT cor0.col2 + + 92 FROM tab0 AS cor0 GROUP BY cor0.col2
----
116
130
171

query I rowsort
SELECT - - cor0.col2 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT + 31 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * col2 col2 FROM tab1 AS cor0 GROUP BY col2
----
2025
5041
64

query I rowsort
SELECT + col1 * cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
132
1596
3608

query I rowsort
SELECT ALL - - 60 + cor0.col1 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor0.col1
----
101
119
121

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-210
-8190
-8372

query I rowsort
SELECT DISTINCT 85 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
85

query I rowsort
SELECT 41 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2
----
41
41
41

query I rowsort
SELECT DISTINCT + tab2.col2 AS col1 FROM tab2 GROUP BY tab2.col2
----
58
79
87

query I rowsort
SELECT tab0.col1 FROM tab0 GROUP BY tab0.col1 HAVING NULL IS NULL
----
0
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col2
----
0
0
81

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-1681
-3481
-3721

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT cor0.col2 - - cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col0
----
116
158
174

query I rowsort
SELECT DISTINCT 30 FROM tab0 GROUP BY tab0.col1
----
30

query I rowsort
SELECT - 66 AS col1 FROM tab0, tab2 AS cor0 GROUP BY tab0.col1
----
-66
-66

query I rowsort
SELECT 30 FROM tab0 GROUP BY col2
----
30
30
30

query I rowsort
SELECT ALL + - 93 FROM tab0 GROUP BY tab0.col1
----
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT - col2 + + 54 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col2
----
-25
-33
-4

query I rowsort
SELECT ALL 26 * col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
2132
572
728

query I rowsort
SELECT ALL - 22 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-22
-22
-22

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT 86 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
86
86
86

query I rowsort
SELECT - 34 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
-34
-34
-34

query I rowsort
SELECT ALL cor0.col1 + 33 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
39
77
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 66 + - cor0.col0 * 91 col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-1299
-8215
-8306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( + COALESCE ( 68, - cor0.col0, + 86 ) ) * cor0.col0 col0 FROM tab1, tab0 AS cor0 GROUP BY cor0.col0
----
1768
2924
5644

query I rowsort
SELECT cor0.col2 - + cor0.col2 AS col2 FROM tab1 cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 * + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
1032
2054
3154

query I rowsort
SELECT + 50 FROM tab0 AS cor0 GROUP BY cor0.col1
----
50
50

onlyif mysql # DIV for integer division: 
query I rowsort label-9581
SELECT + cor0.col2 DIV cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9581
SELECT + cor0.col2 / cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1
1
1

query I rowsort
SELECT ALL + 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 + col2 col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9584
SELECT - cor0.col1 DIV cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9584
SELECT - cor0.col1 / cor0.col1 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 21 * 14 AS col2 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
-294

query I rowsort
SELECT ALL 80 * cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY col2
----
1920
3040
6320

query I rowsort
SELECT ALL 54 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
54
54
54

query I rowsort
SELECT + 58 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col2, cor0.col0
----
22
28
82

query I rowsort
SELECT + 3 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT + cor0.col0 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL cor0.col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL cor0.col1 + 36 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
117
36
36

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col2, cor0.col0
----
9 values hashing to 90cf6ec6406229dce3ed591cac36d8fb

query I rowsort
SELECT ALL 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
54
54
54

query I rowsort
SELECT + 98 + - 25 FROM tab2 AS cor0 GROUP BY cor0.col1
----
73
73
73

query I rowsort
SELECT ALL 98 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
98
98

query I rowsort
SELECT DISTINCT 1 + col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
42
60
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
41
59
61

query I rowsort
SELECT NULLIF ( + cor0.col0 + - cor0.col0, cor0.col0 ) * + cor0.col0 AS col0 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
0

onlyif mysql # DIV for integer division: 
query I rowsort label-9601
SELECT ALL cor0.col0 DIV 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9601
SELECT ALL cor0.col0 / 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
1

query I rowsort
SELECT cor0.col0 * + 48 FROM tab2 AS cor0 GROUP BY cor0.col0
----
4368
4416
720

query I rowsort
SELECT DISTINCT 25 FROM tab2 AS cor0 GROUP BY cor0.col0
----
25

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-44
-57
-6

query I rowsort
SELECT - 35 + - 7 FROM tab1, tab1 AS cor0 GROUP BY tab1.col1
----
-42
-42
-42

query I rowsort
SELECT + - col1 + tab0.col1 AS col0 FROM tab0 GROUP BY tab0.col1
----
0
0

query I rowsort
SELECT ALL + col0 * + 59 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
1298
1652
4838

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2, col1
----
44
57
6

query I rowsort
SELECT - 84 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-84
-84
-84

query I rowsort
SELECT col2 * - 9 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-405
-639
-72

query I rowsort
SELECT 34 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
34
34
34

query I rowsort
SELECT ALL 25 FROM tab1, tab2 AS cor0 GROUP BY tab1.col1
----
25
25
25

onlyif mysql # DIV for integer division: 
query I rowsort label-9614
SELECT 47 DIV 66 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9614
SELECT 47 / 66 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT col0 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
1849
676
6889

query I rowsort
SELECT ALL + + cor0.col2 * + 11 FROM tab2, tab0 cor0 GROUP BY cor0.col2
----
264
418
869

query I rowsort
SELECT + COALESCE ( 62, + col1, + 54 ) * + NULLIF ( - col1, + cor0.col2 ) + + 55 * cor0.col2 * col2 FROM tab1 cor0 GROUP BY cor0.col2, col1, cor0.col2
----
107841
274527
3148

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, col0
----
26
43
83

query I rowsort
SELECT + 36 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
36
36
36

query I rowsort
SELECT cor0.col1 + + cor0.col1 * - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-2508
-3080
-42

query I rowsort
SELECT cor1.col0 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1 GROUP BY cor1.col0
----
26
43
83

query I rowsort
SELECT ALL + cor0.col0 FROM tab1, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT + 37 * + 19 AS col1 FROM tab2 AS cor0 GROUP BY col0
----
703
703
703

query I rowsort
SELECT DISTINCT - ( - 41 ) + - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
-40
41

query I rowsort
SELECT 45 AS col1 FROM tab2 cor0 GROUP BY cor0.col1, col2, cor0.col2
----
45
45
45

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9626
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + cor0.col1 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

skipif mysql # not compatible
query I rowsort label-9626
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + cor0.col1 + + cor0.col0 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
NULL

query I rowsort
SELECT ALL ( + col2 ) AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, col2
----
45
71
8

onlyif mysql # DIV for integer division: 
query I rowsort label-9628
SELECT DISTINCT cor0.col1 DIV cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1

skipif mysql # not compatible
query I rowsort label-9628
SELECT DISTINCT cor0.col1 / cor0.col1 FROM tab2 AS cor0 GROUP BY col1
----
1

query I rowsort
SELECT ALL + 78 FROM tab2 AS cor0 GROUP BY col1
----
78
78
78

query I rowsort
SELECT DISTINCT + 94 FROM tab1 GROUP BY tab1.col0
----
94

query I rowsort
SELECT DISTINCT + cor0.col1 + - 5 AS col0 FROM tab2 cor0 GROUP BY cor0.col1
----
36
54
56

query I rowsort
SELECT + 66 FROM tab0, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
66
66
66

query I rowsort
SELECT + 99 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
99
99
99

query I rowsort
SELECT ALL + 65 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
65
65
65

query I rowsort
SELECT DISTINCT - - cor0.col2 AS col1 FROM tab2, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab2 AS cor0 GROUP BY col1
----
41
59
61

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col2
----
24
38
79

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col2
----
15
91
92

query I rowsort
SELECT ALL + 79 FROM tab1 AS cor0 GROUP BY cor0.col2
----
79
79
79

query I rowsort
SELECT DISTINCT + 31 * - cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0
----
-1333
-2573
-806

query I rowsort
SELECT ALL - 84 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-84
-84
-84

query I rowsort
SELECT ALL 13 AS col1 FROM tab2 GROUP BY col0
----
13
13
13

query I rowsort
SELECT DISTINCT + 44 AS col1 FROM tab1 GROUP BY col1
----
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col1, cor0.col0
----
44
57
6

query I rowsort
SELECT DISTINCT cor0.col1 + 2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
43
61
63

query I rowsort
SELECT DISTINCT - COALESCE ( cor0.col1, + cor0.col0 * - cor0.col0 ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-41
-59
-61

query I rowsort
SELECT + cor0.col0 + 27 AS col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col0, col1
----
109
49
55

query I rowsort
SELECT ALL - 20 FROM tab2 AS cor0 GROUP BY col2, cor0.col1
----
-20
-20
-20

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1 GROUP BY tab1.col2 HAVING NOT ( NULL ) = NULL
----

query I rowsort
SELECT DISTINCT 6 FROM tab1 AS cor0 GROUP BY cor0.col2
----
6

query I rowsort
SELECT + cor0.col2 * cor0.col2 * + cor0.col2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
13824
493039
54872

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.col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

onlyif mysql # DIV for integer division: 
query I rowsort label-9654
SELECT cor0.col0 DIV + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9654
SELECT cor0.col0 / + cor0.col0 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1
1
1

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
40

query I rowsort
SELECT ALL + + 82 AS col2 FROM tab2 GROUP BY col1
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 79 col2 FROM tab2 cor0 GROUP BY cor0.col1, cor0.col1
----
79
79
79

query I rowsort
SELECT ( 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-9659
SELECT 31 DIV cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9659
SELECT 31 / cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0
----
0
0
2

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
26
43
83

query I rowsort
SELECT ALL col1 FROM tab2 AS cor0 GROUP BY col0, cor0.col1
----
41
59
61

query I rowsort
SELECT - cor0.col0 * cor0.col0 * cor0.col0 FROM tab2 AS cor0 GROUP BY col0
----
-3375
-753571
-778688

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
41
59
61

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9664
SELECT CAST( - 35 AS SIGNED ) * - col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-16940
-235340
-27440

skipif mysql # not compatible
query I rowsort label-9664
SELECT CAST ( - 35 AS INTEGER ) * - col0 * - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
-16940
-235340
-27440

query I rowsort
SELECT - 16 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-16
-16

query I rowsort
SELECT 10 FROM tab0 AS cor0 GROUP BY col1
----
10
10

query I rowsort
SELECT cor0.col0 + - CASE + ( cor0.col2 ) WHEN - cor0.col2 THEN NULL WHEN 30 * + col0 THEN col0 WHEN cor0.col2 THEN NULL END + cor0.col2 * - cor0.col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab0, tab1 cor0 GROUP BY cor0.col0
----
-22
-28
-82

onlyif mysql # DIV for integer division: 
query I rowsort label-9669
SELECT ALL + 92 DIV 10 FROM tab2 cor0 GROUP BY cor0.col2
----
9
9
9

skipif mysql # not compatible
query I rowsort label-9669
SELECT ALL + 92 / 10 FROM tab2 cor0 GROUP BY cor0.col2
----
9
9
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 51 col0 FROM tab2 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT - cor0.col2 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-24
-38
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 3 col2 FROM tab1, tab0 AS cor0, tab2 AS cor1 GROUP BY cor0.col2
----
-3
-3
-3

query I rowsort
SELECT DISTINCT 27 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col0
----
27

query I rowsort
SELECT DISTINCT - 7 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-7

query I rowsort
SELECT - tab1.col0 + 74 FROM tab1 GROUP BY col0
----
-8
46
52

query I rowsort
SELECT + 81 * + cor0.col0 * + col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
39204
544644
63504

query I rowsort
SELECT + 0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT ALL ( col0 ) AS col0 FROM tab1 cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT ALL - 44 - - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, col2, cor0.col2
----
-1
-18
39

query I rowsort
SELECT cor0.col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col0
----
44
57
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-44
-57
-6

query I rowsort
SELECT ALL + 10 AS col2 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
10
10
10

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, col0
----
0
0
81

query I rowsort
SELECT DISTINCT + 25 FROM tab2 AS cor0 GROUP BY col2
----
25

query I rowsort
SELECT cor0.col0 + 77 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
168
169
92

query I rowsort
SELECT DISTINCT 97 FROM tab1 AS cor0 GROUP BY cor0.col2
----
97

query I rowsort
SELECT + 57 * cor0.col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1368
2166
4503

query I rowsort
SELECT - 73 FROM tab1 GROUP BY col2
----
-73
-73
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col1 col0 FROM tab2, tab0 AS cor0, tab2 cor1 GROUP BY cor0.col1
----
-6561
0

query I rowsort
SELECT 57 FROM tab1 AS cor0 GROUP BY cor0.col0
----
57
57
57

query I rowsort
SELECT ALL + cor0.col1 + col1 AS col2 FROM tab0 cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NULL IS NULL
----
-22
-28
-82

query I rowsort
SELECT - cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2 HAVING NOT + col2 IS NOT NULL
----

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING ( NULL ) <= ( NULL )
----

onlyif mysql # DIV for integer division: 
query I rowsort label-9696
SELECT ALL + cor0.col0 DIV cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9696
SELECT ALL + cor0.col0 / cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
1
1
1

query I rowsort
SELECT DISTINCT + cor0.col1 - cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
-26
-83
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 * - cor0.col0 + + 0 col2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-455
-460
-75

query I rowsort
SELECT + cor0.col0 + cor0.col0 * 43 * - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col0
----
-20790
-289050
-33684

query I rowsort
SELECT cor0.col0 + - col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-29
16
38

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab1 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
20

query I rowsort
SELECT col0 * cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col0, col1
----
132
1596
3608

query I rowsort
SELECT - 37 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 cor1 GROUP BY cor1.col1, cor0.col1
----
-37
-37
-37
-37

query I rowsort
SELECT ALL + cor1.col1 + - 99 * - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor1.col1
----
4100
5900
6100

query I rowsort
SELECT 12 FROM tab0 AS cor0 GROUP BY cor0.col1
----
12
12

query I rowsort
SELECT - 65 * cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-3770
-5135
-5655

query I rowsort
SELECT DISTINCT cor0.col1 * 30 FROM tab2 AS cor0 GROUP BY cor0.col1
----
1230
1770
1830

query I rowsort
SELECT 58 * cor0.col1 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
2552
3306
348

query I rowsort
SELECT cor0.col2 * - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col2
----
-3364
-6241
-7569

query I rowsort
SELECT 11 * cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
286
473
913

query I rowsort
SELECT ALL - 14 FROM tab0 AS cor0 GROUP BY col2
----
-14
-14
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 53 col0 FROM tab2 cor0 GROUP BY cor0.col2
----
53
53
53

query I rowsort
SELECT DISTINCT + + tab2.col1 AS col2 FROM tab2 GROUP BY col1
----
41
59
61

query I rowsort
SELECT - 22 FROM tab0 AS cor0 GROUP BY col1
----
-22
-22

query I rowsort
SELECT ALL cor0.col2 + 2 AS col2 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
26
40
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 col0 FROM tab2 GROUP BY col1
----
-41
-59
-61

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
28

query I rowsort
SELECT DISTINCT + 80 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
80

query I rowsort
SELECT 92 + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
107
183
184

query I rowsort
SELECT + cor0.col1 * - cor0.col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-1936
-3249
-36

query I rowsort
SELECT - cor0.col1 - cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
-162
0
0

query I rowsort
SELECT ALL - 1 FROM tab1 cor0 GROUP BY cor0.col0
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 * - 23 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
190463
194672
5175

query I rowsort
SELECT cor0.col2 * + col0 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col0
----
1305
5336
7189

query I rowsort
SELECT DISTINCT + 38 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
38

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
98

query I rowsort
SELECT 9 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
9
9
9

query I rowsort
SELECT + tab2.col0 AS col0 FROM tab2 GROUP BY col0
----
15
91
92

query I rowsort
SELECT DISTINCT - 85 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-85

query I rowsort
SELECT + 29 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
29
29
29

query I rowsort
SELECT ALL cor0.col1 + + ( cor0.col2 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
105
38
79

query I rowsort
SELECT DISTINCT + 49 FROM tab1 cor0 GROUP BY cor0.col0
----
49

query I rowsort
SELECT ALL + 84 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1 GROUP BY cor1.col2
----
84
84
84

query I rowsort
SELECT - - COALESCE ( + 96, tab1.col0 ) FROM tab1 GROUP BY col0
----
96
96
96

query I rowsort
SELECT DISTINCT + 77 + col0 FROM tab0 AS cor0 GROUP BY col1, col0
----
103
120
160

query I rowsort
SELECT ALL + 22 + - tab2.col1 FROM tab2 GROUP BY tab2.col1
----
-19
-37
-39

query I rowsort
SELECT 96 FROM tab2 AS cor0 GROUP BY col1
----
96
96
96

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT DISTINCT + 87 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
87

query I rowsort
SELECT + - col2 AS col2 FROM tab2 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2, col0
----
15
91
92

query I rowsort
SELECT DISTINCT 56 + cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
114
135
143

query I rowsort
SELECT ALL - cor0.col0 * - 31 + + 33 FROM tab1, tab0 AS cor0, tab1 AS cor1 GROUP BY cor0.col0
----
1366
2606
839

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0

query I rowsort
SELECT + CASE cor0.col2 WHEN cor0.col1 THEN col1 END AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 49 FROM tab0 AS cor0 GROUP BY cor0.col2
----
49

query I rowsort
SELECT ALL + - cor1.col0 FROM tab1, tab2 AS cor0, tab1 AS cor1 GROUP BY cor1.col0
----
-22
-28
-82

query I rowsort
SELECT 34 FROM tab2 cor0 GROUP BY cor0.col0
----
34
34
34

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0 AS cor0 GROUP BY col0, cor0.col1
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 col2 FROM tab1 GROUP BY col1
----
-44
-57
-6

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.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + + col2 * + tab0.col2 AS col2 FROM tab0 GROUP BY col2
----
1444
576
6241

query I rowsort
SELECT - 76 * - 94 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
7144
7144
7144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT ( - 2 ) FROM tab1 AS cor0 GROUP BY cor0.col2
----
-2
-2
-2

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9757
SELECT DISTINCT CAST( + 78 AS SIGNED ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78

skipif mysql # not compatible
query I rowsort label-9757
SELECT DISTINCT CAST ( + 78 AS INTEGER ) AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
78

query I rowsort
SELECT DISTINCT col0 * - 29 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-1247
-2407
-754

query I rowsort
SELECT cor0.col2 * 68 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1632
2584
5372

query I rowsort
SELECT - cor0.col0 * - 26 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
1118
2158
676

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col1
----
15
91
92

query I rowsort
SELECT DISTINCT 9 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
9

query I rowsort
SELECT DISTINCT - col1 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-44
-57
-6

query I rowsort
SELECT DISTINCT - 66 FROM tab2, tab0 AS cor0, tab0 AS cor1 GROUP BY cor0.col0
----
-66

onlyif mysql # DIV for integer division: 
query I rowsort label-9765
SELECT + cor0.col0 - - cor0.col0 DIV ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

skipif mysql # not compatible
query I rowsort label-9765
SELECT + cor0.col0 - - cor0.col0 / ( cor0.col0 ) FROM tab1 AS cor0 GROUP BY cor0.col0
----
23
29
83

query I rowsort
SELECT ALL 22 FROM tab0 AS cor0 GROUP BY cor0.col0
----
22
22
22

query I rowsort
SELECT ALL - 73 AS col1 FROM tab1, tab0 AS cor0 GROUP BY cor0.col2
----
-73
-73
-73

query I rowsort
SELECT + ( - cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-26
-43
-83

query I rowsort
SELECT ALL cor0.col1 + + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
118
122
82

query I rowsort
SELECT + + cor0.col1 + cor0.col1 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
0
162

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 * 56 FROM tab1 AS cor0 GROUP BY cor0.col2
----
2475
3905
440

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
162

query I rowsort
SELECT ALL 58 + - col2 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-21
-29
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col1
----
44
57
6

query I rowsort
SELECT + col1 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
41
59
61

query I rowsort
SELECT ALL + 29 * + 47 * - cor0.col1 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-59972
-77691
-8178

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9777
SELECT + CAST( NULL AS SIGNED ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9777
SELECT + CAST ( NULL AS INTEGER ) FROM tab2 GROUP BY tab2.col1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - tab1.col0 AS col0 FROM tab1 GROUP BY tab1.col0
----
-22
-28
-82

query I rowsort
SELECT DISTINCT + 92 FROM tab2 AS cor0 GROUP BY cor0.col2
----
92

query I rowsort
SELECT DISTINCT - 74 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT + 32 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
32
32
32

query I rowsort
SELECT 43 AS col2 FROM tab0 cor0 GROUP BY cor0.col2
----
43
43
43

query I rowsort
SELECT - 66 + - cor0.col1 FROM tab1 cor0 GROUP BY cor0.col0, col1
----
-110
-123
-72

query I rowsort
SELECT - 97 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-97
-97
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 45 + - 2 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT COALESCE ( 77, - cor0.col2 + + cor0.col1 * - 24, - cor0.col1 + - cor0.col2 ) col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
77
77

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor1.col1
----
0
81

query I rowsort
SELECT DISTINCT - tab2.col2 AS col1 FROM tab2, tab0 AS cor0 GROUP BY tab2.col2
----
-58
-79
-87

query I rowsort
SELECT 63 * - cor0.col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-2583
-3717
-3843

query I rowsort
SELECT ALL - 70 + + cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-27
-44
13

query I rowsort
SELECT + ( col1 ) FROM tab0 AS cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT DISTINCT + COALESCE ( - cor0.col0, - 40 ) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-26
-43
-83

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1 AS cor0 GROUP BY col0, cor0.col1
----
-22
-28
-82

skipif postgresql # PostgreSQL has strict column usage for GROUP BY clauses
query I rowsort
SELECT ALL + COALESCE ( 74, - cor0.col2, NULLIF ( cor0.col1, cor0.col0 ) ) FROM tab2 AS cor0 GROUP BY cor0.col2
----
74
74
74

query I rowsort
SELECT ALL - + cor0.col1 + 10 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
-31
-49
-51

onlyif mysql # DIV for integer division: 
query I rowsort label-9797
SELECT ALL + 62 DIV - col0 + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-2
0
80

skipif mysql # not compatible
skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort label-9797
SELECT ALL + 62 / - col0 + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2, cor0.col1
----
-2
0
80

query I rowsort
SELECT - 29 + - 34 AS col1 FROM tab1 GROUP BY tab1.col2
----
-63
-63
-63

query I rowsort
SELECT ALL - 81 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-81
-81
-81

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9800
SELECT + CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9800
SELECT + CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + 92 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
173
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT DISTINCT cor0.col0 * - cor0.col0 AS col1 FROM tab1 cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col1 HAVING cor0.col1 IS NOT NULL
----
41
59
61

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0 HAVING NOT - cor0.col0 * cor0.col0 = NULL
----

query I rowsort
SELECT DISTINCT + 94 FROM tab2 AS cor0 GROUP BY cor0.col2
----
94

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1 GROUP BY cor0.col2 HAVING NOT NULL IS NOT NULL
----
45
71
8

query I rowsort
SELECT ALL - 92 + cor0.col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-13
-54
-68

query I rowsort
SELECT ALL 85 * cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
1275
7735
7820

query I rowsort
SELECT ( + 56 ) FROM tab2 AS cor0 GROUP BY cor0.col0
----
56
56
56

query I rowsort
SELECT + 37 AS col1 FROM tab1 GROUP BY col0
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col0
----
484
6724
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 col2 FROM tab2 GROUP BY col2
----
-58
-79
-87

query I rowsort
SELECT + - cor0.col0 FROM tab2, tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT - 41 * 56 FROM tab2 cor0 GROUP BY cor0.col1
----
-2296
-2296
-2296

query I rowsort
SELECT NULLIF ( 11, + cor0.col1 ) AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
11
11

query I rowsort
SELECT DISTINCT + 1 FROM tab1 AS cor0 GROUP BY cor0.col1
----
1

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT ALL 22 AS col2 FROM tab0 AS cor0 GROUP BY col1
----
22
22

query I rowsort
SELECT - col0 * cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
-1305
-5336
-7189

query I rowsort
SELECT 98 FROM tab0 AS cor0 GROUP BY cor0.col2
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 + 57 col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
115
136
144

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9824
SELECT cor0.col0 * - CAST( cor0.col2 AS SIGNED ) * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-113535
-309488
-567931

skipif mysql # not compatible
query I rowsort label-9824
SELECT cor0.col0 * - CAST ( cor0.col2 AS INTEGER ) * cor0.col2 AS col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2
----
-113535
-309488
-567931

query I rowsort
SELECT ALL + 63 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2
----
63
63
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 3 col0 FROM tab2 AS cor0 GROUP BY cor0.col1
----
3
3
3

query I rowsort
SELECT ALL - ( cor0.col0 ) FROM tab0 AS cor0 GROUP BY cor0.col0
----
-26
-43
-83

query I rowsort
SELECT 41 FROM tab1, tab1 AS cor0 GROUP BY tab1.col0
----
41
41
41

query I rowsort
SELECT DISTINCT cor0.col2 * + 53 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col2
----
2385
3763
424

query I rowsort
SELECT DISTINCT - 58 + cor0.col2 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1, col2
----
-20
-34
21

onlyif mysql # CAST syntax: SIGNED type: 
query I rowsort label-9831
SELECT ALL col2 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9831
SELECT ALL col2 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
NULL
NULL
NULL

onlyif mysql # DIV for integer division: 
query I rowsort label-9832
SELECT ALL + cor0.col1 DIV 96 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9832
SELECT ALL + cor0.col1 / 96 FROM tab1 AS cor0 GROUP BY cor0.col1
----
0
0
0

query I rowsort
SELECT cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1 GROUP BY cor0.col1
----
0
81

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col0, cor0.col2
----
45
71
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab1, tab1 AS cor0 GROUP BY cor0.col1
----
44
57
6

query I rowsort
SELECT ALL 40 AS col0 FROM tab1 cor0 GROUP BY col2, cor0.col0
----
40
40
40

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 GROUP BY col2, col1
----
44
57
6

query I rowsort
SELECT - cor0.col1 + + cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY col1, cor0.col0
----
-29
16
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 22 * - cor0.col0 col1 FROM tab1 AS cor0 GROUP BY cor0.col1, col0, cor0.col0
----
-1804
-484
-616

query I rowsort
SELECT DISTINCT - 39 FROM tab1 AS cor0 GROUP BY cor0.col1
----
-39

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1 cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT + col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col0
----
15
91
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 37 col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
37
37

query I rowsort
SELECT ALL + 12 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
12
12
12

query I rowsort
SELECT ALL 69 FROM tab1 AS cor0 GROUP BY cor0.col0
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - cor0.col2 col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col2
----
-2025
-5041
-64

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor0.col0
----
22
28
82

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT col1 + - cor0.col1 + 58 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
58
58
58

query I rowsort
SELECT cor0.col2 * - ( + 96 ) FROM tab2 cor0 GROUP BY cor0.col2
----
-5568
-7584
-8352

query I rowsort
SELECT - cor0.col2 + + cor0.col2 + + cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col1 FROM tab2 AS cor0 GROUP BY col2, cor0.col2
----
0
0
0

query I rowsort
SELECT 36 FROM tab1 AS cor0 GROUP BY cor0.col1
----
36
36
36

query I rowsort
SELECT 48 * - cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
-4368
-4416
-720

query I rowsort
SELECT ALL - 9 - cor0.col0 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1, col1
----
-35
-52
-92

query I rowsort
SELECT DISTINCT cor0.col2 - - cor0.col2 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col2
----
116
158
174

query I rowsort
SELECT - cor0.col2 * col2 + - cor0.col2 * + 74 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col2
----
-12087
-2352
-4256

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab1, tab1 cor0, tab2 AS cor1 GROUP BY cor1.col2
----
58
79
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT ALL - 79 FROM tab1 GROUP BY tab1.col0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
45
71
8

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1, cor0.col1
----
0
81

query I rowsort
SELECT - 73 FROM tab1, tab0 AS cor0 GROUP BY tab1.col2
----
-73
-73
-73

query I rowsort
SELECT - cor0.col2 * - cor0.col2 AS col2 FROM tab0 AS cor0 GROUP BY col2
----
1444
576
6241

onlyif mysql # DIV for integer division: 
query I rowsort label-9865
SELECT DISTINCT cor0.col0 DIV 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9865
SELECT DISTINCT cor0.col0 / 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
0
1
2

query I rowsort
SELECT 12 + cor0.col1 FROM tab1 AS cor0 GROUP BY col1, col2
----
18
56
69

query I rowsort
SELECT 8 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
8
8
8

query I rowsort
SELECT 51 FROM tab1 AS cor0 GROUP BY cor0.col2
----
51
51
51

query I rowsort
SELECT ALL cor0.col2 * 57 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3306
4503
4959

query I rowsort
SELECT - 87 FROM tab2 AS cor0 GROUP BY cor0.col1, col2
----
-87
-87
-87

query I rowsort
SELECT + cor0.col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT DISTINCT cor0.col1 - 62 * cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
-1612
-2585
-5146

query I rowsort
SELECT DISTINCT 82 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col1
----
82

query I rowsort
SELECT ALL + 35 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
35
35
35

query I rowsort
SELECT 93 FROM tab0 AS cor0 GROUP BY cor0.col1
----
93
93

query I rowsort
SELECT DISTINCT 67 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col1
----
67

query I rowsort
SELECT + cor0.col1 * - cor0.col0 * - 39 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col0
----
140712
5148
62244

query I rowsort
SELECT - cor1.col2 FROM tab0, tab0 AS cor0, tab0 cor1 GROUP BY cor1.col2
----
-24
-38
-79

query I rowsort
SELECT - + cor0.col0 AS col1 FROM tab1, tab1 AS cor0 GROUP BY cor0.col0
----
-22
-28
-82

query I rowsort
SELECT ALL - 55 AS col2 FROM tab0, tab2 cor0 GROUP BY cor0.col1
----
-55
-55
-55

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col1
----
22
28
82

query I rowsort
SELECT ALL cor0.col2 * 6 * - col2 - - col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
-12105
-30175
-376

query I rowsort
SELECT DISTINCT + cor0.col0 + 38 FROM tab2 AS cor0 GROUP BY col0
----
129
130
53

query I rowsort
SELECT - 16 FROM tab1 AS cor0 GROUP BY col2
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col0 FROM tab1 AS cor0 GROUP BY col2
----
14
14
14

query I rowsort
SELECT - 45 AS col0 FROM tab2 cor0 GROUP BY cor0.col0
----
-45
-45
-45

query I rowsort
SELECT + 1 - - col0 AS col0 FROM tab0 AS cor0 GROUP BY col0
----
27
44
84

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 - 28 AS col1 FROM tab2 GROUP BY tab2.col0
----
-28
-28
-28

query I rowsort
SELECT tab1.col0 AS col2 FROM tab1 GROUP BY tab1.col0
----
22
28
82

query I rowsort
SELECT + cor0.col2 * 39 FROM tab0 AS cor0 GROUP BY cor0.col2
----
1482
3081
936

query I rowsort
SELECT cor0.col2 + - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col2
----
0
0
0

query I rowsort
SELECT - cor0.col1 + + col1 FROM tab0 cor0 GROUP BY cor0.col1
----
0
0

query I rowsort
SELECT 62 FROM tab2 AS cor0 GROUP BY cor0.col1
----
62
62
62

query I rowsort
SELECT + cor0.col1 + 38 * cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
3159

query I rowsort
SELECT DISTINCT + + 62 AS col0 FROM tab2, tab2 AS cor0 GROUP BY cor0.col0
----
62

query I rowsort
SELECT + col1 * - 84 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-6804
0

query I rowsort
SELECT + + tab1.col2 AS col0 FROM tab1 GROUP BY tab1.col2
----
45
71
8

query I rowsort
SELECT ALL + cor0.col2 + - 2 FROM tab1 AS cor0 GROUP BY cor0.col1, col1, col2
----
43
6
69

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-45
-71
-8

query I rowsort
SELECT DISTINCT - 99 * cor0.col1 + 48 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-7971
48

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1 cor0 WHERE NOT NULL NOT IN ( + cor0.col1 * cor0.col2 ) GROUP BY cor0.col0
----

query I rowsort
SELECT + tab1.col1 * tab1.col1 FROM tab1 GROUP BY tab1.col1
----
1936
3249
36

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 GROUP BY cor0.col0
----
26
43
83

query I rowsort
SELECT - cor0.col2 * cor0.col2 - - col2 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col2
----
-1406
-552
-6162

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1 GROUP BY cor0.col2
----
-45
-71
-8

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT ALL col1 * + 69 AS col1 FROM tab2 AS cor0 GROUP BY col1
----
2829
4071
4209

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0 cor0 GROUP BY col1
----
0
81

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 cor0 GROUP BY cor0.col0, cor0.col0
----
15
91
92

query I rowsort
SELECT - col0 AS col1 FROM tab0 AS cor0 GROUP BY col0
----
-26
-43
-83

query I rowsort
SELECT - 18 * 56 + cor0.col2 AS col1 FROM tab2, tab0 AS cor0, tab0 cor1 GROUP BY cor0.col2
----
-929
-970
-984

query I rowsort
SELECT ALL - 72 FROM tab2, tab1 AS cor0 GROUP BY cor0.col0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT ( + 65 ) FROM tab0 AS cor0 GROUP BY cor0.col2
----
65

query I rowsort
SELECT DISTINCT 84 FROM tab2 AS cor0 GROUP BY cor0.col2
----
84

query I rowsort
SELECT DISTINCT + 60 AS col2 FROM tab1 GROUP BY tab1.col1
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 1 * cor0.col2 col0 FROM tab0 AS cor0 GROUP BY cor0.col2
----
24
38
79

query I rowsort
SELECT ALL + col1 + - 48 AS col0 FROM tab0 GROUP BY tab0.col1
----
-48
33

query I rowsort
SELECT col0 + cor0.col0 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
164
44
56

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 + + cor0.col0 * + 18 FROM tab2 AS cor0 GROUP BY cor0.col0
----
10120
495
9919

query I rowsort
SELECT DISTINCT 58 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col0
----
58

query I rowsort
SELECT + 54 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col0, col0
----
54
54
54

query I rowsort
SELECT DISTINCT cor0.col1 + 87 FROM tab2 AS cor0 GROUP BY cor0.col1
----
128
146
148

query I rowsort
SELECT DISTINCT cor0.col0 + 2 FROM tab2 AS cor0 GROUP BY cor0.col0
----
17
93
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 + + cor0.col1 col1 FROM tab0 cor0 GROUP BY cor0.col1
----
127
46

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
-26
-43
-83

query I rowsort
SELECT - cor0.col1 + + cor0.col2 * - cor0.col2 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col2, cor0.col0, cor0.col1
----
-1444
-6241
-657

query I rowsort
SELECT + cor0.col2 * + 30 FROM tab2, tab2 cor0 GROUP BY cor0.col2
----
1740
2370
2610

query I rowsort
SELECT DISTINCT + 39 FROM tab1 AS cor0 GROUP BY col0
----
39

query I rowsort
SELECT - - tab2.col0 + + tab2.col0 FROM tab2 GROUP BY tab2.col0
----
182
184
30

query I rowsort
SELECT - tab2.col0 + - 29 AS col0 FROM tab2 GROUP BY tab2.col0
----
-120
-121
-44

query I rowsort
SELECT DISTINCT + 90 + cor1.col2 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
148
169
177

query I rowsort
SELECT - cor0.col2 + - 99 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-157
-178
-186

query I rowsort
SELECT + cor0.col0 + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col2, cor0.col0
----
166
52
86

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab1 cor0 GROUP BY cor0.col1, cor0.col2
----
44
57
6

query I rowsort
SELECT cor0.col2 * + NULLIF ( + cor0.col2, + cor0.col2 ) * ( - 98 ) FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col2
----
NULL
NULL
NULL

query I rowsort
SELECT 31 + cor0.col2 * cor0.col2 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col2
----
3395
6272
7600

query I rowsort
SELECT 87 AS col2 FROM tab1 AS cor0 GROUP BY col1, cor0.col1
----
87
87
87

query I rowsort
SELECT 58 FROM tab2 cor0 GROUP BY cor0.col2
----
58
58
58

query I rowsort
SELECT + 37 FROM tab0 cor0 GROUP BY cor0.col2
----
37
37
37

query I rowsort
SELECT DISTINCT - 24 AS col2 FROM tab0, tab2 AS cor0 GROUP BY cor0.col0
----
-24

query I rowsort
SELECT - + 35 FROM tab1, tab1 cor0 GROUP BY cor0.col2
----
-35
-35
-35

query I rowsort
SELECT ALL - 49 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-49
-49

query I rowsort
SELECT cor0.col0 + + ( - col0 ) AS col1 FROM tab1 cor0 GROUP BY col0
----
0
0
0

query I rowsort
SELECT - col1 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-41
-59
-61

query I rowsort
SELECT ALL 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
23
23

query I rowsort
SELECT - cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col2, cor0.col1
----
0
0
0

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 DISTINCT + + cor0.col2 * 81 AS col1 FROM tab0, tab0 AS cor0 GROUP BY cor0.col2
----
1944
3078
6399

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab0 AS cor0 GROUP BY col1
----
83

query I rowsort
SELECT DISTINCT + 80 FROM tab1 GROUP BY tab1.col1
----
80

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1
----
58
79
87

query I rowsort
SELECT 45 AS col2 FROM tab0 GROUP BY tab0.col1
----
45
45

query I rowsort
SELECT DISTINCT + 12 FROM tab0 AS cor0 GROUP BY cor0.col2
----
12

query I rowsort
SELECT ALL 96 + cor0.col0 * cor0.col0 * + cor0.col0 FROM tab2 AS cor0 GROUP BY cor0.col0
----
3471
753667
778784

query I rowsort
SELECT DISTINCT - col0 * col0 FROM tab1 cor0 GROUP BY cor0.col0
----
-484
-6724
-784

query I rowsort
SELECT ALL - 71 FROM tab2 AS cor0 GROUP BY cor0.col2
----
-71
-71
-71

query I rowsort
SELECT cor0.col1 + 5 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
5
5
86

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
162

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 AS col0 FROM tab0 AS cor0 GROUP BY cor0.col1
----
0
6561

query I rowsort
SELECT cor0.col1 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1
----
0
0
81

query I rowsort
SELECT - cor0.col1 * 84 AS col1 FROM tab2 AS cor0 GROUP BY cor0.col1
----
-3444
-4956
-5124

query I rowsort
SELECT 22 AS col2 FROM tab0 AS cor0 GROUP BY col0
----
22
22
22

query I rowsort
SELECT - 50 FROM tab2, tab1 AS cor0 GROUP BY cor0.col1
----
-50
-50
-50

query I rowsort
SELECT ALL 17 AS col0 FROM tab1 AS cor0 GROUP BY cor0.col1
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 68 - + cor0.col2 col2 FROM tab1 AS cor0 GROUP BY cor0.col1, col2
----
-113
-139
-76

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2 AS cor0 GROUP BY cor0.col2, cor0.col1, col1
----
41
59
61

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 FROM tab0 cor0 GROUP BY cor0.col0, cor0.col1, col1
----
-1849
-676
-6889

query I rowsort
SELECT cor0.col0 + - cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0, cor0.col2
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 + - col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
0
0
0

query I rowsort
SELECT 45 * col1 FROM tab2 cor0 GROUP BY cor0.col2, cor0.col1
----
1845
2655
2745

query I rowsort
SELECT + 13 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col0
----
13
13
13

query I rowsort
SELECT DISTINCT - 58 AS col2 FROM tab0 AS cor0 GROUP BY cor0.col0
----
-58

query I rowsort
SELECT - 80 * - 38 AS col2 FROM tab2 GROUP BY col0
----
3040
3040
3040

query I rowsort
SELECT - cor1.col2 FROM tab2, tab0 AS cor0, tab2 AS cor1 GROUP BY cor1.col2
----
-58
-79
-87

query I rowsort
SELECT - cor0.col1 + + 93 AS col1 FROM tab1 cor0 GROUP BY col1
----
36
49
87

query I rowsort
SELECT DISTINCT - cor0.col1 * - 12 FROM tab0 AS cor0 GROUP BY cor0.col0, cor0.col1
----
0
972

query I rowsort
SELECT - 80 FROM tab1, tab0 cor0 GROUP BY cor0.col0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT ( - 13 ) AS col0 FROM tab0 cor0 GROUP BY cor0.col2
----
-13

query I rowsort
SELECT DISTINCT - 23 AS col1 FROM tab0 AS cor0 GROUP BY cor0.col1
----
-23

query I rowsort
SELECT DISTINCT + 21 FROM tab2 AS cor0 GROUP BY cor0.col1
----
21

query I rowsort
SELECT DISTINCT col2 + + 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 - cor0.col0 col0 FROM tab1 AS cor0 GROUP BY col0
----
-22
-28
-82

query I rowsort
SELECT 95 FROM tab1 cor0 GROUP BY col2
----
95
95
95

query I rowsort
SELECT ALL cor0.col2 FROM tab1 cor0 GROUP BY cor0.col2, cor0.col2
----
45
71
8

query I rowsort
SELECT 82 FROM tab2 AS cor0 GROUP BY cor0.col2
----
82
82
82

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1, tab2 AS cor0 GROUP BY cor0.col2
----
58
79
87

query I rowsort
SELECT 63 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1
----
63
63
63

query I rowsort
SELECT - + 28 AS col0 FROM tab0, tab1 AS cor0 GROUP BY cor0.col0
----
-28
-28
-28

query I rowsort
SELECT ALL + + 9 AS col2 FROM tab0, tab0 AS cor0 GROUP BY cor0.col1
----
9
9

query I rowsort
SELECT - cor0.col2 FROM tab2 AS cor0 GROUP BY cor0.col1, cor0.col2
----
-58
-79
-87

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 GROUP BY cor0.col1, cor0.col0
----
0
0
81

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col2 FROM tab2 AS cor0 GROUP BY cor0.col0, cor0.col2
----
182
184
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * + 11 col0 FROM tab0 AS cor0 GROUP BY cor0.col0
----
286
473
913

query I rowsort
SELECT ( col0 + cor0.col0 ) * cor0.col0 FROM tab1 AS cor0 GROUP BY cor0.col0
----
13448
1568
968

query I rowsort
SELECT 18 AS col2 FROM tab1 AS cor0 GROUP BY cor0.col1, cor0.col2
----
18
18
18

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0 GROUP BY tab0.col0
----
26
43
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 13 - - cor0.col1 col1 FROM tab2 cor0 GROUP BY cor0.col1
----
54
72
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab0 AS cor0 GROUP BY col2, cor0.col1
----
24
38
79

