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(89,91,82)

statement ok
INSERT INTO tab0 VALUES(35,97,1)

statement ok
INSERT INTO tab0 VALUES(24,86,33)

statement ok
INSERT INTO tab1 VALUES(64,10,57)

statement ok
INSERT INTO tab1 VALUES(3,26,54)

statement ok
INSERT INTO tab1 VALUES(80,13,96)

statement ok
INSERT INTO tab2 VALUES(7,31,27)

statement ok
INSERT INTO tab2 VALUES(79,17,38)

statement ok
INSERT INTO tab2 VALUES(78,59,26)

query I rowsort
SELECT col0 * - col0 - col1 FROM tab2
----
-6143
-6258
-80

query I rowsort
SELECT + - col1 - cor0.col1 * col2 FROM tab2 cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL + - col2 + col0 + col1 * + col0 AS col1 FROM tab1 AS cor0
----
1024
27
647

query I rowsort
SELECT col1 * - col2 + col2 AS col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT col1 * - col2 - tab0.col2 * - col0 AS col1 FROM tab0
----
-164
-2046
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5
SELECT col1 DIV col2 + col2 AS col2 FROM tab0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-5
SELECT col1 / col2 + col2 AS col2 FROM tab0
----
35
83
98

query I rowsort
SELECT 9 AS col1 FROM tab1 cor0
----
9
9
9

query I rowsort
SELECT DISTINCT + 23 * col0 * cor0.col2 FROM tab2 AS cor0
----
4347
46644
69046

query I rowsort
SELECT DISTINCT + col0 * + col0 + col0 * + col0 AS col1 FROM tab2 AS cor0
----
12168
12482
98

query I rowsort
SELECT 52 * col2 AS col2 FROM tab1
----
2808
2964
4992

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + - col0 - + col0 AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT col0 - - col1 * cor0.col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT col0 + col2 * col2 * col1 AS col1 FROM tab2 AS cor0
----
22606
24627
39962

query I rowsort
SELECT DISTINCT col1 + - col1 * - col2 + col0 FROM tab1 AS cor0
----
1341
1433
644

query I rowsort
SELECT + ( col1 ) * col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT + 32 + col2 AS col2 FROM tab1
----
128
86
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-17
SELECT DISTINCT - col1 DIV - col0 + col1 + col0 * col1 * + col0 AS col0 FROM tab2 AS cor0
----
106114
1554
359015

skipif mysql # not compatible
query I rowsort label-17
SELECT DISTINCT - col1 / - col0 + col1 + col0 * col1 * + col0 AS col0 FROM tab2 AS cor0
----
106114
1554
359015

query I rowsort
SELECT - col0 * - cor0.col2 + + col1 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 48 + - col0 + col2 col2 FROM tab1 AS cor0
----
-32
-55
3

query I rowsort
SELECT 20 + cor0.col1 FROM tab1 AS cor0
----
30
33
46

query I rowsort
SELECT 97 + col0 AS col0 FROM tab2
----
104
175
176

query I rowsort
SELECT col0 * - col2 + col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ALL - + 89 * col2 AS col1 FROM tab1 AS cor0
----
-4806
-5073
-8544

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

query I rowsort
SELECT ALL - ( col0 ) + ( - col1 ) FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT - - cor0.col0 + + col2 + + 43 AS col1 FROM tab1 AS cor0
----
100
164
219

query I rowsort
SELECT 24 * - col0 * + 18 AS col0 FROM tab2 AS cor0
----
-3024
-33696
-34128

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

query I rowsort
SELECT ALL col1 * + 3 * + col1 FROM tab1
----
2028
300
507

query I rowsort
SELECT ALL ( tab0.col2 ) FROM tab0, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT - col0 * + ( col2 ) * + col1 AS col1 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + cor0.col0 + + col2 * 81 * col1 FROM tab1 AS cor0
----
101168
113727
46234

query I rowsort
SELECT ALL + - col0 + - col0 * ( col2 ) AS col1 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT + col0 + ( col0 * cor0.col0 ) + col2 FROM tab0 AS cor0
----
1261
633
8092

query I rowsort
SELECT ALL - col2 + + 88 FROM tab0 AS cor0
----
55
6
87

query I rowsort
SELECT col0 + + col2 + cor0.col1 AS col0 FROM tab2 cor0
----
134
163
65

query I rowsort
SELECT - col0 + ( cor0.col0 ) + + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col2 + col2 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-39
SELECT + + col2 * - 39 + col2 + col1 DIV + col0 AS col2 FROM tab1 AS cor0
----
-2044
-2166
-3648

skipif mysql # not compatible
query I rowsort label-39
SELECT + + col2 * - 39 + col2 + col1 / + col0 AS col2 FROM tab1 AS cor0
----
-2044
-2166
-3648

query I rowsort
SELECT DISTINCT + col2 + col1 * cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - - col2 + - cor0.col0 * 89 AS col2 FROM tab1 AS cor0
----
-213
-5639
-7024

query I rowsort
SELECT + + col2 * + 71 AS col2 FROM tab1 AS cor0
----
3834
4047
6816

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to d6394df0309139ffe20e7d96c77e26ee

query I rowsort
SELECT ALL + + 48 + cor0.col0 * col2 FROM tab0 AS cor0
----
7346
83
840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 26 * col0 col0 FROM tab2 AS cor0
----
-182
-2028
-2054

query I rowsort
SELECT col1 + col2 * 4 * col1 FROM tab0
----
11438
29939
485

query I rowsort
SELECT DISTINCT col1 + col2 * tab1.col0 * - col0 FROM tab1
----
-233462
-460
-614387

onlyif mysql # use DIV operator for integer division
query I rowsort label-48
SELECT + col2 DIV col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-48
SELECT + col2 / col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
1
34
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-49
SELECT - cor0.col0 * - col2 DIV col2 AS col1 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-49
SELECT - cor0.col0 * - col2 / col2 AS col1 FROM tab0 cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-50
SELECT + + CAST( - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-50
SELECT + + CAST ( - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT 91 + + col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2747
-6
-7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-52
SELECT ALL col0 + col2 DIV col1 FROM tab2
----
7
78
81

skipif mysql # not compatible
query I rowsort label-52
SELECT ALL col0 + col2 / col1 FROM tab2
----
7
78
81

query I rowsort
SELECT ALL col2 + - 15 * 31 AS col2 FROM tab2
----
-427
-438
-439

query I rowsort
SELECT - col0 * + ( col1 ) + col2 + col0 FROM tab2
----
-1226
-183
-4498

query I rowsort
SELECT ALL - col1 + 6 * - col1 FROM tab0
----
-602
-637
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-56
SELECT - CAST( col2 AS SIGNED ) * col1 + + col0 * + ( tab1.col2 ) FROM tab1
----
-1242
3078
6432

skipif mysql # not compatible
query I rowsort label-56
SELECT - CAST ( col2 AS INTEGER ) * col1 + + col0 * + ( tab1.col2 ) FROM tab1
----
-1242
3078
6432

query I rowsort
SELECT ALL - ( col2 + col0 ) AS col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT ALL 79 * cor0.col0 FROM tab0 cor0
----
1896
2765
7031

query I rowsort
SELECT - col1 + + 56 AS col2 FROM tab2 cor0
----
-3
25
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-60
SELECT DISTINCT col0 + - 47 DIV cor0.col0 AS col0 FROM tab1 AS cor0
----
-12
64
80

skipif mysql # not compatible
query I rowsort label-60
SELECT DISTINCT col0 + - 47 / cor0.col0 AS col0 FROM tab1 AS cor0
----
-12
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-61
SELECT DISTINCT - - col2 * col2 + + col2 DIV 3 AS col1 FROM tab1 AS cor0
----
2934
3268
9248

skipif mysql # not compatible
query I rowsort label-61
SELECT DISTINCT - - col2 * col2 + + col2 / 3 AS col1 FROM tab1 AS cor0
----
2934
3268
9248

onlyif mysql # use DIV operator for integer division
query I rowsort label-62
SELECT ALL - 41 * + col0 * col2 + 71 DIV col1 FROM tab2 AS cor0
----
-123078
-7747
-83147

skipif mysql # not compatible
query I rowsort label-62
SELECT ALL - 41 * + col0 * col2 + 71 / col1 FROM tab2 AS cor0
----
-123078
-7747
-83147

query I rowsort
SELECT ALL + 13 + 48 AS col1 FROM tab2 AS cor0
----
61
61
61

query I rowsort
SELECT ALL - col1 * col1 + col1 AS col0 FROM tab1
----
-156
-650
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-65
SELECT DISTINCT cor0.col2 + col2 * - CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

skipif mysql # not compatible
query I rowsort label-65
SELECT DISTINCT cor0.col2 + col2 * - CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 19 * 43 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6c59c2a27ab48c997e1aa68d7e061ce8

query I rowsort
SELECT DISTINCT - tab0.col1 + - col0 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT ALL + 41 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

query I rowsort
SELECT + + col1 + - ( ( - col1 ) ) FROM tab2 cor0
----
118
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-70
SELECT - col2 + CAST( ( col0 ) AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-70
SELECT - col2 + CAST ( ( col0 ) AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - col1 + + 78 FROM tab1 AS cor0
----
52
65
68

query I rowsort
SELECT ALL + col1 * + 86 AS col1 FROM tab0 AS cor0
----
7396
7826
8342

query I rowsort
SELECT ALL + - col2 + - cor0.col2 * col0 * - col0 FROM tab0 AS cor0
----
1224
18975
649440

query I rowsort
SELECT + + col2 + 74 AS col1 FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT DISTINCT col0 + - cor0.col2 * col0 FROM tab1 cor0
----
-159
-3584
-7600

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col2 * col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-78
SELECT ALL - + col2 DIV - 59 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-78
SELECT ALL - + col2 / - 59 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-79
SELECT DISTINCT - cor0.col1 + ( col2 ) DIV col0 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-79
SELECT DISTINCT - cor0.col1 + ( col2 ) / col0 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT ALL col0 - + 9 AS col0 FROM tab0
----
15
26
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-81
SELECT ALL + CAST( NULL AS DECIMAL ) FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-81
SELECT ALL + CAST ( NULL AS REAL ) FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col1 * col0 * tab2.col2 - col2 * col2 * + col2 FROM tab2
----
-105906
-137228
-25542

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT tab0.col1 / + ( col2 ) + + CAST ( ( + col1 ) + + ( col0 ) AS REAL ) * + tab0.col1 FROM tab0
----
12901
16381
9462

onlyif mysql # use DIV operator for integer division
query I rowsort label-84
SELECT - 81 + 58 DIV col2 AS col0 FROM tab0 AS cor0
----
-23
-80
-81

skipif mysql # not compatible
query I rowsort label-84
SELECT - 81 + 58 / col2 AS col0 FROM tab0 AS cor0
----
-23
-80
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-85
SELECT + CAST( NULL AS SIGNED ) * col0 + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-85
SELECT + CAST ( NULL AS INTEGER ) * col0 + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 59 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-87
SELECT - - col1 * col1 + CAST( col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
306
3540
992

skipif mysql # not compatible
query I rowsort label-87
SELECT - - col1 * col1 + CAST ( col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
306
3540
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-88
SELECT DISTINCT - col2 DIV + col0 + 95 FROM tab0 AS cor0
----
94
95

skipif mysql # not compatible
query I rowsort label-88
SELECT DISTINCT - col2 / + col0 + 95 FROM tab0 AS cor0
----
94
95

query I rowsort
SELECT DISTINCT + 22 * col0 + 54 AS col0 FROM tab2 AS cor0
----
1770
1792
208

query I rowsort
SELECT + col1 + col0 * + col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL 47 + cor0.col0 AS col0 FROM tab2 cor0
----
125
126
54

query I rowsort
SELECT ALL cor0.col2 + 71 FROM tab2, tab1 AS cor0
----
9 values hashing to ad3a49e3385c421062a79fe5dc433531

query I rowsort
SELECT ALL + 25 * - col2 AS col2 FROM tab1 AS cor0
----
-1350
-1425
-2400

query I rowsort
SELECT ALL 44 + + col1 FROM tab2 AS cor0
----
103
61
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + cor0.col2 * - col1 + - col1 col1 FROM tab2 AS cor0
----
-1619
-701
-895

query I rowsort
SELECT DISTINCT - cor0.col2 + col1 * + 70 * - 33 FROM tab1 AS cor0
----
-23157
-30126
-60114

query I rowsort
SELECT DISTINCT 83 + + col1 AS col1 FROM tab2 AS cor0
----
100
114
142

query I rowsort
SELECT ALL + + col0 * + cor0.col0 * - col1 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-99
SELECT ALL - col0 - CAST( col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-99
SELECT ALL - col0 - CAST ( col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col2 - + cor0.col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-102
SELECT ALL + - col0 DIV col0 AS col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-102
SELECT ALL + - col0 / col0 AS col0 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL col1 * + 42 FROM tab2 AS cor0
----
1302
2478
714

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + 27 * col2 col1 FROM tab1 AS cor0
----
15390
33696
37908

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-105
SELECT + - CAST( - col1 AS SIGNED ) * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-105
SELECT + - CAST ( - col1 AS INTEGER ) * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - 5 col1 FROM tab1 AS cor0
----
49
52
91

query I rowsort
SELECT DISTINCT + 75 AS col1 FROM tab1 AS cor0
----
75

query I rowsort
SELECT DISTINCT + col1 + + col2 * col1 * + 41 + 22 * - tab1.col0 FROM tab1
----
21972
49421
57524

query I rowsort
SELECT ALL 16 * + tab0.col2 + col0 FROM tab0
----
1401
51
552

query I rowsort
SELECT - 31 + col1 + + col1 FROM tab1 cor0
----
-11
-5
21

skipif mysql # not compatible
query I rowsort
SELECT ALL + - CAST ( - col1 AS REAL ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + ( 78 ) * + col0 - col2 AS col0 FROM tab1 cor0
----
180
4935
6144

query I rowsort
SELECT 41 + 53 + col1 FROM tab1 cor0
----
104
107
120

onlyif mysql # use DIV operator for integer division
query I rowsort label-114
SELECT DISTINCT + 93 DIV col1 col2 FROM tab1 AS cor0
----
3
7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-114
SELECT DISTINCT + 93 / col1 col2 FROM tab1 AS cor0
----
3
7
9

query I rowsort
SELECT ALL + 16 * + cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to d059351c64af69b130200d54d42fcde1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 44 + 94 col0 FROM tab0 AS cor0
----
50
50
50

query I rowsort
SELECT DISTINCT - 82 AS col0 FROM tab1 AS cor0
----
-82

query I rowsort
SELECT DISTINCT + - 67 * - col0 AS col2 FROM tab1 AS cor0
----
201
4288
5360

query I rowsort
SELECT ALL 89 FROM tab0, tab2 cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ALL + ( - col2 ) * - col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-121
SELECT - 4 + col0 + col0 DIV col0 AS col0 FROM tab2 AS cor0
----
4
75
76

skipif mysql # not compatible
query I rowsort label-121
SELECT - 4 + col0 + col0 / col0 AS col0 FROM tab2 AS cor0
----
4
75
76

query I rowsort
SELECT DISTINCT tab0.col1 + + 89 AS col1 FROM tab0
----
175
180
186

query I rowsort
SELECT 83 * 81 AS col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to ea8328fdb8bba96800e605d43dc91a3e

query I rowsort
SELECT DISTINCT col0 + + 39 * + col0 FROM tab1
----
120
2560
3200

query I rowsort
SELECT + 95 * + tab0.col1 FROM tab0
----
8170
8645
9215

query I rowsort
SELECT DISTINCT ( + tab0.col1 ) + col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT 8 + col1 * + col1 FROM tab1
----
108
177
684

query I rowsort
SELECT col1 + tab2.col0 * - col2 + 25 AS col1 FROM tab2
----
-133
-1944
-2960

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 cor1, tab2 AS cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT ALL 46 FROM tab2, tab1 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

onlyif mysql # use DIV operator for integer division
query I rowsort label-131
SELECT DISTINCT + col0 + - col1 DIV col1 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-131
SELECT DISTINCT + col0 + - col1 / col1 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT ( + 66 ) + col1 FROM tab0 AS cor0
----
152
157
163

query I rowsort
SELECT ALL - cor0.col1 * col1 * col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

query I rowsort
SELECT ALL - + col1 * - 11 + col1 FROM tab1 AS cor0
----
120
156
312

query I rowsort
SELECT + - col2 * col2 + col2 * cor0.col1 FROM tab1 AS cor0
----
-1512
-2679
-7968

onlyif mysql # use DIV operator for integer division
query I rowsort label-136
SELECT ALL + - col2 DIV 81 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-136
SELECT ALL + - col2 / 81 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - 58 * + col0 + col1 AS col0 FROM tab0 AS cor0
----
-1306
-1933
-5071

query I rowsort
SELECT DISTINCT 89 * col0 + - col2 * + col2 AS col2 FROM tab2
----
-106
5587
6266

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT 99 * + col2 AS col0 FROM tab0
----
3267
8118
99

query I rowsort
SELECT + 0 + col1 + + tab0.col2 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT col2 * + col2 * col2 AS col0 FROM tab0
----
1
35937
551368

query I rowsort
SELECT 9 * col0 FROM tab1
----
27
576
720

query I rowsort
SELECT DISTINCT - 26 + - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1251
-602
-7947

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 4fa4bd3038de6e74a345debc8ab4cd53

query I rowsort
SELECT DISTINCT - + 25 FROM tab1 AS cor0
----
-25

query I rowsort
SELECT DISTINCT + col0 + - tab2.col0 * 39 AS col2 FROM tab2
----
-266
-2964
-3002

query I rowsort
SELECT DISTINCT + col0 * col0 + cor0.col0 AS col2 FROM tab1 cor0
----
12
4160
6480

query I rowsort
SELECT + - col1 * 53 AS col1 FROM tab2 AS cor0
----
-1643
-3127
-901

onlyif mysql # use DIV operator for integer division
query I rowsort label-150
SELECT ALL col0 + - col0 DIV col0 FROM tab1 cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-150
SELECT ALL col0 + - col0 / col0 FROM tab1 cor0
----
2
63
79

query I rowsort
SELECT + col0 * + col2 - 59 FROM tab0 AS cor0
----
-24
7239
733

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1, tab2 AS cor2
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

query I rowsort
SELECT - + cor0.col1 + col0 FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col1 col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - col0 * cor0.col1 + + col0 * - col0 FROM tab0 AS cor0
----
-16020
-2640
-4620

query I rowsort
SELECT col2 - 26 * + 8 * - col2 FROM tab0 cor0
----
17138
209
6897

onlyif mysql # use DIV operator for integer division
query I rowsort label-157
SELECT + col2 + - col1 DIV - col0 AS col2 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-157
SELECT + col2 + - col1 / - col0 AS col2 FROM tab2 AS cor0
----
26
31
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-158
SELECT ALL + col2 * CAST( NULL AS DECIMAL ) col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-158
SELECT ALL + col2 * CAST ( NULL AS REAL ) col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * 61 FROM tab2 AS cor0
----
1037
1891
3599

query I rowsort
SELECT + col1 + col2 * - col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT - col2 * 73 FROM tab0 AS cor0
----
-2409
-5986
-73

query I rowsort
SELECT + - col0 + 32 AS col2 FROM tab0 AS cor0
----
-3
-57
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-163
SELECT 4 * col0 + col0 DIV - col1 AS col1 FROM tab2 AS cor0
----
28
311
312

skipif mysql # not compatible
query I rowsort label-163
SELECT 4 * col0 + col0 / - col1 AS col1 FROM tab2 AS cor0
----
28
311
312

query I rowsort
SELECT col1 * + 70 FROM tab1
----
1820
700
910

query I rowsort
SELECT DISTINCT + 46 * - col2 + col1 + col0 FROM tab1 AS cor0
----
-2455
-2548
-4323

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 93 col0 FROM tab2 AS cor0
----
119
120
131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col0 col1 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT + cor0.col2 + - col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT cor0.col0 + col2 * 73 AS col0 FROM tab1 AS cor0
----
3945
4225
7088

onlyif mysql # use DIV operator for integer division
query I rowsort label-170
SELECT ALL + ( + cor0.col2 ) DIV - col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-170
SELECT ALL + ( + cor0.col2 ) / - col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT - col0 + col1 * ( col2 ) AS col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL + - col1 + col0 * + col1 AS col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT 55 * + col1 AS col0 FROM tab2 AS cor0
----
1705
3245
935

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-174
SELECT + col1 * - col0 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-174
SELECT + col1 * - col0 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-175
SELECT ALL + tab2.col2 * col0 / CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-175
SELECT ALL + tab2.col2 * col0 / CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col2 - ( + col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - col0 * 56 + + col2 FROM tab0 cor0
----
1377
1961
5066

query I rowsort
SELECT - 58 AS col2 FROM tab2
----
-58
-58
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-179
SELECT ALL - ( col0 ) DIV tab1.col2 col1 FROM tab1
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-179
SELECT ALL - ( col0 ) / tab1.col2 col1 FROM tab1
----
-1
0
0

query I rowsort
SELECT - + 70 * 50 AS col1 FROM tab2 AS cor0
----
-3500
-3500
-3500

onlyif mysql # use DIV operator for integer division
query I rowsort label-181
SELECT - 57 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-181
SELECT - 57 / + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - ( + col1 ) AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + 96 * - col2 AS col2 FROM tab0 AS cor0
----
-3168
-7872
-96

query I rowsort
SELECT - + col1 * - col2 * cor0.col1 FROM tab0 AS cor0
----
244068
679042
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 40 * + col1 col1 FROM tab2 AS cor0
----
1240
2360
680

query I rowsort
SELECT ALL + 69 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT + 78 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
234
4992
6240

query I rowsort
SELECT ALL + + col1 + + col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + 78 * col0 * - col1 AS col2 FROM tab2
----
-104754
-16926
-358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( tab0.col0 ) * - 59 col2 FROM tab0, tab2 AS cor0, tab2, tab1 cor1
----
-1416
-2065
-5251

query I rowsort
SELECT DISTINCT - col2 - cor0.col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT col1 + + cor0.col2 * cor0.col0 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-193
SELECT + - col2 DIV 14 + col2 * col0 FROM tab1 AS cor0
----
159
3644
7674

skipif mysql # not compatible
query I rowsort label-193
SELECT + - col2 / 14 + col2 * col0 FROM tab1 AS cor0
----
159
3644
7674

onlyif mysql # use DIV operator for integer division
query I rowsort label-194
SELECT - + col2 - 69 DIV + col0 FROM tab0 cor0
----
-2
-35
-82

skipif mysql # not compatible
query I rowsort label-194
SELECT - + col2 - 69 / + col0 FROM tab0 cor0
----
-2
-35
-82

query I rowsort
SELECT DISTINCT - 6 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-6

query I rowsort
SELECT + col2 * + 66 AS col1 FROM tab1
----
3564
3762
6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-197
SELECT - col1 DIV + 52 + ( - col0 ) AS col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-197
SELECT - col1 / + 52 + ( - col0 ) AS col0 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT ALL - col0 * col0 + - tab1.col1 + col2 AS col1 FROM tab1
----
-4049
-6317
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-199
SELECT col2 * 82 + + col2 DIV col2 FROM tab1 AS cor0
----
4429
4675
7873

skipif mysql # not compatible
query I rowsort label-199
SELECT col2 * 82 + + col2 / col2 FROM tab1 AS cor0
----
4429
4675
7873

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-200
SELECT + col1 * CAST( NULL AS SIGNED ) + + col2 * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-200
SELECT + col1 * CAST ( NULL AS INTEGER ) + + col2 * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + - tab2.col2 * col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT ALL 39 + cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e571980a10ffc1527379e13c1a33e52a

query I rowsort
SELECT ALL + col0 + 78 + + col0 AS col1 FROM tab2 AS cor0
----
234
236
92

query I rowsort
SELECT - col0 + - 62 * + col2 AS col0 FROM tab2 AS cor0
----
-1681
-1690
-2435

query I rowsort
SELECT - ( 61 ) + col1 FROM tab0 AS cor0
----
25
30
36

query I rowsort
SELECT ALL + - 25 + - col0 * - col1 * 69 AS col2 FROM tab2 AS cor0
----
14948
317513
92642

query I rowsort
SELECT 22 + col1 FROM tab1 AS cor0
----
32
35
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-208
SELECT DISTINCT - + ( - col0 ) * - col2 - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-208
SELECT DISTINCT - + ( - col0 ) * - col2 - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-209
SELECT DISTINCT 91 * + cor0.col2 + col0 DIV col0 col1 FROM tab0 AS cor0
----
3004
7463
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-209
SELECT DISTINCT 91 * + cor0.col2 + col0 / col0 col1 FROM tab0 AS cor0
----
3004
7463
92

query I rowsort
SELECT DISTINCT + 14 * col2 * + cor0.col1 - + col0 FROM tab2 AS cor0
----
11711
21398
8965

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 40 * - cor0.col0 col2 FROM tab0 AS cor0
----
-1303
-3469
-874

query I rowsort
SELECT ALL - + 88 + + 5 AS col2 FROM tab0 AS cor0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT - col2 * - col2 * + col2 + ( + col2 ) FROM tab0 AS cor0
----
2
35970
551450

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-214
SELECT ALL + CAST( + col2 AS SIGNED ) * - col0 + 19 + + col1 * - col1 AS col1 FROM tab0 cor0
----
-15560
-8169
-9425

skipif mysql # not compatible
query I rowsort label-214
SELECT ALL + CAST ( + col2 AS INTEGER ) * - col0 + 19 + + col1 * - col1 AS col1 FROM tab0 cor0
----
-15560
-8169
-9425

query I rowsort
SELECT tab0.col2 * 26 FROM tab0, tab2 cor0
----
9 values hashing to 461c22d854be0001e8f8005306ff5d99

query I rowsort
SELECT DISTINCT col1 * - col0 * - col1 AS col2 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT ALL - ( - col1 ) * - tab0.col1 * tab0.col2 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL col0 + col2 * + col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT 58 AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT - 47 * + col1 FROM tab1 cor0
----
-1222
-470
-611

onlyif mysql # use DIV operator for integer division
query I rowsort label-221
SELECT DISTINCT col1 DIV ( + 97 * col1 ) + col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-221
SELECT DISTINCT col1 / ( + 97 * col1 ) + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col0 * 40 + - col1 AS col1 FROM tab2 cor0
----
-311
-3177
-3179

query I rowsort
SELECT - col1 * + col1 + 22 FROM tab2 AS cor0
----
-267
-3459
-939

query I rowsort
SELECT DISTINCT - col0 + + ( 25 ) AS col2 FROM tab2 AS cor0
----
-53
-54
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-225
SELECT DISTINCT + + cor0.col1 * + col0 DIV - col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-225
SELECT DISTINCT + + cor0.col1 * + col0 / - col0 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-226
SELECT + - col0 DIV cor0.col0 + + col0 AS col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-226
SELECT + - col0 / cor0.col0 + + col0 AS col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT cor0.col2 * CAST ( 55 + - col0 AS REAL ) FROM tab2 AS cor0
----
-598
-912
1296

query I rowsort
SELECT col1 + ( - 73 ) * - col2 AS col0 FROM tab2 AS cor0
----
1957
2002
2791

query I rowsort
SELECT ALL - col1 + col1 * - col1 * + col0 FROM tab1 AS cor0
----
-13533
-2054
-6410

query I rowsort
SELECT DISTINCT + col1 * col0 * 13 FROM tab2
----
17459
2821
59826

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 + col1 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + col0 + col2 * + 95 FROM tab2 AS cor0
----
2548
2572
3689

query I rowsort
SELECT ALL + col1 + 6 FROM tab1 AS cor0
----
16
19
32

query I rowsort
SELECT DISTINCT ( 46 ) AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
46

query I rowsort
SELECT - - col1 + + col2 * col1 AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - 76 * col0 + 62 AS col2 FROM tab0 AS cor0
----
-1762
-2598
-6702

query I rowsort
SELECT - col1 + cor0.col2 - col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - - 20 * + col1 + - 80 FROM tab1 AS cor0
----
120
180
440

onlyif mysql # use DIV operator for integer division
query I rowsort label-239
SELECT DISTINCT col2 * col2 + + ( + cor0.col1 ) + + col2 DIV ( + col0 ) FROM tab0 AS cor0
----
1176
6815
98

skipif mysql # not compatible
query I rowsort label-239
SELECT DISTINCT col2 * col2 + + ( + cor0.col1 ) + + col2 / ( + col0 ) FROM tab0 AS cor0
----
1176
6815
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 * col0 + - 60 * - col1 col0 FROM tab2 AS cor0
----
-2544
-5221
1811

onlyif mysql # use DIV operator for integer division
query I rowsort label-241
SELECT col1 DIV - cor0.col1 + col2 + col2 FROM tab1 AS cor0
----
107
113
191

skipif mysql # not compatible
query I rowsort label-241
SELECT col1 / - cor0.col1 + col2 + col2 FROM tab1 AS cor0
----
107
113
191

onlyif mysql # use DIV operator for integer division
query I rowsort label-242
SELECT col0 * + col2 - - col0 DIV + col0 AS col1 FROM tab1 cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-242
SELECT col0 * + col2 - - col0 / + col0 AS col1 FROM tab1 cor0
----
163
3649
7681

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 73 col0 FROM tab0, tab1 AS cor0
----
73

query I rowsort
SELECT tab0.col0 * + tab0.col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * + col0 + - col1 + - col1 * col0 FROM tab0
----
-16111
-2726
-4717

onlyif mysql # use DIV operator for integer division
query I rowsort label-246
SELECT ALL ( + col0 ) + - ( + col2 ) DIV col2 AS col2 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-246
SELECT ALL ( + col0 ) + - ( + col2 ) / col2 AS col2 FROM tab1
----
2
63
79

query I rowsort
SELECT ( + col2 * col2 ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 75 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-249
SELECT DISTINCT 0 DIV col0 AS col0 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-249
SELECT DISTINCT 0 / col0 AS col0 FROM tab2
----
0

query I rowsort
SELECT - + 98 AS col2 FROM tab1 AS cor0
----
-98
-98
-98

query I rowsort
SELECT ALL 7 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT 12 + + tab0.col1 * ( 89 * - col0 ) FROM tab0
----
-183684
-302143
-720799

query I rowsort
SELECT + tab0.col1 * - col1 * col1 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT ALL col2 * 20 AS col2 FROM tab2
----
520
540
760

query I rowsort
SELECT col1 + ( - col2 ) * col2 FROM tab2
----
-1427
-617
-698

query I rowsort
SELECT ALL + - 13 * + col1 FROM tab1 AS cor0
----
-130
-169
-338

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) + col2 * col1 col0 FROM tab2 AS cor0
----
1560
684
864

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

query I rowsort
SELECT ALL - col2 * - col1 + col0 + - col1 * 87 FROM tab2 AS cor0
----
-1853
-3521
-754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-260
SELECT ALL + CAST( + 29 AS SIGNED ) + col1 AS col0 FROM tab1 AS cor0
----
39
42
55

skipif mysql # not compatible
query I rowsort label-260
SELECT ALL + CAST ( + 29 AS INTEGER ) + col1 AS col0 FROM tab1 AS cor0
----
39
42
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 59 + + col1 col0 FROM tab0 AS cor0
----
145
150
156

query I rowsort
SELECT DISTINCT - cor0.col2 + - col0 AS col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT - col2 * 83 - col2 AS col0 FROM tab1 cor0
----
-4536
-4788
-8064

query I rowsort
SELECT - cor0.col2 * col1 - - col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT 57 * - 38 FROM tab2 AS cor0
----
-2166

query I rowsort
SELECT DISTINCT - ( 76 ) + col0 + - col2 FROM tab0 AS cor0
----
-42
-69
-85

query I rowsort
SELECT ALL - col1 + 9 * - cor0.col0 FROM tab0 AS cor0
----
-302
-412
-892

query I rowsort
SELECT 57 * col0 FROM tab1 cor0
----
171
3648
4560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + 28 col0 FROM tab0 AS cor0
----
2296
28
924

query I rowsort
SELECT ALL - 47 * col2 FROM tab2
----
-1222
-1269
-1786

query I rowsort
SELECT DISTINCT + ( col2 + + tab1.col2 ) * + col1 FROM tab1
----
1140
2496
2808

query I rowsort
SELECT DISTINCT + 53 * - ( col0 * + 66 ) AS col1 FROM tab0
----
-122430
-311322
-83952

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-273
SELECT ALL + CAST( NULL AS SIGNED ) - cor0.col0 * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT 85 FROM tab1, tab2 AS cor0
----
85

query I rowsort
SELECT ALL - col1 * + ( + col1 + tab0.col0 ) AS col1 FROM tab0
----
-12804
-16380
-9460

query I rowsort
SELECT - - col1 + + cor0.col0 - col1 * col1 AS col1 FROM tab0 AS cor0
----
-7286
-8101
-9277

onlyif mysql # use DIV operator for integer division
query I rowsort label-277
SELECT + 59 DIV - cor0.col0 + + col1 * + col1 * col0 AS col0 FROM tab0 AS cor0
----
177502
329314
737009

skipif mysql # not compatible
query I rowsort label-277
SELECT + 59 / - cor0.col0 + + col1 * + col1 * col0 AS col0 FROM tab0 AS cor0
----
177502
329314
737009

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-278
SELECT DISTINCT + col1 * CAST( + col0 AS SIGNED ) + col0 FROM tab0 AS cor0
----
2088
3430
8188

skipif mysql # not compatible
query I rowsort label-278
SELECT DISTINCT + col1 * CAST ( + col0 AS INTEGER ) + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + - col0 * - cor0.col0 + col2 AS col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + col2 + col2 * ( - col0 ) FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT + cor0.col2 + + 66 FROM tab2 AS cor0
----
104
92
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-282
SELECT + + col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-282
SELECT + + col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * + 21 + - 19 AS col0 FROM tab2 AS cor0
----
-1657
-166
-1678

onlyif mysql # use DIV operator for integer division
query I rowsort label-284
SELECT - col2 * 98 DIV + col0 FROM tab1 AS cor0
----
-117
-1764
-87

skipif mysql # not compatible
query I rowsort label-284
SELECT - col2 * 98 / + col0 FROM tab1 AS cor0
----
-117
-1764
-87

query I rowsort
SELECT cor0.col0 + + ( 61 + col1 ) FROM tab0 AS cor0
----
171
193
241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * ( col1 ) + - col0 col2 FROM tab1 AS cor0
----
-1120
-704
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 6 * col0 col2 FROM tab1 AS cor0
----
18
384
480

query I rowsort
SELECT DISTINCT - 95 * + 94 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2 AS cor2
----
-8930

query I rowsort
SELECT cor0.col1 + + 76 * col2 FROM tab1 cor0
----
4130
4342
7309

query I rowsort
SELECT - + 2 * + col1 FROM tab2 AS cor0
----
-118
-34
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 * + 64 col1 FROM tab1
----
3456
3648
6144

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col2 FROM tab2
----
52
54
76

query I rowsort
SELECT - 21 - tab0.col1 FROM tab0
----
-107
-112
-118

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 * 95 col1 FROM tab2
----
696
7469
7522

query I rowsort
SELECT - tab1.col2 + + tab1.col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-296
SELECT - col0 DIV col0 - + ( + col0 * - col0 ) AS col2 FROM tab2
----
48
6083
6240

skipif mysql # not compatible
query I rowsort label-296
SELECT - col0 / col0 - + ( + col0 * - col0 ) AS col2 FROM tab2
----
48
6083
6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col1 + + cor0.col0 col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT ALL + tab0.col1 + col2 AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT 32 * + col2 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT + + col1 + ( + col1 ) FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL - col0 * 28 + col0 + col1 * - col2 FROM tab2 AS cor0
----
-1026
-2779
-3640

query I rowsort
SELECT ALL + col2 + + 96 - col1 FROM tab1 AS cor0
----
124
143
179

query I rowsort
SELECT ALL + - col0 + - col1 + - 15 FROM tab0 AS cor0
----
-125
-147
-195

onlyif mysql # use DIV operator for integer division
query I rowsort label-304
SELECT DISTINCT + cor0.col0 * - 7 + - col1 DIV - col0 FROM tab0 AS cor0
----
-165
-243
-622

skipif mysql # not compatible
query I rowsort label-304
SELECT DISTINCT + cor0.col0 * - 7 + - col1 / - col0 FROM tab0 AS cor0
----
-165
-243
-622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col2 + - col2 col1 FROM tab2 cor0
----
-52
-54
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + ( col2 ) col0 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-307
SELECT ( col1 ) * CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-307
SELECT ( col1 ) * CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-308
SELECT - cor0.col0 * - CAST( col1 AS SIGNED ) + + cor0.col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

skipif mysql # not compatible
query I rowsort label-308
SELECT - cor0.col0 * - CAST ( col1 AS INTEGER ) + + cor0.col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT + col2 * - 77 * col1 FROM tab0 AS cor0
----
-218526
-574574
-7469

query I rowsort
SELECT ALL + col2 * - 65 + - cor0.col2 AS col1 FROM tab2 cor0
----
-1716
-1782
-2508

onlyif mysql # use DIV operator for integer division
query I rowsort label-311
SELECT 16 DIV col2 FROM tab0 AS cor0
----
0
0
16

skipif mysql # not compatible
query I rowsort label-311
SELECT 16 / col2 FROM tab0 AS cor0
----
0
0
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-312
SELECT + + CAST( + col1 AS SIGNED ) DIV - col2 + col2 * col1 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-312
SELECT + + CAST ( + col1 AS INTEGER ) / - col2 + col2 * col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-313
SELECT - + col0 + col2 DIV col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-313
SELECT - + col0 + col2 / col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL 97 - + 30 * col2 FROM tab2
----
-1043
-683
-713

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

query I rowsort
SELECT + 18 + + col0 * col1 AS col0 FROM tab2 AS cor0
----
1361
235
4620

query I rowsort
SELECT DISTINCT ( col1 ) + + col0 * col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ( cor0.col1 ) * col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col0 * - col1 AS col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL + ( + col1 ) * + col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - ( col2 ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - - 74 + - col2 * 45 FROM tab1 AS cor0
----
-2356
-2491
-4246

query I rowsort
SELECT 75 + col0 * - col2 FROM tab2 AS cor0
----
-114
-1953
-2927

query I rowsort
SELECT DISTINCT + col1 * col2 + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-325
SELECT 58 DIV - 99 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-325
SELECT 58 / - 99 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - - 77 * col0 + + col2 AS col2 FROM tab2 cor0
----
566
6032
6121

query I rowsort
SELECT ALL cor0.col2 * col0 + + col0 + - col1 AS col2 FROM tab1 cor0
----
139
3702
7747

query I rowsort
SELECT - ( cor0.col2 ) + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL + - col0 * + col2 + - col0 * col0 FROM tab2 AS cor0
----
-238
-8112
-9243

query I rowsort
SELECT + 63 * col1 + - col0 FROM tab1 AS cor0
----
1635
566
739

query I rowsort
SELECT 84 - - col1 FROM tab0 AS cor0
----
170
175
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - col1 * col0 col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 * - col0 col0 FROM tab0 AS cor0
----
-2328
-3395
-8633

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + - col1 * col0 * col2 col1 FROM tab1 AS cor0
----
-36490
-4238
-99853

query I rowsort
SELECT cor0.col0 * + col2 + col1 + + col2 AS col2 FROM tab2 AS cor0
----
2113
247
3057

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) AS col2 FROM tab0, tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-338
SELECT DISTINCT CAST( col1 AS SIGNED ) DIV - col1 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-338
SELECT DISTINCT CAST ( col1 AS INTEGER ) / - col1 FROM tab2
----
-1

query I rowsort
SELECT + ( - col2 ) * col0 + + tab1.col2 * - col2 FROM tab1
----
-16896
-3078
-6897

query I rowsort
SELECT DISTINCT + - 34 * + col0 AS col0 FROM tab1 AS cor0
----
-102
-2176
-2720

query I rowsort
SELECT ALL + 64 * - col0 FROM tab1 AS cor0
----
-192
-4096
-5120

onlyif mysql # use DIV operator for integer division
query I rowsort label-342
SELECT - + col0 + col2 DIV cor0.col1 FROM tab1 cor0
----
-1
-59
-73

skipif mysql # not compatible
query I rowsort label-342
SELECT - + col0 + col2 / cor0.col1 FROM tab1 cor0
----
-1
-59
-73

query I rowsort
SELECT - col1 + + col1 * col2 AS col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-345
SELECT - col0 * col0 DIV - col1 + - col2 FROM tab1
----
-54
352
396

skipif mysql # not compatible
query I rowsort label-345
SELECT - col0 * col0 / - col1 + - col2 FROM tab1
----
-54
352
396

query I rowsort
SELECT - cor1.col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT DISTINCT ( col0 ) * col1 + - col0 * + cor0.col2 FROM tab1 cor0
----
-3008
-6640
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-348
SELECT ALL + col2 DIV col0 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-348
SELECT ALL + col2 / col0 AS col1 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-349
SELECT - col1 - + col2 * 53 DIV + col0 FROM tab0
----
-139
-158
-98

skipif mysql # not compatible
query I rowsort label-349
SELECT - col1 - + col2 * 53 / + col0 FROM tab0
----
-139
-158
-98

query I rowsort
SELECT + 48 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ( + 94 * col1 ) + col0 AS col2 FROM tab1
----
1004
1302
2447

query I rowsort
SELECT tab0.col2 + tab0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 0a9ba7ddbb78279db2d78308414e03c9

onlyif mysql # use DIV operator for integer division
query I rowsort label-353
SELECT DISTINCT 12 DIV 69 AS col0 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-353
SELECT DISTINCT 12 / 69 AS col0 FROM tab0
----
0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-355
SELECT - + col0 + + ( col1 ) DIV - col0 FROM tab1 AS cor0
----
-11
-64
-80

skipif mysql # not compatible
query I rowsort label-355
SELECT - + col0 + + ( col1 ) / - col0 FROM tab1 AS cor0
----
-11
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-356
SELECT DISTINCT - ( + col1 ) DIV col2 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-356
SELECT DISTINCT - ( + col1 ) / col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + cor0.col0 * + cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to bc669a3cc969c7619ebcffb5400ba0ba

onlyif mysql # use DIV operator for integer division
query I rowsort label-358
SELECT + col2 DIV 63 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-358
SELECT + col2 / 63 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT ALL - + ( + 68 ) + - col1 FROM tab1 AS cor0
----
-78
-81
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-360
SELECT DISTINCT CAST( 51 AS SIGNED ) FROM tab1 AS cor0
----
51

skipif mysql # not compatible
query I rowsort label-360
SELECT DISTINCT CAST ( 51 AS INTEGER ) FROM tab1 AS cor0
----
51

query I rowsort
SELECT DISTINCT - col0 * 72 AS col2 FROM tab0
----
-1728
-2520
-6408

query I rowsort
SELECT + - col1 + - 59 * - col2 AS col0 FROM tab0 AS cor0
----
-38
1861
4747

query I rowsort
SELECT ALL - - col1 + 54 AS col2 FROM tab2 AS cor0
----
113
71
85

query I rowsort
SELECT DISTINCT col0 + 4 * col1 AS col1 FROM tab0 AS cor0
----
368
423
453

query I rowsort
SELECT ALL col1 * + 19 + + 74 FROM tab2 AS cor0
----
1195
397
663

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-366
SELECT ALL + + col0 + + CAST( + 96 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
120
131
185

skipif mysql # not compatible
query I rowsort label-366
SELECT ALL + + col0 + + CAST ( + 96 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
120
131
185

query I rowsort
SELECT DISTINCT - col1 * cor0.col0 - 85 AS col0 FROM tab0 AS cor0
----
-2149
-3480
-8184

query I rowsort
SELECT - cor0.col0 * ( cor0.col2 ) + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT 87 * 79 + col2 AS col2 FROM tab0 AS cor0
----
6874
6906
6955

query I rowsort
SELECT ALL + 35 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
-293
-359
-856

query I rowsort
SELECT DISTINCT - col2 * + cor0.col2 + + col0 * 89 FROM tab2 AS cor0
----
-106
5587
6266

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-372
SELECT - CAST( 88 AS SIGNED ) * col2 + + col1 FROM tab0 AS cor0
----
-2818
-7125
9

skipif mysql # not compatible
query I rowsort label-372
SELECT - CAST ( 88 AS INTEGER ) * col2 + + col1 FROM tab0 AS cor0
----
-2818
-7125
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-373
SELECT ALL col2 * CAST( 59 AS SIGNED ) + col1 FROM tab2
----
1593
1624
2259

skipif mysql # not compatible
query I rowsort label-373
SELECT ALL col2 * CAST ( 59 AS INTEGER ) + col1 FROM tab2
----
1593
1624
2259

query I rowsort
SELECT + - 7 - 32 FROM tab0 AS cor0
----
-39
-39
-39

query I rowsort
SELECT - - 59 - col0 FROM tab0 AS cor0
----
-30
24
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-376
SELECT DISTINCT + col0 * - col1 + - col2 DIV cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-376
SELECT DISTINCT + col0 * - col1 + - col2 / cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - - col1 + col1 AS col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - - col2 * + col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-379
SELECT ALL - col2 DIV + tab2.col1 col2 FROM tab2
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-379
SELECT ALL - col2 / + tab2.col1 col2 FROM tab2
----
-2
0
0

query I rowsort
SELECT ALL col2 * + col1 * col0 AS col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT 75 AS col0 FROM tab1
----
75

query I rowsort
SELECT DISTINCT - tab2.col1 * - tab2.col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + 89 + col0 * - 75 FROM tab2
----
-436
-5761
-5836

query I rowsort
SELECT ALL - 7 FROM tab0, tab1 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT DISTINCT + col0 * + col0 - - cor0.col1 AS col0 FROM tab1 cor0
----
35
4106
6413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-386
SELECT - + col0 * + CAST( col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-386
SELECT - + col0 * + CAST ( col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col0 * + col1 + + cor0.col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL + col0 * ( + 63 ) * - col0 FROM tab2 AS cor0
----
-3087
-383292
-393183

query I rowsort
SELECT DISTINCT tab0.col2 + 11 FROM tab0, tab0 AS cor0
----
12
44
93

query I rowsort
SELECT + 10 * 0 * - cor0.col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-391
SELECT DISTINCT col2 DIV - ( col2 ) AS col0 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-391
SELECT DISTINCT col2 / - ( col2 ) AS col0 FROM tab0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-392
SELECT ALL CAST( 35 AS SIGNED ) AS col2 FROM tab0
----
35
35
35

skipif mysql # not compatible
query I rowsort label-392
SELECT ALL CAST ( 35 AS INTEGER ) AS col2 FROM tab0
----
35
35
35

query I rowsort
SELECT - + 6 * - col0 AS col1 FROM tab1 AS cor0
----
18
384
480

onlyif mysql # use DIV operator for integer division
query I rowsort label-394
SELECT + col1 * col2 DIV 4 + col2 FROM tab1 AS cor0
----
199
405
408

skipif mysql # not compatible
query I rowsort label-394
SELECT + col1 * col2 / 4 + col2 FROM tab1 AS cor0
----
199
405
408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 45 col1 FROM tab1
----
-45
-45
-45

query I rowsort
SELECT DISTINCT 4 AS col1 FROM tab0 AS cor0
----
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-397
SELECT + 65 * col0 DIV 71 + + 26 * col0 AS col2 FROM tab0 AS cor0
----
2395
645
942

skipif mysql # not compatible
query I rowsort label-397
SELECT + 65 * col0 / 71 + + 26 * col0 AS col2 FROM tab0 AS cor0
----
2395
645
942

query I rowsort
SELECT - - 50 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

onlyif mysql # use DIV operator for integer division
query I rowsort label-399
SELECT - 98 DIV cor0.col1 + + col2 DIV + 67 FROM tab1 AS cor0
----
-3
-6
-9

skipif mysql # not compatible
query I rowsort label-399
SELECT - 98 / cor0.col1 + + col2 / + 67 FROM tab1 AS cor0
----
-3
-6
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-400
SELECT + - col0 * col0 + + CAST( col2 AS SIGNED ) DIV col2 FROM tab0 AS cor0
----
-1224
-575
-7920

skipif mysql # not compatible
query I rowsort label-400
SELECT + - col0 * col0 + + CAST ( col2 AS INTEGER ) / col2 FROM tab0 AS cor0
----
-1224
-575
-7920

query I rowsort
SELECT + 64 * + col0 + cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
13158
2337
4374

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - col0 * 42 col0 FROM tab1 AS cor0
----
-2631
-3264
-72

query I rowsort
SELECT - - col1 + + col0 * + 35 AS col2 FROM tab1 AS cor0
----
131
2250
2813

query I rowsort
SELECT 87 * col0 * + col0 FROM tab1 AS cor0
----
356352
556800
783

query I rowsort
SELECT - 13 * + col2 FROM tab0 AS cor0
----
-1066
-13
-429

query I rowsort
SELECT DISTINCT - + col0 * + col2 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - + 44 AS col2 FROM tab1 AS cor0
----
-44
-44
-44

query I rowsort
SELECT ALL cor0.col2 + cor0.col1 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + + col1 col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col0 * col0 + tab1.col2 FROM tab1
----
4153
63
6496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

onlyif mysql # use DIV operator for integer division
query I rowsort label-412
SELECT DISTINCT + col0 - + col1 DIV - col0 AS col2 FROM tab1
----
11
64
80

skipif mysql # not compatible
query I rowsort label-412
SELECT DISTINCT + col0 - + col1 / - col0 AS col2 FROM tab1
----
11
64
80

query I rowsort
SELECT ALL ( - 23 ) - col2 FROM tab1
----
-119
-77
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-414
SELECT + 70 DIV + col0 + col2 FROM tab0 AS cor0
----
3
35
82

skipif mysql # not compatible
query I rowsort label-414
SELECT + 70 / + col0 + col2 FROM tab0 AS cor0
----
3
35
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-415
SELECT 5 * + col2 + CAST( NULL AS SIGNED ) * + 51 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-415
SELECT 5 * + col2 + CAST ( NULL AS INTEGER ) * + 51 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-416
SELECT - + col1 DIV + col0 + 65 * - col0 AS col0 FROM tab2 AS cor0
----
-459
-5070
-5135

skipif mysql # not compatible
query I rowsort label-416
SELECT - + col1 / + col0 + 65 * - col0 AS col0 FROM tab2 AS cor0
----
-459
-5070
-5135

query I rowsort
SELECT DISTINCT - 57 + - col2 * + 30 AS col0 FROM tab0 AS cor0
----
-1047
-2517
-87

query I rowsort
SELECT DISTINCT - 79 * col2 + 51 AS col1 FROM tab1 AS cor0
----
-4215
-4452
-7533

query I rowsort
SELECT + - 10 + - col2 FROM tab2 AS cor0
----
-36
-37
-48

query I rowsort
SELECT + + cor0.col2 + + col0 * col1 - + 32 FROM tab0 AS cor0
----
2065
3364
8149

onlyif mysql # use DIV operator for integer division
query I rowsort label-421
SELECT + - ( - cor0.col1 ) DIV 57 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-421
SELECT + - ( - cor0.col1 ) / 57 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-422
SELECT col1 * - col1 - + col1 DIV 35 col1 FROM tab2 AS cor0
----
-289
-3482
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-422
SELECT col1 * - col1 - + col1 / 35 col1 FROM tab2 AS cor0
----
-289
-3482
-961

query I rowsort
SELECT DISTINCT - + 7 * cor0.col2 AS col1 FROM tab1 AS cor0
----
-378
-399
-672

query I rowsort
SELECT DISTINCT + col1 * + ( col2 ) FROM tab2
----
1534
646
837

query I rowsort
SELECT + col1 * + tab2.col2 - + col0 FROM tab2
----
1456
567
830

query I rowsort
SELECT - 62 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT + - col1 * + ( + col0 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + 64 * 25 FROM tab1 cor0
----
1600
1600
1600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-429
SELECT ALL - CAST( 66 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
2178
5412
66

skipif mysql # not compatible
query I rowsort label-429
SELECT ALL - CAST ( 66 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
2178
5412
66

query I rowsort
SELECT + + ( + 10 ) AS col2 FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT + + 33 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT + cor1.col2 + - cor2.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 6a4b01aff43883f6dbe6655de6f7a1d0

query I rowsort
SELECT ALL + - col2 + 32 * col1 AS col2 FROM tab0 AS cor0
----
2719
2830
3103

query I rowsort
SELECT ALL - col2 + - col0 + - col1 AS col2 FROM tab0 AS cor0
----
-133
-143
-262

query I rowsort
SELECT DISTINCT + 23 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
23

query I rowsort
SELECT DISTINCT + col1 + - col1 * cor0.col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT - + col0 + 7 FROM tab1 AS cor0
----
-57
-73
4

query I rowsort
SELECT ALL - - col1 * - 81 FROM tab1 cor0
----
-1053
-2106
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col0 ) col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + - 51 * col1 AS col2 FROM tab2 AS cor0
----
-1581
-3009
-867

query I rowsort
SELECT ALL - col1 * 37 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT 43 * + col0 FROM tab2 AS cor0
----
301
3354
3397

onlyif mysql # use DIV operator for integer division
query I rowsort label-443
SELECT DISTINCT - col0 + + col1 DIV - col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-443
SELECT DISTINCT - col0 + + col1 / - col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-444
SELECT + 7 DIV + col0 FROM tab1 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-444
SELECT + 7 / + col0 FROM tab1 AS cor0
----
0
0
2

query I rowsort
SELECT ALL + col0 + 45 AS col2 FROM tab1 AS cor0
----
109
125
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col0 ) * - col0 col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL col0 * col0 * + col1 AS col1 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT DISTINCT - col0 * col1 * 58 AS col0 FROM tab2 AS cor0
----
-12586
-266916
-77894

query I rowsort
SELECT ( - col2 ) + col0 AS col1 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - 17 AS col1 FROM tab1 AS cor0
----
-17

onlyif mysql # use DIV operator for integer division
query I rowsort label-451
SELECT + col2 DIV - col2 + + tab0.col0 AS col2 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-451
SELECT + col2 / - col2 + + tab0.col0 AS col2 FROM tab0
----
23
34
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-452
SELECT + col2 DIV - ( - ( col2 ) ) + 2 AS col0 FROM tab1 AS cor0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-452
SELECT + col2 / - ( - ( col2 ) ) + 2 AS col0 FROM tab1 AS cor0
----
3
3
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-453
SELECT - col0 + 56 DIV col0 AS col1 FROM tab0 AS cor0
----
-22
-34
-89

skipif mysql # not compatible
query I rowsort label-453
SELECT - col0 + 56 / col0 AS col1 FROM tab0 AS cor0
----
-22
-34
-89

query I rowsort
SELECT DISTINCT + col0 + - cor0.col0 * - col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT col0 * 38 + - col1 FROM tab0 AS cor0
----
1233
3291
826

onlyif mysql # use DIV operator for integer division
query I rowsort label-456
SELECT ALL cor0.col0 + ( col2 ) DIV + col2 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-456
SELECT ALL cor0.col0 + ( col2 ) / + col2 FROM tab1 AS cor0
----
4
65
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-457
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-457
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + ( col1 ) col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL + - cor0.col2 * - cor0.col2 AS col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT - + col0 + 37 * - 1 FROM tab2 AS cor0
----
-115
-116
-44

query I rowsort
SELECT ALL col1 + + col2 + col2 AS col0 FROM tab1
----
124
134
205

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 35 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT - 94 * - cor0.col2 * col2 AS col0 FROM tab2 AS cor0
----
135736
63544
68526

onlyif mysql # use DIV operator for integer division
query I rowsort label-464
SELECT DISTINCT - col1 + + col1 DIV tab0.col1 + col0 AS col2 FROM tab0
----
-1
-61

skipif mysql # not compatible
query I rowsort label-464
SELECT DISTINCT - col1 + + col1 / tab0.col1 + col0 AS col2 FROM tab0
----
-1
-61

query I rowsort
SELECT ALL tab2.col2 * 26 FROM tab2
----
676
702
988

query I rowsort
SELECT + col1 + - col2 * col1 * + col0 FROM tab0
----
-3298
-664027
-68026

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-467
SELECT - CAST( 94 AS SIGNED ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

skipif mysql # not compatible
query I rowsort label-467
SELECT - CAST ( 94 AS INTEGER ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

query I rowsort
SELECT col0 FROM tab0 WHERE ( NULL ) BETWEEN ( NULL ) AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL IN ( - col1 * col1 )
----

query I rowsort
SELECT DISTINCT col0 FROM tab0 WHERE NOT NULL BETWEEN ( col1 * + col0 * - col1 ) AND NULL
----

query I rowsort
SELECT ALL - - cor0.col1 * + col0 * col0 - - col1 FROM tab2 AS cor0
----
106114
1550
359015

query I rowsort
SELECT ALL - col0 * col2 + col0 * col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT - col2 * col0 FROM tab2 WHERE NOT col0 >= ( NULL )
----

query I rowsort
SELECT - col1 - - col0 AS col1 FROM tab2
----
-24
19
62

query III rowsort
SELECT * FROM tab0 WHERE col2 IN ( - tab0.col1 + + col1 * + col2 )
----

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 WHERE - col1 + + col1 + col1 * col0 <> NULL
----

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT col1 + col2 IN ( col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - - col2 + - col1 * - col0 FROM tab2 cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-482
SELECT ALL - - col2 + col0 DIV cor0.col2 FROM tab0 AS cor0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-482
SELECT ALL - - col2 + col0 / cor0.col2 FROM tab0 AS cor0
----
33
36
83

query I rowsort
SELECT DISTINCT + col1 + + cor0.col2 + col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT ALL - + col1 * col1 - col1 * col2 FROM tab0 AS cor0
----
-10234
-15743
-9506

query I rowsort
SELECT + col2 * - col2 + col1 * col2 AS col1 FROM tab1 AS cor0
----
-1512
-2679
-7968

query I rowsort
SELECT ALL - - col2 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + + cor0.col2 - col0 AS col1 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-488
SELECT ALL + - col1 DIV cor0.col2 + col0 * + col2 AS col2 FROM tab0 AS cor0
----
-62
7297
790

skipif mysql # not compatible
query I rowsort label-488
SELECT ALL + - col1 / cor0.col2 + col0 * + col2 AS col2 FROM tab0 AS cor0
----
-62
7297
790

query I rowsort
SELECT ALL + col1 + - col0 AS col1 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL - tab2.col0 * + col1 + tab2.col0 AS col2 FROM tab2
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-491
SELECT DISTINCT tab2.col2 DIV + col0 + col1 AS col1 FROM tab2
----
17
34
59

skipif mysql # not compatible
query I rowsort label-491
SELECT DISTINCT tab2.col2 / + col0 + col1 AS col1 FROM tab2
----
17
34
59

query I rowsort
SELECT + - cor0.col1 + - col1 AS col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT + + col2 + col2 * 9 * col1 AS col1 FROM tab2 AS cor0
----
13832
5852
7560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-494
SELECT col2 + - CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-494
SELECT col2 + - CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + - col1 * - 3 FROM tab0 cor0
----
258
273
291

query I rowsort
SELECT ALL col1 * - col1 * col2 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT 65 * col0 AS col1 FROM tab1
----
195
4160
5200

query I rowsort
SELECT 75 * + col0 FROM tab2
----
525
5850
5925

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) NOT IN ( col2 * + col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) IN ( - tab0.col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-501
SELECT - col2 DIV col2 - col0 FROM tab0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-501
SELECT - col2 / col2 - col0 FROM tab0
----
-25
-36
-90

query I rowsort
SELECT ALL + col2 + col0 - col2 AS col1 FROM tab1
----
3
64
80

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL < ( - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-504
SELECT DISTINCT col1 DIV tab0.col1 AS col0 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-504
SELECT DISTINCT col1 / tab0.col1 AS col0 FROM tab0
----
1

query I rowsort
SELECT col2 / + col0 + - col1 * col2 AS col0 FROM tab2 WHERE ( + col1 - col1 ) BETWEEN + col2 + + col2 AND ( NULL )
----

query I rowsort
SELECT - col2 + tab2.col1 - col2 AS col1 FROM tab2
----
-23
-59
7

query I rowsort
SELECT DISTINCT - tab0.col1 + + col0 FROM tab0 WHERE ( + col2 * col1 - col0 * col2 ) NOT IN ( col2 )
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-508
SELECT col1 DIV + tab0.col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-508
SELECT col1 / + tab0.col2 FROM tab0
----
1
2
97

query I rowsort
SELECT + col0 FROM tab1 WHERE NOT NULL IN ( - col1 )
----

query I rowsort
SELECT DISTINCT tab2.col2 * + col2 * + col1 + + col0 * - col2 FROM tab2
----
21546
22410
37856

onlyif mysql # use DIV operator for integer division
query I rowsort label-511
SELECT - col2 DIV col0 - - col0 * + col2 AS col1 FROM tab2
----
186
2028
3002

skipif mysql # not compatible
query I rowsort label-511
SELECT - col2 / col0 - - col0 * + col2 AS col1 FROM tab2
----
186
2028
3002

query I rowsort
SELECT DISTINCT + col2 * col1 + col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL + col0 + col2 FROM tab2 WHERE col0 / - col0 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT col1 * + col1 * - col2 - col2 * + col2 AS col1 FROM tab1
----
-25440
-39420
-8949

query I rowsort
SELECT ALL - col2 * col0 + tab2.col2 * col2 FROM tab2
----
-1352
-1558
540

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT + col1 * - col0 - col2 NOT BETWEEN ( NULL ) AND ( col0 * + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-517
SELECT - col1 * col0 DIV + col1 AS col0 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-517
SELECT - col1 * col0 / + col1 AS col0 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + col2 + + col1 + tab2.col1 FROM tab2
----
144
72
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-519
SELECT DISTINCT + col0 * - col0 DIV - col0 AS col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-519
SELECT DISTINCT + col0 * - col0 / - col0 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT col1 + col2 + + col2 AS col1 FROM tab2
----
111
85
93

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col1 * col0 <> NULL
----

query I rowsort
SELECT col1 * col1 * + col2 + col1 AS col2 FROM tab1
----
16237
36530
5710

onlyif mysql # use DIV operator for integer division
query I rowsort label-523
SELECT - col0 + 42 DIV tab0.col1 AS col1 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-523
SELECT - col0 + 42 / tab0.col1 AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + + cor0.col0 + - col2 * col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + 51 AS col2 FROM tab0 cor0
----
51

query I rowsort
SELECT ( col2 ) * cor0.col0 * 23 AS col2 FROM tab1 AS cor0
----
176640
3726
83904

query I rowsort
SELECT ALL - - ( + 46 ) FROM tab0 AS cor0
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 52 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + 32 col0 FROM tab0
----
-1120
-2848
-768

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-531
SELECT ALL - col0 * - CAST( col1 AS SIGNED ) AS col0 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-531
SELECT ALL - col0 * - CAST ( col1 AS INTEGER ) AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - col0 * col2 + ( + ( - col2 ) ) AS col1 FROM tab2 AS cor0
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-533
SELECT + col0 + + cor0.col0 DIV col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-533
SELECT + col0 + + cor0.col0 / col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT ALL + col2 * - col1 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL - 95 * col1 + cor0.col2 FROM tab0 cor0
----
-8137
-8563
-9214

onlyif mysql # use DIV operator for integer division
query I rowsort label-536
SELECT ALL - ( + col0 ) + 77 DIV ( - col0 ) AS col2 FROM tab2 AS cor0
----
-18
-78
-79

skipif mysql # not compatible
query I rowsort label-536
SELECT ALL - ( + col0 ) + 77 / ( - col0 ) AS col2 FROM tab2 AS cor0
----
-18
-78
-79

query I rowsort
SELECT ALL tab1.col1 * - col1 * tab1.col0 + - ( - col0 ) * col1 FROM tab1
----
-12480
-1950
-5760

skipif mysql # not compatible
query I rowsort
SELECT - col2 * + tab1.col2 - col1 * CAST ( - 68 AS REAL ) AS col0 FROM tab1
----
-1148
-2569
-8332

query I rowsort
SELECT + - 13 AS col1 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to d1ee13c6e23ea99b2cf17e8ca7cf45ee

query I rowsort
SELECT - 38 - - col2 * tab2.col0 FROM tab2
----
151
1990
2964

query I rowsort
SELECT DISTINCT + 77 * col2 * - col1 AS col0 FROM tab0
----
-218526
-574574
-7469

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col2 * col1 col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT col2 * - cor0.col1 + + ( col0 * - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
-1413
-4666
-7648

onlyif mysql # use DIV operator for integer division
query I rowsort label-544
SELECT + 46 DIV - cor0.col0 FROM tab2 AS cor0
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-544
SELECT + 46 / - cor0.col0 FROM tab2 AS cor0
----
-6
0
0

query I rowsort
SELECT DISTINCT 31 * - col0 FROM tab2 AS cor0
----
-217
-2418
-2449

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) + ( - ( - col0 ) ) col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL tab1.col0 + + col1 * - col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + col2 * cor0.col0 + - col1 AS col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT DISTINCT - col0 * + col0 + - ( col1 + col1 ) AS col0 FROM tab1 cor0
----
-4116
-61
-6426

query I rowsort
SELECT ALL + + col0 * - col0 + col1 FROM tab0 cor0
----
-1128
-490
-7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 + 75 col0 FROM tab1 AS cor0
----
4171
6475
84

query I rowsort
SELECT ALL col0 + + col2 AS col1 FROM tab0 cor0
----
171
36
57

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to d5761ba4e40f0c65536d1d3c9de4e566

query I rowsort
SELECT DISTINCT - - col2 * col1 + 63 AS col1 FROM tab0 AS cor0
----
160
2901
7525

query I rowsort
SELECT + col2 + 69 * col1 FROM tab2 AS cor0
----
1211
2166
4097

query I rowsort
SELECT - col0 * ( - 47 ) AS col2 FROM tab2 AS cor0
----
329
3666
3713

query I rowsort
SELECT - col2 * col0 + + cor0.col2 * col1 AS col2 FROM tab2 cor0
----
-2356
-494
648

query I rowsort
SELECT DISTINCT + col1 + col2 * col0 AS col2 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * ( - col2 ) col1 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-560
SELECT ALL - + col0 * - CAST( NULL AS SIGNED ) + - cor0.col0 FROM tab1 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL + cor0.col2 + - ( + ( col2 ) ) + cor0.col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT cor0.col2 - col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT col2 + - 93 FROM tab1 AS cor0
----
-36
-39
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-564
SELECT ALL - cor0.col0 * col0 DIV col1 col0 FROM tab2 AS cor0
----
-1
-103
-367

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-564
SELECT ALL - cor0.col0 * col0 / col1 col0 FROM tab2 AS cor0
----
-1
-103
-367

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - CAST ( + col2 AS REAL ) FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-566
SELECT DISTINCT ( col2 ) * + col2 - + CAST( NULL AS SIGNED ) * col0 * - col1 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-566
SELECT DISTINCT ( col2 ) * + col2 - + CAST ( NULL AS INTEGER ) * col0 * - col1 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 + ( - col1 ) FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - + col1 + 16 FROM tab1 cor0
----
-10
3
6

query I rowsort
SELECT DISTINCT + col1 - + col1 * + col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT 11 * - 7 * - col0 + ( + col0 ) * + col0 * 17 AS col1 FROM tab0 AS cor0
----
11640
141510
23520

query I rowsort
SELECT ALL col2 * col0 * col2 AS col2 FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-572
SELECT - - CAST( NULL AS SIGNED ) + + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-572
SELECT - - CAST ( NULL AS INTEGER ) + + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-573
SELECT DISTINCT - + ( cor0.col2 ) DIV + cor0.col0 + ( - col0 ) * - col1 col1 FROM tab0 AS cor0
----
2063
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-573
SELECT DISTINCT - + ( cor0.col2 ) / + cor0.col0 + ( - col0 ) * - col1 col1 FROM tab0 AS cor0
----
2063
3395
8099

query I rowsort
SELECT DISTINCT - 85 FROM tab0 cor0
----
-85

query I rowsort
SELECT ALL 78 * col1 AS col1 FROM tab0 cor0
----
6708
7098
7566

query I rowsort
SELECT 84 - - 64 * - col2 FROM tab1 cor0
----
-3372
-3564
-6060

query I rowsort
SELECT ALL + + cor0.col0 * col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + 24 - 88 FROM tab0 AS cor0
----
-64
-64
-64

query I rowsort
SELECT ALL - + col2 * - 9 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT ALL - 87 + + col0 AS col2 FROM tab2 AS cor0
----
-8
-80
-9

query I rowsort
SELECT ALL + col1 + 81 AS col1 FROM tab1 cor0
----
107
91
94

query I rowsort
SELECT ALL - col0 - cor0.col1 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT + + ( col0 ) + - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + col0 * + col2 * + 0 AS col2 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 27 + col1 * col1 col1 FROM tab2 AS cor0
----
262
3454
934

query I rowsort
SELECT DISTINCT + col0 + col1 + - ( col0 * + col0 ) FROM tab1 cor0
----
-4022
-6307
20

query I rowsort
SELECT ALL - 31 - col2 FROM tab1 AS cor0
----
-127
-85
-88

query I rowsort
SELECT ALL + + cor0.col2 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-589
SELECT + 94 * - col1 + CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
-1209
-2418
-930

skipif mysql # not compatible
query I rowsort label-589
SELECT + 94 * - col1 + CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
-1209
-2418
-930

query I rowsort
SELECT ALL + 91 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT cor0.col0 * - col1 + + cor0.col2 * - col1 FROM tab1 AS cor0
----
-1210
-1482
-2288

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 59 + - col0 col0 FROM tab0 AS cor0
----
-148
-83
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-594
SELECT + col2 DIV - ( col2 ) AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-594
SELECT + col2 / - ( col2 ) AS col1 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-595
SELECT + - CAST( + 45 AS SIGNED ) FROM tab2 AS cor0
----
-45
-45
-45

skipif mysql # not compatible
query I rowsort label-595
SELECT + - CAST ( + 45 AS INTEGER ) FROM tab2 AS cor0
----
-45
-45
-45

query I rowsort
SELECT col0 + 61 + - col2 * col2 FROM tab2 cor0
----
-1304
-537
-661

query I rowsort
SELECT 57 * - 27 AS col2 FROM tab2 AS cor0
----
-1539
-1539
-1539

onlyif mysql # use DIV operator for integer division
query I rowsort label-598
SELECT + ( + cor0.col0 ) DIV - col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-598
SELECT + ( + cor0.col0 ) / - col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-599
SELECT - col2 * 31 + - col0 + col1 DIV col0 FROM tab2 cor0
----
-1257
-840
-884

skipif mysql # not compatible
query I rowsort label-599
SELECT - col2 * 31 + - col0 + col1 / col0 FROM tab2 cor0
----
-1257
-840
-884

query I rowsort
SELECT 20 + - col1 AS col0 FROM tab2 cor0
----
-11
-39
3

query I rowsort
SELECT - col0 + ( - tab0.col2 ) AS col2 FROM tab0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-602
SELECT ALL col2 * col2 DIV - tab2.col0 + col2 * - ( col2 ) + col1 FROM tab2
----
-1445
-625
-802

skipif mysql # not compatible
query I rowsort label-602
SELECT ALL col2 * col2 / - tab2.col0 + col2 * - ( col2 ) + col1 FROM tab2
----
-1445
-625
-802

query I rowsort
SELECT DISTINCT - 85 FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-604
SELECT ALL CAST( + 50 AS SIGNED ) * col2 AS col0 FROM tab2
----
1300
1350
1900

skipif mysql # not compatible
query I rowsort label-604
SELECT ALL CAST ( + 50 AS INTEGER ) * col2 AS col0 FROM tab2
----
1300
1350
1900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * cor0.col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col2 * 37 FROM tab0 cor0
----
1221
3034
37

query I rowsort
SELECT ALL - 28 + + col0 AS col2 FROM tab2
----
-21
50
51

query I rowsort
SELECT ALL + 94 + col2 AS col0 FROM tab2
----
120
121
132

onlyif mysql # use DIV operator for integer division
query I rowsort label-609
SELECT tab1.col2 + - col0 DIV col2 + col1 * + tab1.col1 FROM tab1
----
156
265
730

skipif mysql # not compatible
query I rowsort label-609
SELECT tab1.col2 + - col0 / col2 + col1 * + tab1.col1 FROM tab1
----
156
265
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-610
SELECT + cor0.col0 - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-610
SELECT + cor0.col0 - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 48 FROM tab1, tab0 AS cor0
----
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-612
SELECT + col2 * 69 DIV 62 AS col1 FROM tab1
----
106
60
63

skipif mysql # not compatible
query I rowsort label-612
SELECT + col2 * 69 / 62 AS col1 FROM tab1
----
106
60
63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-613
SELECT + tab1.col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

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

query I rowsort
SELECT 8 FROM tab2, tab0 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-615
SELECT - + col1 * CAST( - col1 AS SIGNED ) + col2 + col2 FROM tab1 AS cor0
----
214
361
784

skipif mysql # not compatible
query I rowsort label-615
SELECT - + col1 * CAST ( - col1 AS INTEGER ) + col2 + col2 FROM tab1 AS cor0
----
214
361
784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col2 * - col0 col1 FROM tab2 AS cor0
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-617
SELECT DISTINCT + col0 DIV col1 + + ( col1 + col0 ) AS col2 FROM tab2 AS cor0
----
100
138
38

skipif mysql # not compatible
query I rowsort label-617
SELECT DISTINCT + col0 / col1 + + ( col1 + col0 ) AS col2 FROM tab2 AS cor0
----
100
138
38

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

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to 7e572cf6967c395d92dce41dcb35c4db

onlyif mysql # use DIV operator for integer division
query I rowsort label-620
SELECT + + col0 DIV col2 + 44 AS col0 FROM tab1 AS cor0
----
44
44
45

skipif mysql # not compatible
query I rowsort label-620
SELECT + + col0 / col2 + 44 AS col0 FROM tab1 AS cor0
----
44
44
45

query I rowsort
SELECT col1 * col0 + - col1 AS col0 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT - col2 + ( cor0.col1 ) * col0 FROM tab0 AS cor0
----
2031
3394
8017

skipif mysql # not compatible
query I rowsort
SELECT - col0 + CAST ( col0 AS REAL ) FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 3 * - 30 col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to c0d96679aba507520916e8654e5a6618

query I rowsort
SELECT DISTINCT - col1 * - 74 + col2 AS col0 FROM tab1 AS cor0
----
1058
1978
797

query I rowsort
SELECT col2 + col1 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - - col0 * col2 + - cor0.col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT + cor0.col1 * 79 + + col1 FROM tab0 AS cor0
----
6880
7280
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 57 + col1 col1 FROM tab0 AS cor0
----
143
148
154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL col0 + - 37 FROM tab0 AS cor0
----
-13
-2
52

query I rowsort
SELECT DISTINCT + col1 * - 10 + + cor0.col1 * col2 AS col2 FROM tab2 AS cor0
----
476
527
944

query I rowsort
SELECT ALL + + col2 * - cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - - cor0.col1 * col0 * col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT - 11 AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 7120875811e4d19a19b69cd34b6bc202

query I rowsort
SELECT - cor0.col0 * 49 * 65 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to c1b54ac5a138d0fb1ef7d3e5b16f6994

query I rowsort
SELECT 40 + + col0 FROM tab2
----
118
119
47

query I rowsort
SELECT - col2 * + col2 AS col0 FROM tab2 cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-639
SELECT CAST( NULL AS DECIMAL ) * - 52 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-639
SELECT CAST ( NULL AS REAL ) * - 52 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-640
SELECT DISTINCT - CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-640
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + col0 AS REAL ) * cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + - ( + cor0.col1 ) + col2 + + 52 FROM tab2 AS cor0
----
19
48
73

query I rowsort
SELECT ALL col2 - col1 * - col1 FROM tab1 cor0
----
157
265
730

query I rowsort
SELECT DISTINCT - + 98 FROM tab1 AS cor0
----
-98

query I rowsort
SELECT ALL - col2 + - col0 * - 24 AS col1 FROM tab1 AS cor0
----
1479
18
1824

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-646
SELECT ALL - - col0 / col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-646
SELECT ALL - - col0 / col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * col1 - 59 * + col0 FROM tab1 cor0
----
-255
-4416
-5760

query I rowsort
SELECT DISTINCT + col1 + - col0 * - col0 AS col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT col2 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-650
SELECT ALL - col0 + col1 DIV cor0.col2 AS col0 FROM tab0 AS cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-650
SELECT ALL - col0 + col1 / cor0.col2 AS col0 FROM tab0 AS cor0
----
-22
-88
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 col2 FROM tab0 AS cor0
----
60
60
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-652
SELECT DISTINCT + - col1 + col0 DIV + 27 AS col2 FROM tab2 AS cor0
----
-15
-31
-57

skipif mysql # not compatible
query I rowsort label-652
SELECT DISTINCT + - col1 + col0 / + 27 AS col2 FROM tab2 AS cor0
----
-15
-31
-57

query I rowsort
SELECT col2 * col0 + col0 + col2 FROM tab2 cor0
----
2132
223
3119

query I rowsort
SELECT DISTINCT - col0 * 32 AS col1 FROM tab1 AS cor0
----
-2048
-2560
-96

query I rowsort
SELECT - cor0.col2 * col1 + col1 + col1 FROM tab2 AS cor0
----
-1416
-612
-775

onlyif mysql # use DIV operator for integer division
query I rowsort label-656
SELECT ALL - + cor0.col1 DIV ( cor0.col0 ) + col0 FROM tab2 AS cor0
----
3
78
79

skipif mysql # not compatible
query I rowsort label-656
SELECT ALL - + cor0.col1 / ( cor0.col0 ) + col0 FROM tab2 AS cor0
----
3
78
79

query I rowsort
SELECT DISTINCT - cor0.col0 + 35 * col1 FROM tab1 AS cor0
----
286
375
907

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-658
SELECT + col0 * CAST( + col2 AS SIGNED ) col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-658
SELECT + col0 * CAST ( + col2 AS INTEGER ) col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + + col2 * col0 + - col1 * col1 AS col2 FROM tab0 cor0
----
-6604
-9374
-983

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

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

query I rowsort
SELECT ALL + 50 AS col0 FROM tab1
----
50
50
50

query I rowsort
SELECT ALL cor0.col2 * col1 + col0 + - col2 AS col1 FROM tab2 AS cor0
----
1586
687
817

query I rowsort
SELECT col1 + 65 AS col1 FROM tab0 AS cor0
----
151
156
162

query I rowsort
SELECT ALL - + cor0.col2 + 54 FROM tab2 AS cor0
----
16
27
28

query I rowsort
SELECT DISTINCT + - col0 * col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-667
SELECT - col1 + col2 + - 61 DIV col1 FROM tab1 AS cor0
----
26
41
79

skipif mysql # not compatible
query I rowsort label-667
SELECT - col1 + col2 + - 61 / col1 FROM tab1 AS cor0
----
26
41
79

query I rowsort
SELECT + 56 FROM tab0, tab0 cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT DISTINCT - - 73 * 83 AS col0 FROM tab2 AS cor0
----
6059

query I rowsort
SELECT 49 + - col2 AS col1 FROM tab0 AS cor0
----
-33
16
48

query I rowsort
SELECT + col1 * ( col1 ) + col0 + ( - col2 ) AS col0 FROM tab1
----
107
153
625

query I rowsort
SELECT col0 + 62 * col0 * + col2 FROM tab0
----
2205
452565
49128

query I rowsort
SELECT DISTINCT + col1 * + col2 + - col0 FROM tab0
----
2814
62
7373

query I rowsort
SELECT ALL + ( + 65 ) + - col0 * cor0.col0 FROM tab2 AS cor0
----
-6019
-6176
16

query I rowsort
SELECT DISTINCT ( col1 ) * - col1 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-676
SELECT CAST( col1 AS SIGNED ) col0 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-676
SELECT CAST ( col1 AS INTEGER ) col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - + col0 + col0 * col0 + - 81 FROM tab2 AS cor0
----
-39
5925
6081

query I rowsort
SELECT DISTINCT + col1 + + tab2.col0 + col0 FROM tab2
----
175
215
45

query I rowsort
SELECT ALL col1 + + col2 * - 84 * col0 AS col1 FROM tab1
----
-13582
-306422
-645107

query I rowsort
SELECT col0 * + col1 + + col2 - + col0 AS col2 FROM tab1
----
1056
129
633

query I rowsort
SELECT DISTINCT tab2.col0 + col0 AS col0 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT col2 + col2 + col1 FROM tab2
----
111
85
93

query I rowsort
SELECT col0 + col1 * + col2 * col0 AS col2 FROM tab1
----
36544
4215
99920

query I rowsort
SELECT + col2 * tab0.col1 * - col1 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT 76 * 60 AS col0 FROM tab2
----
4560
4560
4560

query I rowsort
SELECT DISTINCT - 65 + col1 FROM tab0
----
21
26
32

query I rowsort
SELECT 68 + + col0 * + col2 AS col2 FROM tab2
----
2096
257
3070

query I rowsort
SELECT DISTINCT - 73 AS col1 FROM tab1, tab1 cor0
----
-73

query I rowsort
SELECT DISTINCT + + 0 AS col0 FROM tab2 AS cor0
----
0

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

query I rowsort
SELECT + 96 * col1 AS col1 FROM tab1 AS cor0
----
1248
2496
960

query I rowsort
SELECT - 88 * col0 AS col2 FROM tab1
----
-264
-5632
-7040

query I rowsort
SELECT ALL - + col1 * col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + - col1 * + ( + col1 ) + 78 * 53 FROM tab2 AS cor0
----
3173
3845
653

query I rowsort
SELECT - col0 * + col0 + + col0 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
-11
-5947
-6145

query I rowsort
SELECT + col2 + col2 * 80 AS col0 FROM tab0
----
2673
6642
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-697
SELECT DISTINCT - CAST( + 42 AS SIGNED ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-42

skipif mysql # not compatible
query I rowsort label-697
SELECT DISTINCT - CAST ( + 42 AS INTEGER ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-42

query I rowsort
SELECT DISTINCT - 65 + + 98 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-699
SELECT CAST( NULL AS SIGNED ) * cor1.col0 + - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-699
SELECT CAST ( NULL AS INTEGER ) * cor1.col0 + - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + + ( col0 ) AS col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL - col1 * + col2 - 31 FROM tab0 AS cor0
----
-128
-2869
-7493

query I rowsort
SELECT DISTINCT - + 49 * - col1 + ( col2 ) + - col2 * + ( ( + col2 ) ) AS col1 FROM tab0 AS cor0
----
-2183
3158
4753

onlyif mysql # use DIV operator for integer division
query I rowsort label-703
SELECT DISTINCT - col1 + - col2 DIV - 31 col2 FROM tab2 AS cor0
----
-16
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-703
SELECT DISTINCT - col1 + - col2 / - 31 col2 FROM tab2 AS cor0
----
-16
-31
-59

query I rowsort
SELECT ALL - ( col0 ) + + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT 0 + - 6 * cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2a7e8ee9536f02d92bce86c083650f44

query I rowsort
SELECT - col0 * ( ( + col0 ) ) AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + col2 * - col0 + + 2 * col1 * + col0 AS col2 FROM tab0 AS cor0
----
3336
6755
8900

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-708
SELECT DISTINCT + col1 * - CAST( NULL AS SIGNED ) + col0 + col0 FROM tab1 AS cor0
----
NULL

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

query I rowsort
SELECT DISTINCT + col2 + ( + cor0.col1 ) FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT col2 + - col1 * col1 * - col2 FROM tab2 AS cor0
----
11020
25974
90532

query I rowsort
SELECT + col2 * col1 - + col0 AS col0 FROM tab0 cor0
----
2814
62
7373

query I rowsort
SELECT ALL - col2 + - ( + 79 + + col2 ) FROM tab2 AS cor0
----
-131
-133
-155

query I rowsort
SELECT - cor0.col0 + col2 * col1 AS col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT - + col1 + col1 * + 73 AS col1 FROM tab1 AS cor0
----
1872
720
936

onlyif mysql # use DIV operator for integer division
query I rowsort label-716
SELECT - col2 DIV col2 + 24 AS col2 FROM tab1 AS cor0
----
23
23
23

skipif mysql # not compatible
query I rowsort label-716
SELECT - col2 / col2 + 24 AS col2 FROM tab1 AS cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-717
SELECT + - col1 + col2 DIV col0 col1 FROM tab0 AS cor0
----
-85
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-717
SELECT + - col1 + col2 / col0 col1 FROM tab0 AS cor0
----
-85
-91
-97

query I rowsort
SELECT ALL cor0.col1 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT ALL - - cor0.col2 + col0 * col0 FROM tab1 cor0
----
4153
63
6496

query I rowsort
SELECT - col1 + - 1 * + ( - col2 ) AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ( - cor0.col1 ) * col1 AS col0 FROM tab2 cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-722
SELECT DISTINCT - col2 DIV - col2 AS col2 FROM tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-722
SELECT DISTINCT - col2 / - col2 AS col2 FROM tab1 cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 + col0 * col0 + - col0 col0 FROM tab0 AS cor0
----
1189
519
7750

query I rowsort
SELECT 24 * col2 * - 26 AS col2 FROM tab2 AS cor0
----
-16224
-16848
-23712

query I rowsort
SELECT col0 * col1 - 46 AS col2 FROM tab2 AS cor0
----
1297
171
4556

query I rowsort
SELECT + + cor0.col2 + col2 * col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT - col1 + col0 * + 39 AS col0 FROM tab0 AS cor0
----
1268
3380
850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-728
SELECT + cor0.col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-728
SELECT + cor0.col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + cor0.col1 col1 FROM tab0 cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * 61 + cor0.col2 + cor0.col2 col1 FROM tab2 AS cor0
----
1113
1945
3651

query I rowsort
SELECT + 93 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT col0 * col1 + - col1 AS col2 FROM tab0 AS cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col0 * col1 col0 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT - col1 * 25 AS col2 FROM tab1
----
-250
-325
-650

query I rowsort
SELECT + col2 * + 9 FROM tab2
----
234
243
342

query I rowsort
SELECT - col0 * + 95 AS col2 FROM tab2
----
-665
-7410
-7505

query I rowsort
SELECT DISTINCT col1 + 47 AS col1 FROM tab1
----
57
60
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-738
SELECT - CAST( + col0 AS SIGNED ) + col1 AS col0 FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-738
SELECT - CAST ( + col0 AS INTEGER ) + col1 AS col0 FROM tab0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-739
SELECT - col2 DIV 62 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-739
SELECT - col2 / 62 FROM tab0
----
-1
0
0

query I rowsort
SELECT DISTINCT cor1.col2 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) * + col1 col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-742
SELECT - + ( + col1 ) DIV - col0 AS col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-742
SELECT - + ( + col1 ) / - col0 AS col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT ALL 27 AS col2 FROM tab1
----
27
27
27

query I rowsort
SELECT DISTINCT + + col0 * col1 + 25 FROM tab1 cor0
----
103
1065
665

query I rowsort
SELECT DISTINCT col2 - - col2 * - col1 AS col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT col2 + col1 + ( col0 ) * + col2 FROM tab2
----
2113
247
3057

query I rowsort
SELECT - col0 * - col1 * 4 AS col1 FROM tab2
----
18408
5372
868

query I rowsort
SELECT - ( + col1 + tab2.col1 ) * - 75 FROM tab2
----
2550
4650
8850

query I rowsort
SELECT + 86 * + col0 * 34 FROM tab1 AS cor0
----
187136
233920
8772

onlyif mysql # use DIV operator for integer division
query I rowsort label-750
SELECT col2 DIV - col1 AS col1 FROM tab2 cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-750
SELECT col2 / - col1 AS col1 FROM tab2 cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT col1 * col1 * + col1 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT + tab0.col0 * - 82 * 90 AS col2 FROM tab0
----
-177120
-258300
-656820

query I rowsort
SELECT col1 + + ( - col0 ) AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + 55 + col1 AS col0 FROM tab1 AS cor0
----
65
68
81

query I rowsort
SELECT ALL col0 + col1 + + col2 FROM tab1 cor0
----
131
189
83

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-757
SELECT CAST( 62 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
62
62
62

skipif mysql # not compatible
query I rowsort label-757
SELECT CAST ( 62 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
62
62
62

query I rowsort
SELECT + 96 * 13 AS col2 FROM tab0 AS cor0
----
1248
1248
1248

query I rowsort
SELECT ALL - col1 + + 37 * col1 FROM tab2
----
1116
2124
612

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 90 * col1 + - col2 col1 FROM tab0 AS cor0
----
7707
8108
8729

query I rowsort
SELECT DISTINCT col2 * + col0 + - col2 * tab2.col0 + - col0 * col0 AS col2 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + 16 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
16

query I rowsort
SELECT + col2 + ( col2 ) * + col0 AS col1 FROM tab2
----
2054
216
3040

query I rowsort
SELECT DISTINCT ( 60 ) AS col1 FROM tab1 cor0
----
60

query I rowsort
SELECT - + ( col0 ) * - col0 + - col1 AS col1 FROM tab2 cor0
----
18
6025
6224

query I rowsort
SELECT DISTINCT col0 + + 72 FROM tab0 AS cor0
----
107
161
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 26 * col0 col2 FROM tab0 cor0
----
2314
624
910

query I rowsort
SELECT - - col2 + + col1 FROM tab2 cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-770
SELECT ALL CAST( NULL AS SIGNED ) + ( col0 ) * cor0.col2 FROM tab1 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + col0 * col2 + - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT + col1 + 94 * col1 FROM tab1 AS cor0
----
1235
2470
950

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-773
SELECT ALL CAST( NULL AS SIGNED ) * col1 + + cor0.col2 / ( col1 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-773
SELECT ALL CAST ( NULL AS INTEGER ) * col1 + + cor0.col2 / ( col1 ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 64 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT DISTINCT - + 18 + - col0 FROM tab1 AS cor0
----
-21
-82
-98

query I rowsort
SELECT col2 - - col1 * + col1 * + col0 FROM tab1
----
13616
2082
6457

query I rowsort
SELECT - ( + tab1.col0 * + col0 ) AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - col0 + + tab1.col1 FROM tab1
----
-54
-67
23

query I rowsort
SELECT - 89 * cor0.col0 * col1 FROM tab0 AS cor0
----
-183696
-302155
-720811

query I rowsort
SELECT ALL ( + col2 ) * + col0 + + col2 * col2 AS col1 FROM tab1 cor0
----
16896
3078
6897

query I rowsort
SELECT ALL + col2 + col0 * - 61 FROM tab1 AS cor0
----
-129
-3847
-4784

query I rowsort
SELECT DISTINCT col2 * - ( + col0 ) + cor0.col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - - cor0.col0 * 67 AS col1 FROM tab2 AS cor0
----
469
5226
5293

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + 15 col1 FROM tab0 AS cor0
----
16
48
97

query I rowsort
SELECT - cor0.col1 * + cor0.col2 - - col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT + - col0 * - col0 + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL col1 - ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT col0 * col1 * - col2 - - col2 AS col1 FROM tab1 AS cor0
----
-36423
-4158
-99744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-789
SELECT + cor0.col2 + CAST( + col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-789
SELECT + cor0.col2 + CAST ( + col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-790
SELECT ALL - col2 DIV - 94 + col2 FROM tab1 AS cor0
----
54
57
97

skipif mysql # not compatible
query I rowsort label-790
SELECT ALL - col2 / - 94 + col2 FROM tab1 AS cor0
----
54
57
97

query I rowsort
SELECT ALL - - cor0.col1 * - ( cor0.col1 ) * + col2 + - cor0.col2 * - col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-130390
-35530
-48546

query I rowsort
SELECT col2 * + ( + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-793
SELECT ALL - 57 * col2 - + 70 DIV - 48 AS col0 FROM tab1
----
-3077
-3248
-5471

skipif mysql # not compatible
query I rowsort label-793
SELECT ALL - 57 * col2 - + 70 / - 48 AS col0 FROM tab1
----
-3077
-3248
-5471

query I rowsort
SELECT - + col2 * col0 + - cor0.col0 * col2 FROM tab0 AS cor0
----
-14596
-1584
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-795
SELECT DISTINCT col2 + + 32 DIV col1 FROM tab2 AS cor0
----
26
28
39

skipif mysql # not compatible
query I rowsort label-795
SELECT DISTINCT col2 + + 32 / col1 FROM tab2 AS cor0
----
26
28
39

query I rowsort
SELECT - col1 + + ( 8 + col2 ) * - col1 FROM tab0 AS cor0
----
-3612
-8281
-970

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-797
SELECT DISTINCT + col1 * + CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-797
SELECT DISTINCT + col1 * + CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + col1 col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL - col2 * - 39 FROM tab1
----
2106
2223
3744

query I rowsort
SELECT cor0.col0 + ( - 37 ) AS col1 FROM tab1 AS cor0
----
-34
27
43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-801
SELECT ALL col0 + CAST( 90 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
154
170
93

skipif mysql # not compatible
query I rowsort label-801
SELECT ALL col0 + CAST ( 90 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
154
170
93

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0, tab0 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 489dc4a89dc53914f025e2426f93a929

query I rowsort
SELECT + ( 8 ) * - col1 - + col2 FROM tab2 AS cor0
----
-174
-275
-498

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 44 col1 FROM tab2 AS cor0
----
1364
2596
748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-805
SELECT CAST( NULL AS SIGNED ) + - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-805
SELECT CAST ( NULL AS INTEGER ) + - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col2 + 7 FROM tab1 AS cor0
----
103
61
64

query I rowsort
SELECT - col1 + - 64 FROM tab1 AS cor0
----
-74
-77
-90

query I rowsort
SELECT ALL - col1 + col2 * + col0 AS col2 FROM tab0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( - col0 * col2 ) col1 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT col0 + + col1 * 21 FROM tab2
----
1317
436
658

query I rowsort
SELECT ALL + + 81 + - col0 AS col2 FROM tab0 AS cor0
----
-8
46
57

query I rowsort
SELECT + 80 + col1 FROM tab0 AS cor0
----
166
171
177

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + ( - col1 ) * 41 AS col1 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT DISTINCT + - 44 * cor0.col0 FROM tab2 AS cor0
----
-308
-3432
-3476

query I rowsort
SELECT + col1 + col0 * + ( + col1 ) FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - + col0 * cor0.col2 * + col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT 40 * - col1 * col0 AS col2 FROM tab2
----
-184080
-53720
-8680

onlyif mysql # use DIV operator for integer division
query I rowsort label-819
SELECT ALL + col1 DIV tab0.col0 AS col1 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-819
SELECT ALL + col1 / tab0.col0 AS col1 FROM tab0
----
1
2
3

query I rowsort
SELECT col0 * - col1 + - col1 * - 73 FROM tab2 cor0
----
-102
-295
2046

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col2 ) col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT - 14 FROM tab1, tab0, tab0 cor0
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

query I rowsort
SELECT ALL - 49 + 39 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

onlyif mysql # use DIV operator for integer division
query I rowsort label-825
SELECT ALL - col1 DIV - col0 AS col2 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-825
SELECT ALL - col1 / - col0 AS col2 FROM tab2
----
0
0
4

query I rowsort
SELECT - - col2 + + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + + col2 * + col2 + - col2 AS col2 FROM tab0 AS cor0
----
0
1056
6642

onlyif mysql # use DIV operator for integer division
query I rowsort label-828
SELECT - - col1 DIV col0 + - col0 AS col2 FROM tab2 AS cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-828
SELECT - - col1 / col0 + - col0 AS col2 FROM tab2 AS cor0
----
-3
-78
-79

query I rowsort
SELECT ALL - col1 * tab0.col1 - - col2 * - col2 FROM tab0
----
-15005
-8485
-9410

query I rowsort
SELECT - - col1 * - col2 + cor0.col2 + col1 AS col0 FROM tab0 AS cor0
----
-2719
-7289
1

query I rowsort
SELECT DISTINCT + col1 + + col1 * col1 AS col0 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL - 5 + col0 AS col0 FROM tab1 AS cor0
----
-2
59
75

query I rowsort
SELECT ALL col0 + col2 * + col1 AS col2 FROM tab1 WHERE - col0 IN ( + tab1.col2 / - col0 + + col1 )
----

query I rowsort
SELECT ALL col2 + + col2 * col2 FROM tab0
----
1122
2
6806

query III rowsort
SELECT * FROM tab0 WHERE NOT - col0 IN ( + col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col1 * + col0 col0 FROM tab1
----
104
1053
650

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT + col2 <= col2
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT tab0.col0 < ( NULL )
----

query I rowsort
SELECT ALL + col0 - + col1 AS col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 + + col2 AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-841
SELECT ALL 27 + col1 DIV col0 FROM tab1 AS cor0
----
27
27
35

skipif mysql # not compatible
query I rowsort label-841
SELECT ALL 27 + col1 / col0 FROM tab1 AS cor0
----
27
27
35

query I rowsort
SELECT DISTINCT + tab2.col0 - col1 AS col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT + col2 FROM tab2 WHERE NOT ( NULL ) > col1 * + col1 + - col0 * + col0
----

query I rowsort
SELECT DISTINCT - col2 - + col0 * col2 FROM tab0
----
-36
-7380
-825

query I rowsort
SELECT col1 + + col2 + - col1 AS col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col2 + - col1 + col2 col2 FROM tab2 AS cor0
----
-193
-2061
-2981

query I rowsort
SELECT ALL col0 + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT col0 + + cor0.col0 + col2 * col1 FROM tab2 AS cor0
----
1690
804
851

query I rowsort
SELECT - col1 + + col1 + - col2 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT col1 * col0 FROM tab1 WHERE NOT col1 NOT IN ( - col0 )
----

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab0 WHERE col1 * col0 < col2 + col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-852
SELECT tab0.col2 DIV + col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-852
SELECT tab0.col2 / + col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT col0 + - col0 * col2 * col0 - col0 FROM tab2
----
-1323
-158184
-237158

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( + col2 ) >= ( col1 )
----
7
31
27
78
59
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + 66 * + col1 AS col1 FROM tab2 AS cor0
----
1122
2046
3894

query I rowsort
SELECT ALL 83 + col1 AS col2 FROM tab2 AS cor0
----
100
114
142

query I rowsort
SELECT - - cor0.col1 + - col0 + + col1 FROM tab1 AS cor0
----
-44
-54
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-859
SELECT DISTINCT - col1 + col2 DIV + 85 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-859
SELECT DISTINCT - col1 + col2 / + 85 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL - + 50 * + col2 * ( + cor0.col0 ) AS col0 FROM tab1 AS cor0
----
-182400
-384000
-8100

query I rowsort
SELECT col2 * + col0 + - col2 * col1 FROM tab1 AS cor0
----
-1242
3078
6432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-863
SELECT + CAST( 82 AS SIGNED ) + tab0.col2 + - ( + col1 ) FROM tab0
----
-14
29
73

skipif mysql # not compatible
query I rowsort label-863
SELECT + CAST ( 82 AS INTEGER ) + tab0.col2 + - ( + col1 ) FROM tab0
----
-14
29
73

query I rowsort
SELECT - 22 * 17 + - col1 * col1 AS col2 FROM tab0
----
-7770
-8655
-9783

query I rowsort
SELECT 86 AS col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to ed1a39c2752ca3723602e4a92c54bbc4

query I rowsort
SELECT - 13 * - col2 * - col2 FROM tab0
----
-13
-14157
-87412

query I rowsort
SELECT + tab0.col2 + col0 * + 92 AS col1 FROM tab0
----
2241
3221
8270

query I rowsort
SELECT ( col2 ) * + col0 + col0 + - cor0.col2 FROM tab0 AS cor0
----
69
7305
783

query I rowsort
SELECT DISTINCT - + ( col1 ) * + col0 * - col1 FROM tab0 AS cor0
----
177504
329315
737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col0 + + col2 + + col1 col1 FROM tab1
----
-4029
-6291
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-871
SELECT + col1 * col0 + - col0 + + ( - tab2.col0 ) DIV col0 FROM tab2
----
1263
209
4523

skipif mysql # not compatible
query I rowsort label-871
SELECT + col1 * col0 + - col0 + + ( - tab2.col0 ) / col0 FROM tab2
----
1263
209
4523

query I rowsort
SELECT 65 + + col1 FROM tab0
----
151
156
162

query I rowsort
SELECT - 13 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to e95f5f4bd0f480397cced5f5e8a23792

query I rowsort
SELECT DISTINCT - - tab0.col0 AS col0 FROM tab0, tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + + col2 * - col1 + - col1 FROM tab2 AS cor0
----
-1593
-663
-868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-876
SELECT + + CAST( NULL AS DECIMAL ) * cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-876
SELECT + + CAST ( NULL AS REAL ) * cor0.col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 39 FROM tab1 cor0
----
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-878
SELECT ALL + - col0 + col0 DIV - cor0.col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-878
SELECT ALL + - col0 + col0 / - cor0.col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - col0 * col2 * - col2 + col1 FROM tab0 AS cor0
----
132
26222
598527

query I rowsort
SELECT ALL + col2 * + col2 - col2 * + col1 FROM tab1 AS cor0
----
1512
2679
7968

query I rowsort
SELECT ALL + ( - ( - col0 ) ) + 49 FROM tab2 cor0
----
127
128
56

query I rowsort
SELECT DISTINCT ( 37 ) AS col0 FROM tab0 AS cor0
----
37

query I rowsort
SELECT ALL 93 + col1 AS col1 FROM tab1 AS cor0
----
103
106
119

query I rowsort
SELECT DISTINCT + cor0.col0 - - col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + ( 48 ) FROM tab1
----
48
48
48

query I rowsort
SELECT DISTINCT 54 * col2 AS col1 FROM tab1
----
2916
3078
5184

query I rowsort
SELECT - 5 + col2 * - col1 * - 40 FROM tab1
----
22795
49915
56155

query I rowsort
SELECT ALL + cor0.col2 + 8 FROM tab0 AS cor0
----
41
9
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-889
SELECT ALL + + 24 + + 89 * col0 DIV - col0 FROM tab2 AS cor0
----
-65
-65
-65

skipif mysql # not compatible
query I rowsort label-889
SELECT ALL + + 24 + + 89 * col0 / - col0 FROM tab2 AS cor0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT + col0 + col1 AS col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL - 34 * 2 FROM tab1 AS cor0
----
-68
-68
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-893
SELECT ALL + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT - 88 + - col0 FROM tab1 AS cor0
----
-152
-168
-91

query I rowsort
SELECT DISTINCT col0 * cor0.col0 + 33 FROM tab1 AS cor0
----
4129
42
6433

query I rowsort
SELECT ALL - - col1 + - col2 * 18 FROM tab0 AS cor0
----
-1385
-508
79

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

query I rowsort
SELECT ALL - 31 * + col2 FROM tab1 cor0
----
-1674
-1767
-2976

query I rowsort
SELECT DISTINCT + 34 * - col1 FROM tab2 AS cor0
----
-1054
-2006
-578

query I rowsort
SELECT ( - 97 ) FROM tab0
----
-97
-97
-97

query I rowsort
SELECT - ( + col0 ) + 60 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1563
-664
-860

query I rowsort
SELECT DISTINCT - + col0 + - cor0.col1 FROM tab0 cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + cor0.col0 * + 0 col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort
SELECT col1 / - col2 + col1 * col2 + - CAST ( + 20 AS REAL ) FROM tab1 AS cor0
----
1228
1384
550

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-905
SELECT - + col0 + CAST( - col0 AS SIGNED ) col0 FROM tab0 AS cor0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-905
SELECT - + col0 + CAST ( - col0 AS INTEGER ) col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT ALL col2 * - 62 AS col2 FROM tab0 AS cor0
----
-2046
-5084
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-907
SELECT col1 + + CAST( NULL AS SIGNED ) * 95 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-907
SELECT col1 + + CAST ( NULL AS INTEGER ) * 95 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * - ( - col0 ) * + col2 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT col2 * 58 + col0 FROM tab0 AS cor0
----
1938
4845
93

query I rowsort
SELECT ALL + - col1 * 25 FROM tab2 cor0
----
-1475
-425
-775

query I rowsort
SELECT ALL + - cor0.col2 * - 7 FROM tab2 AS cor0
----
182
189
266

query I rowsort
SELECT ALL + cor0.col1 * + ( 47 ) AS col2 FROM tab0 AS cor0
----
4042
4277
4559

onlyif mysql # use DIV operator for integer division
query I rowsort label-913
SELECT DISTINCT col0 DIV 62 + - ( col2 + - col2 ) col2 FROM tab2
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-913
SELECT DISTINCT col0 / 62 + - ( col2 + - col2 ) col2 FROM tab2
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-914
SELECT DISTINCT + + col2 DIV + ( cor0.col1 + - 16 ) FROM tab1 AS cor0
----
-32
-9
5

skipif mysql # not compatible
query I rowsort label-914
SELECT DISTINCT + + col2 / + ( cor0.col1 + - 16 ) FROM tab1 AS cor0
----
-32
-9
5

query I rowsort
SELECT - - ( - col0 ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - - ( 35 ) AS col1 FROM tab0 cor0 CROSS JOIN tab1, tab2 AS cor1
----
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-917
SELECT + + cor0.col0 + - cor0.col1 DIV col0 AS col1 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-917
SELECT + + cor0.col0 + - cor0.col1 / col0 AS col1 FROM tab0 AS cor0
----
21
33
88

query I rowsort
SELECT + 90 * - col1 FROM tab1
----
-1170
-2340
-900

onlyif mysql # use DIV operator for integer division
query I rowsort label-919
SELECT DISTINCT - tab1.col1 * col0 DIV + col1 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-919
SELECT DISTINCT - tab1.col1 * col0 / + col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 92 AS col1 FROM tab2, tab0 cor0
----
92

query I rowsort
SELECT + cor0.col0 * - 57 AS col0 FROM tab2 cor0
----
-399
-4446
-4503

onlyif mysql # use DIV operator for integer division
query I rowsort label-922
SELECT - col1 DIV CAST( + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-922
SELECT - col1 / CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col2 * col2 * 9 FROM tab1 cor0
----
26244
29241
82944

onlyif mysql # use DIV operator for integer division
query I rowsort label-924
SELECT - 14 DIV 36 + col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-924
SELECT - 14 / 36 + col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-925
SELECT + CAST( NULL AS SIGNED ) * + 3 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-925
SELECT + CAST ( NULL AS INTEGER ) * + 3 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 27 + + cor0.col2 * - cor0.col0 FROM tab1 AS cor0
----
-135
-3621
-7653

query I rowsort
SELECT + col0 + col1 * col0 * col2 AS col1 FROM tab0 AS cor0
----
3430
664207
68136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 + col2 * + col2 col1 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT cor0.col1 * + col1 + col1 AS col2 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT - + 71 FROM tab2 cor0
----
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT - - 4 * col2 + cor0.col1 AS col2 FROM tab0 AS cor0
----
101
218
419

query I rowsort
SELECT + 31 * - col1 FROM tab2
----
-1829
-527
-961

query I rowsort
SELECT DISTINCT col2 * col1 + - 66 + col2 FROM tab1 AS cor0
----
1278
1392
561

query I rowsort
SELECT ALL - 44 * col1 * col0 + + col0 * - col0 * tab2.col0 AS col2 FROM tab2
----
-552131
-677040
-9891

query I rowsort
SELECT col2 * + col2 * 37 AS col2 FROM tab1 AS cor0
----
107892
120213
340992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 col0 FROM tab2 AS cor0
----
71
71
71

query I rowsort
SELECT - col0 * cor0.col2 + - ( 98 ) FROM tab1 AS cor0
----
-260
-3746
-7778

query I rowsort
SELECT DISTINCT 55 * col2 - col2 * 57 * col1 FROM tab1 AS cor0
----
-29355
-65856
-77058

query I rowsort
SELECT - + col0 + - col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL col2 - + 93 * + col0 FROM tab1 AS cor0
----
-225
-5895
-7344

onlyif mysql # use DIV operator for integer division
query I rowsort label-942
SELECT - col2 * + 68 + col0 DIV col2 FROM tab1 AS cor0
----
-3672
-3875
-6528

skipif mysql # not compatible
query I rowsort label-942
SELECT - col2 * + 68 + col0 / col2 FROM tab1 AS cor0
----
-3672
-3875
-6528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( col0 ) * + cor0.col0 + col0 col0 FROM tab2 AS cor0
----
1330
158262
237237

query I rowsort
SELECT - 78 * - 86 + col2 * ( cor0.col2 ) FROM tab0 AS cor0
----
13432
6709
7797

onlyif mysql # use DIV operator for integer division
query I rowsort label-945
SELECT + col1 DIV col1 col1 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-945
SELECT + col1 / col1 col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + ( col2 ) + - col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-947
SELECT col0 DIV cor0.col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-947
SELECT col0 / cor0.col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - cor0.col2 * col2 - + col1 * col1 FROM tab2 AS cor0
----
-1690
-1733
-4157

query I rowsort
SELECT 46 - col1 FROM tab0 AS cor0
----
-40
-45
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-950
SELECT DISTINCT - ( - col1 ) + - col0 + ( + cor0.col1 ) DIV - 36 AS col2 FROM tab2 AS cor0
----
-20
-62
24

skipif mysql # not compatible
query I rowsort label-950
SELECT DISTINCT - ( - col1 ) + - col0 + ( + cor0.col1 ) / - 36 AS col2 FROM tab2 AS cor0
----
-20
-62
24

query I rowsort
SELECT + - col1 * cor0.col2 + + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL 46 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-1104
-1610
-4094

query I rowsort
SELECT DISTINCT + ( - col2 ) * - 46 FROM tab1 AS cor0
----
2484
2622
4416

query I rowsort
SELECT ALL col1 * tab0.col0 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL ( - col2 * col0 ) - - 63 AS col2 FROM tab0
----
-7235
-729
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-956
SELECT ALL + 14 * col0 * - col1 - CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-956
SELECT ALL + 14 * col0 * - col1 - CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 14 - col0 AS col0 FROM tab2
----
-64
-65
7

query I rowsort
SELECT 35 + col1 + col1 FROM tab0
----
207
217
229

query I rowsort
SELECT ALL + ( - col1 ) * col2 * col2 AS col0 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT + - col1 - + 92 FROM tab1 AS cor0
----
-102
-105
-118

query I rowsort
SELECT DISTINCT - + col0 * col2 + + col1 AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * ( 86 ) col0 FROM tab1 AS cor0
----
1118
2236
860

query I rowsort
SELECT col1 * + 82 AS col0 FROM tab2 AS cor0
----
1394
2542
4838

query I rowsort
SELECT ALL col2 * col0 + - col1 * col0 FROM tab1 AS cor0
----
3008
6640
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - cor0.col1 col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - + col2 + ( col2 ) * col1 AS col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT col2 * + ( - 24 ) FROM tab1 AS cor0
----
-1296
-1368
-2304

query I rowsort
SELECT DISTINCT col0 + + ( cor0.col1 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL col2 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL - col0 - - 40 FROM tab1 AS cor0
----
-24
-40
37

query I rowsort
SELECT DISTINCT + - cor0.col2 * ( col0 + col2 ) AS col1 FROM tab2 AS cor0
----
-2704
-4446
-918

query I rowsort
SELECT DISTINCT - + col2 * + col0 * col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - col2 * ( + col2 ) FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT cor0.col2 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT col2 + 11 * col2 FROM tab1 cor0
----
1152
648
684

query I rowsort
SELECT 59 - - col1 AS col0 FROM tab1 AS cor0
----
69
72
85

query I rowsort
SELECT DISTINCT ( 95 ) + - col1 * 91 AS col1 FROM tab2 AS cor0
----
-1452
-2726
-5274

query I rowsort
SELECT ALL - 41 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-979
SELECT ALL + CAST( NULL AS SIGNED ) * + ( - col0 ) + + ( - col1 ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-979
SELECT ALL + CAST ( NULL AS INTEGER ) * + ( - col0 ) + + ( - col1 ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2, tab1 cor0
----
54
57
96

query I rowsort
SELECT + col0 + + col0 * col2 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT col2 * - col0 * tab2.col1 + - col1 * + ( tab2.col1 ) FROM tab2
----
-123133
-51323
-6820

query I rowsort
SELECT DISTINCT + + 2 * - col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT + - 8 + cor0.col1 * 30 AS col1 FROM tab1 AS cor0
----
292
382
772

query I rowsort
SELECT - 57 * col2 + + ( col0 * + col1 ) FROM tab0 AS cor0
----
183
3338
3425

query I rowsort
SELECT DISTINCT + col2 * + cor0.col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT - ( + ( - col1 ) ) AS col2 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 39 * + tab2.col2 col2 FROM tab2
----
-1014
-1053
-1482

query I rowsort
SELECT + col2 * + col1 - col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - cor0.col2 + - col1 + + 62 FROM tab2 cor0
----
-23
4
7

query I rowsort
SELECT - col0 * + cor0.col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - col2 * col1 - - tab2.col0 AS col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT 98 * col2 AS col1 FROM tab0
----
3234
8036
98

query I rowsort
SELECT DISTINCT - 93 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-93

query I rowsort
SELECT ALL col2 - cor0.col1 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - + col2 * + ( col1 ) * + col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT + 94 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

onlyif mysql # use DIV operator for integer division
query I rowsort label-998
SELECT - col2 DIV - 39 AS col2 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-998
SELECT - col2 / - 39 AS col2 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT - ( + 11 ) FROM tab1
----
-11
-11
-11

query I rowsort
SELECT DISTINCT tab1.col0 * + 97 + col0 FROM tab1
----
294
6272
7840

query I rowsort
SELECT DISTINCT - 75 + - col1 * col1 * + col2 FROM tab1
----
-16299
-36579
-5775

query I rowsort
SELECT - col2 * 2 AS col1 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT ALL + col1 * cor0.col0 + col1 + 45 * cor0.col2 FROM tab2 AS cor0
----
1463
3070
5831

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

query I rowsort
SELECT - 72 * - col0 + - cor0.col2 FROM tab2 AS cor0
----
477
5590
5650

query I rowsort
SELECT DISTINCT ( + col2 ) * - col1 + 56 AS col1 FROM tab2
----
-1478
-590
-781

onlyif mysql # use DIV operator for integer division
query I rowsort label-1007
SELECT DISTINCT - col1 * col0 DIV - col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1007
SELECT DISTINCT - col1 * col0 / - col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT col2 + cor0.col0 + + col0 FROM tab2 cor0
----
182
196
41

query I rowsort
SELECT - 11 * col2 + ( - ( + col1 ) ) AS col1 FROM tab1 AS cor0
----
-1069
-620
-637

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 * + col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT - - cor0.col1 * col1 + 84 * + col0 AS col2 FROM tab0 AS cor0
----
12349
15757
9412

query I rowsort
SELECT + - 94 * col1 + col0 FROM tab1 cor0
----
-1142
-2441
-876

query I rowsort
SELECT - col0 + col2 AS col1 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT ALL - 98 AS col0 FROM tab1 AS cor0
----
-98
-98
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1015
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1015
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - 23 + col0 * - 81 * + col2 FROM tab2 AS cor0
----
-15332
-164291
-243185

query I rowsort
SELECT ALL - - col2 * - cor0.col0 + col1 FROM tab0 cor0
----
-706
-7207
62

query I rowsort
SELECT + 11 + cor0.col0 + 47 AS col2 FROM tab2 AS cor0
----
136
137
65

query I rowsort
SELECT tab0.col0 * - 45 AS col0 FROM tab0
----
-1080
-1575
-4005

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT col1 * col1 * col2 + + 94 FROM tab2 AS cor0
----
11076
26041
90600

onlyif mysql # use DIV operator for integer division
query I rowsort label-1022
SELECT - 17 + + col0 DIV col2 + col1 FROM tab1 AS cor0
----
-4
-6
9

skipif mysql # not compatible
query I rowsort label-1022
SELECT - 17 + + col0 / col2 + col1 FROM tab1 AS cor0
----
-4
-6
9

query I rowsort
SELECT DISTINCT + col2 * col1 + 22 FROM tab0 AS cor0
----
119
2860
7484

onlyif mysql # use DIV operator for integer division
query I rowsort label-1024
SELECT ALL cor0.col0 DIV + cor0.col0 FROM tab2 AS cor0
----
1
1
1

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

query I rowsort
SELECT ALL + col2 + cor0.col2 AS col1 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - + ( - col2 ) * + col1 - - col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + col0 * + col2 * - col1 AS col2 FROM tab1
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 col2 FROM tab2
----
34
34
34

query I rowsort
SELECT DISTINCT - 80 * col2 * col1 AS col2 FROM tab1
----
-112320
-45600
-99840

query I rowsort
SELECT ( col1 * tab1.col0 ) AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT - ( col2 ) * - col2 * + col1 FROM tab2
----
22599
24548
39884

skipif mysql # not compatible
query I rowsort
SELECT + cor0.col2 + + CAST ( + 58 AS REAL ) FROM tab1 cor0
----
112
115
154

query I rowsort
SELECT col2 + 22 AS col2 FROM tab0 AS cor0
----
104
23
55

query I rowsort
SELECT + col2 - 4 AS col2 FROM tab1 AS cor0
----
50
53
92

query I rowsort
SELECT - col1 + col1 * cor0.col1 + col0 FROM tab0 AS cor0
----
7334
8279
9347

onlyif mysql # use DIV operator for integer division
query I rowsort label-1036
SELECT tab2.col0 * + col1 + col1 + tab2.col1 DIV col0 FROM tab2
----
1360
252
4661

skipif mysql # not compatible
query I rowsort label-1036
SELECT tab2.col0 * + col1 + col1 + tab2.col1 / col0 FROM tab2
----
1360
252
4661

query I rowsort
SELECT ALL - 71 + col0 + + col2 * col1 AS col0 FROM tab2
----
1541
654
773

query I rowsort
SELECT DISTINCT col1 + + col1 * col0 + tab1.col2 * - tab1.col1 * ( + col0 ) FROM tab1
----
-35830
-4108
-98787

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1039
SELECT DISTINCT - col0 * col2 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-1039
SELECT DISTINCT - col0 * col2 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL

query I rowsort
SELECT - tab1.col2 * tab1.col0 * col2 AS col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT - cor0.col2 - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 7a2e0645e15b3844a0d89b13fc219077

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 * 50 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 01bb888fcda98626ba73f689b45d7e92

query I rowsort
SELECT - + 70 + tab1.col2 AS col1 FROM tab1, tab1 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to f437512b52d127c913c517b0070e2ce8

query I rowsort
SELECT - col1 + ( 2 ) FROM tab1 AS cor0
----
-11
-24
-8

query I rowsort
SELECT cor0.col1 * - cor0.col2 - - 11 AS col2 FROM tab1 AS cor0
----
-1237
-1393
-559

query I rowsort
SELECT + col1 * - ( 63 ) FROM tab2 AS cor0
----
-1071
-1953
-3717

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col2 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - cor0.col1 - ( col0 ) * + 81 AS col1 FROM tab1 AS cor0
----
-269
-5194
-6493

query I rowsort
SELECT ALL + ( + ( cor0.col1 ) ) * col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - ( + ( + col0 ) ) * + col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + ( col1 ) + col2 * ( + col2 ) FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT - 78 - 64 AS col1 FROM tab0 AS cor0
----
-142
-142
-142

query I rowsort
SELECT col2 * 7 FROM tab1
----
378
399
672

query I rowsort
SELECT DISTINCT tab1.col0 * - ( - col0 ) - - col2 AS col1 FROM tab1
----
4153
63
6496

query I rowsort
SELECT ALL - tab0.col2 - + 92 FROM tab0
----
-125
-174
-93

query I rowsort
SELECT DISTINCT tab1.col1 - + col1 * + tab1.col1 FROM tab1
----
-156
-650
-90

query I rowsort
SELECT DISTINCT cor0.col1 + - 91 * - col2 FROM tab0 AS cor0
----
188
3089
7553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1058
SELECT ALL + + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1058
SELECT ALL + + CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 66 + - ( col2 ) + + ( + col1 * col2 ) AS col1 FROM tab2 AS cor0
----
1574
674
876

query I rowsort
SELECT + col2 * - 23 - col1 * - col1 FROM tab2 AS cor0
----
-585
2883
340

onlyif mysql # use DIV operator for integer division
query I rowsort label-1061
SELECT ALL col2 * 88 DIV - col0 FROM tab0 cor0
----
-121
-2
-81

skipif mysql # not compatible
query I rowsort label-1061
SELECT ALL col2 * 88 / - col0 FROM tab0 cor0
----
-121
-2
-81

query I rowsort
SELECT cor0.col1 * ( col1 ) AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT 1 + cor0.col1 + + col0 FROM tab0 AS cor0
----
111
133
181

query I rowsort
SELECT - - 24 AS col0 FROM tab1 AS cor0
----
24
24
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-1065
SELECT ALL + + col1 * + col0 + col0 DIV ( - 77 ) + col1 DIV - ( - cor0.col0 + + col2 * + cor0.col0 ) AS col1 FROM tab1 cor0
----
1039
640
78

skipif mysql # not compatible
query I rowsort label-1065
SELECT ALL + + col1 * + col0 + col0 / ( - 77 ) + col1 / - ( - cor0.col0 + + col2 * + cor0.col0 ) AS col1 FROM tab1 cor0
----
1039
640
78

query I rowsort
SELECT cor0.col1 + col0 * 23 AS col1 FROM tab0 cor0
----
2138
638
902

query I rowsort
SELECT + + 86 * + col2 * + 62 FROM tab2 AS cor0
----
138632
143964
202616

onlyif mysql # use DIV operator for integer division
query I rowsort label-1068
SELECT DISTINCT col0 * col0 + + col2 * col2 DIV + 28 AS col1 FROM tab2 AS cor0
----
6108
6292
75

skipif mysql # not compatible
query I rowsort label-1068
SELECT DISTINCT col0 * col0 + + col2 * col2 / + 28 AS col1 FROM tab2 AS cor0
----
6108
6292
75

query I rowsort
SELECT - + col0 - + col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - - cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT - ( - 60 ) FROM tab0
----
60

query I rowsort
SELECT + + col1 * 44 + - col2 FROM tab2 AS cor0
----
1337
2570
710

query I rowsort
SELECT ALL - 22 * col1 + + cor0.col1 FROM tab1 AS cor0
----
-210
-273
-546

query I rowsort
SELECT ALL + ( - col0 ) + - col0 * - col0 + - col0 * - col1 AS col2 FROM tab2 AS cor0
----
10608
259
7505

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab2 AS cor0
----
43

query I rowsort
SELECT DISTINCT + 87 + + cor0.col0 FROM tab0 AS cor0
----
111
122
176

query I rowsort
SELECT + 63 + col1 AS col1 FROM tab2 AS cor0
----
122
80
94

query I rowsort
SELECT ALL + ( col1 ) AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL col0 + col0 * col2 AS col1 FROM tab2 cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT - + cor0.col2 - - col0 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT + + 85 AS col0 FROM tab2 AS cor0
----
85
85
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1082
SELECT ALL - col2 DIV - col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1082
SELECT ALL - col2 / - col1 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT ALL - - ( - col2 ) * ( + col0 ) + - cor0.col2 * + col1 AS col0 FROM tab0 AS cor0
----
-132
-14760
-3630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 87 col1 FROM tab0 AS cor0
----
-87
-87
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-1085
SELECT ALL col1 DIV + cor0.col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1085
SELECT ALL col1 / + cor0.col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT DISTINCT - - col1 + col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL + - col2 * col1 * 29 FROM tab0 AS cor0
----
-216398
-2813
-82302

onlyif mysql # use DIV operator for integer division
query I rowsort label-1088
SELECT DISTINCT 53 DIV col1 FROM tab1 AS cor0
----
2
4
5

skipif mysql # not compatible
query I rowsort label-1088
SELECT DISTINCT 53 / col1 FROM tab1 AS cor0
----
2
4
5

query I rowsort
SELECT ALL + cor2.col2 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1090
SELECT + col2 * CAST( NULL AS SIGNED ) + - col1 * col0 + col1 * cor0.col1 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT cor0.col0 * - col2 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT - col0 * - 11 FROM tab1
----
33
704
880

query I rowsort
SELECT ALL + col0 + col0 * - 96 FROM tab2
----
-665
-7410
-7505

query I rowsort
SELECT DISTINCT + col1 - - col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT + col1 * col0 - + 55 AS col2 FROM tab2 AS cor0
----
1288
162
4547

query I rowsort
SELECT ALL - col2 * - col0 + - col1 * - col0 FROM tab1 AS cor0
----
240
4288
8720

onlyif mysql # use DIV operator for integer division
query I rowsort label-1097
SELECT DISTINCT - col2 - col1 DIV - 45 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1097
SELECT DISTINCT - col2 - col1 / - 45 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - col1 + - ( ( cor0.col1 ) ) * - col1 AS col1 FROM tab2 AS cor0
----
272
3422
930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1099
SELECT ALL CAST( col2 AS SIGNED ) * - col2 + - 43 FROM tab0 cor0
----
-1132
-44
-6767

skipif mysql # not compatible
query I rowsort label-1099
SELECT ALL CAST ( col2 AS INTEGER ) * - col2 + - 43 FROM tab0 cor0
----
-1132
-44
-6767

query I rowsort
SELECT DISTINCT + col1 * - ( - col2 * - col0 ) + - col2 FROM tab1 AS cor0
----
-36537
-4266
-99936

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

query I rowsort
SELECT ALL - col2 * col0 + - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) AS col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - ( + col1 ) * col0 - - cor0.col0 * + 21 AS col0 FROM tab0 AS cor0
----
-1560
-2660
-6230

query I rowsort
SELECT ( + col1 ) * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - 57 * 14 - - col1 AS col0 FROM tab2 AS cor0
----
-739
-767
-781

query I rowsort
SELECT DISTINCT col2 + col1 + + 25 AS col1 FROM tab0
----
123
144
198

query I rowsort
SELECT DISTINCT col1 * + col0 * 25 + - col1 * col2 FROM tab0
----
195013
48762
84778

onlyif mysql # use DIV operator for integer division
query I rowsort label-1109
SELECT col1 + col1 DIV col2 + + col2 AS col2 FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-1109
SELECT col1 + col1 / col2 + + col2 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT + col0 + - ( + col1 ) + cor0.col2 AS col0 FROM tab0 AS cor0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1111
SELECT DISTINCT + 73 + - col0 * cor0.col2 DIV - col0 AS col1 FROM tab1 AS cor0
----
127
130
169

skipif mysql # not compatible
query I rowsort label-1111
SELECT DISTINCT + 73 + - col0 * cor0.col2 / - col0 AS col1 FROM tab1 AS cor0
----
127
130
169

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1112
SELECT - CAST( col0 AS SIGNED ) * col1 + col0 + - col2 AS col0 FROM tab1 cor0
----
-1056
-129
-633

skipif mysql # not compatible
query I rowsort label-1112
SELECT - CAST ( col0 AS INTEGER ) * col1 + col0 + - col2 AS col0 FROM tab1 cor0
----
-1056
-129
-633

query I rowsort
SELECT - ( col2 ) * col1 + - col2 + cor0.col0 * col0 AS col1 FROM tab0 AS cor0
----
-2295
1127
377

query I rowsort
SELECT ALL col1 * 53 FROM tab0 AS cor0
----
4558
4823
5141

query I rowsort
SELECT ALL 25 * + col1 AS col1 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT - col1 + + 98 + + col0 FROM tab1 cor0
----
152
165
75

query I rowsort
SELECT DISTINCT + - 98 + col0 FROM tab0 cor0
----
-63
-74
-9

query I rowsort
SELECT col2 * + col0 + - col0 * - col0 FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

onlyif mysql # use DIV operator for integer division
query I rowsort label-1120
SELECT - 80 DIV + col2 + + col1 FROM tab1 AS cor0
----
13
25
9

skipif mysql # not compatible
query I rowsort label-1120
SELECT - 80 / + col2 + + col1 FROM tab1 AS cor0
----
13
25
9

query I rowsort
SELECT 32 * col2 AS col0 FROM tab2
----
1216
832
864

query I rowsort
SELECT ALL 49 * - col1 FROM tab1
----
-1274
-490
-637

query I rowsort
SELECT col1 * - col2 * ( + cor0.col2 + col1 ) FROM tab0 AS cor0
----
-1290926
-337722
-9506

query I rowsort
SELECT + col1 * + col1 + 70 FROM tab2 AS cor0
----
1031
3551
359

query I rowsort
SELECT - + col1 + 36 * + col0 AS col1 FROM tab0 AS cor0
----
1163
3113
778

query I rowsort
SELECT + tab2.col0 * col2 + col0 * col2 * - col1 FROM tab2
----
-117624
-48032
-5670

query I rowsort
SELECT ALL - col2 * ( - col2 ) * + col0 + tab1.col1 * + col1 FROM tab1
----
208036
737449
9424

query I rowsort
SELECT ALL - + col2 * ( - col1 ) + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT 93 * 63 FROM tab1, tab1 AS cor0
----
9 values hashing to 3e4722ab8d2ed64beb172a9adb4f7678

query I rowsort
SELECT col0 - - col2 * + col1 FROM tab0 cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 AS col1 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-1132
SELECT ALL + col0 DIV 28 FROM tab2 AS cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1132
SELECT ALL + col0 / 28 FROM tab2 AS cor0
----
0
2
2

query I rowsort
SELECT + col0 + - 32 + col0 FROM tab0 AS cor0
----
146
16
38

query I rowsort
SELECT + col1 * - ( - 21 ) AS col0 FROM tab1 AS cor0
----
210
273
546

query I rowsort
SELECT - col0 + col0 + col0 AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT col0 + 59 AS col1 FROM tab0 AS cor0
----
148
83
94

query I rowsort
SELECT 57 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT DISTINCT 59 - + col0 FROM tab0
----
-30
24
35

query I rowsort
SELECT + + cor0.col1 + col2 * + ( col2 ) FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT - cor0.col0 + + col2 FROM tab1 cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-1141
SELECT - col2 * + CAST( cor0.col1 AS SIGNED ) + col0 DIV col0 FROM tab2 cor0
----
-1533
-645
-836

skipif mysql # not compatible
query I rowsort label-1141
SELECT - col2 * + CAST ( cor0.col1 AS INTEGER ) + col0 / col0 FROM tab2 cor0
----
-1533
-645
-836

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1142
SELECT col1 / + CAST( NULL AS SIGNED ) + + col2 * + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1142
SELECT col1 / + CAST ( NULL AS INTEGER ) + + col2 * + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 * + col1 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 70 col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1145
SELECT ALL + cor0.col1 DIV - cor0.col2 + + col0 AS col1 FROM tab0 AS cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-1145
SELECT ALL + cor0.col1 / - cor0.col2 + + col0 AS col1 FROM tab0 AS cor0
----
-62
22
88

query I rowsort
SELECT ALL + col0 * + ( + col2 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - col0 * - 0 + cor0.col2 * + col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT 31 * cor0.col1 FROM tab1 AS cor0
----
310
403
806

query I rowsort
SELECT DISTINCT - + 85 * col2 + + col2 FROM tab1 AS cor0
----
-4536
-4788
-8064

query I rowsort
SELECT - - 51 AS col0 FROM tab0 AS cor0
----
51
51
51

query I rowsort
SELECT - 43 * col1 AS col0 FROM tab2 AS cor0
----
-1333
-2537
-731

query I rowsort
SELECT ALL + col1 * 39 AS col2 FROM tab1
----
1014
390
507

query I rowsort
SELECT - cor0.col1 * cor0.col1 * + col1 FROM tab2 AS cor0
----
-205379
-29791
-4913

onlyif mysql # use DIV operator for integer division
query I rowsort label-1154
SELECT + col2 + 96 DIV cor0.col1 FROM tab0 AS cor0
----
1
34
83

skipif mysql # not compatible
query I rowsort label-1154
SELECT + col2 + 96 / cor0.col1 FROM tab0 AS cor0
----
1
34
83

query I rowsort
SELECT DISTINCT - col0 * - 8 AS col1 FROM tab0
----
192
280
712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + col0 col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1157
SELECT - 8 + col1 * 73 DIV col0 FROM tab0 AS cor0
----
194
253
66

skipif mysql # not compatible
query I rowsort label-1157
SELECT - 8 + col1 * 73 / col0 FROM tab0 AS cor0
----
194
253
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-1158
SELECT col1 * col1 DIV - col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-1158
SELECT col1 * col1 / - col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-12

query I rowsort
SELECT + 89 * - col0 FROM tab2 AS cor0
----
-623
-6942
-7031

query I rowsort
SELECT DISTINCT - - col0 * col1 * cor0.col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT + 36 AS col2 FROM tab0 AS cor0
----
36
36
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1162
SELECT + + 0 + - col0 * CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-1162
SELECT + + 0 + - col0 * CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 24 * tab1.col0 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 3b8a48eb981b5d832c1c00af57ac46ae

query I rowsort
SELECT ALL + ( 71 ) FROM tab0
----
71
71
71

query I rowsort
SELECT ALL - - 25 AS col0 FROM tab0 AS cor0
----
25
25
25

query I rowsort
SELECT 11 AS col2 FROM tab2, tab1, tab0 AS cor0, tab0
----
81 values hashing to 288f8fb62e079d095c14d7cf3e2d3359

query I rowsort
SELECT + + cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + ( + ( col0 ) ) AS col2 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1169
SELECT + - col2 * - CAST( NULL AS SIGNED ) / + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1169
SELECT + - col2 * - CAST ( NULL AS INTEGER ) / + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1170
SELECT col0 * + CAST( - col1 AS SIGNED ) * + col1 + + ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-13440
-2025
-6336

skipif mysql # not compatible
query I rowsort label-1170
SELECT col0 * + CAST ( - col1 AS INTEGER ) * + col1 + + ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-13440
-2025
-6336

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 91 col2 FROM tab0
----
7826
8281
8827

query I rowsort
SELECT - col2 - col0 * + col0 AS col1 FROM tab2
----
-6110
-6279
-76

query I rowsort
SELECT ALL - col0 - col0 * col2 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT ALL - col2 * + 35 FROM tab0 AS cor0
----
-1155
-2870
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - 76 ) col2 FROM tab2 AS cor0
----
-76
-76
-76

query I rowsort
SELECT - col2 + + 65 * + col1 AS col2 FROM tab2 AS cor0
----
1067
1988
3809

skipif mysql # not compatible
query I rowsort
SELECT - - col0 * + col2 + + col1 + + CAST ( cor0.col0 AS REAL ) * - col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1178
SELECT - col0 * + col0 + col0 * + tab2.col2 * + col2 - ( col2 * CAST( col2 AS SIGNED ) ) FROM tab2
----
106391
4325
45968

skipif mysql # not compatible
query I rowsort label-1178
SELECT - col0 * + col0 + col0 * + tab2.col2 * + col2 - ( col2 * CAST ( col2 AS INTEGER ) ) FROM tab2
----
106391
4325
45968

query I rowsort
SELECT col1 + - col0 * - col0 AS col1 FROM tab1
----
35
4106
6413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1180
SELECT + - CAST( NULL AS SIGNED ) * col2 + - cor0.col0 * - col1 + - col0 * col0 FROM tab1 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL - + 31 * + col0 AS col0 FROM tab2 AS cor0
----
-217
-2418
-2449

onlyif mysql # use DIV operator for integer division
query I rowsort label-1182
SELECT DISTINCT + - cor0.col1 DIV + col1 AS col1 FROM tab0 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-1182
SELECT DISTINCT + - cor0.col1 / + col1 AS col1 FROM tab0 cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1183
SELECT col2 + col2 DIV tab1.col0 AS col2 FROM tab1
----
57
72
97

skipif mysql # not compatible
query I rowsort label-1183
SELECT col2 + col2 / tab1.col0 AS col2 FROM tab1
----
57
72
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col0 + + 65 * - col1 col0 FROM tab1
----
-1699
-4746
-7245

query I rowsort
SELECT - tab2.col0 + + tab2.col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col0 + ( + 53 ) AS col0 FROM tab0
----
142
77
88

query I rowsort
SELECT col2 + + ( tab1.col0 ) + col1 AS col2 FROM tab1
----
131
189
83

query I rowsort
SELECT ALL - col2 * - col2 + col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-1189
SELECT ( - col1 ) DIV col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-1189
SELECT ( - col1 ) / col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT DISTINCT + col2 * + ( - col2 ) AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - cor0.col2 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + 49 - tab1.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 0b0a707f0cd5ea50d9831dfc6af84138

query I rowsort
SELECT - tab2.col2 * col2 * col2 + ( + col0 ) AS col0 FROM tab2
----
-17498
-19676
-54793

query I rowsort
SELECT - col1 * + 58 AS col1 FROM tab2
----
-1798
-3422
-986

onlyif mysql # use DIV operator for integer division
query I rowsort label-1195
SELECT ALL + + 98 DIV 84 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1195
SELECT ALL + + 98 / 84 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + - col2 + ( col0 ) + + 81 AS col1 FROM tab2 AS cor0
----
122
133
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-1197
SELECT DISTINCT col0 DIV - tab0.col1 AS col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-1197
SELECT DISTINCT col0 / - tab0.col1 AS col1 FROM tab0
----
0

query I rowsort
SELECT 36 + col0 * ( col1 ) * col1 FROM tab0
----
177540
329351
737045

query I rowsort
SELECT DISTINCT col0 + col0 - col0 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT + 22 + + col1 - + ( - col0 ) FROM tab1
----
115
51
96

query I rowsort
SELECT ALL - 23 + - col2 FROM tab0 AS cor0
----
-105
-24
-56

query I rowsort
SELECT DISTINCT + col0 * + col1 - col2 AS col2 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT - col0 - col1 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT 75 * cor0.col1 + + col2 AS col1 FROM tab0 AS cor0
----
6483
6907
7276

query I rowsort
SELECT ALL ( col1 ) * ( + 12 ) FROM tab1 AS cor0
----
120
156
312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1206
SELECT ALL col2 + CAST( NULL AS SIGNED ) * + 19 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1206
SELECT ALL col2 + CAST ( NULL AS INTEGER ) * + 19 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + cor0.col1 * - col1 + - col0 AS col0 FROM tab2 cor0
----
-3585
-406
-995

onlyif mysql # use DIV operator for integer division
query I rowsort label-1208
SELECT - col2 DIV + col1 AS col2 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-1208
SELECT - col2 / + col1 AS col2 FROM tab2
----
-2
0
0

query I rowsort
SELECT DISTINCT - col1 * - ( col1 ) * + col2 + - col1 + - col2 AS col0 FROM tab1
----
16115
36424
5633

query I rowsort
SELECT DISTINCT - col0 + + cor0.col2 * - ( - col2 ) + col0 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT cor0.col0 * col0 - + col0 AS col2 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT DISTINCT + + col1 + - 55 * + col2 FROM tab0 AS cor0
----
-1729
-4419
42

query I rowsort
SELECT ALL + col0 + 45 + - col2 FROM tab0 AS cor0
----
36
52
79

query I rowsort
SELECT ALL - col1 * cor0.col0 + - col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + - col1 + + cor0.col0 * - col2 AS col2 FROM tab0 AS cor0
----
-132
-7389
-878

onlyif mysql # use DIV operator for integer division
query I rowsort label-1216
SELECT DISTINCT - col2 + col0 + - 39 DIV + col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-1216
SELECT DISTINCT - col2 + col0 + - 39 / + col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1217
SELECT ALL + + col1 * + cor0.col2 - 66 DIV col1 AS col2 FROM tab2 AS cor0
----
1533
643
835

skipif mysql # not compatible
query I rowsort label-1217
SELECT ALL + + col1 * + cor0.col2 - 66 / col1 AS col2 FROM tab2 AS cor0
----
1533
643
835

query I rowsort
SELECT ALL + col0 + + col1 * ( - col1 ) AS col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL - - col2 * col1 + 42 AS col0 FROM tab1 AS cor0
----
1290
1446
612

query I rowsort
SELECT - ( col1 ) * + cor0.col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL col2 + + ( - col2 ) AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - + 95 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 28 + + col0 col0 FROM tab0 cor0
----
117
52
63

query I rowsort
SELECT DISTINCT - 59 - - col2 * col1 FROM tab2 AS cor0
----
1475
587
778

query I rowsort
SELECT ALL + - 5 * col0 AS col1 FROM tab0 AS cor0
----
-120
-175
-445

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1226
SELECT ALL - col1 + - col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT - ( col0 ) * + 79 FROM tab2 AS cor0
----
-553
-6162
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1228
SELECT DISTINCT col2 * + col1 - - CAST( + 57 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
154
2895
7519

skipif mysql # not compatible
query I rowsort label-1228
SELECT DISTINCT col2 * + col1 - - CAST ( + 57 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
154
2895
7519

query I rowsort
SELECT + - col1 + + col1 * + col1 AS col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT + - ( - col1 ) * - ( 69 + + col1 ) AS col1 FROM tab1 AS cor0
----
-1066
-2470
-790

query I rowsort
SELECT DISTINCT 25 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
25

query I rowsort
SELECT ( + cor0.col1 ) * + 0 AS col2 FROM tab2, tab1 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

onlyif mysql # use DIV operator for integer division
query I rowsort label-1233
SELECT DISTINCT + col2 * - col1 + tab2.col2 DIV - col1 - tab2.col1 AS col0 FROM tab2
----
-1593
-665
-868

skipif mysql # not compatible
query I rowsort label-1233
SELECT DISTINCT + col2 * - col1 + tab2.col2 / - col1 - tab2.col1 AS col0 FROM tab2
----
-1593
-665
-868

query I rowsort
SELECT col1 * col1 + - ( col2 * - col2 ) FROM tab1
----
3349
3592
9385

query I rowsort
SELECT 62 - - col1 * + tab2.col1 FROM tab2
----
1023
351
3543

query I rowsort
SELECT col0 + - col1 * ( col1 ) AS col2 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT 2 * + tab1.col0 * + tab1.col0 + 82 - + col1 FROM tab1
----
12869
74
8264

query I rowsort
SELECT ALL - col0 * + col2 - - col1 AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT + col2 * - col1 + 79 * - 52 AS col2 FROM tab2 cor0
----
-4754
-4945
-5642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col1 col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + 22 * - col2 FROM tab0 AS cor0
----
-1804
-22
-726

query I rowsort
SELECT DISTINCT - tab2.col1 * - 16 AS col0 FROM tab2, tab2 AS cor0
----
272
496
944

query I rowsort
SELECT ALL - 8 FROM tab2, tab1 AS cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT DISTINCT tab1.col0 + - 80 FROM tab1
----
-16
-77
0

query I rowsort
SELECT + - col2 + + col0 * - 51 AS col2 FROM tab0 cor0
----
-1257
-1786
-4621

query I rowsort
SELECT - + 47 + - col2 * col2 FROM tab1 AS cor0
----
-2963
-3296
-9263

query I rowsort
SELECT + 60 + col2 AS col2 FROM tab0 AS cor0
----
142
61
93

query I rowsort
SELECT DISTINCT - - col1 + 52 AS col0 FROM tab1 AS cor0
----
62
65
78

query I rowsort
SELECT ALL - col0 + + col2 + cor0.col1 * + 29 * 8 AS col2 FROM tab2 AS cor0
----
13636
3903
7212

query I rowsort
SELECT col1 * + col1 + + col2 AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - col2 * col1 * col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL 84 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1 cor2
----
81 values hashing to 3c092ed1a99ddb5afc7049fd2b9427f9

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab0 cor1, tab0, tab1 AS cor2
----
3645 values hashing to e5255b2277726ba4514ff55622dec830

query I rowsort
SELECT 44 * ( + col0 ) + + col0 AS col0 FROM tab0 AS cor0
----
1080
1575
4005

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col2 AS REAL ) FROM tab0 cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1256
SELECT DISTINCT - CAST( - 59 AS SIGNED ) + cor0.col0 - 84 * + 87 FROM tab0 AS cor0
----
-7160
-7214
-7225

skipif mysql # not compatible
query I rowsort label-1256
SELECT DISTINCT - CAST ( - 59 AS INTEGER ) + cor0.col0 - 84 * + 87 FROM tab0 AS cor0
----
-7160
-7214
-7225

query I rowsort
SELECT ALL 81 + - col2 * col2 FROM tab0 AS cor0
----
-1008
-6643
80

query I rowsort
SELECT DISTINCT + - 26 + col1 FROM tab0 AS cor0
----
60
65
71

query I rowsort
SELECT ALL col2 + + col1 * - 97 FROM tab1 AS cor0
----
-1165
-2468
-913

query I rowsort
SELECT ALL - 92 * - col2 AS col0 FROM tab2 AS cor0
----
2392
2484
3496

query I rowsort
SELECT DISTINCT + + ( - col0 ) + ( col1 * - col2 + + col0 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - - 45 + - col2 AS col1 FROM tab1 AS cor0
----
-12
-51
-9

query I rowsort
SELECT ALL - - col2 + + col0 * - 82 AS col2 FROM tab0 AS cor0
----
-1935
-2869
-7216

query I rowsort
SELECT DISTINCT cor0.col1 + col0 * - col2 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT col1 + col2 * + col2 AS col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT DISTINCT + - 60 * col2 AS col1 FROM tab1 AS cor0
----
-3240
-3420
-5760

query I rowsort
SELECT ALL - 98 + - col2 * col1 AS col1 FROM tab1 cor0
----
-1346
-1502
-668

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1268
SELECT DISTINCT + col2 + - col0 * CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

skipif mysql # not compatible
query I rowsort label-1268
SELECT DISTINCT + col2 + - col0 * CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT ALL col1 + 55 FROM tab2 AS cor0
----
114
72
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + col1 + col1 col0 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT + col2 + + col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1272
SELECT - + col2 + - CAST( NULL AS DECIMAL ) * - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1272
SELECT - + col2 + - CAST ( NULL AS REAL ) * - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 + - 66 * + col0 AS col0 FROM tab2 AS cor0
----
-435
-5122
-5176

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1274
SELECT - col0 + CAST( 27 * - col2 AS SIGNED ) FROM tab2 AS cor0
----
-1105
-736
-780

skipif mysql # not compatible
query I rowsort label-1274
SELECT - col0 + CAST ( 27 * - col2 AS INTEGER ) FROM tab2 AS cor0
----
-1105
-736
-780

query I rowsort
SELECT col2 * 59 AS col0 FROM tab0 cor0
----
1947
4838
59

query I rowsort
SELECT ALL col1 * - col2 * ( - 92 ) AS col0 FROM tab2
----
141128
59432
77004

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1277
SELECT ALL col0 + + CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-1277
SELECT ALL col0 + + CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + col1 * 41 FROM tab2 AS cor0
----
1271
2419
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1279
SELECT DISTINCT + - cor0.col0 * - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL

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

query I rowsort
SELECT + cor0.col1 * ( + col2 * + col1 ) + col2 FROM tab1 AS cor0
----
16320
36558
5757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * 77 col2 FROM tab0 AS cor0
----
-6622
-7007
-7469

query I rowsort
SELECT - tab1.col2 * - col2 + - 7 * + tab1.col0 AS col1 FROM tab1
----
2801
2895
8656

query I rowsort
SELECT + col2 * - tab1.col1 * col2 AS col2 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT - cor0.col0 + - cor0.col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT + + 90 + col2 FROM tab2 AS cor0
----
116
117
128

query I rowsort
SELECT + col0 + + col0 * - ( col0 * + col0 ) FROM tab1 cor0
----
-24
-262080
-511920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 + + cor0.col0 * 19 * - col1 col1 FROM tab1 AS cor0
----
-12217
-1536
-19856

query I rowsort
SELECT DISTINCT - - 47 AS col0 FROM tab0 AS cor0
----
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col2 col0 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + - col0 * cor0.col1 + ( cor0.col2 * col0 ) AS col2 FROM tab1 AS cor0
----
3008
6640
84

query I rowsort
SELECT DISTINCT - + 80 - col2 AS col0 FROM tab2 cor0
----
-106
-107
-118

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 41 * - col1 col1 FROM tab2 AS cor0
----
-1271
-2419
-697

query I rowsort
SELECT ALL - 56 * col0 AS col2 FROM tab1 AS cor0
----
-168
-3584
-4480

onlyif mysql # use DIV operator for integer division
query I rowsort label-1294
SELECT DISTINCT 77 DIV - col2 col1 FROM tab1 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1294
SELECT DISTINCT 77 / - col2 col1 FROM tab1 AS cor0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1295
SELECT ALL CAST( - 28 AS SIGNED ) FROM tab1
----
-28
-28
-28

skipif mysql # not compatible
query I rowsort label-1295
SELECT ALL CAST ( - 28 AS INTEGER ) FROM tab1
----
-28
-28
-28

query I rowsort
SELECT col0 - + col0 * + ( 69 ) FROM tab2 AS cor0
----
-476
-5304
-5372

query I rowsort
SELECT + - 24 - col1 AS col0 FROM tab2 AS cor0
----
-41
-55
-83

query I rowsort
SELECT - cor0.col1 + + 73 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2795217fc7d7a8c3d681e02f5ca6d470

query I rowsort
SELECT ( - 76 ) AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d90b4aa5f03b4a149aa925c4a88acca0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

query I rowsort
SELECT 84 * + col2 FROM tab2
----
2184
2268
3192

query I rowsort
SELECT DISTINCT - - cor0.col1 + - 24 * cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 922f144b99004196a5b1a58c239af68a

query I rowsort
SELECT ALL - col2 + - col0 * + col1 AS col2 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT + ( + 12 ) * col1 * col0 AS col1 FROM tab1 AS cor0
----
12480
7680
936

query I rowsort
SELECT DISTINCT - col1 * ( col2 ) * - col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT ( 11 ) FROM tab2
----
11
11
11

query I rowsort
SELECT ( 23 ) * tab1.col1 + ( + ( + col1 ) ) FROM tab1
----
240
312
624

query I rowsort
SELECT ALL - + col2 + - col0 * + col1 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT - 63 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to fc0b533c2773a0a802e1fc8317dcebf2

query I rowsort
SELECT ALL - + col2 + cor0.col0 + col2 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL - cor0.col0 + - ( 44 ) AS col0 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 64b6289e302ddee471a17c127025ba40

query I rowsort
SELECT ALL tab0.col1 AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab1 cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1315
SELECT - CAST( NULL AS SIGNED ) + col0 col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1315
SELECT - CAST ( NULL AS INTEGER ) + col0 col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 94 * col1 + col0 FROM tab0 AS cor0
----
-8060
-8465
-9083

query I rowsort
SELECT ALL + + cor0.col0 * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT ( + col1 ) + cor0.col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - ( 14 * col2 ) FROM tab2
----
-364
-378
-532

onlyif mysql # use DIV operator for integer division
query I rowsort label-1320
SELECT ALL 92 DIV + col1 AS col2 FROM tab1
----
3
7
9

skipif mysql # not compatible
query I rowsort label-1320
SELECT ALL 92 / + col1 AS col2 FROM tab1
----
3
7
9

query I rowsort
SELECT ( + 34 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT + tab0.col1 * + 17 * + tab0.col0 AS col1 FROM tab0
----
137683
35088
57715

query I rowsort
SELECT ( 57 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT ALL - col2 + - col1 * - 84 AS col2 FROM tab0 AS cor0
----
7191
7562
8147

query I rowsort
SELECT col1 + - 8 + col1 AS col2 FROM tab2 AS cor0
----
110
26
54

query I rowsort
SELECT DISTINCT + col1 * - ( col0 ) FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT cor0.col2 + 26 AS col1 FROM tab0 AS cor0
----
108
27
59

query I rowsort
SELECT col0 + col0 * - ( - col1 ) FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - - col0 * - col2 + - 29 + col1 FROM tab2 AS cor0
----
-187
-1998
-3014

query I rowsort
SELECT - ( + col0 ) * + col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + ( - col0 ) + + col1 * + ( - 69 + + col0 ) AS col1 FROM tab2 cor0
----
-1929
453
91

query I rowsort
SELECT DISTINCT + col1 + - col2 + cor0.col2 AS col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - 10 col2 FROM tab2 AS cor0
----
170
310
590

query I rowsort
SELECT ALL + + col1 + 4 + col0 FROM tab0 AS cor0
----
114
136
184

query I rowsort
SELECT ALL - + 91 AS col0 FROM tab0 AS cor0
----
-91
-91
-91

query I rowsort
SELECT + cor0.col0 + - 35 AS col1 FROM tab0 cor0
----
-11
0
54

query I rowsort
SELECT + + cor0.col1 * - 97 AS col2 FROM tab2 AS cor0
----
-1649
-3007
-5723

query I rowsort
SELECT ALL - 42 FROM tab0, tab1 cor0
----
9 values hashing to 9894093f29c0defae91347934f060329

query I rowsort
SELECT - col1 * - ( + col1 ) AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL - col2 * 75 FROM tab1 AS cor0
----
-4050
-4275
-7200

query I rowsort
SELECT DISTINCT + tab2.col0 FROM tab2, tab0, tab0 AS cor0
----
7
78
79

query I rowsort
SELECT 29 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT col2 * - 35 FROM tab2 AS cor0
----
-1330
-910
-945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - ( + col0 + - col2 ) col1 FROM tab1
----
-448
1280
153

query I rowsort
SELECT - - col1 * - col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL cor0.col1 + 97 FROM tab1, tab2 AS cor0
----
9 values hashing to 168f04f79bf0fe53ef77f40c5e1714f6

query I rowsort
SELECT ALL - 99 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 761f5f1a166a00db99360141565a85da

query I rowsort
SELECT ALL - col2 * 24 FROM tab1
----
-1296
-1368
-2304

query I rowsort
SELECT ALL - ( + ( col1 ) * 40 ) FROM tab1
----
-1040
-400
-520

query I rowsort
SELECT + - 14 + - col0 + 43 * col0 FROM tab1 AS cor0
----
112
2674
3346

onlyif mysql # use DIV operator for integer division
query I rowsort label-1351
SELECT - 80 * col1 DIV + tab2.col0 col2 FROM tab2
----
-17
-354
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1351
SELECT - 80 * col1 / + tab2.col0 col2 FROM tab2
----
-17
-354
-60

query I rowsort
SELECT + col0 * - col0 + col1 AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT col1 + + col0 * - col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + 40 + + col0 * - 60 FROM tab2 AS cor0
----
-380
-4640
-4700

query I rowsort
SELECT ALL + 53 * - tab1.col2 FROM tab1
----
-2862
-3021
-5088

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col2 FROM tab1 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-1357
SELECT + col2 DIV cor0.col1 + col1 AS col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-1357
SELECT + col2 / cor0.col1 + col1 AS col1 FROM tab1 AS cor0
----
15
20
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-1358
SELECT 95 + - col0 DIV 31 col2 FROM tab2 AS cor0
----
93
93
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1358
SELECT 95 + - col0 / 31 col2 FROM tab2 AS cor0
----
93
93
95

query I rowsort
SELECT DISTINCT - 68 + col1 FROM tab1
----
-42
-55
-58

query I rowsort
SELECT ( col2 ) * col1 * col0 + + col1 FROM tab2
----
119711
51051
5890

query I rowsort
SELECT ALL tab0.col1 + + col2 AS col0 FROM tab0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1362
SELECT - col0 - - col1 * - CAST( col1 AS SIGNED ) AS col1 FROM tab0
----
-7420
-8370
-9444

skipif mysql # not compatible
query I rowsort label-1362
SELECT - col0 - - col1 * - CAST ( col1 AS INTEGER ) AS col1 FROM tab0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT col0 + tab1.col1 * + 5 + + col1 FROM tab1
----
124
158
159

query I rowsort
SELECT - col1 * + col0 * + col2 - col1 FROM tab1
----
-36490
-4238
-99853

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1365
SELECT + col1 * + col1 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1365
SELECT + col1 * + col1 + + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + col2 * tab0.col2 + - 76 AS col1 FROM tab0
----
-41
26060
598360

query I rowsort
SELECT DISTINCT - col2 * + col1 + 88 AS col1 FROM tab1
----
-1160
-1316
-482

query I rowsort
SELECT - + 42 * + cor0.col0 + 63 AS col1 FROM tab2 AS cor0
----
-231
-3213
-3255

query I rowsort
SELECT ALL + col0 * + col1 * 39 AS col1 FROM tab1 AS cor0
----
24960
3042
40560

query I rowsort
SELECT - col1 * + 31 AS col1 FROM tab0 AS cor0
----
-2666
-2821
-3007

query I rowsort
SELECT - col1 * 54 FROM tab1 AS cor0
----
-1404
-540
-702

query I rowsort
SELECT ALL cor0.col2 * + col2 * + col0 + cor0.col0 FROM tab0 AS cor0
----
26160
598525
70

query I rowsort
SELECT ALL + + col0 + ( + col0 ) AS col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1374
SELECT - col0 DIV - ( 76 ) + + col2 * col0 FROM tab0 AS cor0
----
35
7299
792

skipif mysql # not compatible
query I rowsort label-1374
SELECT - col0 / - ( 76 ) + + col2 * col0 FROM tab0 AS cor0
----
35
7299
792

query I rowsort
SELECT - cor2.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to f74ca4a9760ae5a015b067d560a14502

query I rowsort
SELECT col0 + col0 * col1 * col2 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT DISTINCT - col1 + col0 * col0 AS col2 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT DISTINCT + tab0.col2 * + 54 FROM tab0, tab2 AS cor0
----
1782
4428
54

query I rowsort
SELECT ( - col1 ) * ( - col1 + tab1.col1 ) FROM tab1
----
0
0
0

query I rowsort
SELECT cor0.col2 + - 90 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 8f4b416e6d940eb19658362c34408b74

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

query I rowsort
SELECT DISTINCT col0 * ( col1 ) + - cor0.col2 + + ( - col0 ) * col1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-1383
SELECT col2 * ( + col2 * - col2 ) + ( - col2 + + col1 ) DIV - col0 AS col1 FROM tab0 AS cor0
----
-3
-35939
-551368

skipif mysql # not compatible
query I rowsort label-1383
SELECT col2 * ( + col2 * - col2 ) + ( - col2 + + col1 ) / - col0 AS col1 FROM tab0 AS cor0
----
-3
-35939
-551368

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - col1 col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + tab0.col1 - + 71 * col0 AS col0 FROM tab0
----
-1618
-2388
-6228

query I rowsort
SELECT + - 43 * 86 FROM tab0 AS cor0
----
-3698
-3698
-3698

query I rowsort
SELECT ALL + + col2 + + col2 * col2 AS col0 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT - ( - 35 ) FROM tab1 AS cor0
----
35
35
35

query I rowsort
SELECT DISTINCT - col1 * + col1 + col1 AS col2 FROM tab2 cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL + - 64 - - 17 AS col2 FROM tab2 AS cor0
----
-47
-47
-47

onlyif mysql # use DIV operator for integer division
query I rowsort label-1391
SELECT - ( col2 ) - + cor0.col2 DIV - col1 AS col2 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-1391
SELECT - ( col2 ) - + cor0.col2 / - col1 AS col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT + + col1 - col0 * col0 AS col2 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL - 88 + - cor0.col1 FROM tab1 AS cor0
----
-101
-114
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1394
SELECT ALL 70 + col1 DIV col2 FROM tab1 AS cor0
----
70
70
70

skipif mysql # not compatible
query I rowsort label-1394
SELECT ALL 70 + col1 / col2 FROM tab1 AS cor0
----
70
70
70

query I rowsort
SELECT col1 + - col0 * - ( + col2 ) * col1 AS col1 FROM tab0 AS cor0
----
3492
664209
68198

query I rowsort
SELECT - col1 * col2 + 68 AS col1 FROM tab0 AS cor0
----
-2770
-29
-7394

onlyif mysql # use DIV operator for integer division
query I rowsort label-1397
SELECT ALL - col1 DIV tab0.col2 - - col0 FROM tab0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-1397
SELECT ALL - col1 / tab0.col2 - - col0 FROM tab0
----
-62
22
88

query I rowsort
SELECT DISTINCT col2 * - col1 - - tab0.col0 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT ALL - + cor0.col2 AS col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT col2 * 40 FROM tab2
----
1040
1080
1520

onlyif mysql # use DIV operator for integer division
query I rowsort label-1401
SELECT ALL - col1 + + cor0.col1 DIV col2 AS col0 FROM tab0 cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-1401
SELECT ALL - col1 + + cor0.col1 / col2 AS col0 FROM tab0 cor0
----
-84
-90
0

query I rowsort
SELECT DISTINCT cor0.col0 - - col2 AS col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1403
SELECT DISTINCT + col0 + CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-1403
SELECT DISTINCT + col0 + CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * - col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + + col1 + + col2 * - col1 FROM tab2 cor0
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1407
SELECT CAST( NULL AS SIGNED ) / + 68 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1407
SELECT CAST ( NULL AS INTEGER ) / + 68 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 13 * - col0 * + col1 FROM tab2 AS cor0
----
17459
2821
59826

onlyif mysql # use DIV operator for integer division
query I rowsort label-1409
SELECT + 64 * 4 DIV col2 FROM tab1 AS cor0
----
2
4
4

skipif mysql # not compatible
query I rowsort label-1409
SELECT + 64 * 4 / col2 FROM tab1 AS cor0
----
2
4
4

query I rowsort
SELECT ALL 68 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
103
157
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col2 ) - col0 * - cor0.col1 col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT ( 90 ) AS col2 FROM tab2 AS cor0
----
90

query I rowsort
SELECT + 38 - - 79 AS col0 FROM tab2 cor0
----
117
117
117

query I rowsort
SELECT DISTINCT - ( + col1 ) AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL ( - col1 ) + col1 * + col1 AS col0 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT - + 10 * + col1 + - col0 AS col0 FROM tab2 AS cor0
----
-249
-317
-668

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 * - col2 col2 FROM tab1 AS cor0
----
-1350
-1425
-2400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col1 ) col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + cor0.col1 * col0 + ( col2 ) + cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
1305
797
808

query I rowsort
SELECT + 42 AS col0 FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT ALL - col2 - - col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT 94 * col1 + col1 * + 33 FROM tab1 AS cor0
----
1270
1651
3302

onlyif mysql # use DIV operator for integer division
query I rowsort label-1424
SELECT cor0.col1 DIV col1 + ( col2 ) + col0 FROM tab0 AS cor0
----
172
37
58

skipif mysql # not compatible
query I rowsort label-1424
SELECT cor0.col1 / col1 + ( col2 ) + col0 FROM tab0 AS cor0
----
172
37
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-1425
SELECT DISTINCT + col0 DIV + col0 - col0 * ( col2 ) AS col1 FROM tab1 AS cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-1425
SELECT DISTINCT + col0 / + col0 - col0 * ( col2 ) AS col1 FROM tab1 AS cor0
----
-161
-3647
-7679

query I rowsort
SELECT ALL + col1 + - col1 - col1 AS col0 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1427
SELECT - col2 + - CAST( NULL AS DECIMAL ) * + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1427
SELECT - col2 + - CAST ( NULL AS REAL ) * + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * + ( - 11 ) AS col2 FROM tab2 cor0
----
-286
-297
-418

query I rowsort
SELECT - col2 + cor0.col0 * - col2 AS col1 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + cor0.col0 + - 57 FROM tab0 AS cor0
----
-22
-33
32

query I rowsort
SELECT - 91 + + tab0.col2 + col0 FROM tab0
----
-34
-55
80

query I rowsort
SELECT ALL 11 AS col0 FROM tab1
----
11
11
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-1433
SELECT DISTINCT - - 56 DIV 53 AS col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1433
SELECT DISTINCT - - 56 / 53 AS col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT - 93 + 81 FROM tab0 AS cor0
----
-12
-12
-12

query I rowsort
SELECT ALL col0 * 14 AS col0 FROM tab2
----
1092
1106
98

query I rowsort
SELECT ALL col2 * 4 FROM tab2
----
104
108
152

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1437
SELECT ALL CAST( NULL AS SIGNED ) * - 13 + + tab1.col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1437
SELECT ALL CAST ( NULL AS INTEGER ) * - 13 + + tab1.col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 + + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 - - cor0.col0 * - cor0.col2 col1 FROM tab2 AS cor0
----
-406
-4345
-6630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 78 col2 FROM tab0
----
-1872
-2730
-6942

query I rowsort
SELECT ALL ( col2 ) * - col1 * 59 FROM tab2
----
-38114
-49383
-90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col1 col0 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT col0 + col2 + col1 AS col2 FROM tab2 cor0
----
134
163
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-1444
SELECT + 4 * - col2 + - 8 DIV + 4 AS col1 FROM tab0 AS cor0
----
-134
-330
-6

skipif mysql # not compatible
query I rowsort label-1444
SELECT + 4 * - col2 + - 8 / + 4 AS col1 FROM tab0 AS cor0
----
-134
-330
-6

query I rowsort
SELECT - + ( col0 ) + + cor0.col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - col1 + + col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT - col0 + + cor0.col2 + + col1 AS col0 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT - 99 * col0 AS col1 FROM tab1 cor0
----
-297
-6336
-7920

query I rowsort
SELECT ALL + - ( + 49 ) - - col2 * + 18 AS col2 FROM tab0 cor0
----
-31
1427
545

query I rowsort
SELECT col1 * - 23 * + col1 AS col0 FROM tab1 AS cor0
----
-15548
-2300
-3887

query I rowsort
SELECT ALL - cor0.col1 + col2 * cor0.col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT + ( col0 ) * cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1453
SELECT - + col1 * col1 + + col2 * - CAST( col1 + col0 AS SIGNED ) FROM tab1 AS cor0
----
-2242
-4318
-9097

skipif mysql # not compatible
query I rowsort label-1453
SELECT - + col1 * col1 + + col2 * - CAST ( col1 + col0 AS INTEGER ) FROM tab1 AS cor0
----
-2242
-4318
-9097

query I rowsort
SELECT 25 * col2 + col2 FROM tab2 AS cor0
----
676
702
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-1455
SELECT + + cor0.col1 DIV col2 + col1 * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-1455
SELECT + + cor0.col1 / col2 + col1 * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + 73 * - col0 AS col2 FROM tab1 cor0
----
-219
-4672
-5840

query I rowsort
SELECT - - 25 + - col0 FROM tab1 AS cor0
----
-39
-55
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-1458
SELECT ALL + - col0 + col1 DIV + col1 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-1458
SELECT ALL + - col0 + col1 / + col1 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT 37 AS col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT - - col2 * cor0.col0 + - 62 * + 93 FROM tab1 AS cor0
----
-2118
-5604
1914

query I rowsort
SELECT + + col1 * + 63 + 56 FROM tab1 AS cor0
----
1694
686
875

query I rowsort
SELECT cor0.col2 * 35 + + col1 * col1 FROM tab2 AS cor0
----
1619
1906
4391

query I rowsort
SELECT col0 + 21 AS col1 FROM tab0 AS cor0
----
110
45
56

query I rowsort
SELECT ALL ( - tab1.col0 ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT - + ( cor0.col0 ) * - cor0.col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 * col0 AS col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL + col1 * - col0 + cor0.col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1468
SELECT - col1 * CAST( 96 AS SIGNED ) FROM tab1
----
-1248
-2496
-960

skipif mysql # not compatible
query I rowsort label-1468
SELECT - col1 * CAST ( 96 AS INTEGER ) FROM tab1
----
-1248
-2496
-960

query I rowsort
SELECT ALL col2 - 19 FROM tab1
----
35
38
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - + 73 col1 FROM tab2
----
-66
5
6

query I rowsort
SELECT ALL + + 82 * col0 AS col0 FROM tab1 AS cor0
----
246
5248
6560

query I rowsort
SELECT ALL - - cor0.col0 * ( - col2 ) FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-1473
SELECT DISTINCT - col0 DIV - col2 + col0 * ( col2 * + col0 ) col2 FROM tab0 AS cor0
----
1260
19008
649523

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1473
SELECT DISTINCT - col0 / - col2 + col0 * ( col2 * + col0 ) col2 FROM tab0 AS cor0
----
1260
19008
649523

query I rowsort
SELECT DISTINCT + - col2 * + col0 - col2 * - 64 * col1 FROM tab2 AS cor0
----
38342
53379
96148

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1475
SELECT - + ( col1 ) * - col0 + CAST( + 22 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
100
1062
662

skipif mysql # not compatible
query I rowsort label-1475
SELECT - + ( col1 ) * - col0 + CAST ( + 22 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
100
1062
662

query I rowsort
SELECT + - 65 + + col1 FROM tab0 cor0
----
21
26
32

query I rowsort
SELECT ( - cor0.col0 ) + col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - 51 * cor0.col1 FROM tab2, tab2 cor0
----
9 values hashing to 55134eee1cfff0fa65d36a8a3f1f64dd

query I rowsort
SELECT DISTINCT - col1 + + col0 * + col0 - col0 FROM tab1
----
-20
4022
6307

query I rowsort
SELECT col0 + - 0 + + 64 FROM tab2
----
142
143
71

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 - - CAST ( + col1 + + col0 * + col1 AS REAL ) FROM tab1
----
107
1133
714

onlyif mysql # use DIV operator for integer division
query I rowsort label-1482
SELECT + ( 89 ) * + tab0.col0 + + col1 DIV + 94 AS col1 FROM tab0
----
2136
3116
7921

skipif mysql # not compatible
query I rowsort label-1482
SELECT + ( 89 ) * + tab0.col0 + + col1 / + 94 AS col1 FROM tab0
----
2136
3116
7921

query I rowsort
SELECT col2 + col2 * - col1 AS col0 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT 61 * col0 * tab1.col1 + tab1.col1 FROM tab1
----
39050
4784
63453

query I rowsort
SELECT col0 + + tab0.col0 + - col2 * col0 AS col1 FROM tab0
----
-7120
-744
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-1486
SELECT - 18 DIV + col1 + col1 * col2 FROM tab2
----
1534
645
837

skipif mysql # not compatible
query I rowsort label-1486
SELECT - 18 / + col1 + col1 * col2 FROM tab2
----
1534
645
837

query I rowsort
SELECT - col1 * col0 - + tab0.col0 * - col1 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1488
SELECT DISTINCT col1 DIV 83 + + col2 * ( col0 ) col2 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1488
SELECT DISTINCT col1 / 83 + + col2 * ( col0 ) col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL cor0.col0 + + cor0.col2 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 00ff93cbcc751be1393f9e1fd72170f8

query I rowsort
SELECT ALL + col0 * 37 AS col1 FROM tab0 AS cor0
----
1295
3293
888

query I rowsort
SELECT + col1 * + col1 + col2 + col1 FROM tab2 AS cor0
----
1019
344
3566

query I rowsort
SELECT col2 * tab0.col2 * col1 + + ( + col2 ) + col2 FROM tab0
----
612048
93720
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-1493
SELECT col0 DIV 29 FROM tab1
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1493
SELECT col0 / 29 FROM tab1
----
0
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1494
SELECT DISTINCT tab1.col1 * - col1 DIV - col1 col0 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1494
SELECT DISTINCT tab1.col1 * - col1 / - col1 col0 FROM tab1
----
10
13
26

query I rowsort
SELECT + 85 + + col0 FROM tab2
----
163
164
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1496
SELECT - col0 DIV col2 + + tab1.col2 FROM tab1
----
54
56
96

skipif mysql # not compatible
query I rowsort label-1496
SELECT - col0 / col2 + + tab1.col2 FROM tab1
----
54
56
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1497
SELECT DISTINCT - ( col0 ) DIV col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-1497
SELECT DISTINCT - ( col0 ) / col0 FROM tab1
----
-1

query I rowsort
SELECT + 21 * - cor0.col1 + - cor0.col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to b0bb359d42820e41b000863dae59d5a1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 col1 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1500
SELECT + col1 DIV - col1 + col2 * tab2.col0 FROM tab2
----
188
2027
3001

skipif mysql # not compatible
query I rowsort label-1500
SELECT + col1 / - col1 + col2 * tab2.col0 FROM tab2
----
188
2027
3001

query I rowsort
SELECT - + cor0.col1 * + 37 AS col0 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT - + col1 * 98 AS col1 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT + col2 + + ( 2 ) AS col2 FROM tab1 AS cor0
----
56
59
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1504
SELECT ALL col2 DIV - col0 + - col0 AS col1 FROM tab1 AS cor0
----
-21
-64
-81

skipif mysql # not compatible
query I rowsort label-1504
SELECT ALL col2 / - col0 + - col0 AS col1 FROM tab1 AS cor0
----
-21
-64
-81

query I rowsort
SELECT ALL - - col1 * col1 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT col0 * - col1 + col0 AS col0 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT cor0.col1 * col1 * + ( cor0.col0 * col2 ) AS col1 FROM tab0 AS cor0
----
329315
5857632
60434738

query I rowsort
SELECT - cor0.col1 * + ( col2 ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT tab0.col1 * - col1 * - 71 FROM tab0
----
525116
587951
668039

onlyif mysql # use DIV operator for integer division
query I rowsort label-1510
SELECT ALL 87 DIV - col1 AS col1 FROM tab1
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-1510
SELECT ALL 87 / - col1 AS col1 FROM tab1
----
-3
-6
-8

query I rowsort
SELECT col0 * col1 * - col2 AS col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-1512
SELECT - 81 DIV col1 - 31 FROM tab2
----
-32
-33
-35

skipif mysql # not compatible
query I rowsort label-1512
SELECT - 81 / col1 - 31 FROM tab2
----
-32
-33
-35

query I rowsort
SELECT + ( + col2 ) * - ( - 5 * - col1 ) FROM tab1
----
-2850
-6240
-7020

onlyif mysql # use DIV operator for integer division
query I rowsort label-1514
SELECT ALL + col0 * cor0.col2 + col2 DIV cor0.col0 AS col1 FROM tab1 AS cor0
----
180
3648
7681

skipif mysql # not compatible
query I rowsort label-1514
SELECT ALL + col0 * cor0.col2 + col2 / cor0.col0 AS col1 FROM tab1 AS cor0
----
180
3648
7681

query I rowsort
SELECT ALL - col2 * 39 FROM tab1 cor0
----
-2106
-2223
-3744

query I rowsort
SELECT col1 * col2 + - col2 * col1 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1517
SELECT DISTINCT col2 DIV + col0 col1 FROM tab2 AS cor0
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1517
SELECT DISTINCT col2 / + col0 col1 FROM tab2 AS cor0
----
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1518
SELECT DISTINCT col0 * col1 DIV - col1 + - col1 * 26 FROM tab1 cor0
----
-324
-418
-679

skipif mysql # not compatible
query I rowsort label-1518
SELECT DISTINCT col0 * col1 / - col1 + - col1 * 26 FROM tab1 cor0
----
-324
-418
-679

query I rowsort
SELECT + - col0 * + ( + cor0.col0 ) * - col0 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT DISTINCT + col1 * ( + 54 ) FROM tab2 AS cor0
----
1674
3186
918

query I rowsort
SELECT - cor0.col0 + - ( + col2 ) FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + col0 * 20 + col0 FROM tab2 AS cor0
----
147
1638
1659

query III rowsort
SELECT * FROM tab1 WHERE ( NULL ) NOT IN ( + col0 + + col2 * tab1.col1 * col2 + - col1 )
----

query I rowsort
SELECT col2 * - col2 FROM tab2 WHERE - col0 + col2 * - col2 > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 * + col2 col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT col1 * - col2 + - col1 * tab1.col1 FROM tab1
----
-1417
-2080
-670

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL <= ( col2 + - col1 * - col2 )
----

query I rowsort
SELECT ALL + tab0.col0 / col0 AS col0 FROM tab0 WHERE ( NULL ) <> col0
----

query I rowsort
SELECT - tab1.col1 * - tab1.col2 + + col2 AS col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT + col1 * + col1 + col2 FROM tab1
----
157
265
730

query I rowsort
SELECT ALL tab1.col1 - - col2 FROM tab1
----
109
67
80

query I rowsort
SELECT col0 * + tab2.col2 * col1 + col0 AS col1 FROM tab2
----
119730
51113
5866

query III rowsort
SELECT * FROM tab1 WHERE NULL BETWEEN NULL AND + col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 * + col0 col2 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT 56 + - cor0.col2 * 56 AS col0 FROM tab0 cor0
----
-1792
-4536
0

query I rowsort
SELECT DISTINCT + 95 + + col0 * col0 AS col0 FROM tab2 AS cor0
----
144
6179
6336

query I rowsort
SELECT - + 63 * - col0 + - ( + col1 + + cor0.col0 ) * - 57 AS col2 FROM tab1 AS cor0
----
10341
1842
8250

query I rowsort
SELECT ALL - - col1 + - col0 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL - cor0.col2 * + col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( cor0.col0 ) + - col2 col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col2 + - col1 - - col2 * col1 FROM tab2
----
1449
591
779

query I rowsort
SELECT tab2.col1 * - col0 * - col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + col0 + + col0 + col0 AS col2 FROM tab1
----
192
240
9

query I rowsort
SELECT - col0 * col0 - col0 FROM tab0
----
-1260
-600
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-1545
SELECT DISTINCT tab2.col0 DIV col1 + - tab2.col2 * + col0 - col1 FROM tab2
----
-2086
-220
-3015

skipif mysql # not compatible
query I rowsort label-1545
SELECT DISTINCT tab2.col0 / col1 + - tab2.col2 * + col0 - col1 FROM tab2
----
-2086
-220
-3015

query I rowsort
SELECT DISTINCT col2 + col2 FROM tab1 WHERE NULL = ( col1 * col1 + col2 )
----

query I rowsort
SELECT + col1 * + col2 + col2 + col0 * tab0.col0 FROM tab0
----
1323
15465
3447

query I rowsort
SELECT + - col2 + + col2 * + 37 AS col0 FROM tab0 cor0
----
1188
2952
36

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT IN ( - col2 * col2 )
----

query I rowsort
SELECT DISTINCT - - 59 AS col1 FROM tab2 cor0
----
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 + + col2 col0 FROM tab1 AS cor0
----
153
156
195

query I rowsort
SELECT DISTINCT - col0 * col0 + 12 AS col0 FROM tab0 AS cor0
----
-1213
-564
-7909

query I rowsort
SELECT - col2 * col2 * col2 + + col1 FROM tab2 AS cor0
----
-17517
-19652
-54855

query I rowsort
SELECT - cor0.col2 * + col2 * - 37 AS col0 FROM tab0 AS cor0
----
248788
37
40293

query I rowsort
SELECT + 96 + col0 AS col1 FROM tab2 cor0
----
103
174
175

query I rowsort
SELECT + col0 * + col0 - + cor0.col0 * col1 FROM tab2 AS cor0
----
-168
1482
4898

query I rowsort
SELECT ( col0 ) + ( 77 * col1 ) AS col1 FROM tab0 AS cor0
----
6646
7096
7504

query I rowsort
SELECT col1 * - 77 + - col0 FROM tab1 AS cor0
----
-1081
-2005
-834

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab1, tab2 cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT + ( 60 ) FROM tab1 cor0
----
60
60
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-1561
SELECT DISTINCT - tab1.col1 DIV tab1.col0 AS col2 FROM tab1
----
-8
0

skipif mysql # not compatible
query I rowsort label-1561
SELECT DISTINCT - tab1.col1 / tab1.col0 AS col2 FROM tab1
----
-8
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 cor2
----
972 values hashing to 82def1c3361e635dd4cf447edc22edb9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1563
SELECT col2 DIV col0 + + col0 * col0 * col0 FROM tab2
----
346
474552
493039

skipif mysql # not compatible
query I rowsort label-1563
SELECT col2 / col0 + + col0 * col0 * col0 FROM tab2
----
346
474552
493039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 + ( col0 ) * ( + tab2.col0 * - col0 ) + ( col2 + tab2.col1 * 33 ) col0 FROM tab2
----
-472488
-492349
798

onlyif mysql # use DIV operator for integer division
query I rowsort label-1565
SELECT + col0 DIV + ( col2 ) AS col0 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-1565
SELECT + col0 / + ( col2 ) AS col0 FROM tab0
----
0
1
35

query I rowsort
SELECT ALL + + 89 - tab0.col1 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 2107f3330e60f38d1eaa2f040554679e

query I rowsort
SELECT tab0.col1 + 27 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 34009f9cdbd74333a9ccae95336999d6

query I rowsort
SELECT DISTINCT col0 + + 82 AS col1 FROM tab1
----
146
162
85

query I rowsort
SELECT 24 * col0 AS col2 FROM tab0
----
2136
576
840

query I rowsort
SELECT ALL - - ( col0 ) * - col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + 57 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 220a93709e207779b34ef74b544764a5

onlyif mysql # use DIV operator for integer division
query I rowsort label-1572
SELECT + col0 DIV + col0 col1 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1572
SELECT + col0 / + col0 col1 FROM tab1
----
1
1
1

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1574
SELECT col0 * + col1 * - col2 + col1 DIV + col1 AS col2 FROM tab1 AS cor0
----
-36479
-4211
-99839

skipif mysql # not compatible
query I rowsort label-1574
SELECT col0 * + col1 * - col2 + col1 / + col1 AS col2 FROM tab1 AS cor0
----
-36479
-4211
-99839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - col2 * - col0 col1 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - - col1 * col0 * + col2 + + col0 * col1 + + col2 * + col1 FROM tab2 AS cor0
----
125788
53023
6913

query I rowsort
SELECT ALL + + cor0.col1 * col1 + col1 + + col2 FROM tab1 AS cor0
----
167
278
756

query I rowsort
SELECT ALL col1 + + col1 * cor0.col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT 99 - col1 FROM tab2
----
40
68
82

query I rowsort
SELECT ( 99 ) * - col2 + + col0 FROM tab1 AS cor0
----
-5343
-5579
-9424

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 68 col2 FROM tab0
----
68
68
68

query I rowsort
SELECT ALL - ( - ( + tab0.col1 ) ) FROM tab0
----
86
91
97

query I rowsort
SELECT - col0 - col1 AS col1 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + + col0 + col1 + - col0 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + + 52 * - cor0.col0 FROM tab0 AS cor0
----
-1248
-1820
-4628

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 + cor0.col1 + + col0 FROM tab2 AS cor0
----
-193
-3344
-923

query I rowsort
SELECT ALL cor0.col1 + col2 * col0 AS col1 FROM tab1 cor0
----
188
3658
7693

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

query I rowsort
SELECT ALL - 54 FROM tab1, tab0 cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT DISTINCT - col0 * col1 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + ( + 23 * col2 ) FROM tab0
----
1886
23
759

query III rowsort
SELECT * FROM tab1 cor0 WHERE NULL NOT IN ( col2 )
----

query I rowsort
SELECT ALL col0 * + col1 * - col2 FROM tab1
----
-36480
-4212
-99840

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND ( - col0 * + col2 - + col2 * col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1596
SELECT ALL - tab0.col1 DIV tab0.col1 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1596
SELECT ALL - tab0.col1 / tab0.col1 AS col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 + col0 AS col1 FROM tab1 WHERE NULL IN ( - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1598
SELECT DISTINCT tab2.col0 DIV col1 AS col2 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-1598
SELECT DISTINCT tab2.col0 / col1 AS col2 FROM tab2
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab0 WHERE NOT ( NULL ) NOT IN ( + col2 * col1 + col1 * - col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - tab1.col1 col2 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1601
SELECT ALL col0 * col1 + + col2 DIV - col2 AS col0 FROM tab0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-1601
SELECT ALL col0 * col1 + + col2 / - col2 AS col0 FROM tab0
----
2063
3394
8098

onlyif mysql # use DIV operator for integer division
query I rowsort label-1602
SELECT + col0 DIV col2 + col1 AS col0 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-1602
SELECT + col0 / col2 + col1 AS col0 FROM tab0
----
132
86
92

query I rowsort
SELECT ALL col2 + col1 - col2 AS col2 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1604
SELECT ALL - col0 + col0 DIV col0 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-1604
SELECT ALL - col0 + col0 / col0 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT ALL - - cor0.col2 * col2 + col2 AS col0 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL + + col2 + col0 * + col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT - - col0 * - col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - cor0.col0 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT - col2 * + col2 + + col0 * col1 AS col2 FROM tab0 AS cor0
----
1375
3394
975

query I rowsort
SELECT col1 + + col1 + col1 FROM tab1
----
30
39
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1611
SELECT ALL + col2 + - col0 DIV col2 FROM tab0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-1611
SELECT ALL + col2 + - col0 / col2 FROM tab0
----
-34
33
81

query I rowsort
SELECT DISTINCT + col2 * + tab0.col1 + col0 FROM tab0
----
132
2862
7551

query I rowsort
SELECT DISTINCT + col1 + + col2 + col0 * col0 * tab1.col1 FROM tab1
----
314
41027
83309

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 cor0 CROSS JOIN tab2
----
-7
-78
-79

query I rowsort
SELECT tab1.col0 + - col2 * tab1.col2 FROM tab1
----
-2913
-3185
-9136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + tab1.col2 + col0 col1 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT + + cor0.col0 * col2 + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + col0 * - col0 + - cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
-1413
-4666
-7648

onlyif mysql # use DIV operator for integer division
query I rowsort label-1619
SELECT - + cor0.col0 DIV col0 AS col1 FROM tab2 cor0
----
-1
-1
-1

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

query I rowsort
SELECT DISTINCT col0 + - 26 * + col1 FROM tab1 AS cor0
----
-196
-258
-673

query I rowsort
SELECT - cor0.col0 + col1 * + col1 * 76 FROM tab0 AS cor0
----
562072
629267
715049

query I rowsort
SELECT ALL + col1 + + 70 + ( + col2 * + tab0.col2 ) FROM tab0
----
1245
168
6885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 + tab1.col0 * - col1 col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT DISTINCT 1 AS col2 FROM tab2, tab1 AS cor0
----
1

query I rowsort
SELECT col2 + col2 * + tab1.col2 AS col2 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT + tab0.col2 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - + col1 * col1 + + 16 FROM tab1 AS cor0
----
-153
-660
-84

query I rowsort
SELECT ALL 91 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT ALL + - 42 * - 67 AS col0 FROM tab0 AS cor0
----
2814
2814
2814

query I rowsort
SELECT + col1 * col1 * col2 AS col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT 45 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

onlyif mysql # use DIV operator for integer division
query I rowsort label-1632
SELECT cor0.col2 DIV ( cor0.col0 ) FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1632
SELECT cor0.col2 / ( cor0.col0 ) FROM tab0 cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1633
SELECT - cor0.col2 * col1 DIV 98 AS col1 FROM tab2 AS cor0
----
-15
-6
-8

skipif mysql # not compatible
query I rowsort label-1633
SELECT - cor0.col2 * col1 / 98 AS col1 FROM tab2 AS cor0
----
-15
-6
-8

query I rowsort
SELECT ALL + cor0.col1 + - 53 FROM tab1, tab2 AS cor0
----
9 values hashing to 1eb6a55287d084b6067f8c640a7f53e5

onlyif mysql # use DIV operator for integer division
query I rowsort label-1635
SELECT ALL - 8 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1635
SELECT ALL - 8 / col1 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1636
SELECT + 23 + - 33 DIV cor0.col2 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

skipif mysql # not compatible
query I rowsort label-1636
SELECT + 23 + - 33 / cor0.col2 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

query I rowsort
SELECT DISTINCT - - 2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
2

query I rowsort
SELECT ALL - 48 FROM tab1, tab2 AS cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT ALL tab0.col0 * col1 + - 3 AS col0 FROM tab0
----
2061
3392
8096

query I rowsort
SELECT ALL - 20 + 63 * cor0.col1 FROM tab2, tab0 cor0
----
9 values hashing to 06bd0d15a31e528e85e40673d41fd77b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col0 + - 54 col1 FROM tab1
----
-216
-3702
-7734

query I rowsort
SELECT + cor0.col0 - + 56 * col0 * - col0 FROM tab0 AS cor0
----
32280
443665
68635

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1643
SELECT DISTINCT - - cor0.col1 * CAST( col0 AS SIGNED ) + - col0 FROM tab2 AS cor0
----
1264
210
4524

skipif mysql # not compatible
query I rowsort label-1643
SELECT DISTINCT - - cor0.col1 * CAST ( col0 AS INTEGER ) + - col0 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-1644
SELECT cor0.col1 * CAST( + ( - col2 ) AS SIGNED ) * - ( col2 * - col0 ) + + cor0.col2 DIV - col2 AS col1 FROM tab0 cor0
----
-2247697
-3396
-54457677

skipif mysql # not compatible
query I rowsort label-1644
SELECT cor0.col1 * CAST ( + ( - col2 ) AS INTEGER ) * - ( col2 * - col0 ) + + cor0.col2 / - col2 AS col1 FROM tab0 cor0
----
-2247697
-3396
-54457677

query I rowsort
SELECT ALL col0 * ( ( col2 ) ) AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + - col1 * 2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT ALL cor0.col2 + col1 * col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT col2 - 71 AS col1 FROM tab0 AS cor0
----
-38
-70
11

query I rowsort
SELECT ALL - col0 + - 21 AS col0 FROM tab1 AS cor0
----
-101
-24
-85

query I rowsort
SELECT + col2 - col0 * + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT - + col0 * + col2 + + col0 * col2 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1652
SELECT ALL - col2 DIV ( tab1.col0 ) AS col0 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-1652
SELECT ALL - col2 / ( tab1.col0 ) AS col0 FROM tab1
----
-1
-18
0

query I rowsort
SELECT col2 * - col1 + + ( - col1 ) AS col2 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - tab0.col1 * col2 + + 40 AS col1 FROM tab0
----
-2798
-57
-7422

query I rowsort
SELECT DISTINCT + col0 * + ( + 12 ) + col2 FROM tab0
----
1150
321
421

onlyif mysql # use DIV operator for integer division
query I rowsort label-1656
SELECT col1 DIV 40 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1656
SELECT col1 / 40 FROM tab2
----
0
0
1

query I rowsort
SELECT + - col1 + col2 * col1 + - col0 FROM tab0 AS cor0
----
-35
2728
7282

query I rowsort
SELECT ALL ( - tab2.col1 ) - col2 * col2 * col1 AS col1 FROM tab2
----
-22630
-24565
-39943

query I rowsort
SELECT DISTINCT + - col2 + col2 FROM tab2 cor0
----
0

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) + + col0 * col1 FROM tab2 cor0
----
1381
244
4628

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 53 AS REAL ) + + col0 * cor0.col1 FROM tab2 AS cor0
----
1290
164
4549

query I rowsort
SELECT - cor0.col0 * + col0 + 69 * - 55 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-125811
-319111
-5020

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1663
SELECT ALL - cor0.col1 * - col1 + CAST( 85 + col2 AS SIGNED ) AS col0 FROM tab0 cor0
----
7514
8448
9495

skipif mysql # not compatible
query I rowsort label-1663
SELECT ALL - cor0.col1 * - col1 + CAST ( 85 + col2 AS INTEGER ) AS col0 FROM tab0 cor0
----
7514
8448
9495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - col1 col1 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-1665
SELECT + col0 + col1 DIV col1 AS col1 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-1665
SELECT + col0 + col1 / col1 AS col1 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1666
SELECT + 88 + col0 * 41 DIV + 34 FROM tab2
----
182
183
96

skipif mysql # not compatible
query I rowsort label-1666
SELECT + 88 + col0 * 41 / + 34 FROM tab2
----
182
183
96

query I rowsort
SELECT ALL col1 - cor0.col2 * - cor0.col1 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-1668
SELECT ALL + - col1 + - col1 DIV CAST( + 39 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-88
-93
-99

skipif mysql # not compatible
query I rowsort label-1668
SELECT ALL + - col1 + - col1 / CAST ( + 39 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-88
-93
-99

query I rowsort
SELECT DISTINCT col2 + cor0.col2 * 91 - - col1 * col1 FROM tab2 AS cor0
----
3445
3785
5873

query I rowsort
SELECT DISTINCT + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + - 42 * - cor0.col2 + - 6 + cor0.col0 AS col2 FROM tab0 AS cor0
----
1404
3527
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 col0 FROM tab0
----
-95
-95
-95

query I rowsort
SELECT DISTINCT 1 * 73 * + col2 AS col0 FROM tab1
----
3942
4161
7008

query I rowsort
SELECT col1 * - col2 - + tab0.col0 * 33 FROM tab0
----
-10399
-1252
-3630

query I rowsort
SELECT + 4 + col2 * - 33 FROM tab1 AS cor0
----
-1778
-1877
-3164

query I rowsort
SELECT DISTINCT tab2.col2 * 87 * - col2 FROM tab2
----
-125628
-58812
-63423

query I rowsort
SELECT DISTINCT - 45 - col2 AS col0 FROM tab2
----
-71
-72
-83

query I rowsort
SELECT col1 * + col2 - - tab1.col2 AS col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL + - 12 * col2 + col0 FROM tab0 AS cor0
----
-372
-895
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1680
SELECT DISTINCT ( + cor0.col0 ) * cor0.col0 / CAST( NULL AS SIGNED ) col0 FROM tab1, tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1680
SELECT DISTINCT ( + cor0.col0 ) * cor0.col0 / CAST ( NULL AS INTEGER ) col0 FROM tab1, tab1 AS cor0
----
NULL

query I rowsort
SELECT - col1 * 12 FROM tab0
----
-1032
-1092
-1164

query I rowsort
SELECT 53 * col2 - col0 FROM tab1
----
2859
2957
5008

query I rowsort
SELECT DISTINCT ( col1 ) * + cor0.col1 AS col0 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1684
SELECT DISTINCT CAST( + col0 AS SIGNED ) AS col2 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1684
SELECT DISTINCT CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL 99 * col0 AS col2 FROM tab2 cor0
----
693
7722
7821

query I rowsort
SELECT - ( 2 ) + col2 * - col0 FROM tab0 AS cor0
----
-37
-7300
-794

query I rowsort
SELECT ALL - tab2.col2 * - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to b336c500cf10b0a0ff50fcdda3308e9b

query I rowsort
SELECT ( col1 * col1 ) FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL + 84 * col1 + + col0 FROM tab1 AS cor0
----
1172
2187
904

query I rowsort
SELECT DISTINCT + + col1 * + col2 + - col0 * 43 AS col1 FROM tab2 cor0
----
-1820
-2751
536

query I rowsort
SELECT + + col2 + - col1 AS col2 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT DISTINCT ( 17 ) * + col0 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT ALL - col1 + 21 + col1 FROM tab1 AS cor0
----
21
21
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1694
SELECT + CAST( + ( cor0.col1 ) AS SIGNED ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-1694
SELECT + CAST ( + ( cor0.col1 ) AS INTEGER ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - ( - col0 ) + - col0 + + 71 FROM tab2 AS cor0
----
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + 71 AS col1 FROM tab1 cor0
----
71
71
71

query I rowsort
SELECT DISTINCT + + 19 + + col2 * 79 FROM tab0 AS cor0
----
2626
6497
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 + col0 col1 FROM tab0 AS cor0
----
104
115
169

query I rowsort
SELECT ALL - col1 + + col2 * + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT + col2 * cor0.col2 + col1 FROM tab1 AS cor0
----
2942
3259
9229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1702
SELECT ALL + col1 * CAST( NULL AS SIGNED ) + - 92 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1702
SELECT ALL + col1 * CAST ( NULL AS INTEGER ) + - 92 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + + 29 FROM tab1 AS cor0
----
125
83
86

query I rowsort
SELECT col1 + ( tab2.col0 ) + col0 FROM tab2
----
175
215
45

query I rowsort
SELECT ALL col2 * col1 - 37 * - cor0.col1 FROM tab2 AS cor0
----
1275
1984
3717

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1706
SELECT - - col2 * + CAST( NULL AS SIGNED ) + + 54 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1706
SELECT - - col2 * + CAST ( NULL AS INTEGER ) + + 54 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + ( - col1 ) AS col2 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT ALL cor0.col2 + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1709
SELECT DISTINCT col0 + 42 DIV + col1 AS col0 FROM tab1 AS cor0
----
4
68
83

skipif mysql # not compatible
query I rowsort label-1709
SELECT DISTINCT col0 + 42 / + col1 AS col0 FROM tab1 AS cor0
----
4
68
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + 68 col1 FROM tab2 AS cor0
----
-1768
-1836
-2584

query I rowsort
SELECT col1 * + col1 + col1 * + 36 FROM tab2 AS cor0
----
2077
5605
901

onlyif mysql # use DIV operator for integer division
query I rowsort label-1712
SELECT ALL + - ( col0 ) DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1712
SELECT ALL + - ( col0 ) / col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + 99 * - 9 * cor0.col1 FROM tab1 AS cor0
----
-11583
-23166
-8910

query I rowsort
SELECT DISTINCT + col1 - col1 * + col0 * col1 FROM tab1 AS cor0
----
-13507
-2002
-6390

query I rowsort
SELECT ALL ( - col0 ) * - col0 + + ( 59 ) * + col0 FROM tab1 cor0
----
11120
186
7872

query I rowsort
SELECT DISTINCT col0 * - col0 + col1 * + col1 FROM tab0
----
360
6820
8184

query I rowsort
SELECT DISTINCT col0 + 1 * 31 * - tab0.col1 AS col0 FROM tab0
----
-2642
-2732
-2972

onlyif mysql # use DIV operator for integer division
query I rowsort label-1718
SELECT + col0 DIV - col0 + col2 AS col1 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-1718
SELECT + col0 / - col0 + col2 AS col1 FROM tab0
----
0
32
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1719
SELECT col2 * tab1.col0 + + col0 DIV - col2 FROM tab1
----
162
3647
7680

skipif mysql # not compatible
query I rowsort label-1719
SELECT col2 * tab1.col0 + + col0 / - col2 FROM tab1
----
162
3647
7680

query I rowsort
SELECT DISTINCT - tab0.col1 + + col2 * col0 AS col0 FROM tab0
----
-62
706
7207

query I rowsort
SELECT 29 * cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 54bc59094b2661807c1d12f560e4953b

query I rowsort
SELECT ALL 92 * cor1.col2 AS col1 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 31c26c3b81c5b285d664fabf92e83648

query I rowsort
SELECT DISTINCT - + col2 * + col0 + - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT col2 * - col2 * col1 FROM tab2
----
-22599
-24548
-39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1725
SELECT ALL cor0.col2 + CAST( NULL AS SIGNED ) col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1725
SELECT ALL cor0.col2 + CAST ( NULL AS INTEGER ) col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 4 * col2 AS col2 FROM tab1
----
216
228
384

query I rowsort
SELECT col1 * - col2 + ( + col0 ) FROM tab1 cor0
----
-1168
-1401
-506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1728
SELECT col0 * CAST( NULL AS SIGNED ) - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1728
SELECT col0 * CAST ( NULL AS INTEGER ) - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * cor0.col1 - - col1 FROM tab1 AS cor0
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-1730
SELECT col0 + ( - 47 ) DIV col0 FROM tab1 AS cor0
----
-12
64
80

skipif mysql # not compatible
query I rowsort label-1730
SELECT col0 + ( - 47 ) / col0 FROM tab1 AS cor0
----
-12
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1731
SELECT DISTINCT ( - col0 ) + CAST( + col0 + col0 AS SIGNED ) * - 46 FROM tab2
----
-651
-7254
-7347

skipif mysql # not compatible
query I rowsort label-1731
SELECT DISTINCT ( - col0 ) + CAST ( + col0 + col0 AS INTEGER ) * - 46 FROM tab2
----
-651
-7254
-7347

query I rowsort
SELECT DISTINCT col2 * col1 + + col0 FROM tab0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - tab0.col2 col0 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-1734
SELECT 25 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1734
SELECT 25 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT 79 + + col0 AS col1 FROM tab0
----
103
114
168

onlyif mysql # use DIV operator for integer division
query I rowsort label-1736
SELECT tab1.col1 * tab1.col1 DIV tab1.col2 AS col2 FROM tab1
----
1
1
12

skipif mysql # not compatible
query I rowsort label-1736
SELECT tab1.col1 * tab1.col1 / tab1.col2 AS col2 FROM tab1
----
1
1
12

query I rowsort
SELECT 18 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT ALL - 66 + col0 * + cor0.col2 FROM tab1 AS cor0
----
3582
7614
96

query I rowsort
SELECT ALL col1 + - 76 * col1 + 59 AS col1 FROM tab2 AS cor0
----
-1216
-2266
-4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-1740
SELECT ALL cor0.col1 + + col0 + - col2 * ( + col2 + + col2 ) DIV 53 AS col0 FROM tab0 AS cor0
----
-73
132
69

skipif mysql # not compatible
query I rowsort label-1740
SELECT ALL cor0.col1 + + col0 + - col2 * ( + col2 + + col2 ) / 53 AS col0 FROM tab0 AS cor0
----
-73
132
69

query I rowsort
SELECT DISTINCT - col2 * - 55 - + col1 FROM tab0 AS cor0
----
-42
1729
4419

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1742
SELECT + CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1742
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + + col2 * col1 * col1 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT - 28 * col0 FROM tab1 cor0
----
-1792
-2240
-84

query I rowsort
SELECT ALL + ( + ( + col2 ) ) * + ( + cor0.col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL - 0 * tab2.col1 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 38 * - tab0.col2 FROM tab0, tab1, tab2 AS cor0
----
-1254
-3116
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1748
SELECT - 85 * col0 DIV + col2 FROM tab1 AS cor0
----
-4
-70
-95

skipif mysql # not compatible
query I rowsort label-1748
SELECT - 85 * col0 / + col2 FROM tab1 AS cor0
----
-4
-70
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1749
SELECT DISTINCT cor0.col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1749
SELECT DISTINCT cor0.col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1750
SELECT ALL 12 * col0 DIV 3 FROM tab0
----
140
356
96

skipif mysql # not compatible
query I rowsort label-1750
SELECT ALL 12 * col0 / 3 FROM tab0
----
140
356
96

query I rowsort
SELECT ALL + tab0.col0 * tab0.col0 * + 74 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 42ca987b6a0755ddc38f4db66472ba82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1752
SELECT + CAST( NULL AS SIGNED ) - 91 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1752
SELECT + CAST ( NULL AS INTEGER ) - 91 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col2 * + cor0.col2 AS col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT + + 82 * col1 AS col2 FROM tab2 cor0
----
1394
2542
4838

query I rowsort
SELECT - 94 * + col2 AS col2 FROM tab2 AS cor0
----
-2444
-2538
-3572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - col2 * col1 + + 31 FROM tab1 AS cor0
----
-1217
-1373
-539

query I rowsort
SELECT ALL + + col2 * + cor0.col0 + ( - col2 ) * + 2 AS col1 FROM tab1 AS cor0
----
3534
54
7488

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1759
SELECT ALL - + col0 + - CAST( col2 AS SIGNED ) col0 FROM tab2 cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1759
SELECT ALL - + col0 + - CAST ( col2 AS INTEGER ) col0 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT - col1 + - ( - ( col0 ) ) FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + col1 + ( 69 ) * + col0 FROM tab1 AS cor0
----
233
4426
5533

onlyif mysql # use DIV operator for integer division
query I rowsort label-1762
SELECT DISTINCT - col2 + 79 DIV col0 FROM tab2 AS cor0
----
-16
-25
-37

skipif mysql # not compatible
query I rowsort label-1762
SELECT DISTINCT - col2 + 79 / col0 FROM tab2 AS cor0
----
-16
-25
-37

query I rowsort
SELECT + col2 * col0 + + cor0.col0 FROM tab2 AS cor0
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col1 FROM tab1
----
62
62
62

query I rowsort
SELECT + 51 * col2 FROM tab0
----
1683
4182
51

query I rowsort
SELECT - cor0.col1 * + 98 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 990b55b223604b28e77514ed357946b4

query I rowsort
SELECT + + col1 + + col2 * 54 AS col1 FROM tab0 cor0
----
151
1868
4519

query I rowsort
SELECT DISTINCT - - cor0.col0 * + col1 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL - - col1 * - 19 - col0 * col1 AS col1 FROM tab1 AS cor0
----
-1287
-572
-830

query I rowsort
SELECT ALL - col2 + ( col0 ) * + col1 AS col0 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT - - col2 + 75 * col0 FROM tab1 AS cor0
----
279
4857
6096

onlyif mysql # use DIV operator for integer division
query I rowsort label-1772
SELECT + col0 + cor0.col1 DIV - cor0.col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-1772
SELECT + col0 + cor0.col1 / - cor0.col0 FROM tab0 AS cor0
----
21
33
88

query I rowsort
SELECT - 76 + 42 FROM tab1 AS cor0
----
-34
-34
-34

query I rowsort
SELECT ALL + ( - ( + col0 ) ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 85 + 21 + - col0 FROM tab0 cor0
----
17
71
82

query I rowsort
SELECT ALL + 25 + - 52 * - col1 FROM tab1 cor0
----
1377
545
701

query I rowsort
SELECT col2 * col1 * - col1 + + col0 AS col0 FROM tab1
----
-16144
-36501
-5636

query I rowsort
SELECT DISTINCT - col2 * + 25 FROM tab0
----
-2050
-25
-825

query I rowsort
SELECT ( + cor1.col2 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1780
SELECT + col1 + col1 * + ( + cor0.col0 + - cor0.col2 * CAST( col2 AS SIGNED ) ) FROM tab0 AS cor0
----
-603694
-91504
3395

skipif mysql # not compatible
query I rowsort label-1780
SELECT + col1 + col1 * + ( + cor0.col0 + - cor0.col2 * CAST ( col2 AS INTEGER ) ) FROM tab0 AS cor0
----
-603694
-91504
3395

query I rowsort
SELECT ALL + 11 * cor0.col1 FROM tab0 AS cor0
----
1001
1067
946

query I rowsort
SELECT ALL col2 * col0 + + col1 * col0 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT col0 * col2 + + cor0.col2 + col1 * col0 FROM tab0 AS cor0
----
15479
2889
3431

query I rowsort
SELECT + cor1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - ( - col1 ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - 86 AS col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
81 values hashing to 1ef7453f3d4bc7d93f06fc98b5d59841

query I rowsort
SELECT col2 * col1 + + col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT col1 - col0 * col0 AS col2 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT tab2.col1 * col2 + col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT - ( - col2 ) + + col1 + col2 AS col2 FROM tab1 AS cor0
----
124
134
205

query I rowsort
SELECT - ( + col0 ) + col1 + 8 AS col1 FROM tab0 AS cor0
----
10
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 * col1 + col2 + col0 col2 FROM tab1 AS cor0
----
100016
36601
4269

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) + - ( 74 ) * - tab1.col0 col2 FROM tab1
----
276
4793
6016

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 + - col2 col2 FROM tab0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-1795
SELECT ALL - - cor0.col1 DIV ( col2 ) + col2 * col0 AS col0 FROM tab0 AS cor0
----
132
7299
794

skipif mysql # not compatible
query I rowsort label-1795
SELECT ALL - - cor0.col1 / ( col2 ) + col2 * col0 AS col0 FROM tab0 AS cor0
----
132
7299
794

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 * - tab2.col2 + + 69 * - col1 col1 FROM tab2
----
-2617
-2868
-4747

query I rowsort
SELECT ALL - 15 + col2 * col2 AS col2 FROM tab0
----
-14
1074
6709

query I rowsort
SELECT DISTINCT - 42 + col2 FROM tab0
----
-41
-9
40

query I rowsort
SELECT DISTINCT + - 77 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-1800
SELECT + col1 + col2 DIV 92 + col1 * col2 AS col0 FROM tab0 AS cor0
----
194
2924
7553

skipif mysql # not compatible
query I rowsort label-1800
SELECT + col1 + col2 / 92 + col1 * col2 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT cor0.col1 + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT + col2 * ( - col2 ) + + col2 + - col0 FROM tab2 AS cor0
----
-1485
-709
-728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1803
SELECT + col0 * + 53 + ( col2 * CAST( 71 AS SIGNED ) ) + - col2 * col2 FROM tab0 AS cor0
----
1925
2526
3815

skipif mysql # not compatible
query I rowsort label-1803
SELECT + col0 * + 53 + ( col2 * CAST ( 71 AS INTEGER ) ) + - col2 * col2 FROM tab0 AS cor0
----
1925
2526
3815

query I rowsort
SELECT DISTINCT + cor0.col1 + ( - col1 ) + - col0 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT col1 * col0 - col2 AS col2 FROM tab2
----
1305
190
4576

query I rowsort
SELECT ALL - tab1.col0 * col1 + col0 - col2 * col1 AS col1 FROM tab1
----
-1146
-1479
-2208

query I rowsort
SELECT DISTINCT col0 * col2 + col0 AS col1 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ALL - ( - col0 ) - col1 AS col1 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-1809
SELECT DISTINCT col2 * col1 - - col1 * - col1 DIV - col1 AS col2 FROM tab0
----
194
2924
7553

skipif mysql # not compatible
query I rowsort label-1809
SELECT DISTINCT col2 * col1 - - col1 * - col1 / - col1 AS col2 FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-1810
SELECT ALL - ( + cor0.col2 ) * col0 DIV + cor0.col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1810
SELECT ALL - ( + cor0.col2 ) * col0 / + cor0.col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL - col1 * 70 FROM tab2 AS cor0
----
-1190
-2170
-4130

query I rowsort
SELECT ALL + + col0 * cor0.col0 + col1 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT - cor0.col2 + + cor0.col1 + col1 FROM tab2 cor0
----
-4
35
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1814
SELECT DISTINCT + - cor0.col1 DIV + col0 AS col0 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-1814
SELECT DISTINCT + - cor0.col1 / + col0 AS col0 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT - col2 * cor0.col2 * + col0 + col1 AS col1 FROM tab0 AS cor0
----
-26050
-598345
62

query I rowsort
SELECT ALL - col2 + - col2 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT - col0 + - col0 + col1 * - col0 FROM tab1 AS cor0
----
-1200
-768
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1818
SELECT - col2 + + col2 / CAST( NULL AS SIGNED ) + col2 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1818
SELECT - col2 + + col2 / CAST ( NULL AS INTEGER ) + col2 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 25 AS col0 FROM tab1 AS cor0
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 55 * col1 col0 FROM tab1 AS cor0
----
-1430
-550
-715

onlyif mysql # use DIV operator for integer division
query I rowsort label-1821
SELECT ALL - + col1 DIV - col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-1821
SELECT ALL - + col1 / - col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
132
26
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1822
SELECT DISTINCT - cor0.col0 DIV col0 + ( - col1 ) * + col0 FROM tab0 AS cor0
----
-2065
-3396
-8100

skipif mysql # not compatible
query I rowsort label-1822
SELECT DISTINCT - cor0.col0 / col0 + ( - col1 ) * + col0 FROM tab0 AS cor0
----
-2065
-3396
-8100

query I rowsort
SELECT + - 55 * col2 + 57 FROM tab2 AS cor0
----
-1373
-1428
-2033

query I rowsort
SELECT DISTINCT ( cor0.col1 ) + - col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - + col0 + - col0 - + col1 AS col0 FROM tab1 AS cor0
----
-138
-173
-32

query I rowsort
SELECT ALL - 77 * cor0.col0 FROM tab2 AS cor0
----
-539
-6006
-6083

query I rowsort
SELECT ALL + - cor0.col1 + - col1 AS col0 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT + ( 98 ) * - col0 FROM tab0
----
-2352
-3430
-8722

query I rowsort
SELECT - 10 * col0 FROM tab0 AS cor0
----
-240
-350
-890

query I rowsort
SELECT DISTINCT - 61 + col0 * + col1 FROM tab2 AS cor0
----
1282
156
4541

onlyif mysql # use DIV operator for integer division
query I rowsort label-1831
SELECT ALL + cor0.col2 * - col2 + 51 DIV - 24 FROM tab0 AS cor0
----
-1091
-3
-6726

skipif mysql # not compatible
query I rowsort label-1831
SELECT ALL + cor0.col2 * - col2 + 51 / - 24 FROM tab0 AS cor0
----
-1091
-3
-6726

query I rowsort
SELECT - col0 * + cor0.col2 * cor0.col2 + - col1 * - col2 FROM tab2 AS cor0
----
-113430
-4266
-51194

onlyif mysql # use DIV operator for integer division
query I rowsort label-1833
SELECT ALL - ( - col1 ) DIV col0 + 63 * cor0.col2 FROM tab2 AS cor0
----
1638
1705
2394

skipif mysql # not compatible
query I rowsort label-1833
SELECT ALL - ( - col1 ) / col0 + 63 * cor0.col2 FROM tab2 AS cor0
----
1638
1705
2394

query I rowsort
SELECT DISTINCT - col0 + col2 FROM tab0 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col2 * col0 - tab0.col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT ALL col0 + - col0 * col0 AS col0 FROM tab0
----
-1190
-552
-7832

query III rowsort
SELECT ALL * FROM tab2 WHERE ( NULL ) NOT IN ( - col2 )
----

query I rowsort
SELECT DISTINCT col0 + col2 * + col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT + col1 + + tab1.col1 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL + col1 + + col0 * - col2 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL - 63 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to fc0b533c2773a0a802e1fc8317dcebf2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1842
SELECT DISTINCT col0 DIV col2 - 45 AS col1 FROM tab1 AS cor0
----
-44
-45

skipif mysql # not compatible
query I rowsort label-1842
SELECT DISTINCT col0 / col2 - 45 AS col1 FROM tab1 AS cor0
----
-44
-45

query I rowsort
SELECT - col2 * cor0.col1 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + tab2.col0 * - col1 AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - cor0.col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + col0 col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - col2 * - col2 + + col1 FROM tab2
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-1848
SELECT col2 DIV + col0 + - col2 AS col1 FROM tab0 AS cor0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-1848
SELECT col2 / + col0 + - col2 AS col1 FROM tab0 AS cor0
----
-1
-32
-82

query I rowsort
SELECT ALL col0 * - col0 * cor0.col2 AS col0 FROM tab2 cor0
----
-1323
-158184
-237158

query I rowsort
SELECT + tab1.col1 - tab1.col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + tab0.col2 + - tab0.col1 FROM tab0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1852
SELECT ALL col2 DIV col2 AS col1 FROM tab0 AS cor0 WHERE NOT ( col0 + col2 ) IN ( + col0 )
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1852
SELECT ALL col2 / col2 AS col1 FROM tab0 AS cor0 WHERE NOT ( col0 + col2 ) IN ( + col0 )
----
1
1
1

query I rowsort
SELECT DISTINCT + col2 + col1 * - cor0.col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT + cor0.col0 * col2 + - col0 * col1 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT + col0 * col0 + cor0.col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT col0 + - col0 + - col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL - col0 * + col2 FROM tab1 WHERE ( NULL ) IN ( + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + tab2.col2 col1 FROM tab2
----
104
117
34

query I rowsort
SELECT tab1.col2 + + col0 * + col2 AS col2 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN col1 * col0 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1860
SELECT DISTINCT col1 - - tab0.col1 DIV col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-1860
SELECT DISTINCT col1 - - tab0.col1 / col1 FROM tab0
----
87
92
98

query I rowsort
SELECT + tab1.col0 + col1 * col2 FROM tab1
----
1328
1407
634

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT IN ( col0 )
----

query I rowsort
SELECT DISTINCT col0 + col2 * + col1 AS col2 FROM tab0 WHERE col0 <> + col1
----
132
2862
7551

query I rowsort
SELECT DISTINCT 77 FROM tab2, tab0 AS cor0
----
77

query I rowsort
SELECT col1 * + ( col0 ) * + col0 AS col0 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT + ( ( col1 ) ) * + col1 + 52 * col2 AS col0 FROM tab0
----
12545
9112
9461

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1867
SELECT CAST( NULL AS SIGNED ) + - 21 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1867
SELECT CAST ( NULL AS INTEGER ) + - 21 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1868
SELECT cor0.col2 DIV - cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

skipif mysql # not compatible
query I rowsort label-1868
SELECT cor0.col2 / - cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT ALL - - ( - cor0.col1 ) - - col0 AS col0 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT + 27 + 93 * col2 FROM tab1 AS cor0
----
5049
5328
8955

query I rowsort
SELECT - ( - cor0.col1 ) + + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1, tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL cor0.col0 + - col2 * - col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT + 14 AS col2 FROM tab2 AS cor0
----
14

query I rowsort
SELECT ALL - ( tab0.col2 ) FROM tab0, tab1 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT col0 - + ( col1 ) FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-1877
SELECT + + col1 + 89 DIV + cor0.col0 AS col0 FROM tab1 cor0
----
11
14
55

skipif mysql # not compatible
query I rowsort label-1877
SELECT + + col1 + 89 / + cor0.col0 AS col0 FROM tab1 cor0
----
11
14
55

query I rowsort
SELECT - col2 + - 11 * - ( + col2 ) FROM tab1 AS cor0
----
540
570
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1879
SELECT col2 - CAST( NULL AS SIGNED ) * cor0.col1 * col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1879
SELECT col2 - CAST ( NULL AS INTEGER ) * cor0.col1 * col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 2 * - col2 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL 5 AS col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1882
SELECT col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1882
SELECT col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1883
SELECT - cor0.col2 * - CAST( + 72 + + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
13366
169
5214

skipif mysql # not compatible
query I rowsort label-1883
SELECT - cor0.col2 * - CAST ( + 72 + + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
13366
169
5214

query I rowsort
SELECT col1 * - ( + 18 ) * col0 FROM tab2
----
-24174
-3906
-82836

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 + - col1 col1 FROM tab2
----
-10
-24
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-1887
SELECT DISTINCT - 42 + + col2 DIV col0 AS col1 FROM tab1
----
-24
-41
-42

skipif mysql # not compatible
query I rowsort label-1887
SELECT DISTINCT - 42 + + col2 / col0 AS col1 FROM tab1
----
-24
-41
-42

query I rowsort
SELECT - 83 * - ( tab0.col2 ) FROM tab0
----
2739
6806
83

query I rowsort
SELECT DISTINCT 35 * + col0 * + col1 + col1 AS col2 FROM tab1
----
22410
2756
36413

query I rowsort
SELECT 24 + + col2 * - col0 AS col0 FROM tab0
----
-11
-7274
-768

onlyif mysql # use DIV operator for integer division
query I rowsort label-1891
SELECT ALL - col2 DIV 94 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1891
SELECT ALL - col2 / 94 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - 62 * col0 + tab1.col1 FROM tab1
----
-160
-3958
-4947

query I rowsort
SELECT DISTINCT col0 * - 22 + - col1 AS col1 FROM tab2
----
-1755
-1775
-185

query I rowsort
SELECT - 42 + 41 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT - col1 + - cor0.col2 * + cor0.col2 * col2 FROM tab1 AS cor0
----
-157490
-185203
-884749

query I rowsort
SELECT ALL - + 87 * col0 + + col2 AS col1 FROM tab2 AS cor0
----
-582
-6760
-6835

query I rowsort
SELECT ( tab0.col1 ) + col1 * col0 FROM tab0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-1898
SELECT DISTINCT - col1 + tab1.col2 DIV + col0 + col2 * col0 * col2 AS col2 FROM tab1
----
207926
737268
8740

skipif mysql # not compatible
query I rowsort label-1898
SELECT DISTINCT - col1 + tab1.col2 / + col0 + col2 * col0 * col2 AS col2 FROM tab1
----
207926
737268
8740

query I rowsort
SELECT DISTINCT - ( - col0 ) + + tab1.col0 FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 99 col0 FROM tab2, tab0 AS cor0
----
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-1901
SELECT - 15 * col0 DIV col0 FROM tab0 AS cor0
----
-15
-15
-15

skipif mysql # not compatible
query I rowsort label-1901
SELECT - 15 * col0 / col0 FROM tab0 AS cor0
----
-15
-15
-15

onlyif mysql # use DIV operator for integer division
query I rowsort label-1902
SELECT DISTINCT 48 DIV col1 AS col2 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-1902
SELECT DISTINCT 48 / col1 AS col2 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 * col0 col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + + 67 * col2 AS col1 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT ALL + 87 * col0 AS col0 FROM tab0 AS cor0
----
2088
3045
7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col2 * - col0 col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT ALL 91 * cor0.col2 * col2 FROM tab1 AS cor0
----
265356
295659
838656

query I rowsort
SELECT DISTINCT + cor0.col1 + col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - + 1 * - col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - - col0 + 36 - 64 FROM tab2 AS cor0
----
-21
50
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-1911
SELECT + - col1 DIV - 36 + + cor0.col2 + col2 * col2 col1 FROM tab0 cor0
----
1124
4
6808

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1911
SELECT + - col1 / - 36 + + cor0.col2 + col2 * col2 col1 FROM tab0 cor0
----
1124
4
6808

query I rowsort
SELECT - col1 - - col0 AS col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL cor0.col2 * col0 + ( + col1 ) + + col2 FROM tab1 AS cor0
----
242
3715
7789

query I rowsort
SELECT ALL + - col2 + + col0 + - col2 FROM tab0 AS cor0
----
-42
-75
33

query I rowsort
SELECT DISTINCT + col2 * - 64 - col1 * - col1 AS col1 FROM tab2 AS cor0
----
-2143
-767
1817

query I rowsort
SELECT ALL - col2 + + 77 FROM tab2 AS cor0
----
39
50
51

query I rowsort
SELECT ALL + - col0 + 52 AS col1 FROM tab2 AS cor0
----
-26
-27
45

query I rowsort
SELECT + cor0.col0 + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + col2 + + 14 AS col2 FROM tab0 cor0
----
15
47
96

query I rowsort
SELECT - cor0.col2 + ( 59 ) FROM tab2 AS cor0
----
21
32
33

query I rowsort
SELECT ALL - col1 * 31 * + cor0.col2 + - cor0.col1 FROM tab0 AS cor0
----
-231413
-3104
-88064

query I rowsort
SELECT - + cor0.col2 * + col1 * col1 + col1 FROM tab2 AS cor0
----
-10965
-25916
-90447

onlyif mysql # use DIV operator for integer division
query I rowsort label-1923
SELECT DISTINCT + 90 + + col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
91

skipif mysql # not compatible
query I rowsort label-1923
SELECT DISTINCT + 90 + + col0 / + col0 AS col2 FROM tab0 AS cor0
----
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-1924
SELECT ALL + col0 * 83 + + col2 - - col2 DIV + col2 FROM tab0 cor0
----
2026
2907
7470

skipif mysql # not compatible
query I rowsort label-1924
SELECT ALL + col0 * 83 + + col2 - - col2 / + col2 FROM tab0 cor0
----
2026
2907
7470

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 col1 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1926
SELECT DISTINCT + - 27 DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1926
SELECT DISTINCT + - 27 / + col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - 24 + + cor0.col1 + col2 FROM tab0 cor0
----
149
74
95

query I rowsort
SELECT - - col0 * cor0.col1 + col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - + col0 * - col2 + - col1 AS col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT DISTINCT - 84 + - col2 AS col0 FROM tab0 AS cor0
----
-117
-166
-85

query I rowsort
SELECT col1 + 58 FROM tab0 AS cor0
----
144
149
155

query I rowsort
SELECT - col2 + col0 * col0 AS col0 FROM tab0 cor0
----
1224
543
7839

query I rowsort
SELECT ALL + 72 FROM tab1, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # use DIV operator for integer division
query I rowsort label-1934
SELECT col0 - + 72 * 10 DIV + col1 AS col2 FROM tab2
----
-16
37
66

skipif mysql # not compatible
query I rowsort label-1934
SELECT col0 - + 72 * 10 / + col1 AS col2 FROM tab2
----
-16
37
66

query I rowsort
SELECT DISTINCT + col2 * col1 + - col2 AS col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT - + col2 + + col2 * col1 AS col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT + + col2 - - col1 * + cor0.col2 AS col0 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT - col2 - col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT + col1 * cor0.col0 - + col2 AS col0 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-1940
SELECT ALL + cor0.col1 DIV col0 + col2 col0 FROM tab2 AS cor0
----
26
31
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1940
SELECT ALL + cor0.col1 / col0 + col2 col0 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT + col2 * - col0 * cor0.col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT ALL + - col1 * + col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT + col0 - col1 * col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL + col0 - - col2 * - tab1.col0 FROM tab1
----
-159
-3584
-7600

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1946
SELECT DISTINCT + - col2 * - cor0.col0 + + col1 DIV col1 AS col0 FROM tab2 cor0
----
190
2029
3003

skipif mysql # not compatible
query I rowsort label-1946
SELECT DISTINCT + - col2 * - cor0.col0 + + col1 / col1 AS col0 FROM tab2 cor0
----
190
2029
3003

query I rowsort
SELECT col2 + col2 * cor0.col0 AS col1 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT col2 - - col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL col1 * col0 + + col2 * col2 FROM tab2
----
2787
5278
946

query I rowsort
SELECT ALL tab1.col1 + + tab1.col1 * col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT cor0.col1 + col0 * col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-1952
SELECT col1 + - col1 * col1 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
12
14
9

skipif mysql # not compatible
query I rowsort label-1952
SELECT col1 + - col1 * col1 / cor0.col2 AS col0 FROM tab1 AS cor0
----
12
14
9

query I rowsort
SELECT ALL col2 * col0 + tab1.col0 * - col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - col0 * - col1 * + col2 AS col1 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + col1 + + col0 * cor0.col2 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL col1 * tab1.col2 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 12 + - col0 * + col1 AS col1 FROM tab2
----
-1331
-205
-4590

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 8 * tab1.col1 col1 FROM tab1
----
104
208
80

query I rowsort
SELECT + tab2.col2 + + tab2.col2 * - col2 AS col1 FROM tab2
----
-1406
-650
-702

query IIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 WHERE NULL < NULL
----

query I rowsort
SELECT - tab2.col1 * + tab2.col0 + col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT ALL + tab1.col2 * tab1.col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT - - cor0.col0 * - col2 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL col1 * cor0.col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT + col2 + col2 * 31 FROM tab0 AS cor0
----
1056
2624
32

query I rowsort
SELECT - 85 AS col1 FROM tab0
----
-85
-85
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - cor0.col2 * 92 FROM tab2 AS cor0
----
-2392
-2484
-3496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1969
SELECT DISTINCT - + col2 + CAST( NULL AS SIGNED ) * 46 * col0 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1969
SELECT DISTINCT - + col2 + CAST ( NULL AS INTEGER ) * 46 * col0 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col1 + col2 * 24 FROM tab2 AS cor0
----
679
683
929

query I rowsort
SELECT - + col0 * - 68 FROM tab1 AS cor0
----
204
4352
5440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - - col1 * + 50 AS col0 FROM tab1 AS cor0
----
1300
500
650

query I rowsort
SELECT ( - col1 ) + + col2 FROM tab2
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1975
SELECT DISTINCT CAST( NULL AS SIGNED ) + col2 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-1975
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col2 AS col1 FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1976
SELECT DISTINCT - CAST( col1 AS SIGNED ) + tab0.col0 FROM tab0
----
-2
-62

skipif mysql # not compatible
query I rowsort label-1976
SELECT DISTINCT - CAST ( col1 AS INTEGER ) + tab0.col0 FROM tab0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-1977
SELECT CAST( + col1 AS SIGNED ) DIV + col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-1977
SELECT CAST ( + col1 AS INTEGER ) / + col0 FROM tab2
----
0
0
4

query I rowsort
SELECT DISTINCT 44 + col1 AS col1 FROM tab1
----
54
57
70

query I rowsort
SELECT tab2.col1 * + col2 + col1 + ( - 46 + col1 ) AS col2 FROM tab2
----
1606
634
853

query I rowsort
SELECT DISTINCT + col2 * - 89 * col0 + - col0 FROM tab1
----
-14421
-324736
-683600

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1982
SELECT ALL CAST( - col2 AS SIGNED ) + - col0 * - 81 FROM tab0 AS cor0
----
1911
2834
7127

skipif mysql # not compatible
query I rowsort label-1982
SELECT ALL CAST ( - col2 AS INTEGER ) + - col0 * - 81 FROM tab0 AS cor0
----
1911
2834
7127

query I rowsort
SELECT col0 + col0 + tab2.col2 * - 28 FROM tab2
----
-572
-742
-906

query I rowsort
SELECT - ( col2 ) + - ( + 67 ) AS col1 FROM tab1 AS cor0
----
-121
-124
-163

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT + col2 * + col0 + + col0 * - col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - ( col2 ) * + col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 27 * + col0 * - ( col2 + cor0.col1 ) col0 FROM tab0 cor0
----
-415719
-77112
-92610

query I rowsort
SELECT DISTINCT + ( col0 ) + - 38 AS col0 FROM tab0 AS cor0
----
-14
-3
51

query I rowsort
SELECT - + 98 + cor0.col1 + - col0 FROM tab0 AS cor0
----
-36
-36
-96

query I rowsort
SELECT ALL 51 + - 84 AS col0 FROM tab1
----
-33
-33
-33

query I rowsort
SELECT + 4 * - col1 * + col1 + + ( + col0 ) FROM tab1 AS cor0
----
-2701
-336
-596

query I rowsort
SELECT + col1 * + cor0.col1 * ( + 62 ) + - col2 - + col0 AS col1 FROM tab0 cor0
----
458495
513251
583322

query I rowsort
SELECT ALL ( + col2 ) * ( col1 + - col2 ) FROM tab1
----
-1512
-2679
-7968

onlyif mysql # use DIV operator for integer division
query I rowsort label-1995
SELECT ALL col2 + - col0 - 31 DIV - col1 AS col1 FROM tab2
----
-40
-52
21

skipif mysql # not compatible
query I rowsort label-1995
SELECT ALL col2 + - col0 - 31 / - col1 AS col1 FROM tab2
----
-40
-52
21

query I rowsort
SELECT col1 * col1 * ( + 43 ) AS col1 FROM tab1
----
29068
4300
7267

onlyif mysql # use DIV operator for integer division
query I rowsort label-1997
SELECT - col1 + - cor0.col2 * ( - 85 ) DIV + col0 AS col0 FROM tab1 AS cor0
----
1504
65
89

skipif mysql # not compatible
query I rowsort label-1997
SELECT - col1 + - cor0.col2 * ( - 85 ) / + col0 AS col0 FROM tab1 AS cor0
----
1504
65
89

query I rowsort
SELECT DISTINCT + tab0.col2 + - col0 - + col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + col2 - - cor0.col0 * + 61 FROM tab1 AS cor0
----
237
3961
4976

query I rowsort
SELECT col1 * - col2 + - col0 AS col1 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT - col0 + + col2 * + col1 AS col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + col2 + - ( + col2 * - col1 ) FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT - col0 * 18 + col2 FROM tab2 AS cor0
----
-1378
-1384
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2004
SELECT - + col1 DIV ( + col0 ) + col2 FROM tab0 AS cor0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-2004
SELECT - + col1 / ( + col0 ) + col2 FROM tab0 AS cor0
----
-1
30
81

query I rowsort
SELECT + - col0 * - 75 + col2 FROM tab2 AS cor0
----
552
5876
5963

query I rowsort
SELECT 59 * + col2 FROM tab0
----
1947
4838
59

query I rowsort
SELECT + 36 AS col1 FROM tab2
----
36
36
36

query I rowsort
SELECT col0 + - ( - col1 ) AS col2 FROM tab1 cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + ( ( - col0 ) ) * + col1 col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT - col2 + ( col1 ) * + col0 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2011
SELECT + - col1 / + CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2011
SELECT + - col1 / + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2012
SELECT ALL - col1 DIV - col2 + - col0 + + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-2012
SELECT ALL - col1 / - col2 + - col0 + + col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2013
SELECT ALL + + cor0.col2 DIV - 13 AS col2 FROM tab0 cor0
----
-2
-6
0

skipif mysql # not compatible
query I rowsort label-2013
SELECT ALL + + cor0.col2 / - 13 AS col2 FROM tab0 cor0
----
-2
-6
0

query I rowsort
SELECT col2 * 49 FROM tab1 cor0
----
2646
2793
4704

query I rowsort
SELECT 89 * - col1 AS col2 FROM tab1 AS cor0
----
-1157
-2314
-890

query I rowsort
SELECT + + ( + col2 ) + + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + - 57 AS col0 FROM tab2 AS cor0
----
-57
-57
-57

query I rowsort
SELECT ALL + tab1.col0 * + col2 + + col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT DISTINCT - - col1 * col1 + col2 * - col1 FROM tab2 AS cor0
----
-357
124
1947

query I rowsort
SELECT ALL + 11 FROM tab0, tab1 cor0 CROSS JOIN tab2, tab1, tab0 AS cor1
----
243 values hashing to 9abcb2f48b3a009aa8d65d82a30c843f

onlyif mysql # use DIV operator for integer division
query I rowsort label-2021
SELECT - 17 DIV + col2 AS col0 FROM tab0
----
-17
0
0

skipif mysql # not compatible
query I rowsort label-2021
SELECT - 17 / + col2 AS col0 FROM tab0
----
-17
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2022
SELECT - + col2 DIV + col1 + col2 + col0 FROM tab1 AS cor0
----
116
169
55

skipif mysql # not compatible
query I rowsort label-2022
SELECT - + col2 / + col1 + col2 + col0 FROM tab1 AS cor0
----
116
169
55

query I rowsort
SELECT DISTINCT - 46 AS col2 FROM tab0 AS cor0
----
-46

query I rowsort
SELECT ALL ( 43 ) * + col2 FROM tab1 AS cor0
----
2322
2451
4128

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2025
SELECT - + CAST( + 51 AS SIGNED ) + - col1 * - col2 FROM tab0 AS cor0
----
2787
46
7411

skipif mysql # not compatible
query I rowsort label-2025
SELECT - + CAST ( + 51 AS INTEGER ) + - col1 * - col2 FROM tab0 AS cor0
----
2787
46
7411

query I rowsort
SELECT DISTINCT - - 88 + + cor0.col0 * - col2 AS col0 FROM tab0 AS cor0
----
-704
-7210
53

query I rowsort
SELECT - 88 + col0 * col1 AS col1 FROM tab1 AS cor0
----
-10
552
952

onlyif mysql # use DIV operator for integer division
query I rowsort label-2028
SELECT - ( - col2 ) DIV col1 AS col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2028
SELECT - ( - col2 ) / col1 AS col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT 68 FROM tab2, tab1 cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT col0 * 64 * + col2 AS col0 FROM tab0
----
2240
467072
50688

onlyif mysql # use DIV operator for integer division
query I rowsort label-2031
SELECT DISTINCT col1 + ( tab1.col2 ) DIV - tab1.col0 - - 35 AS col2 FROM tab1
----
43
45
47

skipif mysql # not compatible
query I rowsort label-2031
SELECT DISTINCT col1 + ( tab1.col2 ) / - tab1.col0 - - 35 AS col2 FROM tab1
----
43
45
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-2032
SELECT ALL - tab1.col1 DIV col0 + - 52 + tab1.col2 * col1 FROM tab1
----
1196
1344
518

skipif mysql # not compatible
query I rowsort label-2032
SELECT ALL - tab1.col1 / col0 + - 52 + tab1.col2 * col1 FROM tab1
----
1196
1344
518

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col2 - - col2 col2 FROM tab0
----
152
255
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 45 - col2 col2 FROM tab1
----
2376
2508
4224

query I rowsort
SELECT DISTINCT col1 + - ( - col2 ) - col0 AS col0 FROM tab0
----
63
84
95

query I rowsort
SELECT + 91 * - tab0.col1 + + col2 FROM tab0
----
-7793
-8199
-8826

query I rowsort
SELECT ALL col2 * cor0.col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + - col1 * + 3 + + cor0.col2 + - col1 AS col2 FROM tab2 AS cor0
----
-210
-30
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - 47 * - col2 * 81 col2 FROM tab1 AS cor0
----
205632
217056
365568

query I rowsort
SELECT DISTINCT + 19 * col2 FROM tab1 AS cor0
----
1026
1083
1824

query I rowsort
SELECT ALL + 21 * col0 AS col0 FROM tab2 cor0
----
147
1638
1659

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2042
SELECT ALL - CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2042
SELECT ALL - CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2043
SELECT DISTINCT + col0 + col2 DIV + col1 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2043
SELECT DISTINCT + col0 + col2 / + col1 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + + 23 + + col2 * 40 AS col1 FROM tab0 cor0
----
1343
3303
63

query I rowsort
SELECT + col2 * col2 + + col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT + cor0.col0 + col2 + col0 FROM tab0 AS cor0
----
260
71
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2047
SELECT + - col0 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2047
SELECT + - col0 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + col0 + col1 FROM tab0 AS cor0
----
196
229
271

onlyif mysql # use DIV operator for integer division
query I rowsort label-2049
SELECT col2 + - CAST( col2 AS SIGNED ) DIV col2 col1 FROM tab1 AS cor0
----
53
56
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2049
SELECT col2 + - CAST ( col2 AS INTEGER ) / col2 col1 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT - col1 * col1 * col2 AS col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL + cor0.col0 + 97 FROM tab2 AS cor0
----
104
175
176

query I rowsort
SELECT - col0 * - col1 + col2 AS col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - col1 * + ( 7 ) + + col2 AS col2 FROM tab2 cor0
----
-190
-387
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2054
SELECT ALL col2 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2054
SELECT ALL col2 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2055
SELECT DISTINCT - + col0 DIV + 11 + - col1 AS col0 FROM tab1 AS cor0
----
-15
-20
-26

skipif mysql # not compatible
query I rowsort label-2055
SELECT DISTINCT - + col0 / + 11 + - col1 AS col0 FROM tab1 AS cor0
----
-15
-20
-26

query I rowsort
SELECT DISTINCT - col0 * - cor0.col0 - - 66 FROM tab1 AS cor0
----
4162
6466
75

query I rowsort
SELECT DISTINCT + + col0 * 48 + - col1 AS col2 FROM tab2 cor0
----
305
3685
3775

query I rowsort
SELECT - + col2 + + 91 * + col0 FROM tab0 cor0
----
2151
3184
8017

query I rowsort
SELECT ALL + col0 + + 59 AS col1 FROM tab2 AS cor0
----
137
138
66

query I rowsort
SELECT DISTINCT col0 * 65 + + col2 * + cor0.col0 FROM tab2 AS cor0
----
644
7098
8137

query I rowsort
SELECT ALL + col1 * cor0.col0 * - col1 + col1 FROM tab1 AS cor0
----
-13507
-2002
-6390

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 8 - col1 col0 FROM tab0 AS cor0
----
-105
-94
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2063
SELECT + + cor0.col2 + + col2 * + cor0.col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT - cor0.col0 * ( - col1 ) + col0 * ( col2 ) + 58 AS col1 FROM tab2 AS cor0
----
4403
464
6688

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 * cor0.col0 * - cor0.col1 + col1 col0 FROM tab0 AS cor0
----
149477
356447
90902

query I rowsort
SELECT col1 * + col1 + col1 AS col0 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT DISTINCT - - 88 + + 28 AS col0 FROM tab1 AS cor0
----
116

onlyif mysql # use DIV operator for integer division
query I rowsort label-2068
SELECT + cor0.col2 DIV + col2 + + ( col0 ) AS col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-2068
SELECT + cor0.col2 / + col2 + + ( col0 ) AS col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT - col2 * - col1 + col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL + col1 - + col0 AS col1 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT 82 * - col1 AS col0 FROM tab0 AS cor0
----
-7052
-7462
-7954

query I rowsort
SELECT ALL 12 * + col1 + col2 FROM tab1 AS cor0
----
177
252
366

query I rowsort
SELECT ALL col1 + ( tab1.col1 ) FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - col1 * col1 - cor0.col1 AS col2 FROM tab1 AS cor0
----
-110
-182
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-2075
SELECT + col1 + col0 DIV + col1 AS col2 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-2075
SELECT + col1 + col0 / + col1 AS col2 FROM tab2
----
21
31
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2076
SELECT + 21 DIV + col1 - + 1 AS col0 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2076
SELECT + 21 / + col1 - + 1 AS col0 FROM tab2
----
-1
-1
0

query I rowsort
SELECT - tab2.col0 FROM tab2, tab0, tab1 cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + col1 * col0 + - col2 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT + + 23 AS col1 FROM tab1 cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2080
SELECT - + col2 DIV 5 + - cor0.col0 * col0 FROM tab1 AS cor0
----
-19
-4107
-6419

skipif mysql # not compatible
query I rowsort label-2080
SELECT - + col2 / 5 + - cor0.col0 * col0 FROM tab1 AS cor0
----
-19
-4107
-6419

query I rowsort
SELECT + 29 + - cor0.col2 FROM tab0 AS cor0
----
-4
-53
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-2082
SELECT ALL - 67 * + 50 - - col1 DIV + 68 AS col0 FROM tab1 AS cor0
----
-3350
-3350
-3350

skipif mysql # not compatible
query I rowsort label-2082
SELECT ALL - 67 * + 50 - - col1 / + 68 AS col0 FROM tab1 AS cor0
----
-3350
-3350
-3350

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2083
SELECT CAST( NULL AS DECIMAL ) * - col1 * - col0 + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2083
SELECT CAST ( NULL AS REAL ) * - col1 * - col0 + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT + col1 * col0 + CAST ( 77 + col2 AS REAL ) * + col2 AS col0 FROM tab2 AS cor0
----
3025
5713
7280

query I rowsort
SELECT 59 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col0 * col1 col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + col0 + - 97 + col1 FROM tab2
----
-1
-59
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2088
SELECT col2 DIV + tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2088
SELECT col2 / + tab0.col1 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2089
SELECT + col0 * - CAST( - col1 AS SIGNED ) AS col0 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2089
SELECT + col0 * - CAST ( - col1 AS INTEGER ) AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL 33 FROM tab2, tab2 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT + + col2 * cor0.col0 + + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT - 88 AS col2 FROM tab0, tab1 AS cor0
----
-88

query I rowsort
SELECT col1 * col1 * col2 AS col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL - 89 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

query I rowsort
SELECT ALL + col0 + + col2 - - col0 AS col2 FROM tab2
----
182
196
41

query I rowsort
SELECT - ( col1 ) * + col1 + col2 * + ( col1 + tab2.col0 ) AS col0 FROM tab2
----
3359
65
81

query I rowsort
SELECT ALL 47 * + col2 AS col2 FROM tab2
----
1222
1269
1786

query I rowsort
SELECT ALL + col2 - - ( - col2 ) AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT col1 + - col1 * - col1 * - ( + 6 * + col1 ) AS col1 FROM tab1
----
-105430
-13169
-5990

query I rowsort
SELECT 49 + + col1 AS col2 FROM tab1 AS cor0
----
59
62
75

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

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col1 AS REAL ) + - col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2103
SELECT DISTINCT + CAST( NULL AS SIGNED ) + ( col2 ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2103
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + ( col2 ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - col0 * - cor0.col2 + - col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT + 66 + cor0.col1 AS col1 FROM tab2 AS cor0
----
125
83
97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-2107
SELECT - 92 DIV col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2107
SELECT - 92 / col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT col0 * col0 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col2 FROM tab0, tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT 82 * col0 * + ( 14 ) + col1 AS col1 FROM tab2
----
8067
89603
90709

query I rowsort
SELECT - col0 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + + col1 + + ( - ( + col0 ) ) * - 88 AS col1 FROM tab1 AS cor0
----
290
5642
7053

query I rowsort
SELECT col0 * + 19 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT + col1 - + 69 * col0 FROM tab1
----
-181
-4406
-5507

query I rowsort
SELECT + col0 * ( 49 ) AS col2 FROM tab1 AS cor0
----
147
3136
3920

onlyif mysql # use DIV operator for integer division
query I rowsort label-2116
SELECT ALL - col0 * col1 DIV col2 AS col2 FROM tab1 cor0
----
-1
-10
-11

skipif mysql # not compatible
query I rowsort label-2116
SELECT ALL - col0 * col1 / col2 AS col2 FROM tab1 cor0
----
-1
-10
-11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2117
SELECT cor0.col2 * + CAST( col0 AS SIGNED ) FROM tab0 cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-2117
SELECT cor0.col2 * + CAST ( col0 AS INTEGER ) FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + - col2 + + 48 AS col1 FROM tab1 AS cor0
----
-48
-6
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 24 * ( col1 * - 8 ) col1 FROM tab0 cor0
----
1555008
396288
651840

query I rowsort
SELECT DISTINCT - cor0.col1 + 80 * + col2 AS col1 FROM tab2 AS cor0
----
2021
2129
3023

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2121
SELECT + col0 * CAST( - 78 AS SIGNED ) FROM tab1 AS cor0
----
-234
-4992
-6240

skipif mysql # not compatible
query I rowsort label-2121
SELECT + col0 * CAST ( - 78 AS INTEGER ) FROM tab1 AS cor0
----
-234
-4992
-6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * col2 col1 FROM tab1 AS cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 52 + cor0.col2 col0 FROM tab0 AS cor0
----
-19
-51
30

query I rowsort
SELECT ALL + + 82 * + cor0.col0 AS col2 FROM tab0 cor0
----
1968
2870
7298

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col0 + + col1 * + col0 + col2 col0 FROM tab2 AS cor0
----
-1621
2600
55

query I rowsort
SELECT ALL col0 * cor0.col1 + col2 + col1 * cor0.col2 * 90 AS col0 FROM tab2 AS cor0
----
142688
59521
75574

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 86 * cor0.col1 + col0 col0 FROM tab0 AS cor0
----
-7372
-7737
-8307

query I rowsort
SELECT + 45 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT + 30 AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT ALL + col2 * + 53 AS col0 FROM tab0 cor0
----
1749
4346
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2131
SELECT DISTINCT - col2 * CAST( - col0 AS SIGNED ) + - cor0.col0 AS col2 FROM tab1 AS cor0
----
159
3584
7600

skipif mysql # not compatible
query I rowsort label-2131
SELECT DISTINCT - col2 * CAST ( - col0 AS INTEGER ) + - cor0.col0 AS col2 FROM tab1 AS cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 40 col1 FROM tab0 AS cor0
----
-42
39
7

query I rowsort
SELECT + col2 * - cor0.col2 - cor0.col0 AS col2 FROM tab0 AS cor0
----
-1113
-36
-6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-2134
SELECT DISTINCT + col0 * col1 + 47 DIV - col0 AS col2 FROM tab0 AS cor0
----
2063
3394
8099

skipif mysql # not compatible
query I rowsort label-2134
SELECT DISTINCT + col0 * col1 + 47 / - col0 AS col2 FROM tab0 AS cor0
----
2063
3394
8099

query I rowsort
SELECT ALL col0 * + col2 + col2 AS col1 FROM tab1
----
216
3705
7776

query I rowsort
SELECT + col1 * - tab2.col1 + - 12 + - col1 * col2 FROM tab2
----
-1810
-5027
-947

query I rowsort
SELECT ( col1 ) * col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + - col2 + col1 * col2 AS col1 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2139
SELECT ALL - CAST( NULL AS DECIMAL ) * col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2139
SELECT ALL - CAST ( NULL AS REAL ) * col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 40 FROM tab1 cor0
----
-40

query I rowsort
SELECT - 79 * + col2 AS col0 FROM tab0 AS cor0
----
-2607
-6478
-79

query I rowsort
SELECT ALL - col2 + col2 * col1 AS col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT + col0 * - 44 AS col2 FROM tab0 AS cor0
----
-1056
-1540
-3916

query I rowsort
SELECT - - 58 + - col2 * + col1 * col1 FROM tab2 AS cor0
----
-10924
-25889
-90448

onlyif mysql # use DIV operator for integer division
query I rowsort label-2145
SELECT col0 * + ( - col1 ) + + col1 DIV col1 FROM tab2
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-2145
SELECT col0 * + ( - col1 ) + + col1 / col1 FROM tab2
----
-1342
-216
-4601

onlyif mysql # use DIV operator for integer division
query I rowsort label-2146
SELECT DISTINCT + col2 * col2 * col1 + col2 + col1 DIV - ( col2 + + col1 ) AS col2 FROM tab1
----
119904
32547
75870

skipif mysql # not compatible
query I rowsort label-2146
SELECT DISTINCT + col2 * col2 * col1 + col2 + col1 / - ( col2 + + col1 ) AS col2 FROM tab1
----
119904
32547
75870

query I rowsort
SELECT col0 * tab2.col2 * + 35 FROM tab2
----
105070
6615
70980

query I rowsort
SELECT ALL + col0 * 62 * 25 FROM tab2
----
10850
120900
122450

onlyif mysql # use DIV operator for integer division
query I rowsort label-2149
SELECT DISTINCT + col2 + 65 * 4 DIV col0 FROM tab0
----
43
8
84

skipif mysql # not compatible
query I rowsort label-2149
SELECT DISTINCT + col2 + 65 * 4 / col0 FROM tab0
----
43
8
84

query I rowsort
SELECT DISTINCT ( ( - col0 ) ) AS col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ( - 28 ) - col1 FROM tab2
----
-45
-59
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 41 * - col1 col0 FROM tab2
----
-1271
-2419
-697

query I rowsort
SELECT + + 56 * col1 FROM tab1 AS cor0
----
1456
560
728

onlyif mysql # use DIV operator for integer division
query I rowsort label-2154
SELECT DISTINCT + col2 + col0 DIV - col0 - + CAST( + 70 * col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-5988
-6289
-6790

skipif mysql # not compatible
query I rowsort label-2154
SELECT DISTINCT + col2 + col0 / - col0 - + CAST ( + 70 * col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-5988
-6289
-6790

onlyif mysql # use DIV operator for integer division
query I rowsort label-2155
SELECT DISTINCT + col1 DIV - col2 + cor0.col1 AS col1 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2155
SELECT DISTINCT + col1 / - col2 + cor0.col1 AS col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL + - col1 + + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 55 * cor0.col2 + cor0.col0 col0 FROM tab2 AS cor0
----
-1352
-1478
-2011

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 87 + + tab2.col1 col1 FROM tab2
----
640
6845
6890

query I rowsort
SELECT - 99 + col1 * + col2 FROM tab1
----
1149
1305
471

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab1, tab2, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT 0 AS col0 FROM tab0, tab0 cor0
----
0

query I rowsort
SELECT - 23 AS col0 FROM tab1
----
-23
-23
-23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2163
SELECT CAST( NULL AS DECIMAL ) * 77 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2163
SELECT CAST ( NULL AS REAL ) * 77 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 - - col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - + col2 * + col2 + 9 * col1 FROM tab1 AS cor0
----
-2682
-3159
-9099

query I rowsort
SELECT + - 46 * col0 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT DISTINCT - 44 * col2 + + col1 * + 10 AS col0 FROM tab2 cor0
----
-1502
-554
-878

query I rowsort
SELECT DISTINCT + - 60 * col1 FROM tab1 cor0
----
-1560
-600
-780

query I rowsort
SELECT DISTINCT - 81 * col2 + cor0.col2 + col0 AS col2 FROM tab1 AS cor0
----
-4317
-4496
-7600

query I rowsort
SELECT ALL 69 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2171
SELECT ALL + tab1.col0 + - col1 DIV col1 AS col0 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-2171
SELECT ALL + tab1.col0 + - col1 / col1 AS col0 FROM tab1
----
2
63
79

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab2 cor3
----
3645 values hashing to 713ff9f9cde43214a064a8e6ada00f4e

query I rowsort
SELECT ALL + col2 * - col1 + ( + col2 + - col0 ) FROM tab0 AS cor0
----
-131
-2829
-7469

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - + cor0.col0 col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL + col0 + 89 * + 22 FROM tab2 cor0
----
1965
2036
2037

onlyif mysql # use DIV operator for integer division
query I rowsort label-2176
SELECT + + cor0.col0 DIV + 31 - col2 * col2 AS col0 FROM tab0 AS cor0
----
-1089
-6722
0

skipif mysql # not compatible
query I rowsort label-2176
SELECT + + cor0.col0 / + 31 - col2 * col2 AS col0 FROM tab0 AS cor0
----
-1089
-6722
0

query I rowsort
SELECT DISTINCT + + col1 + - col1 * col0 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2178
SELECT + col1 * - CAST( NULL AS SIGNED ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2178
SELECT + col1 * - CAST ( NULL AS INTEGER ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + 83 FROM tab1 AS cor0
----
-13
26
29

query I rowsort
SELECT col2 + 17 AS col0 FROM tab0 AS cor0
----
18
50
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 + + 52 col2 FROM tab0 AS cor0
----
138
143
149

query I rowsort
SELECT DISTINCT - + cor0.col1 * col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2183
SELECT ALL - - CAST( + 32 AS SIGNED ) + + col0 col1 FROM tab1 AS cor0
----
112
35
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2183
SELECT ALL - - CAST ( + 32 AS INTEGER ) + + col0 col1 FROM tab1 AS cor0
----
112
35
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2184
SELECT - CAST( col0 AS SIGNED ) * col0 + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

skipif mysql # not compatible
query I rowsort label-2184
SELECT - CAST ( col0 AS INTEGER ) * col0 + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT - + 64 * + col1 + + col0 AS col2 FROM tab1 AS cor0
----
-1661
-576
-752

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2186
SELECT DISTINCT - + CAST( col1 AS SIGNED ) + - col1 * - col1 FROM tab0 AS cor0
----
7310
8190
9312

skipif mysql # not compatible
query I rowsort label-2186
SELECT DISTINCT - + CAST ( col1 AS INTEGER ) + - col1 * - col1 FROM tab0 AS cor0
----
7310
8190
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col1 + cor0.col0 + ( + col0 ) col1 FROM tab1 AS cor0
----
1200
768
84

query I rowsort
SELECT DISTINCT col0 * + col1 + + col1 * col0 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL 66 + + 24 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # use DIV operator for integer division
query I rowsort label-2191
SELECT - col2 DIV + 48 FROM tab1 AS cor0
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-2191
SELECT - col2 / + 48 FROM tab1 AS cor0
----
-1
-1
-2

query I rowsort
SELECT DISTINCT - cor0.col1 * ( 18 ) AS col1 FROM tab1, tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT col2 * + col0 * col2 FROM tab0 cor0
----
26136
35
598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 56 * + col0 col2 FROM tab0 AS cor0
----
1344
1960
4984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 + - cor0.col0 col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT col2 + + col2 + + 7 * col2 AS col0 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT + col1 + ( col1 ) + col2 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT col0 + col2 + 30 FROM tab0 AS cor0
----
201
66
87

query I rowsort
SELECT - col1 + - 72 + + ( + col1 ) FROM tab1 AS cor0
----
-72
-72
-72

query I rowsort
SELECT - col1 + - cor0.col2 * - ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT DISTINCT + + col2 * col1 - - col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT 37 * - 57 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 648e09024d864a99fbd3047e59db5c8d

query I rowsort
SELECT + col1 + - ( col2 ) * - ( 28 ) AS col2 FROM tab2 AS cor0
----
1081
787
787

onlyif mysql # use DIV operator for integer division
query I rowsort label-2204
SELECT ALL ( + col2 ) DIV + cor0.col0 - col2 FROM tab1 cor0
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-2204
SELECT ALL ( + col2 ) / + cor0.col0 - col2 FROM tab1 cor0
----
-36
-57
-95

query I rowsort
SELECT DISTINCT + + 27 * col1 AS col0 FROM tab0 AS cor0
----
2322
2457
2619

query I rowsort
SELECT ALL + 10 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT ALL - 23 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

query I rowsort
SELECT + 78 + col2 AS col0 FROM tab2 AS cor0
----
104
105
116

query I rowsort
SELECT - 90 AS col0 FROM tab0 cor0
----
-90
-90
-90

query I rowsort
SELECT cor1.col2 AS col0 FROM tab0, tab2 cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - col2 * ( col0 ) * - 96 AS col0 FROM tab2
----
18144
194688
288192

query I rowsort
SELECT 0 + - col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + ( + ( + col2 ) ) AS col1 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2214
SELECT DISTINCT + col1 DIV - col0 col0 FROM tab2 AS cor0
----
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2214
SELECT DISTINCT + col1 / - col0 col0 FROM tab2 AS cor0
----
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 * + col1 col2 FROM tab2 AS cor0
----
155
295
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2216
SELECT DISTINCT - + col1 * - col0 DIV col0 + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-2216
SELECT DISTINCT - + col1 * - col0 / col0 + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ( tab0.col1 + + col1 ) AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT + 28 + + col1 * - col0 FROM tab2
----
-1315
-189
-4574

query I rowsort
SELECT ( col1 ) * col0 + 0 * col1 + col0 * - col0 * - col1 FROM tab0 cor0
----
122220
51600
728910

query I rowsort
SELECT DISTINCT - ( col1 ) * - col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - + col0 + - col2 * col0 * 29 AS col2 FROM tab2 AS cor0
----
-5488
-58890
-87137

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 42 + - col1 col1 FROM tab0 AS cor0
----
-44
-49
-55

query I rowsort
SELECT + col0 * ( col0 ) FROM tab1
----
4096
6400
9

query I rowsort
SELECT - ( - 88 ) + cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to bae5733f86a6f1db9c6ded00c4c67395

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2225
SELECT ALL + CAST( NULL AS SIGNED ) + 26 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2225
SELECT ALL + CAST ( NULL AS INTEGER ) + 26 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL col2 * + col1 + - col2 * - tab0.col0 + - col0 * col2 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT col2 * - cor0.col1 * cor0.col1 + col2 * + col2 AS col0 FROM tab1 cor0
----
-2451
-33588
-7008

query I rowsort
SELECT DISTINCT 74 FROM tab0, tab0 cor0
----
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-2229
SELECT + - 88 * col1 + col1 DIV + ( cor0.col1 ) col0 FROM tab1 AS cor0
----
-1143
-2287
-879

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2229
SELECT + - 88 * col1 + col1 / + ( cor0.col1 ) col0 FROM tab1 AS cor0
----
-1143
-2287
-879

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

query I rowsort
SELECT + - 98 + - 85 * + col0 AS col1 FROM tab0 AS cor0
----
-2138
-3073
-7663

query I rowsort
SELECT + + 50 * col1 AS col2 FROM tab0 AS cor0
----
4300
4550
4850

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 28 col1 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to eac00a95d734c7071360ed392c3f39bc

query I rowsort
SELECT DISTINCT - col1 + 23 * col1 + + col1 * + col2 FROM tab0 AS cor0
----
2231
4730
9464

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2235
SELECT - CAST( NULL AS SIGNED ) + + 25 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2235
SELECT - CAST ( NULL AS INTEGER ) + + 25 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col1 + - 86 FROM tab0 AS cor0
----
-172
-177
-183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 - 45 col1 FROM tab0 AS cor0
----
2019
3350
8054

onlyif mysql # use DIV operator for integer division
query I rowsort label-2238
SELECT - - col1 + + col0 DIV col1 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2238
SELECT - - col1 + + col0 / col1 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col1 + + cor0.col2 + + col1 * + col0 AS col2 FROM tab2 cor0
----
1364
213
4569

query I rowsort
SELECT DISTINCT - col0 * col1 + + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT col2 * 8 + - col1 FROM tab1 AS cor0
----
406
446
755

query I rowsort
SELECT DISTINCT - 83 * cor0.col0 AS col1 FROM tab2, tab1 AS cor0
----
-249
-5312
-6640

query I rowsort
SELECT DISTINCT - 94 * cor0.col0 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT ALL + ( 21 ) FROM tab2 AS cor0
----
21
21
21

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab0 AS cor0
----
42

query I rowsort
SELECT ALL + col1 + + 14 FROM tab2 AS cor0
----
31
45
73

query I rowsort
SELECT ALL col0 * col2 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT 36 + col1 AS col1 FROM tab0 AS cor0
----
122
127
133

query I rowsort
SELECT ALL - 89 + col2 FROM tab2 cor0
----
-51
-62
-63

query I rowsort
SELECT ALL - 88 + - col2 FROM tab1 AS cor0
----
-142
-145
-184

onlyif mysql # use DIV operator for integer division
query I rowsort label-2251
SELECT DISTINCT - col1 DIV 82 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-2251
SELECT DISTINCT - col1 / 82 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2252
SELECT + + CAST( NULL AS SIGNED ) * col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2252
SELECT + + CAST ( NULL AS INTEGER ) * col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2253
SELECT DISTINCT + CAST( + col0 AS SIGNED ) * - cor0.col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-2253
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) * - cor0.col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2254
SELECT DISTINCT col1 * col2 DIV + col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2254
SELECT DISTINCT col1 * col2 / + col1 FROM tab2
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2255
SELECT ALL + + col0 + - col2 * CAST( + col1 AS SIGNED ) AS col2 FROM tab0 cor0
----
-2814
-62
-7373

skipif mysql # not compatible
query I rowsort label-2255
SELECT ALL + + col0 + - col2 * CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT + + col0 + - col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - - cor0.col2 * col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col2 * col2 + - 98 FROM tab0 AS cor0
----
-97
6626
991

onlyif mysql # use DIV operator for integer division
query I rowsort label-2259
SELECT DISTINCT + cor0.col1 DIV - col0 + + col2 AS col2 FROM tab0 AS cor0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-2259
SELECT DISTINCT + cor0.col1 / - col0 + + col2 AS col2 FROM tab0 AS cor0
----
-1
30
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2260
SELECT ALL - col2 + + col2 DIV + col1 FROM tab2 cor0
----
-26
-27
-36

skipif mysql # not compatible
query I rowsort label-2260
SELECT ALL - col2 + + col2 / + col1 FROM tab2 cor0
----
-26
-27
-36

query I rowsort
SELECT + + cor0.col2 + + cor0.col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + - 95 + + col2 AS col0 FROM tab2 AS cor0
----
-57
-68
-69

query I rowsort
SELECT ALL ( + col0 ) * - col0 AS col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + 91 AS col2 FROM tab0 AS cor0
----
91
91
91

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) * col1 AS col1 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 + - col1 * col1 col2 FROM tab0
----
-15579
-8188
-9444

query I rowsort
SELECT ALL col0 + tab2.col2 * - col2 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT DISTINCT - cor0.col2 - + 76 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-102
-103
-114

query I rowsort
SELECT ALL - 86 * col1 + col2 * + tab2.col2 FROM tab2
----
-18
-1937
-4398

query I rowsort
SELECT ALL - 85 + + col2 AS col1 FROM tab1
----
-28
-31
11

query I rowsort
SELECT - cor0.col0 + - col1 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + + col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL col2 * - 28 AS col0 FROM tab1 cor0
----
-1512
-1596
-2688

query I rowsort
SELECT DISTINCT - 80 + tab2.col0 + + col0 FROM tab2
----
-66
76
78

query I rowsort
SELECT 21 * + col1 + + ( ( col0 ) + col2 ) * + col2 AS col2 FROM tab2
----
1569
3943
4803

query I rowsort
SELECT DISTINCT 93 + col1 FROM tab1
----
103
106
119

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab1.col0 + - 94 col0 FROM tab1
----
-85
4002
6306

query I rowsort
SELECT 48 * col1 + col0 + - 24 AS col1 FROM tab2
----
1471
2886
871

query I rowsort
SELECT col2 * - tab1.col1 * + 45 FROM tab1
----
-25650
-56160
-63180

query I rowsort
SELECT ALL col0 * + col0 + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT col0 * - col2 + 9 AS col2 FROM tab1
----
-153
-3639
-7671

query I rowsort
SELECT DISTINCT tab0.col1 + - tab0.col0 FROM tab0
----
2
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2283
SELECT + - col2 * CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2283
SELECT + - col2 * CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + cor0.col0 * col0 + + col0 - cor0.col1 FROM tab2 cor0
----
-6065
-6179
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col2 col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + + col2 + ( + 80 ) AS col1 FROM tab0 AS cor0
----
113
162
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2287
SELECT DISTINCT - + col2 - + CAST( 77 AS SIGNED ) * col0 * col1 FROM tab1 AS cor0
----
-49337
-6060
-80176

skipif mysql # not compatible
query I rowsort label-2287
SELECT DISTINCT - + col2 - + CAST ( 77 AS INTEGER ) * col0 * col1 FROM tab1 AS cor0
----
-49337
-6060
-80176

onlyif mysql # use DIV operator for integer division
query I rowsort label-2288
SELECT - tab1.col1 DIV - 58 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2288
SELECT - tab1.col1 / - 58 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 + col2 + - col1 FROM tab0
----
-20
-95
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2290
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2290
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2291
SELECT ALL - + ( col1 ) * col1 + CAST( NULL AS SIGNED ) / col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2291
SELECT ALL - + ( col1 ) * col1 + CAST ( NULL AS INTEGER ) / col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2292
SELECT ALL - col0 DIV - col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-2292
SELECT ALL - col0 / - col2 AS col1 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL + 23 * + col1 + - col0 AS col0 FROM tab1 cor0
----
166
219
595

query I rowsort
SELECT 75 + + col2 FROM tab1 AS cor0
----
129
132
171

query I rowsort
SELECT DISTINCT 37 + - col2 FROM tab2
----
-1
10
11

query I rowsort
SELECT - 62 * col1 * cor0.col2 + - col2 FROM tab0 AS cor0
----
-175989
-462726
-6015

query I rowsort
SELECT + col1 + + col2 + - col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) * col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2299
SELECT + CAST( tab2.col1 + + col2 AS SIGNED ) FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-2299
SELECT + CAST ( tab2.col1 + + col2 AS INTEGER ) FROM tab2
----
55
58
85

query I rowsort
SELECT - 78 + + col0 FROM tab0 AS cor0
----
-43
-54
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 51 * col1 col0 FROM tab2 AS cor0
----
1581
3009
867

query I rowsort
SELECT - 97 + + col1 FROM tab2 AS cor0
----
-38
-66
-80

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT + col0 * + col2 * - 12 FROM tab1 cor0
----
-1944
-43776
-92160

onlyif mysql # use DIV operator for integer division
query I rowsort label-2305
SELECT + col0 DIV CAST( ( col1 ) AS SIGNED ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2305
SELECT + col0 / CAST ( ( col1 ) AS INTEGER ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * col1 + 24 * - col0 + col1 * + col1 FROM tab1 AS cor0
----
-2076
-2791
526

query I rowsort
SELECT DISTINCT col1 * ( col0 * col2 + col2 * - col2 ) FROM tab0
----
-25542
3298
52234

query I rowsort
SELECT ALL + col0 * col0 + - 96 FROM tab1 AS cor0
----
-87
4000
6304

query I rowsort
SELECT - col1 * 50 AS col1 FROM tab0
----
-4300
-4550
-4850

query I rowsort
SELECT - ( ( + col2 ) ) AS col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + 75 * ( col1 ) FROM tab0 AS cor0
----
6450
6825
7275

query I rowsort
SELECT + 1 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2313
SELECT - - col1 DIV - 52 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2313
SELECT - - col1 / - 52 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 * cor0.col0 + + col2 * - cor0.col2 FROM tab1 AS cor0
----
-10256
-2994
-3889

query I rowsort
SELECT DISTINCT + 41 * - 66 AS col0 FROM tab2 AS cor0
----
-2706

query I rowsort
SELECT ( - col1 ) + col0 * col0 AS col2 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT - col0 * col0 + col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT - - 50 * + col0 * - col2 + col1 * col0 FROM tab1 AS cor0
----
-181760
-382960
-8022

query I rowsort
SELECT ALL - + col1 * cor0.col1 + - 0 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + 88 + col0 FROM tab1 AS cor0
----
152
168
91

query I rowsort
SELECT ALL + 9 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT DISTINCT + col1 * tab0.col2 AS col1 FROM tab0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2323
SELECT + col1 + CAST( col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-2323
SELECT + col1 + CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT col2 + col2 * - 77 AS col2 FROM tab1 cor0
----
-4104
-4332
-7296

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) AS col0 FROM tab2, tab2 cor0
----
7
78
79

query I rowsort
SELECT col2 + - 21 FROM tab0 AS cor0
----
-20
12
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + ( - col1 + + col2 ) col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT + + col2 * + 14 + col0 FROM tab2 AS cor0
----
385
442
611

onlyif mysql # use DIV operator for integer division
query I rowsort label-2329
SELECT DISTINCT - col2 * + ( - col2 ) + col1 + + col2 DIV + col1 FROM tab1 AS cor0
----
2944
3264
9236

skipif mysql # not compatible
query I rowsort label-2329
SELECT DISTINCT - col2 * + ( - col2 ) + col1 + + col2 / + col1 FROM tab1 AS cor0
----
2944
3264
9236

query I rowsort
SELECT ALL ( 39 ) * cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 4b70e57583cb555cbe186753e1351ffb

query I rowsort
SELECT DISTINCT - col0 * + col1 + - col2 * + col1 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT col0 * 57 AS col1 FROM tab1
----
171
3648
4560

query I rowsort
SELECT ALL + col0 + col2 * col0 * col0 AS col2 FROM tab1 AS cor0
----
233536
489
614480

query I rowsort
SELECT DISTINCT + ( col2 ) * col0 + - col1 FROM tab1 AS cor0
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-2335
SELECT ALL + 44 DIV + col0 FROM tab1 AS cor0
----
0
0
14

skipif mysql # not compatible
query I rowsort label-2335
SELECT ALL + 44 / + col0 FROM tab1 AS cor0
----
0
0
14

query I rowsort
SELECT + cor0.col2 + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

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

query I rowsort
SELECT DISTINCT + + col2 * + col0 * col1 + col2 FROM tab0 AS cor0
----
3396
664200
68145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2339
SELECT ALL CAST( col1 AS SIGNED ) * col1 col2 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2339
SELECT ALL CAST ( col1 AS INTEGER ) * col1 col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + ( col2 ) * col1 + cor0.col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL + col1 * 8 - - col0 AS col1 FROM tab0
----
712
811
817

query I rowsort
SELECT ALL - col0 - + ( 5 ) FROM tab0
----
-29
-40
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2343
SELECT tab2.col0 DIV + col0 AS col1 FROM tab2
----
1
1
1

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

query I rowsort
SELECT - col2 * - ( 48 ) + - col2 * - 52 - tab2.col0 AS col1 FROM tab2
----
2522
2693
3721

onlyif mysql # use DIV operator for integer division
query I rowsort label-2345
SELECT ALL col2 DIV + 40 col2 FROM tab1
----
1
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2345
SELECT ALL col2 / + 40 col2 FROM tab1
----
1
1
2

query I rowsort
SELECT col0 * 95 - - col0 AS col2 FROM tab0
----
2304
3360
8544

query I rowsort
SELECT - 68 + + tab1.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 4be48dd65ddbf0739ea1bee4f9cd15e8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - 33 col1 FROM tab2 AS cor0
----
-1023
-1947
-561

query I rowsort
SELECT ALL 99 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT - col2 - 35 AS col0 FROM tab0 cor0
----
-117
-36
-68

onlyif mysql # use DIV operator for integer division
query I rowsort label-2351
SELECT + col0 + 30 * col1 DIV - col0 AS col0 FROM tab2 cor0
----
-125
56
73

skipif mysql # not compatible
query I rowsort label-2351
SELECT + col0 + 30 * col1 / - col0 AS col0 FROM tab2 cor0
----
-125
56
73

query I rowsort
SELECT + col2 * ( + 13 ) FROM tab0 AS cor0
----
1066
13
429

query I rowsort
SELECT DISTINCT - col1 * + col2 + + col1 - + col2 FROM tab2 AS cor0
----
-1501
-667
-833

query I rowsort
SELECT col1 + ( - col0 ) * col1 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL cor0.col1 + + col0 * + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL col2 * + ( + col1 ) AS col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2357
SELECT ALL + + cor0.col0 + col0 DIV 79 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-2357
SELECT ALL + + cor0.col0 + col0 / 79 FROM tab0 AS cor0
----
24
35
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2358
SELECT DISTINCT - col0 * - CAST( col1 AS SIGNED ) - col1 AS col2 FROM tab2 AS cor0
----
1326
186
4543

skipif mysql # not compatible
query I rowsort label-2358
SELECT DISTINCT - col0 * - CAST ( col1 AS INTEGER ) - col1 AS col2 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + 22 + + col2 FROM tab2
----
48
49
60

query I rowsort
SELECT ALL ( - tab2.col1 ) + + col2 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL cor1.col0 * + 81 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to e328b24916ca97da6b509987dde64251

onlyif mysql # use DIV operator for integer division
query I rowsort label-2362
SELECT DISTINCT ( - col0 ) DIV tab0.col0 + 38 * tab0.col2 AS col0 FROM tab0
----
1253
3115
37

skipif mysql # not compatible
query I rowsort label-2362
SELECT DISTINCT ( - col0 ) / tab0.col0 + 38 * tab0.col2 AS col0 FROM tab0
----
1253
3115
37

query I rowsort
SELECT DISTINCT + ( col0 ) * - col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - 43 * col2 AS col1 FROM tab0 cor0
----
-1419
-3526
-43

query I rowsort
SELECT col2 * - 63 AS col1 FROM tab2 AS cor0
----
-1638
-1701
-2394

query I rowsort
SELECT DISTINCT + col1 + + col0 * 4 FROM tab1 AS cor0
----
266
333
38

query I rowsort
SELECT DISTINCT + - cor0.col1 + - col0 * 99 AS col2 FROM tab0 AS cor0
----
-2462
-3562
-8902

query I rowsort
SELECT - + col0 * cor0.col0 - 96 FROM tab2 AS cor0
----
-145
-6180
-6337

query I rowsort
SELECT DISTINCT + col0 * + col1 + + 79 * col0 AS col0 FROM tab1 AS cor0
----
315
5696
7360

query I rowsort
SELECT + cor0.col1 + - col0 * col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT - col1 + + col2 + col0 AS col1 FROM tab1 AS cor0
----
111
163
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-2372
SELECT ALL cor0.col1 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2372
SELECT ALL cor0.col1 / cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 52 * - col0 col0 FROM tab0 cor0
----
-1248
-1820
-4628

query I rowsort
SELECT - + col1 + - col1 * col0 AS col0 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL ( + col1 ) * - tab1.col1 AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT + ( - tab2.col2 ) - - col1 * col1 * - ( + col0 ) AS col0 FROM tab2
----
-22869
-271544
-6754

query I rowsort
SELECT DISTINCT + col2 + tab1.col2 - + col0 * ( 54 ) AS col1 FROM tab1
----
-3342
-4128
-54

query I rowsort
SELECT DISTINCT - 43 * col1 AS col2 FROM tab1 AS cor0
----
-1118
-430
-559

query I rowsort
SELECT + + 93 + - col0 * 67 AS col1 FROM tab2 AS cor0
----
-376
-5133
-5200

query I rowsort
SELECT + + 7 + + col0 AS col0 FROM tab2 AS cor0
----
14
85
86

query I rowsort
SELECT DISTINCT + 58 * col1 AS col0 FROM tab1 AS cor0
----
1508
580
754

query I rowsort
SELECT - - 71 + col2 + - 81 FROM tab1 AS cor0
----
44
47
86

query I rowsort
SELECT col2 + col1 + 35 FROM tab0 AS cor0
----
133
154
208

query I rowsort
SELECT col0 + 76 + 37 FROM tab0 AS cor0
----
137
148
202

query I rowsort
SELECT - col1 * col2 + - col0 + + col1 FROM tab1 cor0
----
-1315
-1381
-624

query I rowsort
SELECT col1 * + col2 * - col1 AS col2 FROM tab1
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-2387
SELECT DISTINCT + col0 DIV + 55 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2387
SELECT DISTINCT + col0 / + 55 FROM tab1 AS cor0
----
0
1

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

query I rowsort
SELECT ALL col1 * + col0 - col1 * + 95 FROM tab1 AS cor0
----
-195
-2392
-310

query I rowsort
SELECT - col1 * - col2 * col1 AS col1 FROM tab1 AS cor0
----
16224
36504
5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2391
SELECT - col1 * ( col1 * - CAST( NULL AS SIGNED ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2391
SELECT - col1 * ( col1 * - CAST ( NULL AS INTEGER ) ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 82 * + col0 AS col1 FROM tab2 AS cor0
----
-574
-6396
-6478

query I rowsort
SELECT + + cor0.col0 + col1 * col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT cor0.col0 * col0 + + cor0.col0 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-2395
SELECT ALL ( col1 ) DIV - col0 FROM tab0 cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2395
SELECT ALL ( col1 ) / - col0 FROM tab0 cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT - - 15 * cor0.col1 * col0 + - 97 FROM tab0 AS cor0
----
121388
30863
50828

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * ( + col0 ) col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT ( + tab2.col2 ) AS col0 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 col2 FROM tab0
----
80
80
80

query I rowsort
SELECT DISTINCT + - col2 * ( - col1 ) + + 35 AS col1 FROM tab1 AS cor0
----
1283
1439
605

query I rowsort
SELECT DISTINCT - col0 - + col0 * col1 * ( + col1 * col2 ) AS col1 FROM tab2 AS cor0
----
-181636
-7059546
-867657

query I rowsort
SELECT - cor0.col2 * 66 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 68abcd000241d28589b6ebc454c1ed24

query I rowsort
SELECT + 68 * tab1.col2 + - col2 AS col0 FROM tab1
----
3618
3819
6432

onlyif mysql # use DIV operator for integer division
query I rowsort label-2404
SELECT 25 + + col0 DIV tab1.col2 AS col1 FROM tab1
----
25
25
26

skipif mysql # not compatible
query I rowsort label-2404
SELECT 25 + + col0 / tab1.col2 AS col1 FROM tab1
----
25
25
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2405
SELECT - cor0.col0 + col1 DIV col2 col2 FROM tab1 cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2405
SELECT - cor0.col0 + col1 / col2 col2 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT - col1 + col2 * 38 * - col2 FROM tab0
----
-135
-255603
-41468

query I rowsort
SELECT - col0 * + col0 * col0 AS col1 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT ALL 7 * + col0 AS col1 FROM tab0
----
168
245
623

query I rowsort
SELECT - col2 * cor0.col2 * + 59 + - col1 FROM tab2 AS cor0
----
-39943
-43042
-85213

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 73 col0 FROM tab0
----
-73
-73
-73

query I rowsort
SELECT ALL + cor0.col1 * + 94 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 328add90e429012e879f7671bae2d3de

query I rowsort
SELECT + - 64 * - col0 - cor0.col1 FROM tab2 AS cor0
----
417
4933
5039

query I rowsort
SELECT ALL 48 * + col0 AS col1 FROM tab2
----
336
3744
3792

query I rowsort
SELECT - + col0 + cor0.col0 * - col0 AS col2 FROM tab2 cor0
----
-56
-6162
-6320

query I rowsort
SELECT ALL + col1 * - col0 + + cor0.col1 + ( col1 ) * + col1 FROM tab2 AS cor0
----
-1037
-1062
775

query I rowsort
SELECT - - col0 * cor0.col1 + + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT col0 - col1 AS col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT 23 * col0 - 92 * col0 * col0 FROM tab2
----
-4347
-557934
-572355

query I rowsort
SELECT - 88 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) FROM tab1, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - col0 + + col0 * col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT col0 + + 50 FROM tab2
----
128
129
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - tab1.col2 * - tab1.col2 col1 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT - cor0.col0 * col1 - 5 * - cor0.col2 FROM tab1 AS cor0
----
-355
-560
192

query I rowsort
SELECT DISTINCT - col2 + ( + 14 ) AS col1 FROM tab0 AS cor0
----
-19
-68
13

query I rowsort
SELECT + col2 + 2 + col2 * col0 AS col0 FROM tab2 AS cor0
----
2056
218
3042

query I rowsort
SELECT ALL + col0 - + ( - 94 ) FROM tab2 AS cor0
----
101
172
173

query I rowsort
SELECT DISTINCT - cor0.col2 + + 65 FROM tab2 cor0
----
27
38
39

query I rowsort
SELECT ALL - col1 * + 31 FROM tab1 cor0
----
-310
-403
-806

query I rowsort
SELECT ALL ( 57 ) AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 220a93709e207779b34ef74b544764a5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2431
SELECT + CAST( 25 AS SIGNED ) + col0 * + 67 AS col2 FROM tab0
----
1633
2370
5988

skipif mysql # not compatible
query I rowsort label-2431
SELECT + CAST ( 25 AS INTEGER ) + col0 * + 67 AS col2 FROM tab0
----
1633
2370
5988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col0 col0 FROM tab0 cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2433
SELECT CAST( NULL AS SIGNED ) * + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2433
SELECT CAST ( NULL AS INTEGER ) * + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2434
SELECT ( - col0 ) * col2 DIV + ( 72 ) FROM tab0 AS cor0
----
-101
-11
0

skipif mysql # not compatible
query I rowsort label-2434
SELECT ( - col0 ) * col2 / + ( 72 ) FROM tab0 AS cor0
----
-101
-11
0

query I rowsort
SELECT DISTINCT - col1 * col1 + - ( - col0 ) FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT ALL + 84 + col0 FROM tab0 cor0
----
108
119
173

query I rowsort
SELECT - col0 * col0 + + col2 AS col0 FROM tab2 cor0
----
-22
-6058
-6203

query I rowsort
SELECT ( col1 + col1 ) AS col0 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT col2 * cor0.col0 AS col2 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2440
SELECT 56 DIV - col2 FROM tab0
----
-1
-56
0

skipif mysql # not compatible
query I rowsort label-2440
SELECT 56 / - col2 FROM tab0
----
-1
-56
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2441
SELECT + CAST( NULL AS DECIMAL ) - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2441
SELECT + CAST ( NULL AS REAL ) - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 + col2 * + col0 * col0 FROM tab1 AS cor0
----
233462
460
614387

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2443
SELECT - CAST( col2 AS SIGNED ) * col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2443
SELECT - CAST ( col2 AS INTEGER ) * col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col1 ) * - col2 + ( ( + col2 ) ) * col2 AS col2 FROM tab0 AS cor0
----
14186
3927
98

query I rowsort
SELECT ALL + col0 * 91 + col1 * + ( - col2 * - col0 ) FROM tab0 cor0
----
6580
672217
70296

query I rowsort
SELECT ALL + col2 * col2 - + col2 FROM tab2 AS cor0
----
1406
650
702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2447
SELECT DISTINCT - + CAST( col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-2447
SELECT DISTINCT - + CAST ( col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col1 - ( col1 ) * col0 * 16 FROM tab1
----
-10230
-1222
-16627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2449
SELECT + col0 + 36 - + col0 DIV tab2.col1 AS col2 FROM tab2
----
111
113
43

skipif mysql # not compatible
query I rowsort label-2449
SELECT + col0 + 36 - + col0 / tab2.col1 AS col2 FROM tab2
----
111
113
43

query I rowsort
SELECT DISTINCT col1 * col2 + col1 AS col0 FROM tab2
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-2451
SELECT + ( col1 ) DIV col0 + 83 + + col1 AS col1 FROM tab2
----
100
118
142

skipif mysql # not compatible
query I rowsort label-2451
SELECT + ( col1 ) / col0 + 83 + + col1 AS col1 FROM tab2
----
100
118
142

query I rowsort
SELECT DISTINCT 9 + tab1.col0 FROM tab1
----
12
73
89

query I rowsort
SELECT ALL + tab0.col2 + 67 FROM tab0
----
100
149
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + ( - tab1.col2 ) * col0 ) + 87 * + col1 * - ( col2 ) col1 FROM tab1
----
-100896
-121986
-45942

query I rowsort
SELECT DISTINCT - 4 * 31 + + col0 FROM tab1
----
-121
-44
-60

query I rowsort
SELECT DISTINCT 83 + col0 FROM tab1 cor0
----
147
163
86

query I rowsort
SELECT ALL col0 + + col1 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT + ( - col2 ) * - col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - col1 * - col0 + + col0 * - ( cor0.col0 ) FROM tab1 AS cor0
----
-3456
-5360
69

query I rowsort
SELECT DISTINCT - col0 + 64 AS col0 FROM tab1 cor0
----
-16
0
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-2461
SELECT CAST( 46 AS SIGNED ) * col0 DIV col2 + - col1 FROM tab0 AS cor0
----
-42
-53
1513

skipif mysql # not compatible
query I rowsort label-2461
SELECT CAST ( 46 AS INTEGER ) * col0 / col2 + - col1 FROM tab0 AS cor0
----
-42
-53
1513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2462
SELECT ALL - CAST( - col0 AS SIGNED ) + col1 AS col0 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-2462
SELECT ALL - CAST ( - col0 AS INTEGER ) + col1 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL + col1 + - col2 AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT 57 - + col2 FROM tab0
----
-25
24
56

query I rowsort
SELECT DISTINCT tab0.col1 * - col2 * tab0.col1 AS col2 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT 28 * col0 + - 20 FROM tab1
----
1772
2220
64

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + 5 FROM tab2 AS cor0
----
1449
681
734

query I rowsort
SELECT DISTINCT col1 * col0 * - ( col0 ) AS col0 FROM tab1
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-2469
SELECT col2 * col1 DIV col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2469
SELECT col2 * col1 / col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 66 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

query I rowsort
SELECT ALL col1 + - ( - 64 ) AS col1 FROM tab0
----
150
155
161

query I rowsort
SELECT + - col2 + - ( col0 ) * col0 * + col2 AS col1 FROM tab2 AS cor0
----
-1350
-158210
-237196

query I rowsort
SELECT col2 * ( col2 ) AS col0 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-2474
SELECT DISTINCT tab1.col1 DIV ( - col2 ) + + col0 col1 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2474
SELECT DISTINCT tab1.col1 / ( - col2 ) + + col0 col1 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT + + col0 * - 4 + 93 * col1 FROM tab2 AS cor0
----
1265
2855
5175

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2476
SELECT ALL - - cor0.col1 * CAST( - col1 AS SIGNED ) col1 FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2476
SELECT ALL - - cor0.col1 * CAST ( - col1 AS INTEGER ) col1 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2477
SELECT ALL cor0.col1 DIV + ( ( col1 ) ) FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2477
SELECT ALL cor0.col1 / + ( ( col1 ) ) FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + col1 * + col0 - - 25 AS col1 FROM tab2 AS cor0
----
1368
242
4627

query I rowsort
SELECT ALL + col2 * + 43 FROM tab2 AS cor0
----
1118
1161
1634

query I rowsort
SELECT ALL + cor0.col2 + - col0 * - col2 * col1 AS col1 FROM tab1 cor0
----
36537
4266
99936

query I rowsort
SELECT - + col0 * + 87 FROM tab1 AS cor0
----
-261
-5568
-6960

query I rowsort
SELECT DISTINCT - col1 * - col2 + + col0 * col2 FROM tab2 AS cor0
----
1026
3562
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-2483
SELECT - col1 + + CAST( 88 AS SIGNED ) DIV col2 AS col2 FROM tab1 AS cor0
----
-13
-25
-9

skipif mysql # not compatible
query I rowsort label-2483
SELECT - col1 + + CAST ( 88 AS INTEGER ) / col2 AS col2 FROM tab1 AS cor0
----
-13
-25
-9

query I rowsort
SELECT ALL + + cor0.col0 * col0 + - col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT ALL col2 + + col0 * 95 FROM tab1 AS cor0
----
339
6137
7696

onlyif mysql # use DIV operator for integer division
query I rowsort label-2486
SELECT - col2 DIV 73 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2486
SELECT - col2 / 73 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + 93 col0 FROM tab1 AS cor0
----
67
80
83

query I rowsort
SELECT DISTINCT + 96 + + ( + cor0.col2 ) FROM tab1 AS cor0
----
150
153
192

query I rowsort
SELECT + ( - col0 ) - col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT - + col2 * ( - col1 ) + 31 - col1 AS col0 FROM tab1 cor0
----
1266
1409
591

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 * - col1 col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + 6 + 85 AS col2 FROM tab1 AS cor0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + + 75 * col0 col2 FROM tab2 AS cor0
----
532
5928
6004

query I rowsort
SELECT ALL - col1 * 58 + - col1 FROM tab2 AS cor0
----
-1003
-1829
-3481

query I rowsort
SELECT + 37 + col0 * - col2 FROM tab1 AS cor0
----
-125
-3611
-7643

query I rowsort
SELECT ALL 82 * + col2 FROM tab1 AS cor0
----
4428
4674
7872

query I rowsort
SELECT DISTINCT - ( 19 ) FROM tab1 cor0
----
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2498
SELECT + col0 * + ( col2 ) - CAST( col2 + + col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
131
1943
2947

skipif mysql # not compatible
query I rowsort label-2498
SELECT + col0 * + ( col2 ) - CAST ( col2 + + col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
131
1943
2947

query I rowsort
SELECT - - 44 * col1 FROM tab1 AS cor0
----
1144
440
572

query I rowsort
SELECT + - 12 AS col0 FROM tab2 cor0
----
-12
-12
-12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2501
SELECT + + CAST( NULL AS SIGNED ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2501
SELECT + + CAST ( NULL AS INTEGER ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 * - 85 FROM tab2 cor0
----
-595
-6630
-6715

query I rowsort
SELECT DISTINCT - cor0.col1 * - col2 * col1 + col0 * + col1 AS col1 FROM tab0 cor0
----
12804
246132
687141

query I rowsort
SELECT DISTINCT + 49 * col2 - + cor0.col1 FROM tab0 AS cor0
----
-48
1531
3927

query I rowsort
SELECT - col2 + - cor0.col1 * - col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT + 71 + + cor0.col1 + + ( + col0 ) AS col1 FROM tab2 AS cor0
----
109
167
208

query I rowsort
SELECT 59 * col0 * col1 FROM tab0 AS cor0
----
121776
200305
477841

query I rowsort
SELECT ALL - ( col2 ) * col0 + ( col1 ) + 38 AS col1 FROM tab1 AS cor0
----
-3600
-7629
-98

query I rowsort
SELECT DISTINCT 8 + col1 * - col1 FROM tab2 AS cor0
----
-281
-3473
-953

query I rowsort
SELECT - + cor0.col0 * col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + - col2 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - 82 * col0 + + ( + col1 ) AS col2 FROM tab0 cor0
----
-1882
-2773
-7207

query I rowsort
SELECT col1 + col0 * + ( col2 + col0 * + col0 ) FROM tab2 AS cor0
----
476639
496058
563

query I rowsort
SELECT DISTINCT - col0 + + cor0.col1 AS col0 FROM tab2 cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col2 + 8 col0 FROM tab0 AS cor0
----
105
2846
7470

query I rowsort
SELECT ALL + + col2 + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT 88 + col1 * - tab1.col2 AS col1 FROM tab1
----
-1160
-1316
-482

query I rowsort
SELECT ALL col0 * 13 - tab1.col1 FROM tab1
----
1027
13
822

onlyif mysql # use DIV operator for integer division
query I rowsort label-2520
SELECT ALL + 70 DIV + 80 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2520
SELECT ALL + 70 / + 80 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2521
SELECT - ( col0 ) + col1 * + 2 + col1 * col0 DIV - col2 AS col2 FROM tab0 AS cor0
----
-3236
-5
86

skipif mysql # not compatible
query I rowsort label-2521
SELECT - ( col0 ) + col1 * + 2 + col1 * col0 / - col2 AS col2 FROM tab0 AS cor0
----
-3236
-5
86

query I rowsort
SELECT - 71 + 80 - col0 AS col1 FROM tab2 AS cor0
----
-69
-70
2

query I rowsort
SELECT ALL - col1 + col0 * col1 FROM tab2 cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-2524
SELECT + - col2 + + col1 DIV - col0 + + col0 FROM tab1 cor0
----
-16
-59
7

skipif mysql # not compatible
query I rowsort label-2524
SELECT + - col2 + + col1 / - col0 + + col0 FROM tab1 cor0
----
-16
-59
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2525
SELECT - 58 DIV col0 col1 FROM tab0 cor0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2525
SELECT - 58 / col0 col1 FROM tab0 cor0
----
-1
-2
0

query I rowsort
SELECT ALL ( 0 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - ( + col1 ) AS REAL ) * 44 * - 88 FROM tab2
----
-120032
-228448
-65824

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 + - col2 AS col1 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT DISTINCT col1 + - col2 * col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + cor0.col0 * col2 + - ( + 24 ) FROM tab1 AS cor0
----
138
3624
7656

query I rowsort
SELECT DISTINCT - cor0.col1 * + col1 + - 93 * ( + col1 ) FROM tab0 AS cor0
----
-15394
-16744
-18430

query I rowsort
SELECT ALL - 44 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT + col1 * ( col0 * - col1 ) AS col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-2534
SELECT col1 DIV 59 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2534
SELECT col1 / 59 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT + 9 * - col1 + cor0.col0 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-821
-836
-935

query I rowsort
SELECT ALL + 31 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT - + 86 + 23 + col0 AS col0 FROM tab2 AS cor0
----
-56
15
16

query I rowsort
SELECT - - cor0.col2 + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - 16 - - col1 FROM tab0 AS cor0
----
70
75
81

query I rowsort
SELECT ALL 81 AS col2 FROM tab1 AS cor0
----
81
81
81

query I rowsort
SELECT + 89 * + col1 - col2 FROM tab2 AS cor0
----
1475
2732
5225

query I rowsort
SELECT ALL col1 * 0 + col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + 51 - col0 AS col0 FROM tab2 AS cor0
----
-27
-28
44

query I rowsort
SELECT DISTINCT - cor0.col2 * col1 - + col0 AS col1 FROM tab1 AS cor0
----
-1328
-1407
-634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2545
SELECT ALL + - CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-2545
SELECT ALL + - CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + - 86 + 79 - col2 FROM tab1 AS cor0
----
-103
-61
-64

query I rowsort
SELECT DISTINCT 37 AS col2 FROM tab1, tab1 AS cor0
----
37

query I rowsort
SELECT - 44 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT ALL + 57 + - col0 * - col2 FROM tab0 AS cor0
----
7355
849
92

query I rowsort
SELECT ALL - + col1 * col1 + - col1 AS col0 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT DISTINCT - cor0.col2 - + 71 AS col0 FROM tab1, tab0 AS cor0
----
-104
-153
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2552
SELECT CAST( NULL AS SIGNED ) - + tab2.col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2552
SELECT CAST ( NULL AS INTEGER ) - + tab2.col1 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 - - col0 * + col1 AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT 74 AS col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 82 ) - col0 col1 FROM tab0
----
-7
47
58

query I rowsort
SELECT + ( col2 ) + tab0.col0 + - 32 AS col1 FROM tab0
----
139
25
4

query I rowsort
SELECT DISTINCT - 62 AS col1 FROM tab0 cor0
----
-62

query I rowsort
SELECT DISTINCT tab2.col0 AS col2 FROM tab2, tab2 AS cor0, tab0, tab1 AS cor1
----
7
78
79

query I rowsort
SELECT ALL + col0 * 71 AS col2 FROM tab0 AS cor0
----
1704
2485
6319

query I rowsort
SELECT ALL 6 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL - + col0 + - col2 * - col0 + + col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - + col0 * + col2 * + col0 AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL - - cor0.col2 * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2564
SELECT - - col2 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2564
SELECT - - col2 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 77 AS col0 FROM tab0 AS cor0
----
-77
-77
-77

query I rowsort
SELECT ALL - - cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - - col2 * + col0 * ( col0 ) FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2568
SELECT ALL - + col2 DIV col0 + - 53 FROM tab2 AS cor0
----
-53
-53
-56

skipif mysql # not compatible
query I rowsort label-2568
SELECT ALL - + col2 / col0 + - 53 FROM tab2 AS cor0
----
-53
-53
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2569
SELECT - col1 - - CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-2569
SELECT - col1 - - CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + col0 * cor0.col0 + - col1 * col2 FROM tab1 AS cor0
----
-1395
3526
5152

onlyif mysql # use DIV operator for integer division
query I rowsort label-2571
SELECT + cor0.col2 DIV 80 + ( col0 ) * col1 + 56 FROM tab0 cor0
----
2120
3451
8156

skipif mysql # not compatible
query I rowsort label-2571
SELECT + cor0.col2 / 80 + ( col0 ) * col1 + 56 FROM tab0 cor0
----
2120
3451
8156

query I rowsort
SELECT DISTINCT 87 AS col1 FROM tab0, tab0 AS cor0, tab2 cor1
----
87

query I rowsort
SELECT DISTINCT - 77 * col2 AS col2 FROM tab1
----
-4158
-4389
-7392

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 39 - 29 col1 FROM tab2 AS cor0
----
-302
-3071
-3110

query I rowsort
SELECT DISTINCT + 79 - - col2 AS col0 FROM tab0
----
112
161
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2576
SELECT - - 7 DIV + 55 + col1 * ( + 68 ) col2 FROM tab1 AS cor0
----
1768
680
884

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2576
SELECT - - 7 / + 55 + col1 * ( + 68 ) col2 FROM tab1 AS cor0
----
1768
680
884

query I rowsort
SELECT + 73 AS col2 FROM tab0, tab2 cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 9f0f371d979e70a792c8597c6559f0e2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 + - col1 * - col0 col1 FROM tab1 AS cor0
----
1088
126
688

query I rowsort
SELECT ALL + - col0 * + col0 * - cor0.col0 + + col0 * col2 FROM tab0 cor0
----
14616
42910
712267

query I rowsort
SELECT DISTINCT - - 69 * col1 + col0 FROM tab2 AS cor0
----
1252
2146
4149

query I rowsort
SELECT - - 64 + col2 * + col1 * 63 FROM tab2 AS cor0
----
40762
52795
96706

query I rowsort
SELECT ALL col1 * col1 + - col1 AS col0 FROM tab1
----
156
650
90

query I rowsort
SELECT col0 * col0 * col0 - col1 * - col0 FROM tab1
----
105
262784
513040

query I rowsort
SELECT - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab0 AS cor2, tab2 AS cor3
----
13122 values hashing to 83edd3d92d0791affa778c4589d52bce

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 col0 FROM tab1, tab0 cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to bf75e71325a06683558cf93fd725ad16

query I rowsort
SELECT ALL 17 + - cor0.col1 * - col2 FROM tab1 AS cor0
----
1265
1421
587

query I rowsort
SELECT + 9 + + col2 AS col2 FROM tab2 cor0
----
35
36
47

query I rowsort
SELECT col1 * col2 - col0 FROM tab2
----
1456
567
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-2590
SELECT ALL 64 * + col1 DIV + col1 AS col1 FROM tab1
----
64
64
64

skipif mysql # not compatible
query I rowsort label-2590
SELECT ALL 64 * + col1 / + col1 AS col1 FROM tab1
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 + - col0 + + col0 col1 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + 45 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT DISTINCT + tab0.col2 * - col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT cor0.col0 + cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT 28 FROM tab1, tab2 cor0, tab1 AS cor1
----
28

query I rowsort
SELECT ( + col2 ) * - col1 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
1
33
82

query I rowsort
SELECT 49 AS col1 FROM tab1
----
49
49
49

query I rowsort
SELECT 31 * - col2 + + cor0.col1 FROM tab1 AS cor0
----
-1648
-1757
-2963

onlyif mysql # use DIV operator for integer division
query I rowsort label-2601
SELECT ALL col2 + + cor0.col1 DIV col1 FROM tab0 cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2601
SELECT ALL col2 + + cor0.col1 / col1 FROM tab0 cor0
----
2
34
83

query I rowsort
SELECT DISTINCT + 82 * - col1 AS col0 FROM tab0 AS cor0
----
-7052
-7462
-7954

query I rowsort
SELECT DISTINCT + + 4 * + col2 + col1 * 26 FROM tab1 AS cor0
----
488
722
892

query I rowsort
SELECT ALL col0 + col1 + col1 FROM tab0
----
196
229
271

query I rowsort
SELECT DISTINCT + col1 * - 80 + - col0 AS col1 FROM tab1
----
-1120
-2083
-864

query I rowsort
SELECT DISTINCT - col0 + 88 FROM tab2
----
10
81
9

query I rowsort
SELECT ALL col2 + 45 * - ( - col2 ) + col0 FROM tab1
----
2487
2686
4496

query I rowsort
SELECT + col1 * col2 + + ( col1 ) FROM tab2
----
1593
663
868

query I rowsort
SELECT - col2 + + ( col1 ) * + col0 + col1 FROM tab2 AS cor0
----
1322
221
4635

query I rowsort
SELECT ALL col2 * ( + col2 * + col0 ) FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT col1 + 92 + - col0 AS col0 FROM tab2 AS cor0
----
116
30
73

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

query I rowsort
SELECT + - 77 * col0 + + col2 AS col1 FROM tab1 AS cor0
----
-177
-4871
-6064

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

query I rowsort
SELECT - 59 + col0 + + col2 FROM tab0 cor0
----
-2
-23
112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2616
SELECT CAST( NULL AS SIGNED ) + - 70 + - col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2616
SELECT CAST ( NULL AS INTEGER ) + - 70 + - col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * 59 FROM tab0
----
1416
2065
5251

query I rowsort
SELECT DISTINCT - col1 * 87 AS col2 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT - 47 + 25 FROM tab2 AS cor0
----
-22
-22
-22

query I rowsort
SELECT - col1 + col0 * - col0 FROM tab0 AS cor0
----
-1322
-662
-8012

query I rowsort
SELECT + col1 + 69 * + col0 + col2 AS col0 FROM tab1 AS cor0
----
287
4483
5629

query I rowsort
SELECT - col2 + + ( cor0.col1 ) * 60 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
38722
50193
92014

query I rowsort
SELECT ALL col0 - col0 * - tab1.col2 AS col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT + tab1.col2 * tab1.col0 + col1 * col0 AS col0 FROM tab1
----
240
4288
8720

query I rowsort
SELECT col2 AS col1 FROM tab0 WHERE NULL > col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2626
SELECT - col1 DIV + tab2.col0 + col0 col0 FROM tab2
----
3
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2626
SELECT - col1 / + tab2.col0 + col0 col0 FROM tab2
----
3
78
79

query I rowsort
SELECT - col2 FROM tab0 WHERE NOT col0 * col2 NOT BETWEEN col2 AND ( + tab0.col0 + col1 * - col2 )
----

query I rowsort
SELECT ALL + col2 + + col1 - col1 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT - col1 + - col2 - - col1 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 * col1 * col1 col1 FROM tab1
----
1000
17576
2197

query I rowsort
SELECT DISTINCT - col2 + tab0.col1 * tab0.col0 + - col0 FROM tab0
----
2007
3359
7928

query I rowsort
SELECT col1 * + col2 + + col0 AS col1 FROM tab0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-2633
SELECT + tab1.col1 * col1 DIV - col2 FROM tab1
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-2633
SELECT + tab1.col1 * col1 / - col2 FROM tab1
----
-1
-1
-12

onlyif mysql # use DIV operator for integer division
query I rowsort label-2634
SELECT DISTINCT col2 DIV + col0 col2 FROM tab1
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2634
SELECT DISTINCT col2 / + col0 col2 FROM tab1
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-2635
SELECT ALL tab0.col2 * col2 DIV - col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-2635
SELECT ALL tab0.col2 * col2 / - col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + col2 * - tab2.col2 AS col0 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT tab1.col2 * + tab1.col2 + - tab1.col0 AS col2 FROM tab1
----
2913
3185
9136

query I rowsort
SELECT + col1 * tab0.col1 + + col2 FROM tab0
----
7429
8363
9410

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 + col1 NOT IN ( - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col0 col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 WHERE + col1 + col2 = NULL
----

query I rowsort
SELECT ALL col1 * + col0 * + col2 FROM tab1
----
36480
4212
99840

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT IN ( - col2 / + col0 - - col1 * col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL IN ( col1 * col1 + - col1 * - tab2.col2 * + col1 + - tab2.col2 )
----

query I rowsort
SELECT tab0.col0 * + col1 * tab0.col0 FROM tab0
----
118825
49536
720811

query III rowsort
SELECT ALL * FROM tab1 WHERE ( + col0 / col0 + + col1 + col0 ) >= NULL
----

query I rowsort
SELECT ALL - + col2 * + col1 + + col2 FROM tab0 cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col0 * - col2 * - col2 col2 FROM tab1 AS cor0
----
207993
737376
8802

onlyif mysql # use DIV operator for integer division
query I rowsort label-2649
SELECT - col0 * col1 DIV + cor0.col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-2649
SELECT - col0 * col1 / + cor0.col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab1 AS cor0 WHERE NULL < NULL
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT + col2 + - col2 NOT BETWEEN col2 AND + col1 * - col0 + - cor0.col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL - col0 * col0 * - col1 FROM tab1
----
234
40960
83200

query I rowsort
SELECT DISTINCT - col1 + - 44 - 64 AS col1 FROM tab0 AS cor0
----
-194
-199
-205

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + ( - cor0.col1 ) col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + - col2 * col2 + - col0 AS col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 96 col1 FROM tab0 AS cor0
----
129
178
97

query I rowsort
SELECT DISTINCT + col2 * 5 FROM tab1 AS cor0
----
270
285
480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2659
SELECT DISTINCT + - col0 + + CAST( col2 AS SIGNED ) * col0 + ( - 46 ) AS col1 FROM tab2 AS cor0
----
136
1904
2877

skipif mysql # not compatible
query I rowsort label-2659
SELECT DISTINCT + - col0 + + CAST ( col2 AS INTEGER ) * col0 + ( - 46 ) AS col1 FROM tab2 AS cor0
----
136
1904
2877

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 99 col2 FROM tab0
----
99
99
99

query I rowsort
SELECT ALL col2 * 49 FROM tab1 AS cor0
----
2646
2793
4704

query I rowsort
SELECT + col2 + 20 * ( - col2 ) AS col0 FROM tab0 AS cor0
----
-1558
-19
-627

query I rowsort
SELECT DISTINCT - col1 * + col2 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL - + ( cor0.col1 ) * col0 + cor0.col0 FROM tab2 cor0
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT ( 76 ) FROM tab1 AS cor0
----
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2666
SELECT col2 DIV - 19 FROM tab2 AS cor0
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-2666
SELECT col2 / - 19 FROM tab2 AS cor0
----
-1
-1
-2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to b6efe6f7ec1a3daa3cc6ea9dd7d13455

query I rowsort
SELECT + + col0 + + cor0.col1 AS col0 FROM tab0 cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2669
SELECT + + col0 + - col1 DIV + col1 AS col0 FROM tab2 cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-2669
SELECT + + col0 + - col1 / + col1 AS col0 FROM tab2 cor0
----
6
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col2 + col0 col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT DISTINCT col2 * col2 + + col0 FROM tab2
----
1523
736
754

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( col2 ) BETWEEN NULL AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( col1 ) > col0
----
64
10
57
80
13
96

query I rowsort
SELECT DISTINCT col1 * - col1 * tab0.col0 + + col2 FROM tab0 WHERE NOT col0 <> ( NULL )
----

query I rowsort
SELECT - col0 + tab1.col0 * tab1.col1 AS col1 FROM tab1
----
576
75
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2676
SELECT DISTINCT + 25 + + tab1.col1 * - CAST( ( col0 ) AS SIGNED ) * 27 AS col2 FROM tab1
----
-17255
-2081
-28055

skipif mysql # not compatible
query I rowsort label-2676
SELECT DISTINCT + 25 + + tab1.col1 * - CAST ( ( col0 ) AS INTEGER ) * 27 AS col2 FROM tab1
----
-17255
-2081
-28055

query I rowsort
SELECT col1 + + col1 * ( - 13 ) AS col1 FROM tab1
----
-120
-156
-312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + col1 col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - col2 + col2 * - col2 FROM tab1
----
-2970
-3306
-9312

query I rowsort
SELECT DISTINCT + col1 * - tab0.col0 + col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL 91 * col1 + - tab2.col2 AS col1 FROM tab2
----
1509
2794
5343

query I rowsort
SELECT col0 * tab0.col1 - col2 * col2 FROM tab0
----
1375
3394
975

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2683
SELECT col1 + - col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2683
SELECT col1 + - col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + 83 * tab1.col2 AS col2 FROM tab1
----
4508
4741
7981

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 79b6ae096785aaecea9c1428e4a43e5f

query I rowsort
SELECT - - col2 * 41 AS col0 FROM tab1 AS cor0
----
2214
2337
3936

query I rowsort
SELECT DISTINCT col1 + 45 FROM tab0 cor0
----
131
136
142

query I rowsort
SELECT DISTINCT + col1 * 20 * 99 AS col1 FROM tab1 AS cor0
----
19800
25740
51480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 * cor0.col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + + col2 * - 7 + cor0.col0 FROM tab1 AS cor0
----
-335
-375
-592

query I rowsort
SELECT col1 + + 19 * col2 FROM tab1 AS cor0
----
1052
1093
1837

query I rowsort
SELECT ALL + 30 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT ALL - col0 * ( - cor0.col0 ) AS col2 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2694
SELECT ALL + CAST( cor0.col2 AS SIGNED ) FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2694
SELECT ALL + CAST ( cor0.col2 AS INTEGER ) FROM tab2 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2695
SELECT + + CAST( - col0 AS SIGNED ) col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2695
SELECT + + CAST ( - col0 AS INTEGER ) col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2696
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * + col2 FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-2696
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * + col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT 40 + - col1 AS col2 FROM tab2 AS cor0
----
-19
23
9

query I rowsort
SELECT - ( col2 ) * - 91 + col2 FROM tab2 AS cor0
----
2392
2484
3496

onlyif mysql # use DIV operator for integer division
query I rowsort label-2700
SELECT ALL col1 DIV + col1 + + col0 DIV - 74 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2700
SELECT ALL col1 / + col1 + + col0 / - 74 FROM tab0 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT + col0 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 col2 FROM tab2
----
57
57
57

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

query I rowsort
SELECT - 92 + col1 AS col1 FROM tab1
----
-66
-79
-82

query I rowsort
SELECT - ( - col0 ) * col1 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * col2 col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col2 * col1 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL + col0 * + col1 * - col2 + ( col1 ) * col2 FROM tab1 AS cor0
----
-2808
-35910
-98592

query I rowsort
SELECT ALL - - col1 * - col0 + 88 * col0 FROM tab2 AS cor0
----
2262
399
5609

query I rowsort
SELECT - + col1 * col2 + + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + col2 * ( 91 ) + - col2 AS col2 FROM tab0 cor0
----
2970
7380
90

query I rowsort
SELECT ALL + cor0.col0 * col2 + + col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + col2 * col0 + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

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

query I rowsort
SELECT DISTINCT + + col2 * ( - cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2716
SELECT col0 DIV + col1 + col1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2716
SELECT col0 / + col1 + col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - col2 * col0 + + 83 FROM tab2 AS cor0
----
-106
-1945
-2919

query I rowsort
SELECT col0 + - col2 * + col0 * + col1 AS col2 FROM tab2 AS cor0
----
-119574
-50955
-5852

query I rowsort
SELECT ALL - col2 + - col0 + ( - col0 ) FROM tab2
----
-182
-196
-41

query I rowsort
SELECT - ( col0 ) * ( + col0 ) AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - 52 + col2 FROM tab2
----
-14
-25
-26

query I rowsort
SELECT + 95 + + col0 AS col1 FROM tab0
----
119
130
184

query I rowsort
SELECT ALL + 72 + - col2 AS col1 FROM tab2
----
34
45
46

query I rowsort
SELECT ( - col1 + col2 ) AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT + col1 + cor0.col0 * + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL col1 + col1 + col0 FROM tab2 AS cor0
----
113
196
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 - col0 col0 FROM tab0 cor0
----
2
62

query I rowsort
SELECT ALL - col2 + col2 * - tab1.col0 * - col1 AS col0 FROM tab1
----
36423
4158
99744

query I rowsort
SELECT + - col0 * + col1 + col0 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + col2 * col0 * col0 + col1 * col2 * - col0 AS col0 FROM tab1
----
-3726
196992
514560

query I rowsort
SELECT col0 * - tab1.col0 AS col0 FROM tab1
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2732
SELECT + 45 + + col2 DIV col1 FROM tab1
----
47
50
52

skipif mysql # not compatible
query I rowsort label-2732
SELECT + 45 + + col2 / col1 FROM tab1
----
47
50
52

query I rowsort
SELECT ALL - 20 + - col2 * col0 - col1 AS col0 FROM tab2
----
-2107
-240
-3039

query I rowsort
SELECT ALL ( - 54 * col0 ) FROM tab1
----
-162
-3456
-4320

query I rowsort
SELECT - 99 * col2 FROM tab0 AS cor0
----
-3267
-8118
-99

query I rowsort
SELECT 55 AS col1 FROM tab0 AS cor0
----
55
55
55

query I rowsort
SELECT ALL + ( - 21 ) AS col0 FROM tab2
----
-21
-21
-21

query I rowsort
SELECT ALL + ( col0 + - col1 ) FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + tab2.col2 * + col1 + col0 * tab2.col0 * tab2.col0 FROM tab2
----
1180
476086
493685

query I rowsort
SELECT ALL 46 + col2 * col0 * - col1 FROM tab1
----
-36434
-4166
-99794

query I rowsort
SELECT ALL col1 + + cor0.col0 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL cor0.col0 * - col2 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT 64 + + col1 FROM tab1 cor0
----
74
77
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2744
SELECT + col2 + + col2 DIV - col0 FROM tab0 AS cor0
----
1
32
82

skipif mysql # not compatible
query I rowsort label-2744
SELECT + col2 + + col2 / - col0 FROM tab0 AS cor0
----
1
32
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2745
SELECT DISTINCT + + cor0.col1 * col0 DIV + col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2745
SELECT DISTINCT + + cor0.col1 * col0 / + col0 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 78 * col1 + + col1 * col1 col2 FROM tab2 AS cor0
----
-1037
-1121
-1457

query I rowsort
SELECT ALL + + 45 + - col2 AS col1 FROM tab1 AS cor0
----
-12
-51
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col2 - - col2 * + col1 col2 FROM tab1 AS cor0
----
10464
3819
4320

query I rowsort
SELECT DISTINCT - + col2 * col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2750
SELECT ALL + 74 DIV - cor0.col2 FROM tab0 AS cor0
----
-2
-74
0

skipif mysql # not compatible
query I rowsort label-2750
SELECT ALL + 74 / - cor0.col2 FROM tab0 AS cor0
----
-2
-74
0

query I rowsort
SELECT ALL + cor0.col2 + - cor0.col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + + 96 + + col1 FROM tab2 AS cor0
----
113
127
155

query I rowsort
SELECT + 88 FROM tab1 cor0
----
88
88
88

query I rowsort
SELECT ALL - 9 * col0 FROM tab2 cor0
----
-63
-702
-711

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 + - 17 col2 FROM tab2 AS cor0
----
-1360
-234
-4619

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col2 col1 FROM tab2, tab2 AS cor0, tab1 cor1
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2757
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2757
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - + col0 + col1 AS col1 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + col2 * + col0 + col1 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-2760
SELECT - col1 DIV + 92 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2760
SELECT - col1 / + 92 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col0 * 86 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to e7cfaf65a2f5cdb3f29fab15e9dd6e82

query I rowsort
SELECT col0 * col0 + 61 FROM tab2
----
110
6145
6302

query I rowsort
SELECT DISTINCT col1 * col2 * col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT ALL + col0 * + 32 AS col2 FROM tab0
----
1120
2848
768

query I rowsort
SELECT tab1.col0 * + 56 AS col2 FROM tab1
----
168
3584
4480

query I rowsort
SELECT ALL + 13 + cor0.col2 - cor0.col2 FROM tab1 AS cor0
----
13
13
13

query I rowsort
SELECT ALL + col1 + col0 * + col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - + ( - 1 ) FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col1 AS REAL ) - + cor0.col0 * col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT col2 + col2 * + col2 - col1 FROM tab1
----
2944
3296
9299

query I rowsort
SELECT DISTINCT col1 + - ( col0 ) AS col2 FROM tab1
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2772
SELECT - CAST( NULL AS DECIMAL ) FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2772
SELECT - CAST ( NULL AS REAL ) FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2773
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab2, tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2773
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab2, tab0 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2774
SELECT - + ( + col0 ) * col1 + 56 DIV 18 FROM tab2 AS cor0
----
-1340
-214
-4599

skipif mysql # not compatible
query I rowsort label-2774
SELECT - + ( + col0 ) * col1 + 56 / 18 FROM tab2 AS cor0
----
-1340
-214
-4599

query I rowsort
SELECT ALL 30 + cor0.col1 AS col0 FROM tab1, tab2 cor0, tab0, tab0 AS cor1
----
81 values hashing to 661a6eb0a7ba8e94678943b82076c28f

query I rowsort
SELECT - 99 + 0 FROM tab0 AS cor0
----
-99
-99
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2777
SELECT - + 10 + cor0.col1 DIV - col2 col0 FROM tab1 AS cor0
----
-10
-10
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2777
SELECT - + 10 + cor0.col1 / - col2 col0 FROM tab1 AS cor0
----
-10
-10
-10

query I rowsort
SELECT + 29 + 36 AS col1 FROM tab0 AS cor0
----
65
65
65

query I rowsort
SELECT - + 83 * col1 + col1 AS col0 FROM tab1 AS cor0
----
-1066
-2132
-820

query I rowsort
SELECT col0 * col2 - tab0.col2 FROM tab0
----
34
7216
759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2781
SELECT + CAST( NULL AS SIGNED ) * + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2781
SELECT + CAST ( NULL AS INTEGER ) * + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 47 * col2 + col2 AS col1 FROM tab1 cor0
----
-2484
-2622
-4416

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 34 * - ( col0 ) col1 FROM tab2 cor0
----
-238
-2652
-2686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2784
SELECT - CAST( NULL AS SIGNED ) + col2 * col1 + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2784
SELECT - CAST ( NULL AS INTEGER ) + col2 * col1 + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + - col0 AS col1 FROM tab0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2786
SELECT DISTINCT 55 DIV + cor0.col2 AS col0 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2786
SELECT DISTINCT 55 / + cor0.col2 AS col0 FROM tab1 AS cor0
----
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2787
SELECT - + col1 + col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2787
SELECT - + col1 + col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 40 + + col1 AS col2 FROM tab1 AS cor0
----
50
53
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2789
SELECT + + col1 * - col0 + CAST( col1 AS SIGNED ) * - col0 FROM tab0 AS cor0
----
-16198
-4128
-6790

skipif mysql # not compatible
query I rowsort label-2789
SELECT + + col1 * - col0 + CAST ( col1 AS INTEGER ) * - col0 FROM tab0 AS cor0
----
-16198
-4128
-6790

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - + cor0.col2 * col0 * - CAST ( col1 AS REAL ) AS col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT - 86 * col1 + col0 FROM tab1 cor0
----
-1038
-2233
-796

query I rowsort
SELECT DISTINCT - cor0.col2 * col1 * col2 AS col0 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT cor0.col2 + cor0.col1 * col0 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - col1 + - col0 * col2 FROM tab1 cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL + col0 * col2 + col1 * + col1 * col0 AS col1 FROM tab1 AS cor0
----
10048
21200
2190

query I rowsort
SELECT ALL + - col0 - cor0.col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2798
SELECT DISTINCT col2 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2798
SELECT DISTINCT col2 / cor0.col2 AS col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT + - cor0.col0 * - col0 * col2 - - col1 FROM tab2 AS cor0
----
1354
158243
237175

onlyif mysql # use DIV operator for integer division
query I rowsort label-2800
SELECT - col2 * 75 + col1 DIV col1 AS col0 FROM tab2
----
-1949
-2024
-2849

skipif mysql # not compatible
query I rowsort label-2800
SELECT - col2 * 75 + col1 / col1 AS col0 FROM tab2
----
-1949
-2024
-2849

query I rowsort
SELECT DISTINCT col2 + col1 * + 56 FROM tab2 AS cor0
----
1763
3330
990

query I rowsort
SELECT col1 - + ( 94 ) * + col2 FROM tab1 AS cor0
----
-5050
-5348
-9011

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 + - 12 * col2 FROM tab2 AS cor0
----
-1053
-1900
-988

query I rowsort
SELECT col1 - + ( col0 ) FROM tab0 AS cor0
----
2
62
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2805
SELECT DISTINCT - col1 * - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2805
SELECT DISTINCT - col1 * - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2806
SELECT - - col0 / ( 80 * + col0 ) - CAST( NULL AS SIGNED ) * - 52 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2806
SELECT - - col0 / ( 80 * + col0 ) - CAST ( NULL AS INTEGER ) * - 52 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - cor0.col2 + 0 * col0 + col0 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - col1 * - cor0.col1 col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL + + col1 * 40 * ( col0 ) AS col2 FROM tab0 AS cor0
----
135800
323960
82560

onlyif mysql # use DIV operator for integer division
query I rowsort label-2810
SELECT ALL + - col1 DIV + col1 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2810
SELECT ALL + - col1 / + col1 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab1, tab0 AS cor0
----
83

query I rowsort
SELECT + 48 + + col0 FROM tab0 cor0
----
137
72
83

query I rowsort
SELECT DISTINCT - ( 15 ) + col2 + + col2 FROM tab0 AS cor0
----
-13
149
51

query I rowsort
SELECT col0 * + 4 * col2 + + 87 AS col1 FROM tab0 cor0
----
227
29279
3255

query I rowsort
SELECT - col2 + col2 * + col0 FROM tab1
----
108
3591
7584

query I rowsort
SELECT DISTINCT - tab1.col2 - 57 FROM tab1
----
-111
-114
-153

query I rowsort
SELECT DISTINCT + col0 - + 79 FROM tab2
----
-1
-72
0

query I rowsort
SELECT ALL - 23 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

onlyif mysql # use DIV operator for integer division
query I rowsort label-2819
SELECT col1 + + col0 DIV 62 FROM tab1 AS cor0
----
11
14
26

skipif mysql # not compatible
query I rowsort label-2819
SELECT col1 + + col0 / 62 FROM tab1 AS cor0
----
11
14
26

query I rowsort
SELECT DISTINCT + col2 * 54 FROM tab2 AS cor0
----
1404
1458
2052

query I rowsort
SELECT ALL - col2 + ( + 73 ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
114
125
53

query I rowsort
SELECT DISTINCT + col1 + 79 AS col2 FROM tab2 AS cor0
----
110
138
96

query I rowsort
SELECT 34 * + col0 FROM tab2
----
238
2652
2686

query I rowsort
SELECT DISTINCT col0 + - col1 * col1 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT ( - col1 ) * + 33 + col2 + col0 FROM tab1
----
-209
-253
-801

query I rowsort
SELECT ALL + col1 + - tab1.col2 AS col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col0 + - 49 AS col2 FROM tab1 AS cor0
----
-46
15
31

query I rowsort
SELECT col1 * ( - col1 ) + col0 * ( - 18 ) AS col0 FROM tab0 AS cor0
----
-10039
-7828
-9883

query I rowsort
SELECT ALL + col1 + + 24 AS col1 FROM tab2 AS cor0
----
41
55
83

query I rowsort
SELECT DISTINCT col1 + + 71 + col0 * - col1 AS col1 FROM tab1 AS cor0
----
-559
-956
19

query I rowsort
SELECT col0 * - 15 FROM tab1
----
-1200
-45
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-2832
SELECT - col1 DIV col0 col0 FROM tab1 AS cor0
----
-8
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2832
SELECT - col1 / col0 col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT ALL + cor0.col1 * - cor0.col1 AS col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT cor0.col2 + + 86 FROM tab2 AS cor0
----
112
113
124

query I rowsort
SELECT col1 + - 83 + col1 FROM tab0
----
111
89
99

query I rowsort
SELECT ALL col0 * col0 + col1 * col1 - - col0 FROM tab1 AS cor0
----
4260
6649
688

query I rowsort
SELECT ALL - 48 * col0 + + col1 * + col1 FROM tab2 AS cor0
----
-263
-3503
625

query I rowsort
SELECT DISTINCT - 75 * + col0 + + col0 FROM tab2 cor0
----
-518
-5772
-5846

query I rowsort
SELECT ALL - col2 * cor0.col2 - - col1 * - cor0.col1 FROM tab0 AS cor0
----
-15005
-8485
-9410

query I rowsort
SELECT DISTINCT - - 88 * - col2 AS col1 FROM tab0 AS cor0
----
-2904
-7216
-88

query I rowsort
SELECT ALL - col1 + col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT - 6 * + col0 + 35 FROM tab2 AS cor0
----
-433
-439
-7

query I rowsort
SELECT col2 * col0 + - col1 AS col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT + + col1 * - col1 + ( + cor0.col1 ) FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT col2 * tab0.col2 + + ( + 53 + col1 ) * + 89 AS col1 FROM tab0
----
13351
13460
19540

query I rowsort
SELECT ALL 85 + col1 * - col1 FROM tab1
----
-15
-591
-84

query I rowsort
SELECT 12 * + col2 AS col2 FROM tab1
----
1152
648
684

query I rowsort
SELECT DISTINCT - - col1 * col0 + + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + 78 + col2 * + col0 FROM tab1 cor0
----
240
3726
7758

query I rowsort
SELECT 34 * col2 + col1 FROM tab1 AS cor0
----
1862
1948
3277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 + ( col2 ) * cor0.col2 col2 FROM tab1 AS cor0
----
10256
2994
3889

query I rowsort
SELECT + + 38 * col2 + 26 FROM tab0 AS cor0
----
1280
3142
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2853
SELECT - - col0 + + col0 + + CAST( col2 * - col2 AS SIGNED ) FROM tab1 AS cor0
----
-2910
-3121
-9056

skipif mysql # not compatible
query I rowsort label-2853
SELECT - - col0 + + col0 + + CAST ( col2 * - col2 AS INTEGER ) FROM tab1 AS cor0
----
-2910
-3121
-9056

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

query I rowsort
SELECT - col1 * col1 * col1 + col1 FROM tab0 cor0
----
-635970
-753480
-912576

query I rowsort
SELECT + col0 * + col1 + + col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL col0 * + col2 * - col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - - col1 + - col0 + - col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - - 66 + col0 FROM tab2 AS cor0
----
144
145
73

query I rowsort
SELECT - col0 * - 82 AS col1 FROM tab1 cor0
----
246
5248
6560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2861
SELECT + CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-2861
SELECT + CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2862
SELECT + + cor0.col2 + col2 DIV ( col0 ) AS col2 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-2862
SELECT + + cor0.col2 + col2 / ( col0 ) AS col2 FROM tab2 AS cor0
----
26
30
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2863
SELECT - 80 * + col1 * CAST( col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-591680
-662480
-752720

skipif mysql # not compatible
query I rowsort label-2863
SELECT - 80 * + col1 * CAST ( col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-591680
-662480
-752720

query I rowsort
SELECT DISTINCT - ( ( - col2 ) ) FROM tab0
----
1
33
82

query I rowsort
SELECT + cor0.col0 * + tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 9dd217b6385bf38f78d8b6e6b7864578

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2866
SELECT - + col2 * + cor0.col2 * + col0 + col1 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2866
SELECT - + col2 * + cor0.col2 * + col0 + col1 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 - + 20 FROM tab2
----
-3
11
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-2868
SELECT + col2 + + 65 DIV col1 FROM tab1
----
101
56
63

skipif mysql # not compatible
query I rowsort label-2868
SELECT + col2 + + 65 / col1 FROM tab1
----
101
56
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + 75 col0 FROM tab0
----
110
164
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2870
SELECT ALL - cor0.col2 DIV - 94 + - 40 * + col2 FROM tab2 AS cor0
----
-1040
-1080
-1520

skipif mysql # not compatible
query I rowsort label-2870
SELECT ALL - cor0.col2 / - 94 + - 40 * + col2 FROM tab2 AS cor0
----
-1040
-1080
-1520

query I rowsort
SELECT DISTINCT col0 + + 96 AS col0 FROM tab0 AS cor0
----
120
131
185

query I rowsort
SELECT DISTINCT + - cor0.col0 + + 66 AS col2 FROM tab1 AS cor0
----
-14
2
63

query I rowsort
SELECT ALL + 93 FROM tab2 cor0
----
93
93
93

query I rowsort
SELECT ALL + - 95 + + col1 AS col0 FROM tab2 AS cor0
----
-36
-64
-78

query I rowsort
SELECT DISTINCT ( col2 ) + cor0.col2 AS col1 FROM tab2 cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 74 col2 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT ALL col0 + + 42 * col1 AS col1 FROM tab0 AS cor0
----
3636
3911
4109

onlyif mysql # use DIV operator for integer division
query I rowsort label-2878
SELECT - col1 DIV - 89 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2878
SELECT - col1 / - 89 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + - col1 + - col1 AS col0 FROM tab2 AS cor0
----
-40
-55
45

query I rowsort
SELECT ALL + + 66 * col0 FROM tab2 cor0
----
462
5148
5214

onlyif mysql # use DIV operator for integer division
query I rowsort label-2881
SELECT DISTINCT col0 * 69 + col1 * tab0.col2 DIV + ( col0 ) FROM tab0
----
1774
2417
6224

skipif mysql # not compatible
query I rowsort label-2881
SELECT DISTINCT col0 * 69 + col1 * tab0.col2 / + ( col0 ) FROM tab0
----
1774
2417
6224

query I rowsort
SELECT ALL + col0 * col1 * + ( + col1 ) AS col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT - cor0.col0 + col0 * - ( + col2 ) FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT - 58 FROM tab1, tab2 AS cor0
----
-58

query I rowsort
SELECT + ( col0 ) + - col1 + + col0 FROM tab0
----
-27
-38
87

query I rowsort
SELECT ALL 55 * - col1 + col1 AS col1 FROM tab1
----
-1404
-540
-702

query I rowsort
SELECT - 15 + - col0 AS col0 FROM tab1
----
-18
-79
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2888
SELECT 23 DIV col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2888
SELECT 23 / col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + - col2 * - col1 + ( 52 ) * col2 AS col2 FROM tab2 AS cor0
----
2241
2622
2886

onlyif mysql # use DIV operator for integer division
query I rowsort label-2890
SELECT DISTINCT - ( col2 ) + - col2 - + col2 DIV col1 FROM tab0
----
-164
-2
-66

skipif mysql # not compatible
query I rowsort label-2890
SELECT DISTINCT - ( col2 ) + - col2 - + col2 / col1 FROM tab0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * ( col2 ) + - col0 col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL + ( + cor0.col2 ) - tab2.col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 5ba9183f97d06cb5c1340d457f55f1e3

query I rowsort
SELECT DISTINCT col0 * col2 * 66 FROM tab0 AS cor0
----
2310
481668
52272

query I rowsort
SELECT ALL - col1 * cor0.col2 + cor0.col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL col1 * col1 - - 62 AS col2 FROM tab1 AS cor0
----
162
231
738

query I rowsort
SELECT DISTINCT + col2 + - col1 + + col0 AS col1 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT - cor0.col2 * col2 + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 - - col0 col0 FROM tab0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2899
SELECT ALL - col1 + tab0.col1 DIV col2 - col1 DIV + col1 col2 FROM tab0
----
-1
-85
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2899
SELECT ALL - col1 + tab0.col1 / col2 - col1 / + col1 col2 FROM tab0
----
-1
-85
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2900
SELECT ALL + ( col1 ) DIV - 74 - 98 * tab1.col2 FROM tab1
----
-5292
-5586
-9408

skipif mysql # not compatible
query I rowsort label-2900
SELECT ALL + ( col1 ) / - 74 - 98 * tab1.col2 FROM tab1
----
-5292
-5586
-9408

query I rowsort
SELECT ALL col0 + ( + ( + col0 ) ) * ( col0 * col2 ) AS col1 FROM tab1
----
233536
489
614480

query I rowsort
SELECT ALL tab0.col0 * - col0 + + col2 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
7
78
79

query I rowsort
SELECT ALL + - cor0.col2 - 71 * + col2 * col1 AS col1 FROM tab1 AS cor0
----
-40527
-88704
-99738

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 + - cor0.col0 col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT ALL + col1 - - col2 * col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT col1 * + col2 + + col1 AS col0 FROM tab0 cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + 78 col0 FROM tab1 cor0
----
142
158
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2909
SELECT ALL - col2 DIV + col0 + - col1 * - col0 col2 FROM tab0 AS cor0
----
2063
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2909
SELECT ALL - col2 / + col0 + - col1 * - col0 col2 FROM tab0 AS cor0
----
2063
3395
8099

query I rowsort
SELECT ALL - ( - col1 ) AS col1 FROM tab0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2911
SELECT + CAST( 49 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
49
49
49

skipif mysql # not compatible
query I rowsort label-2911
SELECT + CAST ( 49 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT ( - 17 ) + col2 * ( + col2 * col1 ) FROM tab2
----
22582
24531
39867

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + + col0 * col1 col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - + 73 * + col0 FROM tab0 AS cor0
----
-1752
-2555
-6497

query I rowsort
SELECT ALL - 76 + - cor0.col2 FROM tab0 AS cor0
----
-109
-158
-77

query I rowsort
SELECT + + cor0.col1 * col1 + ( col2 ) FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT col0 + - cor0.col2 * + 2 FROM tab0 AS cor0
----
-42
-75
33

query I rowsort
SELECT col0 + col2 * - 49 FROM tab1 AS cor0
----
-2643
-2729
-4624

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2919
SELECT DISTINCT - col1 * col2 + - CAST( NULL AS SIGNED ) * + ( - cor0.col2 ) col1 FROM tab0 AS cor0
----
NULL

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

query I rowsort
SELECT DISTINCT - cor0.col1 + col0 - - col0 * cor0.col0 FROM tab2 AS cor0
----
25
6103
6303

query I rowsort
SELECT DISTINCT + col1 + - col0 * + ( 62 * + col1 ) FROM tab1 AS cor0
----
-39670
-4810
-64467

query I rowsort
SELECT DISTINCT - col1 * 35 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1078
-1987
-516

query I rowsort
SELECT ALL col0 * - col2 - col2 * col2 FROM tab2 AS cor0
----
-2704
-4446
-918

query I rowsort
SELECT 68 * + col0 + col0 FROM tab1 AS cor0
----
207
4416
5520

query I rowsort
SELECT + + cor0.col0 + col0 * + col2 * + col1 AS col0 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT DISTINCT col2 + - 95 AS col2 FROM tab0 AS cor0
----
-13
-62
-94

query I rowsort
SELECT ALL + 21 + - col2 FROM tab1 AS cor0
----
-33
-36
-75

query I rowsort
SELECT - + col2 * cor0.col1 - col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT ( + col1 ) * cor0.col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - ( tab1.col1 ) * tab1.col1 AS col1 FROM tab1
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2931
SELECT + 48 DIV + 45 + col0 * - 59 AS col0 FROM tab2 AS cor0
----
-412
-4601
-4660

skipif mysql # not compatible
query I rowsort label-2931
SELECT + 48 / + 45 + col0 * - 59 AS col0 FROM tab2 AS cor0
----
-412
-4601
-4660

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 + - col1 FROM tab2 AS cor0
----
-306
-3540
-992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2933
SELECT ALL - - CAST( + col2 AS SIGNED ) * + cor0.col0 + + col1 * + col0 AS col2 FROM tab1 AS cor0
----
240
4288
8720

skipif mysql # not compatible
query I rowsort label-2933
SELECT ALL - - CAST ( + col2 AS INTEGER ) * + cor0.col0 + + col1 * + col0 AS col2 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT - + col2 * 72 + cor0.col0 FROM tab2 AS cor0
----
-1794
-1937
-2657

query I rowsort
SELECT DISTINCT + ( col0 ) * + col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col2 - + 77 * col1 * - col0 AS col1 FROM tab0
----
158961
261416
623705

query I rowsort
SELECT + ( - col2 ) - col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT + + 49 FROM tab2 cor0
----
49
49
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-2939
SELECT + 1 + col1 * cor0.col0 DIV col1 + - 19 AS col2 FROM tab1 AS cor0
----
-15
46
62

skipif mysql # not compatible
query I rowsort label-2939
SELECT + 1 + col1 * cor0.col0 / col1 + - 19 AS col2 FROM tab1 AS cor0
----
-15
46
62

query I rowsort
SELECT + ( + col1 ) + col2 AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL 11 + 55 AS col1 FROM tab2
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 * + col2 + 61 * 37 col0 FROM tab1 cor0
----
-2711
-2987
-6575

query I rowsort
SELECT DISTINCT col2 + 44 * + col1 + col2 * 38 FROM tab0 AS cor0
----
4307
5071
7202

query I rowsort
SELECT DISTINCT 36 FROM tab1, tab1 AS cor0
----
36

query I rowsort
SELECT ALL - + cor0.col0 * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col1 + 32 AS col2 FROM tab1 AS cor0
----
42
45
58

query I rowsort
SELECT col1 * 81 FROM tab1 AS cor0
----
1053
2106
810

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
3
64
80

query I rowsort
SELECT ALL - col0 * col1 * col0 - tab2.col2 * + 49 FROM tab2
----
-107959
-2842
-360230

query I rowsort
SELECT - col2 * col1 + col0 AS col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT - col0 * + 6 + col2 AS col0 FROM tab1 AS cor0
----
-327
-384
36

query I rowsort
SELECT DISTINCT + col1 * 48 FROM tab1 AS cor0
----
1248
480
624

query I rowsort
SELECT col0 * - ( - col0 ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL - + col2 + + col0 + - col1 AS col2 FROM tab1 AS cor0
----
-29
-3
-77

skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 * CAST ( 2 AS REAL ) AS col0 FROM tab0 AS cor0
----
-172
-182
-194

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab1 cor2
----
3645 values hashing to 8d4d13f65f86e1b26b6004a6bdc662b3

query I rowsort
SELECT - 1 FROM tab0, tab0 cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to f3aaea07874d9328a91c424c0907a688

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2958
SELECT CAST( NULL AS SIGNED ) * col0 + col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2958
SELECT CAST ( NULL AS INTEGER ) * col0 + col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 47 * - col1 FROM tab0
----
-4042
-4277
-4559

query I rowsort
SELECT - 98 + + col2 AS col1 FROM tab0 AS cor0
----
-16
-65
-97

query I rowsort
SELECT ALL + - 33 AS col1 FROM tab0 AS cor0
----
-33
-33
-33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2962
SELECT ALL col0 + - col0 * + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2962
SELECT ALL col0 + - col0 * + CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2963
SELECT + col2 DIV - cor0.col1 AS col0 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2963
SELECT + col2 / - cor0.col1 AS col0 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 15 + - col1 * - 93 + col0 col1 FROM tab2 AS cor0
----
1645
2875
5550

query I rowsort
SELECT ALL + 11 * + col2 FROM tab0 AS cor0
----
11
363
902

query I rowsort
SELECT - cor0.col1 + 50 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 7c3ead0daf3ce64a9bf1460f70d8f4cc

query I rowsort
SELECT + col1 * - 9 FROM tab2 AS cor0
----
-153
-279
-531

onlyif mysql # use DIV operator for integer division
query I rowsort label-2968
SELECT ALL + - col2 DIV 8 FROM tab2 cor0
----
-3
-3
-4

skipif mysql # not compatible
query I rowsort label-2968
SELECT ALL + - col2 / 8 FROM tab2 cor0
----
-3
-3
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2969
SELECT + col2 DIV + 69 col1 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2969
SELECT + col2 / + 69 col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - col2 + + 84 * + col2 * col0 FROM tab2 AS cor0
----
15849
170326
252130

query I rowsort
SELECT col2 AS col1 FROM tab1 WHERE NOT col2 * col1 > NULL
----

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2 WHERE NULL > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 * col0 - - col0 col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT - - col2 * col1 - - col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2975
SELECT DISTINCT col1 DIV col2 - - col1 * col1 * - col0 AS col0 FROM tab0
----
-177502
-329218
-737008

skipif mysql # not compatible
query I rowsort label-2975
SELECT DISTINCT col1 / col2 - - col1 * col1 * - col0 AS col0 FROM tab0
----
-177502
-329218
-737008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col2 * col2 col2 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT col2 + col1 * - col2 FROM tab2 AS cor0
----
-1508
-608
-810

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) NOT IN ( col2 )
----

query I rowsort
SELECT ALL col1 * + col1 + col0 FROM tab2
----
3559
368
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col0 * + col2 col0 FROM tab2
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-2981
SELECT + col0 + + col0 DIV + cor0.col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-2981
SELECT + col0 + + col0 / + cor0.col0 FROM tab2 AS cor0
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col2 * - col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col2 - + cor0.col0 * + col2 col1 FROM tab1 AS cor0
----
-399
1536
2754

query I rowsort
SELECT col2 AS col2 FROM tab1 AS cor0 WHERE NOT ( + col0 ) <> ( NULL ) OR NOT ( NULL ) >= - col0 + - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2986
SELECT + + col0 DIV + col0 + + cor0.col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-2986
SELECT + + col0 / + col0 + + cor0.col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT + + col1 * + col1 * col2 - col2 FROM tab1 AS cor0
----
16128
36450
5643

query I rowsort
SELECT + - col0 * cor0.col1 * + col0 - col2 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
-118790
-48744
-713513

onlyif mysql # use DIV operator for integer division
query I rowsort label-2989
SELECT - col0 DIV + col0 col2 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2989
SELECT - col0 / + col0 col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT col0 * col1 * - col0 AS col2 FROM tab0 cor0
----
-118825
-49536
-720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( + col1 ) + 88 col1 FROM tab2 AS cor0
----
105
119
147

onlyif mysql # use DIV operator for integer division
query I rowsort label-2992
SELECT DISTINCT col2 + - col2 DIV - ( col2 + col0 ) AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2992
SELECT DISTINCT col2 + - col2 / - ( col2 + col0 ) AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + 14 + cor0.col2 AS col2 FROM tab0 AS cor0
----
15
47
96

query I rowsort
SELECT DISTINCT + - col1 * col2 + 31 AS col1 FROM tab2 AS cor0
----
-1503
-615
-806

query I rowsort
SELECT ALL - 17 * col2 FROM tab1 AS cor0
----
-1632
-918
-969

query I rowsort
SELECT DISTINCT 52 + - cor0.col1 AS col0 FROM tab0 cor0
----
-34
-39
-45

query I rowsort
SELECT DISTINCT 11 + - col1 - col1 AS col2 FROM tab2
----
-107
-23
-51

query I rowsort
SELECT - 80 * col1 AS col1 FROM tab0
----
-6880
-7280
-7760

query I rowsort
SELECT ALL + tab0.col2 - col1 FROM tab0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3000
SELECT ALL + col0 + - tab0.col1 - + CAST( + col2 AS SIGNED ) FROM tab0
----
-63
-84
-95

skipif mysql # not compatible
query I rowsort label-3000
SELECT ALL + col0 + - tab0.col1 - + CAST ( + col2 AS INTEGER ) FROM tab0
----
-63
-84
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col0 + cor0.col0 * col0 col0 FROM tab1 AS cor0
----
-69
3456
5360

query I rowsort
SELECT col0 * col1 + cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - col0 + + col0 + - col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT + + col1 + 47 * + col2 FROM tab1 AS cor0
----
2564
2689
4525

query I rowsort
SELECT DISTINCT 99 + - col2 + tab2.col0 AS col1 FROM tab2
----
140
151
79

query I rowsort
SELECT ALL - col1 * col0 * - col2 - + tab1.col2 FROM tab1
----
36423
4158
99744

query I rowsort
SELECT ALL + col2 * tab1.col1 - tab1.col0 AS col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT ALL + col1 + col2 AS col1 FROM tab1 WHERE NOT - col2 < col1 / col1
----

query I rowsort
SELECT col2 * + tab1.col2 + + col1 FROM tab1 WHERE ( NULL ) BETWEEN ( NULL ) AND col1 * - col1 * col0
----

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 WHERE NULL > - col2
----

query I rowsort
SELECT ALL + col1 - - tab0.col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 col2 FROM tab0 WHERE ( col2 ) >= NULL
----

query I rowsort
SELECT ALL - col2 FROM tab1 WHERE NOT ( + col2 ) = NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col0 FROM tab1 WHERE ( NULL ) IN ( - col1 * - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3015
SELECT col2 DIV + col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3015
SELECT col2 / + col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col2 + + tab1.col0 AS col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT DISTINCT col0 + + col1 * + col0 FROM tab1
----
1120
704
81

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT + col0 IN ( tab1.col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL tab2.col0 * - col2 - col2 * - tab2.col1 * col2 FROM tab2
----
21546
22410
37856

onlyif mysql # use DIV operator for integer division
query I rowsort label-3020
SELECT ALL col2 DIV + col2 + col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-3020
SELECT ALL col2 / + col2 + col0 FROM tab0
----
25
36
90

query I rowsort
SELECT + col1 + - col0 * col0 * - col0 AS col0 FROM tab0
----
13910
42972
705060

query I rowsort
SELECT DISTINCT col1 * col0 + + tab2.col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT + - 91 * + col1 FROM tab0 AS cor0
----
-7826
-8281
-8827

query I rowsort
SELECT - 93 AS col0 FROM tab1
----
-93
-93
-93

query I rowsort
SELECT - - col1 - - ( col0 + + col1 ) * - col1 FROM tab1 AS cor0
----
-1196
-728
-730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3026
SELECT DISTINCT - - col0 - - CAST( + col0 AS SIGNED ) * col1 * col2 FROM tab2 AS cor0
----
119730
51113
5866

skipif mysql # not compatible
query I rowsort label-3026
SELECT DISTINCT - - col0 - - CAST ( + col0 AS INTEGER ) * col1 * col2 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT DISTINCT - col1 * col1 - cor0.col2 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT + - col1 - - cor0.col2 * + col2 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT ALL col0 * col1 + col2 * col0 FROM tab0 cor0
----
15397
2856
3430

query I rowsort
SELECT ALL col1 + - 73 AS col1 FROM tab1 AS cor0
----
-47
-60
-63

query I rowsort
SELECT cor0.col2 * 71 FROM tab0 AS cor0
----
2343
5822
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3032
SELECT + tab2.col1 + + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3032
SELECT + tab2.col1 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + - col0 + - ( ( + col2 ) ) - + col0 FROM tab2 AS cor0
----
-182
-196
-41

query I rowsort
SELECT ( col2 ) + - col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 7 * + 51 FROM tab1 AS cor0
----
-357

query I rowsort
SELECT ALL - - col0 + + 95 FROM tab0 AS cor0
----
119
130
184

query I rowsort
SELECT + 27 * + col1 FROM tab1 AS cor0
----
270
351
702

query I rowsort
SELECT ALL + + cor0.col1 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3039
SELECT CAST( col1 AS SIGNED ) DIV + col0 AS col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3039
SELECT CAST ( col1 AS INTEGER ) / + col0 AS col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL + col1 * - cor0.col2 + col2 * - col2 * + col2 AS col2 FROM tab2 AS cor0
----
-19110
-20520
-55518

query I rowsort
SELECT col0 + col2 * col1 * 65 FROM tab0 cor0
----
184494
485119
6340

query I rowsort
SELECT 27 * - 45 AS col2 FROM tab1 AS cor0
----
-1215
-1215
-1215

query I rowsort
SELECT + 68 + + 10 * col2 AS col2 FROM tab0 AS cor0
----
398
78
888

query I rowsort
SELECT ALL - col1 * col2 + - col0 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-3045
SELECT ALL + - ( cor0.col0 ) * + col2 + + 68 DIV + cor0.col2 FROM tab1 AS cor0
----
-161
-3647
-7680

skipif mysql # not compatible
query I rowsort label-3045
SELECT ALL + - ( cor0.col0 ) * + col2 + + 68 / + cor0.col2 FROM tab1 AS cor0
----
-161
-3647
-7680

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab0 AS cor0
----
41

query I rowsort
SELECT - col2 + + col2 * ( col1 * - col1 ) FROM tab1 AS cor0
----
-16320
-36558
-5757

query I rowsort
SELECT DISTINCT + 82 AS col0 FROM tab2
----
82

query I rowsort
SELECT - 1 AS col2 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT ALL - ( + col1 ) * - col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL + tab0.col2 * + 46 AS col1 FROM tab0
----
1518
3772
46

query I rowsort
SELECT + 75 + col2 FROM tab0 AS cor0
----
108
157
76

query I rowsort
SELECT DISTINCT ( + col0 ) * - tab1.col1 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3054
SELECT ALL - col0 DIV - 16 AS col2 FROM tab2
----
0
4
4

skipif mysql # not compatible
query I rowsort label-3054
SELECT ALL - col0 / - 16 AS col2 FROM tab2
----
0
4
4

query I rowsort
SELECT ( 98 ) FROM tab0
----
98
98
98

query I rowsort
SELECT - cor0.col2 * - col0 + col0 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 * + col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL 15 + + 87 FROM tab0, tab0 AS cor0
----
9 values hashing to 792cf560743b7eec398ed5c7e48d1343

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3059
SELECT + col2 + - CAST( NULL AS SIGNED ) / - tab2.col2 col2 FROM tab2
----
NULL
NULL
NULL

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

query I rowsort
SELECT col0 * col0 + + col1 AS col0 FROM tab1 AS cor0
----
35
4106
6413

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 283f1c907a0999dbd972d3bd45746c06

query I rowsort
SELECT DISTINCT 97 AS col0 FROM tab2, tab1 cor0
----
97

query I rowsort
SELECT - + cor0.col0 + col1 * col0 AS col1 FROM tab1 AS cor0
----
576
75
960

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

query I rowsort
SELECT + - ( - col1 ) + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3066
SELECT DISTINCT + CAST( NULL AS SIGNED ) * ( + col2 ) + + col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3066
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * ( + col2 ) + + col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - + cor0.col1 + + col0 - + col1 FROM tab1 cor0
----
-49
44
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3068
SELECT - + CAST( NULL AS SIGNED ) - col2 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3068
SELECT - + CAST ( NULL AS INTEGER ) - col2 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 86 FROM tab1, tab2 cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3070
SELECT DISTINCT + CAST( + col0 AS SIGNED ) * - col0 + + col0 + col0 AS col2 FROM tab2 AS cor0
----
-35
-5928
-6083

skipif mysql # not compatible
query I rowsort label-3070
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) * - col0 + + col0 + col0 AS col2 FROM tab2 AS cor0
----
-35
-5928
-6083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3071
SELECT ALL - CAST( col2 AS SIGNED ) + cor0.col2 + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3071
SELECT ALL - CAST ( col2 AS INTEGER ) + cor0.col2 + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - 11 + + col2 AS col1 FROM tab0 AS cor0
----
-10
22
71

query I rowsort
SELECT DISTINCT + 40 * - col2 + - col1 * - col1 AS col2 FROM tab2 AS cor0
----
-119
-1231
2441

query I rowsort
SELECT DISTINCT - 69 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
-69

query I rowsort
SELECT + col2 * + tab2.col2 AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT ( 82 ) * col0 AS col2 FROM tab0
----
1968
2870
7298

query I rowsort
SELECT + col2 * + cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL cor0.col0 + - cor0.col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3079
SELECT - + cor0.col0 DIV col0 + - col0 AS col0 FROM tab2 AS cor0
----
-79
-8
-80

skipif mysql # not compatible
query I rowsort label-3079
SELECT - + cor0.col0 / col0 + - col0 AS col0 FROM tab2 AS cor0
----
-79
-8
-80

query I rowsort
SELECT ALL cor1.col1 + 45 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f5768406435c5ecbd875bdc5f921026

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col2 FROM tab2, tab0, tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - 62 * col2 FROM tab1
----
-3348
-3534
-5952

query I rowsort
SELECT + - 73 * col1 AS col1 FROM tab0 AS cor0
----
-6278
-6643
-7081

query I rowsort
SELECT DISTINCT - col2 + col0 + + col0 * col0 * - col2 FROM tab2
----
-1343
-158132
-237117

query I rowsort
SELECT 72 + col1 AS col1 FROM tab0 AS cor0
----
158
163
169

query I rowsort
SELECT + col2 * + 41 AS col0 FROM tab1 AS cor0
----
2214
2337
3936

query I rowsort
SELECT col0 * - 6 AS col1 FROM tab0 cor0
----
-144
-210
-534

query I rowsort
SELECT + col2 + + col2 * 62 AS col0 FROM tab2 cor0
----
1638
1701
2394

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col0 * + CAST ( - 68 AS REAL ) FROM tab1 AS cor0
----
-204
-4352
-5440

query I rowsort
SELECT ALL col1 * col1 * - col1 - cor0.col0 FROM tab1 AS cor0
----
-1064
-17579
-2277

query I rowsort
SELECT ALL + - col1 * + col0 + - col0 AS col1 FROM tab1 AS cor0
----
-1120
-704
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3092
SELECT - 82 DIV - tab1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 8a9b55ac3cd2c8021c4ebaa64b4d7df4

skipif mysql # not compatible
query I rowsort label-3092
SELECT - 82 / - tab1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 8a9b55ac3cd2c8021c4ebaa64b4d7df4

query I rowsort
SELECT ALL + + ( tab1.col0 ) AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + + col2 * + 16 + col1 AS col2 FROM tab0 AS cor0
----
113
1403
614

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 + 44 col2 FROM tab2 AS cor0
----
70
71
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3096
SELECT + col2 DIV CAST( - 46 * col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3096
SELECT + col2 / CAST ( - 46 * col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 76 * + 53 FROM tab2, tab2 AS cor0
----
9 values hashing to 3414fc2a0fd407d9bef1302ea5248c20

query I rowsort
SELECT col0 + ( tab1.col2 * col1 + 90 * col1 ) AS col2 FROM tab1
----
1534
2498
3747

query I rowsort
SELECT + col0 * + col2 * + col0 FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-3100
SELECT + col0 + col2 DIV col2 FROM tab0 cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-3100
SELECT + col0 + col2 / col2 FROM tab0 cor0
----
25
36
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3101
SELECT ALL + + col2 * - CAST( NULL AS SIGNED ) + + 74 + - col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3101
SELECT ALL + + col2 * - CAST ( NULL AS INTEGER ) + + 74 + - col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3102
SELECT DISTINCT - col2 + - CAST( - 84 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
46
57
58

skipif mysql # not compatible
query I rowsort label-3102
SELECT DISTINCT - col2 + - CAST ( - 84 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
46
57
58

query I rowsort
SELECT + + ( col1 ) * col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - ( - cor0.col0 ) * col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3105
SELECT DISTINCT - + 37 * 32 DIV - col2 AS col0 FROM tab1 cor0
----
12
20
21

skipif mysql # not compatible
query I rowsort label-3105
SELECT DISTINCT - + 37 * 32 / - col2 AS col0 FROM tab1 cor0
----
12
20
21

query I rowsort
SELECT + col0 * 20 FROM tab0 cor0
----
1780
480
700

query I rowsort
SELECT ALL + 54 * col0 AS col0 FROM tab0 AS cor0
----
1296
1890
4806

query I rowsort
SELECT 87 * col1 FROM tab2 AS cor0
----
1479
2697
5133

query I rowsort
SELECT + 1 + + ( col2 ) * + ( col0 + - col1 ) AS col2 FROM tab2 AS cor0
----
-647
2357
495

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3110
SELECT CAST( NULL AS SIGNED ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3110
SELECT CAST ( NULL AS INTEGER ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 98 * col2 FROM tab0 AS cor0
----
3234
8036
98

query I rowsort
SELECT ALL + + 25 * col1 AS col2 FROM tab2 AS cor0
----
1475
425
775

query I rowsort
SELECT - ( - tab0.col0 ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT + col1 * ( 54 ) - + col0 FROM tab0
----
4620
4825
5203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 + - 73 col2 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT ALL - 57 + + col2 FROM tab2 AS cor0
----
-19
-30
-31

query I rowsort
SELECT col0 + - col0 * + col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT - col0 * - col1 + - ( - col2 * col0 ) AS col2 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT ALL + col0 * cor0.col0 - + col2 AS col1 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT cor0.col2 + + cor0.col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3121
SELECT ALL - + col1 + - col2 DIV col0 FROM tab2 AS cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-3121
SELECT ALL - + col1 + - col2 / col0 FROM tab2 AS cor0
----
-17
-34
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3122
SELECT ALL 29 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3122
SELECT ALL 29 / col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3123
SELECT DISTINCT + - col1 * cor0.col2 + - CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3123
SELECT DISTINCT + - col1 * cor0.col2 + - CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 + + col1 col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL - 13 + col1 FROM tab0 AS cor0
----
73
78
84

query I rowsort
SELECT DISTINCT - 13 + col1 AS col1 FROM tab0 cor0
----
73
78
84

query I rowsort
SELECT ALL - + col0 - + col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT - + cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - cor0.col0 + + col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - 16 - col0 * - col2 FROM tab2 AS cor0
----
173
2012
2986

query I rowsort
SELECT - 56 * + col1 AS col0 FROM tab2 AS cor0
----
-1736
-3304
-952

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 - + ( 44 * cor0.col0 ) AS col0 FROM tab0 cor0
----
-12015
-3120
-4935

onlyif mysql # use DIV operator for integer division
query I rowsort label-3134
SELECT ALL 51 DIV col1 AS col0 FROM tab1 AS cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-3134
SELECT ALL 51 / col1 AS col0 FROM tab1 AS cor0
----
1
3
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3135
SELECT DISTINCT col1 * - tab1.col2 + CAST( col1 AS SIGNED ) * col1 col0 FROM tab1
----
-1079
-470
-728

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3135
SELECT DISTINCT col1 * - tab1.col2 + CAST ( col1 AS INTEGER ) * col1 col0 FROM tab1
----
-1079
-470
-728

query I rowsort
SELECT DISTINCT + + ( 83 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
83

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

query I rowsort
SELECT DISTINCT + col2 + 64 FROM tab2 AS cor0
----
102
90
91

query I rowsort
SELECT + + 38 * - 11 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 21401dd4c45b4176a4e939af2dda5c12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3140
SELECT CAST( NULL AS SIGNED ) * - col0 * + tab2.col0 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3140
SELECT CAST ( NULL AS INTEGER ) * - col0 * + tab2.col0 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + ( + col2 ) - + col1 AS col1 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3142
SELECT DISTINCT - - col2 DIV col0 AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3142
SELECT DISTINCT - - col2 / col0 AS col0 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3143
SELECT ALL - col1 * - cor0.col1 - - 72 DIV - 66 AS col1 FROM tab2 AS cor0
----
288
3480
960

skipif mysql # not compatible
query I rowsort label-3143
SELECT ALL - col1 * - cor0.col1 - - 72 / - 66 AS col1 FROM tab2 AS cor0
----
288
3480
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 * col1 * - col2 + col2 * - ( col0 ) col2 FROM tab2
----
-22788
-27550
-41912

query I rowsort
SELECT - 29 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT DISTINCT + - col2 * col0 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT - col0 + - 89 * cor0.col0 + col1 AS col2 FROM tab0 cor0
----
-2074
-3053
-7919

onlyif mysql # use DIV operator for integer division
query I rowsort label-3148
SELECT DISTINCT + col2 DIV + col0 AS col2 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3148
SELECT DISTINCT + col2 / + col0 AS col2 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT + - col0 * cor0.col1 * + col0 + + col1 + col0 AS col0 FROM tab0 cor0
----
-118693
-49426
-720631

onlyif mysql # use DIV operator for integer division
query I rowsort label-3150
SELECT DISTINCT + + cor0.col2 DIV 32 AS col1 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3150
SELECT DISTINCT + + cor0.col2 / 32 AS col1 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT cor0.col1 - - 96 FROM tab1 AS cor0
----
106
109
122

query I rowsort
SELECT + col1 + col1 + col0 * - cor0.col0 FROM tab1 AS cor0
----
-4076
-6374
43

query I rowsort
SELECT DISTINCT + col2 * + col1 + 5 * + col2 AS col1 FROM tab2 AS cor0
----
1664
836
972

query I rowsort
SELECT col0 * cor0.col1 * ( - col2 ) FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT 54 * 53 FROM tab1 AS cor0
----
2862
2862
2862

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3156
SELECT ALL CAST( - 8 AS SIGNED ) * col0 FROM tab0 AS cor0
----
-192
-280
-712

skipif mysql # not compatible
query I rowsort label-3156
SELECT ALL CAST ( - 8 AS INTEGER ) * col0 FROM tab0 AS cor0
----
-192
-280
-712

query I rowsort
SELECT DISTINCT + col2 * ( cor0.col2 ) FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - cor1.col2 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT ALL col1 + ( tab0.col2 + tab0.col0 ) AS col0 FROM tab0
----
133
143
262

query I rowsort
SELECT DISTINCT col2 + + col1 * + col2 FROM tab2
----
1560
684
864

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 66d12da55ea14263893cfc3170a3c57e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + + col0 + col0 * col1 col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - cor0.col0 ) + + col1 col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3164
SELECT + cor0.col0 DIV - 64 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3164
SELECT + cor0.col0 / - 64 FROM tab1 AS cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 73 + col0 col0 FROM tab2 AS cor0
----
151
152
80

query I rowsort
SELECT 75 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab2 AS cor2
----
13122 values hashing to 9e151f7c7ef71e632fe53226985ff986

onlyif mysql # use DIV operator for integer division
query I rowsort label-3168
SELECT - cor0.col0 + + cor0.col1 DIV cor0.col0 FROM tab2 AS cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-3168
SELECT - cor0.col0 + + cor0.col1 / cor0.col0 FROM tab2 AS cor0
----
-3
-78
-79

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

query I rowsort
SELECT + + 23 FROM tab1 cor0
----
23
23
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 * + col0 + + col1 col2 FROM tab1 AS cor0
----
137
2378
2973

query I rowsort
SELECT - ( col2 ) * + col0 + + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-3173
SELECT - + col1 DIV - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3173
SELECT - + col1 / - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3174
SELECT DISTINCT + col0 + - col0 DIV col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3174
SELECT DISTINCT + col0 + - col0 / col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col1 * col2 + + 51 * - col1 FROM tab1 AS cor0
----
-1080
-1911
-2730

query I rowsort
SELECT - col2 * col1 + - col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT 1 AS col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 11 col1 FROM tab1
----
11

query I rowsort
SELECT ALL - 64 FROM tab0, tab2 AS cor0
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3180
SELECT - col1 * - CAST( NULL AS DECIMAL ) + - col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3180
SELECT - col1 * - CAST ( NULL AS REAL ) + - col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * + 37 FROM tab0 AS cor0
----
3182
3367
3589

query I rowsort
SELECT - 11 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

query I rowsort
SELECT - cor0.col2 + + 2 * cor0.col0 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cc2a45fad147b17ff4185e7c1ec8fb95

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3185
SELECT + col0 + + 83 * - col0 + + tab2.col2 * CAST( 36 AS SIGNED ) FROM tab2
----
-5110
-5460
398

skipif mysql # not compatible
query I rowsort label-3185
SELECT + col0 + + 83 * - col0 + + tab2.col2 * CAST ( 36 AS INTEGER ) FROM tab2
----
-5110
-5460
398

onlyif mysql # use DIV operator for integer division
query I rowsort label-3186
SELECT + col1 DIV 13 AS col0 FROM tab2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-3186
SELECT + col1 / 13 AS col0 FROM tab2
----
1
2
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3187
SELECT col2 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3187
SELECT col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 + 96 - + col2 AS col1 FROM tab2 AS cor0
----
11
38
41

query I rowsort
SELECT + col2 * + col0 * - col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL col0 + + col1 * col2 AS col0 FROM tab2
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 + - tab0.col2 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to e99aee51f654d7466542379b3eaf4e25

query I rowsort
SELECT ALL - tab0.col0 + - tab0.col1 * - col0 AS col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT ALL - col0 * + 7 FROM tab2 AS cor0
----
-49
-546
-553

query I rowsort
SELECT ALL - + col2 * ( - ( + col1 ) + + col0 ) * + 3 FROM tab0 AS cor0
----
186
492
6138

query I rowsort
SELECT + col1 * 93 FROM tab0
----
7998
8463
9021

onlyif mysql # use DIV operator for integer division
query I rowsort label-3196
SELECT - col1 DIV - 56 AS col0 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3196
SELECT - col1 / - 56 AS col0 FROM tab2
----
0
0
1

query I rowsort
SELECT DISTINCT col2 + col1 * + col2 + 93 FROM tab1 AS cor0
----
1437
1551
720

query I rowsort
SELECT col1 * + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-3199
SELECT col1 DIV col1 col1 FROM tab2 cor0
----
1
1
1

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

query I rowsort
SELECT DISTINCT 53 * col2 AS col1 FROM tab0 cor0
----
1749
4346
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-3201
SELECT - - ( + col0 ) DIV - cor0.col0 AS col2 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3201
SELECT - - ( + col0 ) / - cor0.col0 AS col2 FROM tab2 cor0
----
-1
-1
-1

query I rowsort
SELECT + ( col1 ) + - 28 AS col1 FROM tab1 AS cor0
----
-15
-18
-2

query I rowsort
SELECT - 79 + - cor0.col2 * ( col1 ) * - col2 AS col1 FROM tab1 AS cor0
----
119729
32411
75737

query I rowsort
SELECT ALL + ( + col2 ) * - tab0.col0 AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col0 + col1 * - ( - col0 ) FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT - 45 AS col0 FROM tab2 AS cor0
----
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 97 * + col2 + - col1 + 89 col0 FROM tab0 AS cor0
----
-105
-3198
-7956

query I rowsort
SELECT ALL - - ( + col2 ) * - col2 + 83 * + cor0.col1 * + ( + col1 ) AS col2 FROM tab1 AS cor0
----
4811
5051
53192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3209
SELECT ALL CAST( NULL AS SIGNED ) * col1 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3209
SELECT ALL CAST ( NULL AS INTEGER ) * col1 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * 77 * + cor0.col0 + col2 AS col2 FROM tab1 AS cor0
----
-49223
-5952
-79984

query I rowsort
SELECT DISTINCT 19 * + cor0.col0 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT + tab2.col0 * - col2 AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 74 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
-74

query I rowsort
SELECT + col1 * - 7 + col0 AS col0 FROM tab0
----
-548
-578
-644

query I rowsort
SELECT + col0 + col0 * col2 FROM tab1
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-3216
SELECT DISTINCT 11 DIV 22 AS col0 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3216
SELECT DISTINCT 11 / 22 AS col0 FROM tab1
----
0

query I rowsort
SELECT - col2 + - 51 * col2 FROM tab0 AS cor0
----
-1716
-4264
-52

query I rowsort
SELECT ( 46 ) * col1 FROM tab0 AS cor0
----
3956
4186
4462

query I rowsort
SELECT + cor0.col2 * - cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 86c8e75d83d283b29460c020ab5988af

query I rowsort
SELECT DISTINCT - 66 + col0 AS col0 FROM tab1
----
-2
-63
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3221
SELECT CAST( + col2 AS SIGNED ) + + col1 FROM tab0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-3221
SELECT CAST ( + col2 AS INTEGER ) + + col1 FROM tab0
----
119
173
98

query I rowsort
SELECT - 0 - + 77 FROM tab2
----
-77
-77
-77

query I rowsort
SELECT ALL col2 + - 67 * col0 AS col2 FROM tab1
----
-147
-4231
-5264

query I rowsort
SELECT DISTINCT + tab1.col0 * tab1.col1 + + col0 * col1 FROM tab1
----
1280
156
2080

query I rowsort
SELECT ALL + col1 + - cor0.col1 * - 44 FROM tab1 AS cor0
----
1170
450
585

query I rowsort
SELECT - 32 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-320
-416
-832

query I rowsort
SELECT + col1 * + col0 * col2 + col0 AS col0 FROM tab0 AS cor0
----
3430
664207
68136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3228
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-3228
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3229
SELECT col2 DIV + col0 + - col0 FROM tab2
----
-4
-78
-79

skipif mysql # not compatible
query I rowsort label-3229
SELECT col2 / + col0 + - col0 FROM tab2
----
-4
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3230
SELECT 89 DIV - col1 + + CAST( - col0 + col2 AS SIGNED ) FROM tab0 AS cor0
----
-34
-7
8

skipif mysql # not compatible
query I rowsort label-3230
SELECT 89 / - col1 + + CAST ( - col0 + col2 AS INTEGER ) FROM tab0 AS cor0
----
-34
-7
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3231
SELECT ALL - 40 + col1 * - CAST( NULL AS SIGNED ) * + ( col1 ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3231
SELECT ALL - 40 + col1 * - CAST ( NULL AS INTEGER ) * + ( col1 ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 56 FROM tab0 AS cor0
----
56

query I rowsort
SELECT DISTINCT + - 91 + - col1 * ( - 79 ) AS col1 FROM tab2 AS cor0
----
1252
2358
4570

query I rowsort
SELECT ALL - col2 * + col0 * - col1 + - col0 - col0 * col0 FROM tab1 AS cor0
----
32320
4200
93360

query I rowsort
SELECT ALL col1 + + 3 + - 88 AS col0 FROM tab1
----
-59
-72
-75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3236
SELECT ALL col0 / + CAST( NULL AS SIGNED ) + 83 col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3236
SELECT ALL col0 / + CAST ( NULL AS INTEGER ) + 83 col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + - ( col0 ) AS col1 FROM tab1
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3238
SELECT ALL + cor0.col1 DIV - 10 FROM tab1 AS cor0
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-3238
SELECT ALL + cor0.col1 / - 10 FROM tab1 AS cor0
----
-1
-1
-2

query I rowsort
SELECT DISTINCT col0 * 11 + col1 FROM tab1 cor0
----
59
714
893

onlyif mysql # use DIV operator for integer division
query I rowsort label-3240
SELECT - col1 DIV - ( 69 * + col1 ) col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3240
SELECT - col1 / - ( 69 * + col1 ) col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col0 + + 71 AS col2 FROM tab1 AS cor0
----
135
151
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-3242
SELECT DISTINCT + - col1 + 85 DIV + col1 FROM tab2 AS cor0
----
-12
-29
-58

skipif mysql # not compatible
query I rowsort label-3242
SELECT DISTINCT + - col1 + 85 / + col1 FROM tab2 AS cor0
----
-12
-29
-58

query I rowsort
SELECT ALL - 5 + 34 + - col0 AS col0 FROM tab0 cor0
----
-6
-60
5

query I rowsort
SELECT DISTINCT + 40 - - col1 AS col1 FROM tab1 AS cor0
----
50
53
66

query I rowsort
SELECT ALL - col2 * - 5 + col0 * + col0 AS col0 FROM tab2 AS cor0
----
184
6214
6431

query I rowsort
SELECT ALL col2 * 68 AS col2 FROM tab2 AS cor0
----
1768
1836
2584

query I rowsort
SELECT DISTINCT - 45 + - 71 AS col1 FROM tab0 AS cor0
----
-116

query I rowsort
SELECT + - col0 * cor0.col2 + col1 + - 65 AS col1 FROM tab2 AS cor0
----
-2034
-223
-3050

query I rowsort
SELECT ALL - col2 * - ( col2 ) AS col0 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL - 65 * col2 * col0 FROM tab2 AS cor0
----
-12285
-131820
-195130

query I rowsort
SELECT ALL - ( + 29 ) + col2 FROM tab2 AS cor0
----
-2
-3
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3252
SELECT ALL + cor0.col2 DIV - col2 - - col1 * col0 AS col1 FROM tab1 AS cor0
----
1039
639
77

skipif mysql # not compatible
query I rowsort label-3252
SELECT ALL + cor0.col2 / - col2 - - col1 * col0 AS col1 FROM tab1 AS cor0
----
1039
639
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - 23 col0 FROM tab1 AS cor0
----
31
34
73

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

query I rowsort
SELECT + - 86 - - cor0.col1 FROM tab0 AS cor0
----
0
11
5

query I rowsort
SELECT ALL ( + 50 ) * + col0 + + col1 * 78 + col1 * 51 AS col0 FROM tab2 AS cor0
----
11511
4349
6143

query I rowsort
SELECT + col0 + + col1 * - col1 FROM tab1 AS cor0
----
-36
-673
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 38 col1 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

query I rowsort
SELECT DISTINCT + + cor0.col1 + - ( col0 ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - + 87 FROM tab2 AS cor0
----
-87

query I rowsort
SELECT col2 + 89 * - col2 + - cor0.col2 FROM tab2 AS cor0
----
-2314
-2403
-3382

query I rowsort
SELECT + - col1 * col0 + col0 * + col1 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3263
SELECT + col0 * - CAST( NULL AS SIGNED ) + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3263
SELECT + col0 * - CAST ( NULL AS INTEGER ) + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + - 83 FROM tab2 AS cor0
----
-4
-5
-76

query I rowsort
SELECT ALL + 28 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT + col2 * ( + col0 ) + - col1 AS col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT col2 * col1 + - col1 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - col2 * 88 FROM tab2 AS cor0
----
-2288
-2376
-3344

onlyif mysql # use DIV operator for integer division
query I rowsort label-3270
SELECT - - 54 DIV - cor0.col0 + - col2 * + ( col0 ) AS col2 FROM tab1 AS cor0
----
-180
-3648
-7680

skipif mysql # not compatible
query I rowsort label-3270
SELECT - - 54 / - cor0.col0 + - col2 * + ( col0 ) AS col2 FROM tab1 AS cor0
----
-180
-3648
-7680

query I rowsort
SELECT + tab1.col2 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - 43 FROM tab0, tab2 cor0
----
-43

onlyif mysql # use DIV operator for integer division
query I rowsort label-3273
SELECT ALL tab1.col1 DIV + 59 col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3273
SELECT ALL tab1.col1 / + 59 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - col1 * tab2.col1 - + col0 AS col1 FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT + ( + col0 ) + 60 - 73 AS col2 FROM tab2 cor0
----
-6
65
66

query I rowsort
SELECT + - 81 * - col2 - col1 * col2 FROM tab0 AS cor0
----
-16
-165
-820

onlyif mysql # use DIV operator for integer division
query I rowsort label-3277
SELECT + - col0 DIV cor0.col0 - cor0.col1 col1 FROM tab2 cor0
----
-18
-32
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3277
SELECT + - col0 / cor0.col0 - cor0.col1 col1 FROM tab2 cor0
----
-18
-32
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col2 ) * - col1 col1 FROM tab0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 21 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 75 col0 FROM tab0 AS cor0
----
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3281
SELECT ALL + + col1 * cor0.col0 + CAST( + col1 AS SIGNED ) * col1 * col1 AS col2 FROM tab1 AS cor0
----
1640
17654
3237

skipif mysql # not compatible
query I rowsort label-3281
SELECT ALL + + col1 * cor0.col0 + CAST ( + col1 AS INTEGER ) * col1 * col1 AS col2 FROM tab1 AS cor0
----
1640
17654
3237

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

query I rowsort
SELECT + + col1 * col2 + 92 * + col0 - + cor0.col0 FROM tab0 AS cor0
----
15561
3282
5022

query I rowsort
SELECT ALL + 50 * col2 + - ( + 25 ) * col1 AS col1 FROM tab0 AS cor0
----
-2375
-500
1825

onlyif mysql # use DIV operator for integer division
query I rowsort label-3285
SELECT DISTINCT + 31 * col1 + 27 - col0 DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
1857
555
989

skipif mysql # not compatible
query I rowsort label-3285
SELECT DISTINCT + 31 * col1 + 27 - col0 / - cor0.col0 AS col2 FROM tab2 AS cor0
----
1857
555
989

query I rowsort
SELECT + + col1 * - col0 - col0 * col0 FROM tab0 AS cor0
----
-16020
-2640
-4620

query I rowsort
SELECT ALL - - 89 + col0 AS col1 FROM tab1 AS cor0
----
153
169
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 11 col0 FROM tab0 cor0
----
11
11
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3289
SELECT ( + col2 ) * - CAST( + 55 * col0 AS SIGNED ) - 47 * col2 AS col2 FROM tab1 AS cor0
----
-11448
-203319
-426912

skipif mysql # not compatible
query I rowsort label-3289
SELECT ( + col2 ) * - CAST ( + 55 * col0 AS INTEGER ) - 47 * col2 AS col2 FROM tab1 AS cor0
----
-11448
-203319
-426912

query I rowsort
SELECT DISTINCT + - col1 * - 54 FROM tab2 AS cor0
----
1674
3186
918

query I rowsort
SELECT ALL + - cor0.col0 * - col1 + - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL - 46 + + col1 - col0 FROM tab1
----
-100
-113
-23

query I rowsort
SELECT + col1 - - col2 AS col1 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 6 col2 FROM tab1, tab0, tab2 AS cor0
----
6

query I rowsort
SELECT 40 * + tab0.col2 AS col2 FROM tab0
----
1320
3280
40

query I rowsort
SELECT ( + cor0.col1 ) AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3297
SELECT - col2 * CAST( col2 AS SIGNED ) - - col1 FROM tab1 cor0
----
-2890
-3239
-9203

skipif mysql # not compatible
query I rowsort label-3297
SELECT - col2 * CAST ( col2 AS INTEGER ) - - col1 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT col0 * + 2 AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - + col1 + - 4 FROM tab1 AS cor0
----
-14
-17
-30

query I rowsort
SELECT - col1 * - col2 + 9 FROM tab2 AS cor0
----
1543
655
846

query I rowsort
SELECT + col1 - - ( + 43 ) AS col1 FROM tab1 cor0
----
53
56
69

query I rowsort
SELECT - col2 + - ( col2 ) * ( col1 ) AS col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + + ( 96 ) + col1 * col1 AS col0 FROM tab1 cor0
----
196
265
772

query I rowsort
SELECT - ( + cor0.col1 ) * - ( cor0.col2 + + col2 ) FROM tab0 AS cor0
----
14924
194
5676

onlyif mysql # use DIV operator for integer division
query I rowsort label-3305
SELECT DISTINCT + col0 DIV - tab0.col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-3305
SELECT DISTINCT + col0 / - tab0.col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT - ( + cor0.col2 ) + ( + col1 ) * - col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL tab0.col2 + + col0 + - tab0.col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3308
SELECT DISTINCT + col1 DIV - col0 + + 42 FROM tab1 AS cor0
----
34
42

skipif mysql # not compatible
query I rowsort label-3308
SELECT DISTINCT + col1 / - col0 + + 42 FROM tab1 AS cor0
----
34
42

query I rowsort
SELECT + col2 * - 5 FROM tab0 AS cor0
----
-165
-410
-5

query I rowsort
SELECT DISTINCT + cor0.col1 + - col0 * - col2 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT + + col1 * + 8 * - col2 FROM tab1 AS cor0
----
-11232
-4560
-9984

query I rowsort
SELECT + - col1 + - col2 AS col0 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT - cor0.col2 * + col1 + - col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT - + cor0.col0 + col2 * col2 + - col2 AS col0 FROM tab1 AS cor0
----
2859
3128
9040

query I rowsort
SELECT ALL - 35 * - col2 FROM tab0 AS cor0
----
1155
2870
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3316
SELECT DISTINCT - - 1 * - col1 DIV + col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3316
SELECT DISTINCT - - 1 * - col1 / + col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - - 88 * 88 FROM tab2 AS cor0
----
7744
7744
7744

query I rowsort
SELECT ALL - + col2 * - col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT col2 + 68 FROM tab0 AS cor0
----
101
150
69

query I rowsort
SELECT DISTINCT col0 + 61 AS col1 FROM tab0
----
150
85
96

query I rowsort
SELECT ALL - 77 AS col1 FROM tab1 AS cor0
----
-77
-77
-77

query I rowsort
SELECT + + col0 * - 63 AS col2 FROM tab2 AS cor0
----
-441
-4914
-4977

query I rowsort
SELECT - - ( - col1 ) + + 28 AS col0 FROM tab1 AS cor0
----
15
18
2

query I rowsort
SELECT - + col2 + col0 * + col2 + - col1 * - col0 AS col0 FROM tab0 AS cor0
----
15315
2823
3429

query I rowsort
SELECT DISTINCT + - col1 * col2 + cor0.col1 * col0 AS col0 FROM tab0 AS cor0
----
-774
3298
637

query I rowsort
SELECT ALL col1 * - col0 + 30 FROM tab1 AS cor0
----
-1010
-48
-610

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * col2 + 33 + col1 col2 FROM tab0 cor0
----
-2719
-7338
33

query I rowsort
SELECT DISTINCT col1 + - col2 + cor0.col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + 98 + - col0 * - 52 * col0 AS col1 FROM tab0 AS cor0
----
30050
411990
63798

query I rowsort
SELECT - ( col0 * col1 ) AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL - + col0 + + col1 * col0 AS col0 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-3332
SELECT + col0 DIV col2 + col0 * + col1 AS col2 FROM tab0 cor0
----
2064
3430
8100

skipif mysql # not compatible
query I rowsort label-3332
SELECT + col0 / col2 + col0 * + col1 AS col2 FROM tab0 cor0
----
2064
3430
8100

query I rowsort
SELECT ALL - + col0 * 97 FROM tab0 AS cor0
----
-2328
-3395
-8633

query I rowsort
SELECT DISTINCT + col0 + - 12 * ( col2 ) AS col1 FROM tab2 AS cor0
----
-234
-317
-377

query I rowsort
SELECT + cor0.col1 + 27 AS col0 FROM tab1 AS cor0
----
37
40
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-3336
SELECT ALL + col2 * col1 DIV - 18 AS col2 FROM tab1 AS cor0
----
-31
-69
-78

skipif mysql # not compatible
query I rowsort label-3336
SELECT ALL + col2 * col1 / - 18 AS col2 FROM tab1 AS cor0
----
-31
-69
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col2 + col2 * col1 col1 FROM tab0 AS cor0
----
164
2046
62

query I rowsort
SELECT ALL col0 - + col1 * col1 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT DISTINCT - col0 + col1 * col0 AS col1 FROM tab1
----
576
75
960

query I rowsort
SELECT 64 * col2 AS col1 FROM tab1
----
3456
3648
6144

query I rowsort
SELECT cor0.col2 + + 45 AS col2 FROM tab2 cor0
----
71
72
83

query I rowsort
SELECT + col1 + ( + col2 ) AS col1 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * col1 col2 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3344
SELECT - col1 DIV - col0 + 32 col2 FROM tab0 AS cor0
----
33
34
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3344
SELECT - col1 / - col0 + 32 col2 FROM tab0 AS cor0
----
33
34
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3345
SELECT col0 + - col2 DIV cor0.col1 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3345
SELECT col0 + - col2 / cor0.col1 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + cor0.col0 * 71 + 98 FROM tab2 AS cor0
----
5636
5707
595

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3347
SELECT + 69 * - col2 + - CAST( + col1 AS SIGNED ) AS col2 FROM tab2
----
-1853
-1894
-2639

skipif mysql # not compatible
query I rowsort label-3347
SELECT + 69 * - col2 + - CAST ( + col1 AS INTEGER ) AS col2 FROM tab2
----
-1853
-1894
-2639

query I rowsort
SELECT ALL 5 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT DISTINCT + col0 + ( - col2 * col1 ) FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT tab2.col2 * 34 * - cor0.col0 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to e56d4bc45e56494deb3774da540b9a8b

query I rowsort
SELECT + col0 * 32 + col0 * + col0 + col0 FROM tab0
----
10858
1368
2380

query I rowsort
SELECT + tab0.col1 * - col2 + col1 * col1 FROM tab0
----
4558
819
9312

query I rowsort
SELECT + 77 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

onlyif mysql # use DIV operator for integer division
query I rowsort label-3354
SELECT + col1 * col0 DIV col1 - col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3354
SELECT + col1 * col0 / col1 - col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + col2 + col1 + 78 FROM tab0
----
176
197
251

query I rowsort
SELECT ALL - col2 + + 21 FROM tab2 AS cor0
----
-17
-5
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3357
SELECT DISTINCT col0 + ( - col0 ) DIV tab0.col0 AS col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-3357
SELECT DISTINCT col0 + ( - col0 ) / tab0.col0 AS col0 FROM tab0
----
23
34
88

query I rowsort
SELECT ( - col1 ) + col0 AS col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT + col1 * - col0 + - ( col1 ) FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT DISTINCT + + cor0.col0 - cor0.col0 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 + - ( col2 * col1 ) + + ( col0 ) FROM tab2 AS cor0
----
-1213
-1667
-2990

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab2 cor0, tab1 AS cor1
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT DISTINCT - ( 95 + col2 ) * ( 69 ) AS col2 FROM tab1
----
-10281
-10488
-13179

query I rowsort
SELECT col0 + - col2 * + col1 AS col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL + cor0.col0 * + col2 + 51 * cor0.col2 - - col2 AS col0 FROM tab1 AS cor0
----
12672
2970
6612

query I rowsort
SELECT + - col1 * col0 + - col0 AS col2 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT - col0 + - col0 AS col1 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT ALL - col0 * col2 * + col2 + + 6 + col1 * col2 AS col2 FROM tab2 AS cor0
----
-113424
-4260
-51188

query I rowsort
SELECT ALL + col0 * - col1 * ( col2 ) AS col0 FROM tab1 cor0
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-3370
SELECT ALL - - col2 * cor0.col0 + + col1 DIV 10 + + col0 FROM tab0 AS cor0
----
7396
79
824

skipif mysql # not compatible
query I rowsort label-3370
SELECT ALL - - col2 * cor0.col0 + + col1 / 10 + + col0 FROM tab0 AS cor0
----
7396
79
824

onlyif mysql # use DIV operator for integer division
query I rowsort label-3371
SELECT ALL - col1 DIV - col0 - - cor0.col0 * - col0 * - col0 FROM tab2 AS cor0
----
347
474552
493039

skipif mysql # not compatible
query I rowsort label-3371
SELECT ALL - col1 / - col0 - - cor0.col0 * - col0 * - col0 FROM tab2 AS cor0
----
347
474552
493039

query I rowsort
SELECT DISTINCT - - 86 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-3
51
62

query I rowsort
SELECT + cor0.col0 * + col2 + + col2 FROM tab1 AS cor0
----
216
3705
7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col1 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL 79 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
2607
6478
79

query I rowsort
SELECT ALL - 42 FROM tab1 cor0
----
-42
-42
-42

query I rowsort
SELECT - col0 - + 94 FROM tab1 AS cor0
----
-158
-174
-97

query I rowsort
SELECT + col1 + + col0 + cor0.col2 * col1 FROM tab1 cor0
----
1341
1433
644

query I rowsort
SELECT ( - col0 ) * col2 + cor0.col0 FROM tab1 cor0
----
-159
-3584
-7600

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

query I rowsort
SELECT + - cor0.col2 + - col0 AS col0 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3382
SELECT + col2 DIV col1 + + 51 + col0 * cor0.col0 FROM tab0 AS cor0
----
1276
627
7972

skipif mysql # not compatible
query I rowsort label-3382
SELECT + col2 / col1 + + 51 + col0 * cor0.col0 FROM tab0 AS cor0
----
1276
627
7972

query I rowsort
SELECT 2 + col2 * + cor0.col1 FROM tab1 AS cor0
----
1250
1406
572

query I rowsort
SELECT ( - col1 ) + col0 AS col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT col1 + col0 * + col2 * col1 FROM tab1
----
36490
4238
99853

onlyif mysql # use DIV operator for integer division
query I rowsort label-3386
SELECT - 9 DIV - col0 AS col0 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3386
SELECT - 9 / - col0 AS col0 FROM tab2
----
0
0
1

query I rowsort
SELECT ALL col2 + + col0 * - col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT ALL tab1.col0 + col2 * - col1 * ( ( col1 ) ) + col2 AS col2 FROM tab1
----
-16048
-36447
-5579

query I rowsort
SELECT - col2 + + ( cor0.col0 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - cor0.col2 * + 4 FROM tab0 AS cor0
----
-132
-328
-4

query I rowsort
SELECT col0 + + 30 AS col1 FROM tab0 AS cor0
----
119
54
65

query I rowsort
SELECT - col1 + + 72 + col0 FROM tab0 AS cor0
----
10
10
70

query I rowsort
SELECT DISTINCT col0 * - 21 + col0 - col2 AS col2 FROM tab1
----
-114
-1337
-1696

query I rowsort
SELECT ALL + + col1 + + col0 * 4 FROM tab1 AS cor0
----
266
333
38

query I rowsort
SELECT col0 + - 54 FROM tab0
----
-19
-30
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 52 * - col2 * - col1 col0 FROM tab1 AS cor0
----
-29640
-64896
-73008

onlyif mysql # use DIV operator for integer division
query I rowsort label-3397
SELECT DISTINCT + col1 + ( col2 ) DIV + cor0.col0 AS col2 FROM tab2 AS cor0
----
17
34
59

skipif mysql # not compatible
query I rowsort label-3397
SELECT DISTINCT + col1 + ( col2 ) / + cor0.col0 AS col2 FROM tab2 AS cor0
----
17
34
59

query I rowsort
SELECT ALL - 67 + col2 FROM tab2 AS cor0
----
-29
-40
-41

query I rowsort
SELECT - + 17 * + col1 AS col0 FROM tab1 AS cor0
----
-170
-221
-442

query I rowsort
SELECT DISTINCT + 14 FROM tab2, tab2 AS cor0
----
14

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + col2 AS REAL ) AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - + 11 AS col1 FROM tab2 AS cor0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT tab0.col2 * + ( col2 ) AS col1 FROM tab0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3404
SELECT ALL CAST( NULL AS SIGNED ) * tab0.col1 + tab0.col0 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3404
SELECT ALL CAST ( NULL AS INTEGER ) * tab0.col1 + tab0.col0 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT tab1.col1 + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 1b6920525e1810523fdee3171c929510

query I rowsort
SELECT ALL col1 * + 95 FROM tab0
----
8170
8645
9215

query I rowsort
SELECT + ( 33 ) FROM tab2 AS cor0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 1 + + col1 col0 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT 39 * col1 FROM tab0 cor0
----
3354
3549
3783

query I rowsort
SELECT + - 15 * - cor1.col1 + cor1.col0 + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to e67b9587fce3e2018afb27f6ef0c2259

query I rowsort
SELECT - + 58 + col2 FROM tab1 AS cor0
----
-1
-4
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3412
SELECT - + cor0.col1 + - col2 + - ( col0 ) * col0 DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
-134
-163
-65

skipif mysql # not compatible
query I rowsort label-3412
SELECT - + cor0.col1 + - col2 + - ( col0 ) * col0 / cor0.col0 AS col2 FROM tab2 AS cor0
----
-134
-163
-65

query I rowsort
SELECT - - col1 * + col2 + - 55 FROM tab0 AS cor0
----
2783
42
7407

query I rowsort
SELECT ( 74 ) AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT + - 3 * - col0 FROM tab0 AS cor0
----
105
267
72

query I rowsort
SELECT ALL - + 57 AS col2 FROM tab2 AS cor0
----
-57
-57
-57

query I rowsort
SELECT - col0 + + ( cor0.col0 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + + col0 * ( col2 ) FROM tab1 cor0
----
216
3705
7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - 50 * - col1 * - col2 col0 FROM tab0 AS cor0
----
-141867
-373018
-4849

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col1 + + col2 col0 FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-3421
SELECT DISTINCT - col0 DIV - 91 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3421
SELECT DISTINCT - col0 / - 91 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - + cor0.col0 + cor0.col1 FROM tab0 cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3423
SELECT DISTINCT + col2 DIV 72 + col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-3423
SELECT DISTINCT + col2 / 72 + col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3424
SELECT - cor0.col1 + ( + cor0.col0 + + col0 ) DIV ( + col1 ) FROM tab0 AS cor0
----
-86
-90
-97

skipif mysql # not compatible
query I rowsort label-3424
SELECT - cor0.col1 + ( + cor0.col0 + + col0 ) / ( + col1 ) FROM tab0 AS cor0
----
-86
-90
-97

query I rowsort
SELECT ALL - 99 * + col0 + tab0.col0 FROM tab0
----
-2352
-3430
-8722

query I rowsort
SELECT ALL - 97 AS col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 12bd12d33f03250bee508c5641e140d5

query I rowsort
SELECT ALL col2 + - col2 + + tab0.col1 * col2 * + col0 AS col0 FROM tab0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-3428
SELECT + col2 DIV + 98 + + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3428
SELECT + col2 / + 98 + + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col1 * 97 + 86 AS col0 FROM tab1 AS cor0
----
1056
1347
2608

query I rowsort
SELECT DISTINCT - - col2 * - 62 AS col1 FROM tab0 AS cor0
----
-2046
-5084
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col2 col1 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3432
SELECT ALL - col2 * col0 DIV 95 AS col0 FROM tab0 AS cor0
----
-76
-8
0

skipif mysql # not compatible
query I rowsort label-3432
SELECT ALL - col2 * col0 / 95 AS col0 FROM tab0 AS cor0
----
-76
-8
0

query I rowsort
SELECT DISTINCT - col0 - - col0 * 96 FROM tab1 AS cor0
----
285
6080
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 9 + 74 * + col2 col2 FROM tab0 AS cor0
----
2145
5330
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 * col1 + - col2 col2 FROM tab1 cor0
----
-1136
-132
-697

onlyif mysql # use DIV operator for integer division
query I rowsort label-3436
SELECT DISTINCT - - col2 DIV + cor0.col0 AS col2 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3436
SELECT DISTINCT - - col2 / + cor0.col0 AS col2 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL - + col1 + col2 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL + col0 * 59 + col2 FROM tab2 AS cor0
----
440
4628
4699

query I rowsort
SELECT ALL col0 + 97 * - 21 * + col1 AS col0 FROM tab0 AS cor0
----
-175158
-185278
-197554

query I rowsort
SELECT - + ( + 93 ) * - col1 AS col1 FROM tab2 AS cor0
----
1581
2883
5487

query I rowsort
SELECT col1 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT - ( col0 ) * col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 13 + - 7 * col2 AS col0 FROM tab1 AS cor0
----
-365
-386
-659

query I rowsort
SELECT DISTINCT - col1 * + col2 + + col0 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT - + col0 + cor0.col2 AS col0 FROM tab0 cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3446
SELECT + + ( + col2 ) DIV + ( - col1 ) + + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3446
SELECT + + ( + col2 ) / + ( - col1 ) + + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - - cor0.col2 + - col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - - col2 * - col1 + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3449
SELECT ALL - col1 * col1 + ( - ( - cor0.col0 ) * CAST( NULL AS SIGNED ) ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3449
SELECT ALL - col1 * col1 + ( - ( - cor0.col0 ) * CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3450
SELECT + col0 * - col0 + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
-1128
-490
-7830

skipif mysql # not compatible
query I rowsort label-3450
SELECT + col0 * - col0 + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + 39 + col1 AS col0 FROM tab0 AS cor0
----
125
130
136

query I rowsort
SELECT ALL + 40 - cor0.col2 AS col2 FROM tab0 AS cor0
----
-42
39
7

query I rowsort
SELECT DISTINCT + 4 * - col0 FROM tab2 AS cor0
----
-28
-312
-316

query I rowsort
SELECT DISTINCT - 57 AS col0 FROM tab0
----
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3455
SELECT DISTINCT - - ( col1 ) + ( col1 ) DIV col1 + col1 FROM tab2 cor0
----
119
35
63

skipif mysql # not compatible
query I rowsort label-3455
SELECT DISTINCT - - ( col1 ) + ( col1 ) / col1 + col1 FROM tab2 cor0
----
119
35
63

query I rowsort
SELECT ALL + + col2 * col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ( - col0 ) * 24 AS col1 FROM tab2 AS cor0
----
-168
-1872
-1896

query I rowsort
SELECT DISTINCT col0 + col1 * - 13 AS col2 FROM tab1 AS cor0
----
-335
-66
-89

query I rowsort
SELECT DISTINCT - - 35 FROM tab0 AS cor0
----
35

query I rowsort
SELECT DISTINCT col0 * + col1 AS col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - - cor0.col2 * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + col1 * ( + ( col2 ) ) + - 32 FROM tab2 AS cor0
----
1502
614
805

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - + 78 col1 FROM tab2 AS cor0
----
-19
-47
-61

query I rowsort
SELECT DISTINCT - col2 * - col1 + - col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL - - col2 * + col1 + + col0 * cor0.col0 FROM tab2 AS cor0
----
6887
7618
886

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 * - col2 + - cor0.col1 col2 FROM tab0 AS cor0
----
-117
-1731
-746

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3468
SELECT ALL + + CAST( col2 AS SIGNED ) + col0 FROM tab2 cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-3468
SELECT ALL + + CAST ( col2 AS INTEGER ) + col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL 12 * + col0 FROM tab0 AS cor0
----
1068
288
420

query I rowsort
SELECT - - 19 FROM tab1 cor0
----
19
19
19

query I rowsort
SELECT DISTINCT col2 * - ( ( + tab2.col0 ) ) * ( col2 ) + tab2.col2 FROM tab2
----
-114038
-5076
-52702

query I rowsort
SELECT ALL col1 + + 99 FROM tab1
----
109
112
125

query I rowsort
SELECT + col0 * - col0 + + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-1010
-6530
-9565

query I rowsort
SELECT DISTINCT + + cor0.col1 * + 99 FROM tab1 AS cor0
----
1287
2574
990

query I rowsort
SELECT - 73 + col2 * + tab2.col1 FROM tab2
----
1461
573
764

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) + + col0 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT + cor0.col1 * - col2 + + col0 + col2 * - col1 FROM tab2 AS cor0
----
-1213
-1667
-2990

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-17
-31
-59

query I rowsort
SELECT col1 + ( col2 ) AS col0 FROM tab0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3480
SELECT - tab0.col0 + CAST( col1 AS SIGNED ) FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-3480
SELECT - tab0.col0 + CAST ( col1 AS INTEGER ) FROM tab0
----
2
62
62

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 cor1, tab2 cor2
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

query I rowsort
SELECT + + col1 * col0 * col2 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT - cor0.col2 + + 0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - + 15 * col1 * - col2 + - ( 57 ) FROM tab1 AS cor0
----
18663
21003
8493

query I rowsort
SELECT - col2 * 55 FROM tab1
----
-2970
-3135
-5280

query I rowsort
SELECT + col2 * + 64 AS col2 FROM tab2
----
1664
1728
2432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3487
SELECT - - CAST( NULL AS DECIMAL ) * 22 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3487
SELECT - - CAST ( NULL AS REAL ) * 22 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 35 * + col1 FROM tab2
----
1085
2065
595

query I rowsort
SELECT ALL - col1 * col1 * - col1 FROM tab2 cor0
----
205379
29791
4913

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 * - col2 FROM tab0 cor0
----
26136
35
598436

query I rowsort
SELECT - + col2 * + cor0.col2 + cor0.col2 AS col0 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT - + cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL col0 + + col2 * + 36 AS col2 FROM tab0 AS cor0
----
1212
3041
71

query I rowsort
SELECT col2 + + col1 * - 52 AS col2 FROM tab0
----
-4439
-4650
-5043

query I rowsort
SELECT - col2 + - 1 * - col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - col2 * - col1 + + ( col2 ) FROM tab1
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - col2 col0 FROM tab2 cor0
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3498
SELECT cor0.col1 * CAST( NULL AS SIGNED ) * + col2 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3498
SELECT cor0.col1 * CAST ( NULL AS INTEGER ) * + col2 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col0 * + 15 * 88 AS col1 FROM tab2 AS cor0
----
-102960
-104280
-9240

query I rowsort
SELECT + col0 * 4 AS col0 FROM tab1 AS cor0
----
12
256
320

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

query I rowsort
SELECT DISTINCT - col0 + col1 * col1 AS col2 FROM tab2 AS cor0
----
210
3403
954

onlyif mysql # use DIV operator for integer division
query I rowsort label-3503
SELECT DISTINCT + - cor0.col1 DIV - 82 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3503
SELECT DISTINCT + - cor0.col1 / - 82 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - - col2 * 70 FROM tab2 AS cor0
----
1820
1890
2660

query I rowsort
SELECT ALL - 89 + + col2 FROM tab0 AS cor0
----
-56
-7
-88

query I rowsort
SELECT DISTINCT - + col0 * - col2 - - col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT - 93 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
-55
-66
-67

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + 1 AS REAL ) AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL cor0.col2 + - 32 FROM tab0 AS cor0
----
-31
1
50

query I rowsort
SELECT DISTINCT + col0 - + col0 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + 41 * + ( col0 ) * + ( + 3 ) AS col1 FROM tab2 AS cor0
----
861
9594
9717

onlyif mysql # use DIV operator for integer division
query I rowsort label-3512
SELECT ALL - col0 DIV col1 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3512
SELECT ALL - col0 / col1 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 + + col1 + + col0 FROM tab2
----
113
196
69

query I rowsort
SELECT ALL tab0.col0 * 51 AS col1 FROM tab0
----
1224
1785
4539

onlyif mysql # use DIV operator for integer division
query I rowsort label-3515
SELECT + col1 DIV - col2 + + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-3515
SELECT + col1 / - col2 + + col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3516
SELECT + cor0.col1 + col1 DIV col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-3516
SELECT + cor0.col1 + col1 / col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT - + cor0.col0 * col1 + ( + 92 * col2 ) + - col1 AS col1 FROM tab0 AS cor0
----
-3400
-646
886

query I rowsort
SELECT + col1 * col0 + col2 AS col2 FROM tab1 cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 col0 FROM tab0
----
28

query I rowsort
SELECT ALL 68 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT + - 65 * + col1 + - col1 AS col0 FROM tab0 AS cor0
----
-5676
-6006
-6402

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 + - col0 col1 FROM tab0 AS cor0
----
10
64
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col0 + - 35 * + 61 col0 FROM tab2 AS cor0
----
-2184
-8219
-8376

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 83 col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
-83

query I rowsort
SELECT DISTINCT + 32 + col2 * 98 FROM tab1
----
5324
5618
9440

query I rowsort
SELECT 17 - + cor0.col2 FROM tab1 AS cor0
----
-37
-40
-79

query I rowsort
SELECT ( col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - ( + 22 ) * col0 + + col1 * ( + col0 ) * + col2 FROM tab0 cor0
----
2625
662160
67584

query I rowsort
SELECT ALL - 75 + col0 FROM tab1 AS cor0
----
-11
-72
5

query I rowsort
SELECT DISTINCT + - 20 AS col0 FROM tab0 AS cor0
----
-20

onlyif mysql # use DIV operator for integer division
query I rowsort label-3531
SELECT + + col2 + - ( + col0 ) DIV + col2 + + cor0.col1 AS col2 FROM tab1 cor0
----
109
66
80

skipif mysql # not compatible
query I rowsort label-3531
SELECT + + col2 + - ( + col0 ) / + col2 + + cor0.col1 AS col2 FROM tab1 cor0
----
109
66
80

query I rowsort
SELECT col1 * col1 - cor0.col2 FROM tab1 AS cor0
----
43
622
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3533
SELECT col0 * col0 + col2 + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3533
SELECT col0 * col0 + col2 + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col2 + col0 * - col1 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-3535
SELECT col1 DIV - col1 - - 77 * col0 FROM tab1
----
230
4927
6159

skipif mysql # not compatible
query I rowsort label-3535
SELECT col1 / - col1 - - 77 * col0 FROM tab1
----
230
4927
6159

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3536
SELECT + col1 * + CAST( NULL AS SIGNED ) - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3536
SELECT + col1 * + CAST ( NULL AS INTEGER ) - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 79 + - col2 FROM tab0 cor0
----
-3
46
78

query I rowsort
SELECT DISTINCT ( + tab2.col0 ) - col0 AS col2 FROM tab2
----
0

query I rowsort
SELECT DISTINCT 5 AS col2 FROM tab1, tab0 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2
----
5

query I rowsort
SELECT ALL + 39 + col2 FROM tab1
----
135
93
96

query I rowsort
SELECT + ( - col2 ) + - col1 * col1 AS col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT DISTINCT - 2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3543
SELECT DISTINCT col2 + - CAST( - col0 AS SIGNED ) * - cor0.col0 * col2 FROM tab0 AS cor0
----
-1224
-18975
-649440

skipif mysql # not compatible
query I rowsort label-3543
SELECT DISTINCT col2 + - CAST ( - col0 AS INTEGER ) * - cor0.col0 * col2 FROM tab0 AS cor0
----
-1224
-18975
-649440

query I rowsort
SELECT DISTINCT + col0 * col0 + ( 71 ) * col2 * 40 FROM tab1
----
153369
165976
279040

query I rowsort
SELECT + col1 * tab0.col1 + - 4 * + col0 AS col1 FROM tab0
----
7300
7925
9269

query I rowsort
SELECT cor0.col2 + - 4 * + col0 AS col2 FROM tab0 AS cor0
----
-139
-274
-63

query I rowsort
SELECT ALL col0 * ( 45 + tab2.col2 ) AS col2 FROM tab2
----
504
5538
6557

query I rowsort
SELECT col0 * col2 - 28 FROM tab0
----
7
7270
764

query I rowsort
SELECT + tab1.col1 + 46 * col0 FROM tab1
----
164
2954
3693

query I rowsort
SELECT DISTINCT + + col1 * + col2 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT + col2 + ( col1 ) * col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3553
SELECT DISTINCT + col1 * CAST( - 59 AS SIGNED ) FROM tab0 AS cor0
----
-5074
-5369
-5723

skipif mysql # not compatible
query I rowsort label-3553
SELECT DISTINCT + col1 * CAST ( - 59 AS INTEGER ) FROM tab0 AS cor0
----
-5074
-5369
-5723

query I rowsort
SELECT DISTINCT + + cor0.col1 + col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT + - cor0.col1 * + 15 AS col2 FROM tab2 AS cor0
----
-255
-465
-885

query I rowsort
SELECT ALL - col2 + + 33 FROM tab2 AS cor0
----
-5
6
7

query I rowsort
SELECT DISTINCT + - col1 * - 88 * + ( + col0 ) AS col1 FROM tab2 cor0
----
118184
19096
404976

onlyif mysql # use DIV operator for integer division
query I rowsort label-3558
SELECT DISTINCT + col0 DIV col1 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-3558
SELECT DISTINCT + col0 / col1 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-25
-27
-34

query I rowsort
SELECT DISTINCT + col1 * 0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col2 + col0 * - tab2.col0 * + col0 AS col1 FROM tab2
----
-316
-474526
-493001

query I rowsort
SELECT + col2 * ( 60 * + col1 ) AS col0 FROM tab0 AS cor0
----
170280
447720
5820

query I rowsort
SELECT ALL - + col0 * - 68 AS col0 FROM tab2 AS cor0
----
476
5304
5372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 15 + 72 * col2 col1 FROM tab0 AS cor0
----
2361
57
5889

query I rowsort
SELECT - + ( + col0 ) AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + 21 * col2 col0 FROM tab0 AS cor0
----
1804
22
726

query I rowsort
SELECT - 12 + - col1 * col2 AS col2 FROM tab2 AS cor0
----
-1546
-658
-849

query I rowsort
SELECT + + col2 + col1 * - col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT + 14 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT ALL - 31 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT DISTINCT + 37 - 76 AS col0 FROM tab0, tab1 cor0, tab2 AS cor1
----
-39

query I rowsort
SELECT ALL tab2.col0 + - col2 AS col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT - 51 * + col0 FROM tab1
----
-153
-3264
-4080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 32 * col1 + - col0 col2 FROM tab1
----
256
336
829

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + cor0.col1 col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + 10 + + col1 * - 38 * 46 AS col1 FROM tab1 AS cor0
----
-17470
-22714
-45438

query I rowsort
SELECT ALL + - cor0.col2 + col1 * + col1 + ( col1 ) AS col1 FROM tab1 AS cor0
----
53
648
86

query I rowsort
SELECT ( + col0 ) * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + col0 * cor0.col2 + + col2 * - col0 + - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3579
SELECT DISTINCT - col0 + - col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

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

query I rowsort
SELECT DISTINCT col1 + col1 + ( 47 * - col2 ) AS col1 FROM tab2 AS cor0
----
-1104
-1207
-1752

query I rowsort
SELECT + - col0 + col0 + 12 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT ALL + col0 + ( col0 ) * col0 AS col2 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL col2 * - col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3584
SELECT ALL + col0 + + CAST( 12 AS SIGNED ) FROM tab1 AS cor0
----
15
76
92

skipif mysql # not compatible
query I rowsort label-3584
SELECT ALL + col0 + + CAST ( 12 AS INTEGER ) FROM tab1 AS cor0
----
15
76
92

query I rowsort
SELECT DISTINCT - col0 * - col0 + - col0 AS col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT DISTINCT - col0 - - col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT col0 * ( ( col2 ) ) * + col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - 84 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-20
-4
-81

query I rowsort
SELECT 22 * col2 AS col1 FROM tab0
----
1804
22
726

query I rowsort
SELECT DISTINCT + cor0.col2 * - tab1.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to d85bc2e8ce42c10576fce198c34232af

query I rowsort
SELECT + + 42 * col0 FROM tab1 AS cor0
----
126
2688
3360

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3592
SELECT + CAST( NULL AS SIGNED ) * 88 col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3592
SELECT + CAST ( NULL AS INTEGER ) * 88 col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL cor1.col1 AS col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL 43 + cor0.col0 * 47 FROM tab0 cor0
----
1171
1688
4226

query I rowsort
SELECT + col2 * ( - col2 + - col1 ) AS col2 FROM tab2
----
-1566
-2090
-2210

query I rowsort
SELECT - col2 + - 84 AS col0 FROM tab2
----
-110
-111
-122

query I rowsort
SELECT col1 + col2 * col0 + - col0 FROM tab2
----
2009
213
2940

query I rowsort
SELECT ALL - col0 + ( - tab0.col1 ) FROM tab0
----
-110
-132
-180

query I rowsort
SELECT - - 41 * 76 + + cor0.col1 * 8 FROM tab0 AS cor0
----
3804
3844
3892

query I rowsort
SELECT DISTINCT col1 + + 78 * + col1 FROM tab1
----
1027
2054
790

query I rowsort
SELECT ALL - col1 + ( - col1 + tab1.col1 * ( + tab1.col0 ) ) AS col0 FROM tab1
----
1014
26
620

query I rowsort
SELECT - col1 * - col1 + col1 AS col0 FROM tab2
----
306
3540
992

query I rowsort
SELECT col2 * - ( 4 ) FROM tab0
----
-132
-328
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3604
SELECT - cor0.col1 * + CAST( NULL AS SIGNED ) * + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3604
SELECT - cor0.col1 * + CAST ( NULL AS INTEGER ) * + col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * 88 AS col1 FROM tab2 cor0
----
-1496
-2728
-5192

query I rowsort
SELECT - col2 + 75 FROM tab2 AS cor0
----
37
48
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-3607
SELECT ALL + col0 + 41 DIV col1 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3607
SELECT ALL + col0 + 41 / col1 AS col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3608
SELECT col2 DIV ( tab2.col0 ) col2 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3608
SELECT col2 / ( tab2.col0 ) col2 FROM tab2
----
0
0
3

query I rowsort
SELECT col0 * 56 AS col2 FROM tab2
----
392
4368
4424

query I rowsort
SELECT DISTINCT - tab1.col0 FROM tab1, tab0, tab2 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col0 * - ( + col2 * tab1.col2 ) FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab0 cor0
----
70

query I rowsort
SELECT + - cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - - cor0.col0 * col0 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1152
15842
2450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( + col1 ) + cor0.col2 col1 FROM tab2 cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-3616
SELECT DISTINCT - col2 + col1 DIV + col1 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-3616
SELECT DISTINCT - col2 + col1 / + col1 FROM tab0 AS cor0
----
-32
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + - col0 * - col2 * col1 col0 FROM tab0 AS cor0
----
3360
664029
68088

query I rowsort
SELECT DISTINCT + + 39 * + col1 + col2 + - ( + 17 ) FROM tab2 AS cor0
----
1219
2310
684

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3619
SELECT + CAST( NULL AS SIGNED ) + - col2 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3619
SELECT + CAST ( NULL AS INTEGER ) + - col2 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * + col0 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

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

query I rowsort
SELECT + - cor0.col0 * col0 + - col2 AS col2 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT ALL - 89 * 40 + - tab2.col1 * 88 FROM tab2
----
-5056
-6288
-8752

query I rowsort
SELECT ALL + 77 + - col0 FROM tab0
----
-12
42
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3625
SELECT - + col1 + - col1 * col0 + + CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-1281
-241
-4583

skipif mysql # not compatible
query I rowsort label-3625
SELECT - + col1 + - col1 * col0 + + CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-1281
-241
-4583

query I rowsort
SELECT + 44 + - col0 * col2 + col2 AS col2 FROM tab2 AS cor0
----
-118
-1958
-2920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3627
SELECT + CAST( NULL AS SIGNED ) + cor0.col2 * col0 + - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL - 31 + col2 * - col0 * + col2 AS col2 FROM tab0 cor0
----
-26167
-598467
-66

query I rowsort
SELECT DISTINCT + col2 - cor0.col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT 47 + cor0.col2 AS col0 FROM tab2 AS cor0
----
73
74
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * col1 + - col1 col1 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT - + col0 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - 47 AS col2 FROM tab0
----
-47
-47
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * + col1 col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL ( col1 ) * + col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + col1 * cor0.col2 + col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + col0 * col1 * + 32 FROM tab1 cor0
----
20480
2496
33280

query I rowsort
SELECT + - col0 * ( + col2 ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col2 * 78 AS col0 FROM tab1 AS cor0
----
4212
4446
7488

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3640
SELECT + col0 + + CAST( 81 AS SIGNED ) col0 FROM tab1 AS cor0
----
145
161
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3640
SELECT + col0 + + CAST ( 81 AS INTEGER ) col0 FROM tab1 AS cor0
----
145
161
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col2 col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3642
SELECT + col2 DIV - col0 - col2 * - col0 * + 66 AS col2 FROM tab1 AS cor0
----
10674
240768
506879

skipif mysql # not compatible
query I rowsort label-3642
SELECT + col2 / - col0 - col2 * - col0 * + 66 AS col2 FROM tab1 AS cor0
----
10674
240768
506879

query I rowsort
SELECT DISTINCT 83 FROM tab0, tab2 cor0, tab0 AS cor1
----
83

query I rowsort
SELECT 23 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to d3b0357ceadb3a70da7f1649b1ef2a30

onlyif mysql # use DIV operator for integer division
query I rowsort label-3645
SELECT - 60 * + 22 + + col1 DIV 79 AS col2 FROM tab2 AS cor0
----
-1320
-1320
-1320

skipif mysql # not compatible
query I rowsort label-3645
SELECT - 60 * + 22 + + col1 / 79 AS col2 FROM tab2 AS cor0
----
-1320
-1320
-1320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * cor0.col0 col0 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3647
SELECT + ( col2 ) - - col0 DIV - col2 FROM tab0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-3647
SELECT + ( col2 ) - - col0 / - col2 FROM tab0
----
-34
33
81

query I rowsort
SELECT - ( col0 ) + - tab1.col2 * - 84 * + tab1.col2 AS col2 FROM tab1
----
244941
272852
774064

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3650
SELECT DISTINCT - - col1 + CAST( NULL AS SIGNED ) + col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3650
SELECT DISTINCT - - col1 + CAST ( NULL AS INTEGER ) + col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 * - 96 * - cor0.col0 + - col1 AS col1 FROM tab0 AS cor0
----
3263
700517
75946

query I rowsort
SELECT DISTINCT - col1 * - col0 + + col2 FROM tab1 cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL col2 * + ( col1 ) - col2 AS col0 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL cor0.col0 + 3 AS col2 FROM tab2 AS cor0
----
10
81
82

query I rowsort
SELECT DISTINCT col2 + + col2 AS col0 FROM tab0 cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3657
SELECT DISTINCT - col1 + cor0.col0 DIV col2 AS col0 FROM tab0 AS cor0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-3657
SELECT DISTINCT - col1 + cor0.col0 / col2 AS col0 FROM tab0 AS cor0
----
-62
-86
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + ( + col0 ) col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + 5 * - col0 * - 94 + - 48 * + col1 AS col1 FROM tab2
----
1802
33828
36314

onlyif mysql # use DIV operator for integer division
query I rowsort label-3660
SELECT col0 + col2 * - 36 DIV - 36 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-3660
SELECT col0 + col2 * - 36 / - 36 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL - 8 + + col0 * + col0 AS col2 FROM tab2 AS cor0
----
41
6076
6233

query I rowsort
SELECT DISTINCT + - 73 AS col2 FROM tab2 AS cor0
----
-73

query I rowsort
SELECT ALL + col0 * - 66 AS col1 FROM tab0 AS cor0
----
-1584
-2310
-5874

query I rowsort
SELECT DISTINCT + 15 AS col2 FROM tab2 AS cor0
----
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - cor0.col1 ) col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - col2 * - cor0.col1 + + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + + 54 + col0 * cor0.col2 + ( col2 ) AS col1 FROM tab2 AS cor0
----
2108
270
3094

query I rowsort
SELECT ALL - + 4 AS col2 FROM tab2 cor0
----
-4
-4
-4

query I rowsort
SELECT + - cor0.col1 + + col1 + col0 AS col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3670
SELECT - col2 DIV 88 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3670
SELECT - col2 / 88 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 75 * 16 FROM tab1 AS cor0
----
1200

query I rowsort
SELECT DISTINCT - ( col2 ) + cor0.col2 + cor0.col1 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 70 * - col1 + col1 col0 FROM tab2 AS cor0
----
-1173
-2139
-4071

query I rowsort
SELECT ALL - + 74 AS col1 FROM tab2 AS cor0
----
-74
-74
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-3675
SELECT - + col2 * col0 DIV - col1 FROM tab2 AS cor0
----
176
34
6

skipif mysql # not compatible
query I rowsort label-3675
SELECT - + col2 * col0 / - col1 FROM tab2 AS cor0
----
176
34
6

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-3677
SELECT + cor0.col0 DIV col0 AS col1 FROM tab2 cor0
----
1
1
1

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

query I rowsort
SELECT ALL + col2 + cor0.col0 * - col0 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT ALL 34 * + cor0.col0 AS col0 FROM tab0 cor0
----
1190
3026
816

query I rowsort
SELECT ALL + + col2 + col1 * 2 + ( + col2 ) AS col2 FROM tab0 AS cor0
----
196
238
346

onlyif mysql # use DIV operator for integer division
query I rowsort label-3681
SELECT ALL + col2 DIV cor0.col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3681
SELECT ALL + col2 / cor0.col1 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT ALL + ( col1 ) + col0 FROM tab0
----
110
132
180

query I rowsort
SELECT - 3 * + col1 + - 71 AS col1 FROM tab0 AS cor0
----
-329
-344
-362

onlyif mysql # use DIV operator for integer division
query I rowsort label-3684
SELECT - col2 DIV - col0 + col2 AS col1 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-3684
SELECT - col2 / - col0 + col2 AS col1 FROM tab2 AS cor0
----
26
30
38

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-3686
SELECT DISTINCT + cor0.col1 + col1 DIV col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-3686
SELECT DISTINCT + cor0.col1 + col1 / col1 FROM tab2 AS cor0
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-3687
SELECT ALL + + col1 DIV cor0.col0 - + col0 FROM tab2 AS cor0
----
-3
-78
-79

skipif mysql # not compatible
query I rowsort label-3687
SELECT ALL + + col1 / cor0.col0 - + col0 FROM tab2 AS cor0
----
-3
-78
-79

query I rowsort
SELECT - 30 + + col2 AS col1 FROM tab1 AS cor0
----
24
27
66

query I rowsort
SELECT + - cor0.col2 * col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ( - col0 ) + ( col1 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ( col1 * - col0 ) FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT 16 + col0 AS col2 FROM tab2
----
23
94
95

query I rowsort
SELECT ALL - ( col2 ) + col2 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT + 7 + col1 FROM tab1
----
17
20
33

query I rowsort
SELECT 4 + tab2.col1 FROM tab2
----
21
35
63

query I rowsort
SELECT ALL - col2 * tab0.col1 * - 73 AS col0 FROM tab0
----
207174
544726
7081

query I rowsort
SELECT ALL + 14 * + col2 * + col1 FROM tab1 AS cor0
----
17472
19656
7980

query I rowsort
SELECT - cor0.col2 * + col1 + + 3 * + col2 FROM tab1 AS cor0
----
-1242
-399
-960

query I rowsort
SELECT DISTINCT - ( + col2 ) * - cor0.col2 + col1 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT + cor0.col2 + - cor0.col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT - col2 * col0 + + ( 48 ) FROM tab2 AS cor0
----
-141
-1980
-2954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col1 col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT tab0.col1 + + col1 * + tab0.col0 AS col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0, tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3705
SELECT tab1.col0 * + tab1.col0 + - col0 DIV + col2 AS col1 FROM tab1
----
4095
6400
9

skipif mysql # not compatible
query I rowsort label-3705
SELECT tab1.col0 * + tab1.col0 + - col0 / + col2 AS col1 FROM tab1
----
4095
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3706
SELECT + - col2 + CAST( NULL AS DECIMAL ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3706
SELECT + - col2 + CAST ( NULL AS REAL ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - col1 * - 63 AS col1 FROM tab0 cor0
----
465948
521703
592767

query I rowsort
SELECT DISTINCT - col0 + 67 FROM tab0 AS cor0
----
-22
32
43

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

query I rowsort
SELECT ALL + cor1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - col0 * - ( - col0 ) * - 20 AS col1 FROM tab2
----
121680
124820
980

query I rowsort
SELECT DISTINCT - col0 * col2 * + col2 AS col1 FROM tab0
----
-26136
-35
-598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3713
SELECT DISTINCT + ( + 41 ) * col1 - - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3713
SELECT DISTINCT + ( + 41 ) * col1 - - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - ( + 45 ) + cor0.col2 FROM tab2 AS cor0
----
-18
-19
-7

query I rowsort
SELECT + - 4 - - col2 * col2 FROM tab1 AS cor0
----
2912
3245
9212

query I rowsort
SELECT ALL - 95 * col2 + - col0 FROM tab0 AS cor0
----
-130
-3159
-7879

query I rowsort
SELECT ALL - ( - col0 ) + + col0 FROM tab1 cor0
----
128
160
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3718
SELECT col1 * + CAST( NULL AS SIGNED ) * - ( + col0 ) + 55 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3718
SELECT col1 * + CAST ( NULL AS INTEGER ) * - ( + col0 ) + 55 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + col0 + col0 * - col0 * + 42 AS col2 FROM tab1 AS cor0
----
-171904
-268640
-372

query I rowsort
SELECT col1 + + col2 + cor0.col1 AS col0 FROM tab0 AS cor0
----
195
205
264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3721
SELECT - col0 * + CAST( NULL AS SIGNED ) + - ( cor0.col2 * + ( + col0 ) ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + - col1 + 14 + cor0.col2 AS col0 FROM tab0 cor0
----
-39
-82
5

query I rowsort
SELECT ALL + + col2 * + 1 + cor0.col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + 62 * 14 AS col1 FROM tab1 AS cor0
----
868
868
868

query I rowsort
SELECT + + col1 * + col1 * - col2 + 39 * - col1 FROM tab1 AS cor0
----
-16731
-37518
-6090

onlyif mysql # use DIV operator for integer division
query I rowsort label-3726
SELECT ALL - 70 DIV cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cf9002ffc94efb2d63003062beca780a

skipif mysql # not compatible
query I rowsort label-3726
SELECT ALL - 70 / cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cf9002ffc94efb2d63003062beca780a

query I rowsort
SELECT DISTINCT - cor1.col2 + - cor0.col2 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
9 values hashing to cfd0b1e71dfb9fff5052c8644f2e3990

query I rowsort
SELECT ALL + 54 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT ALL - col2 * + ( 47 ) FROM tab0
----
-1551
-3854
-47

query I rowsort
SELECT + + 76 * + col0 * 13 AS col2 FROM tab0 AS cor0
----
23712
34580
87932

onlyif mysql # use DIV operator for integer division
query I rowsort label-3731
SELECT - + col1 * col1 - + 13 DIV - col0 FROM tab1 AS cor0
----
-100
-169
-672

skipif mysql # not compatible
query I rowsort label-3731
SELECT - + col1 * col1 - + 13 / - col0 FROM tab1 AS cor0
----
-100
-169
-672

query I rowsort
SELECT ALL ( col2 * - col1 ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT tab1.col0 * col0 * - col1 + + col1 AS col2 FROM tab1
----
-208
-40950
-83187

query I rowsort
SELECT 0 * col2 * 85 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - tab2.col0 + + cor1.col1 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 64de71f07a6ba954417f781fbdd78d39

query I rowsort
SELECT tab2.col0 * col0 + - 90 + + 35 FROM tab2
----
-6
6029
6186

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3737
SELECT - ( - col2 ) + CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3737
SELECT - ( - col2 ) + CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3738
SELECT - cor0.col0 DIV - col1 + 6 + + cor0.col0 FROM tab1 AS cor0
----
76
9
92

skipif mysql # not compatible
query I rowsort label-3738
SELECT - cor0.col0 / - col1 + 6 + + cor0.col0 FROM tab1 AS cor0
----
76
9
92

query I rowsort
SELECT DISTINCT - 82 * - col1 FROM tab0 AS cor0
----
7052
7462
7954

query I rowsort
SELECT ALL + col1 * col0 * col2 FROM tab0 cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-3741
SELECT - 34 DIV col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-3741
SELECT - 34 / col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT col2 + 31 * col2 FROM tab0 cor0
----
1056
2624
32

query I rowsort
SELECT ALL + col1 * - ( col2 ) + - col1 - 47 FROM tab1 AS cor0
----
-1308
-1477
-627

query I rowsort
SELECT - col0 + 6 + + cor0.col2 FROM tab2 AS cor0
----
-35
-46
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 * col2 + cor0.col1 - col0 col2 FROM tab1 AS cor0
----
2939
3195
9149

query I rowsort
SELECT ALL - col0 * col1 * col2 + col1 + + col2 AS col2 FROM tab1
----
-36413
-4132
-99731

onlyif mysql # use DIV operator for integer division
query I rowsort label-3747
SELECT ALL - tab1.col2 + - col0 * col0 DIV + col0 + + 99 FROM tab1
----
-22
-77
42

skipif mysql # not compatible
query I rowsort label-3747
SELECT ALL - tab1.col2 + - col0 * col0 / + col0 + + 99 FROM tab1
----
-22
-77
42

query I rowsort
SELECT ALL col1 * - col1 * - tab1.col1 - - col1 FROM tab1
----
1010
17602
2210

query I rowsort
SELECT - ( - cor1.col1 ) FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT ( 81 ) FROM tab1, tab2 cor0
----
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3751
SELECT + + col1 * col0 + cor0.col0 DIV + col0 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-3751
SELECT + + col1 * col0 + cor0.col0 / + col0 FROM tab1 AS cor0
----
1041
641
79

query I rowsort
SELECT - + col0 * - col1 + - cor0.col1 FROM tab2 cor0
----
1326
186
4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3753
SELECT ALL - + col0 + + CAST( + col0 AS SIGNED ) * + col0 FROM tab2 AS cor0
----
42
6006
6162

skipif mysql # not compatible
query I rowsort label-3753
SELECT ALL - + col0 + + CAST ( + col0 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT - 79 FROM tab2, tab2 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT - col0 * col2 + + col1 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

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

query I rowsort
SELECT - 39 FROM tab0, tab0 cor0
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

query I rowsort
SELECT - 75 * - 94 - col0 * - col0 AS col2 FROM tab2
----
13134
13291
7099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 64 col2 FROM tab0 cor0
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT col2 * col1 + + col0 * - col0 * col0 FROM tab2
----
-473018
-492393
494

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * - col0 - 92 col1 FROM tab1 AS cor0
----
-254
-3740
-7772

query I rowsort
SELECT DISTINCT + col1 + - col1 * - col0 * 31 FROM tab1 cor0
----
19850
2444
32253

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col2 + col1 * ( col2 + - col2 ) col2 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) * 16 * - 11 col0 FROM tab1 AS cor0
----
-10032
-16896
-9504

query I rowsort
SELECT ALL + 38 - + col0 AS col0 FROM tab2 AS cor0
----
-40
-41
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-3767
SELECT DISTINCT - cor0.col0 DIV - col0 + 67 FROM tab1 cor0
----
68

skipif mysql # not compatible
query I rowsort label-3767
SELECT DISTINCT - cor0.col0 / - col0 + 67 FROM tab1 cor0
----
68

query I rowsort
SELECT ALL + - 62 + col1 * - 75 FROM tab1 AS cor0
----
-1037
-2012
-812

query I rowsort
SELECT ALL tab0.col1 + + tab0.col2 * + col0 AS col2 FROM tab0
----
132
7389
878

query I rowsort
SELECT DISTINCT tab2.col2 * - col2 * + col2 + + col0 AS col2 FROM tab2
----
-17498
-19676
-54793

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

query I rowsort
SELECT col2 + col1 * - col2 AS col1 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT ALL col1 + col1 * col1 AS col0 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3774
SELECT col2 DIV col2 + + col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3774
SELECT col2 / col2 + + col1 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT + col0 * - col2 + col1 * col0 FROM tab1
----
-3008
-6640
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3776
SELECT col0 + + col0 DIV - col2 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-3776
SELECT col0 + + col0 / - col2 FROM tab0
----
0
24
88

query I rowsort
SELECT + col1 * - col1 * - col1 FROM tab1
----
1000
17576
2197

query I rowsort
SELECT ALL + - col0 * + col2 + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL col1 * col2 * - col1 + - col0 AS col1 FROM tab2 AS cor0
----
-11061
-25954
-90584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + + cor0.col1 col2 FROM tab2 AS cor0
----
-158
-1969
-2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-3781
SELECT + col1 DIV col0 + - col2 AS col0 FROM tab0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-3781
SELECT + col1 / col0 + - col2 AS col0 FROM tab0
----
-30
-81
1

query I rowsort
SELECT ALL col2 + - tab1.col0 AS col1 FROM tab1 WHERE NOT NULL BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT + col2 * - cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3784
SELECT DISTINCT col0 * col2 DIV col2 + - col0 AS col2 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3784
SELECT DISTINCT col0 * col2 / col2 + - col0 AS col2 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL col0 * - col0 - col0 * col0 FROM tab1 cor0
----
-12800
-18
-8192

onlyif mysql # use DIV operator for integer division
query I rowsort label-3786
SELECT DISTINCT + col2 * + col1 + col0 DIV - col0 FROM tab1 AS cor0
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-3786
SELECT DISTINCT + col2 * + col1 + col0 / - col0 FROM tab1 AS cor0
----
1247
1403
569

query I rowsort
SELECT - - cor0.col1 + + cor0.col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * col0 + - col1 col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT DISTINCT col0 * cor0.col0 + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL + + col0 - + col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - col0 + col0 * col2 AS col1 FROM tab1
----
159
3584
7600

query I rowsort
SELECT ( col2 ) - - col1 AS col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3793
SELECT - 80 + col1 DIV col1 AS col0 FROM tab0
----
-79
-79
-79

skipif mysql # not compatible
query I rowsort label-3793
SELECT - 80 + col1 / col1 AS col0 FROM tab0
----
-79
-79
-79

query I rowsort
SELECT - col0 * col0 + - col1 AS col0 FROM tab0
----
-1322
-662
-8012

query I rowsort
SELECT ALL - 7 * - col2 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT DISTINCT - 6 * - col2 FROM tab0 AS cor0
----
198
492
6

query I rowsort
SELECT - 42 * + col2 AS col0 FROM tab0 AS cor0
----
-1386
-3444
-42

query I rowsort
SELECT DISTINCT - col2 * col1 + - col1 AS col0 FROM tab2 AS cor0
----
-1593
-663
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-3799
SELECT cor0.col1 DIV + cor0.col0 - + cor0.col2 AS col2 FROM tab1 AS cor0
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-3799
SELECT cor0.col1 / + cor0.col0 - + cor0.col2 AS col2 FROM tab1 AS cor0
----
-46
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3800
SELECT - 27 + - cor0.col0 + col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
-115
-50
-61

skipif mysql # not compatible
query I rowsort label-3800
SELECT - 27 + - cor0.col0 + col1 / + col1 AS col2 FROM tab0 AS cor0
----
-115
-50
-61

query I rowsort
SELECT - 11 - cor0.col1 * + col0 FROM tab0 AS cor0
----
-2075
-3406
-8110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col2 ) + col1 * cor0.col2 col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + col2 + col1 - cor0.col0 * col1 AS col1 FROM tab0 AS cor0
----
-1945
-3297
-7926

query I rowsort
SELECT DISTINCT + col1 - + cor0.col1 * col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT + tab0.col2 * + col0 + col2 AS col1 FROM tab0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-3806
SELECT - col1 DIV - col0 + - col0 AS col2 FROM tab0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-3806
SELECT - col1 / - col0 + - col0 AS col2 FROM tab0
----
-21
-33
-88

query I rowsort
SELECT col2 * tab1.col2 + col2 * + col2 AS col1 FROM tab1
----
18432
5832
6498

onlyif mysql # use DIV operator for integer division
query I rowsort label-3808
SELECT ALL col0 DIV - col0 col0 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3808
SELECT ALL col0 / - col0 col0 FROM tab1
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3809
SELECT + tab2.col1 * col0 DIV col1 AS col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-3809
SELECT + tab2.col1 * col0 / col1 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT + col2 * - col2 + - col0 - col2 AS col2 FROM tab2
----
-1561
-763
-780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 * + col1 col0 FROM tab2
----
10982
25947
90506

query III rowsort
SELECT * FROM tab0 WHERE ( col1 * + col0 - - col2 ) > - col2
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL - col0 + col1 - col2 * - tab2.col0 AS col0 FROM tab2
----
2009
213
2940

query I rowsort
SELECT - tab1.col0 * + col2 + col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT - col2 * + col2 + col2 * cor0.col1 FROM tab0 AS cor0
----
1749
738
96

query I rowsort
SELECT + 69 + - col0 FROM tab2 AS cor0
----
-10
-9
62

query I rowsort
SELECT ALL tab0.col0 - + col1 AS col2 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT col2 - - col2 * col2 FROM tab0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-3819
SELECT - col0 DIV col0 + - col0 * col1 * tab2.col0 AS col1 FROM tab2
----
-106098
-1520
-358957

skipif mysql # not compatible
query I rowsort label-3819
SELECT - col0 / col0 + - col0 * col1 * tab2.col0 AS col1 FROM tab2
----
-106098
-1520
-358957

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col2 col0 FROM tab0 WHERE NULL BETWEEN NULL AND ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - col1 col1 FROM tab2 AS cor0
----
-289
-3481
-961

query III rowsort
SELECT * FROM tab2 cor0 WHERE NOT NULL NOT BETWEEN col1 - col0 AND - col1 - - col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3823
SELECT - col1 DIV col0 col1 FROM tab0 AS cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3823
SELECT - col1 / col0 col1 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT + col2 * col2 * tab1.col2 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab2 WHERE NOT col0 + col2 * col0 < ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3826
SELECT col2 DIV tab0.col1 + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3826
SELECT col2 / tab0.col1 + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL - tab1.col1 * - col2 * col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT ALL col0 FROM tab2 WHERE NOT NULL IN ( - col1 )
----

query I rowsort
SELECT DISTINCT - col1 * col1 * tab2.col1 AS col0 FROM tab2
----
-205379
-29791
-4913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + cor0.col2 col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT cor0.col0 AS col2 FROM tab2, tab0 AS cor0 WHERE NOT NULL >= NULL
----

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 cor2
----
3645 values hashing to 0705df526be8eeded96d0c20ae938712

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3833
SELECT CAST( 60 AS SIGNED ) AS col2 FROM tab0
----
60
60
60

skipif mysql # not compatible
query I rowsort label-3833
SELECT CAST ( 60 AS INTEGER ) AS col2 FROM tab0
----
60
60
60

query I rowsort
SELECT ALL - + 83 FROM tab1, tab1 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 291feef3dca992d41fad4b2f7ab1ab9e

query I rowsort
SELECT 65 * col0 AS col2 FROM tab0 AS cor0
----
1560
2275
5785

query I rowsort
SELECT - 54 - col0 FROM tab2 AS cor0
----
-132
-133
-61

query I rowsort
SELECT ALL 30 AS col0 FROM tab1 cor0
----
30
30
30

query I rowsort
SELECT + + col2 + 57 FROM tab0 AS cor0
----
139
58
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col1 ) * col1 col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3840
SELECT + 82 DIV - col0 - col2 AS col2 FROM tab1 AS cor0
----
-58
-81
-97

skipif mysql # not compatible
query I rowsort label-3840
SELECT + 82 / - col0 - col2 AS col2 FROM tab1 AS cor0
----
-58
-81
-97

query I rowsort
SELECT 88 FROM tab2, tab1 cor0, tab1 cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3842
SELECT ( + cor0.col2 ) + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3842
SELECT ( + cor0.col2 ) + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * 54 AS col2 FROM tab2
----
1404
1458
2052

query I rowsort
SELECT + cor0.col0 - + cor0.col0 * + 28 FROM tab1, tab1 AS cor0
----
9 values hashing to 30daa29f4cd03eb157c2346a198a49f9

query I rowsort
SELECT DISTINCT + col1 * 13 FROM tab2 AS cor0
----
221
403
767

query I rowsort
SELECT DISTINCT + col2 + + 7 AS col0 FROM tab2 AS cor0
----
33
34
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3847
SELECT - tab1.col0 + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3847
SELECT - tab1.col0 + CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + 93 * - col0 * col2 FROM tab0
----
-3220
-678625
-73632

query I rowsort
SELECT - col2 + 85 - col0 AS col0 FROM tab1 AS cor0
----
-36
-91
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-3850
SELECT ALL col2 DIV - 42 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3850
SELECT ALL col2 / - 42 AS col2 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 59 * col1 col2 FROM tab2 cor0
----
1003
1829
3481

query I rowsort
SELECT DISTINCT + col2 * + 12 FROM tab1 AS cor0
----
1152
648
684

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 43 col1 FROM tab2 AS cor0
----
-43
-43
-43

query I rowsort
SELECT - - 6 * - 17 FROM tab2 AS cor0
----
-102
-102
-102

query I rowsort
SELECT DISTINCT - col1 + col0 * col0 AS col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT - 64 AS col0 FROM tab0, tab0 AS cor0
----
-64

query I rowsort
SELECT - 57 + col2 * + col2 FROM tab2 AS cor0
----
1387
619
672

query I rowsort
SELECT ALL - col2 * col1 * - col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT - ( + col0 + + tab2.col2 ) * + col2 FROM tab2
----
-2704
-4446
-918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * + 63 + col0 col1 FROM tab1 AS cor0
----
-186
-3968
-4960

query I rowsort
SELECT DISTINCT - 12 AS col2 FROM tab0
----
-12

query I rowsort
SELECT 31 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT col2 * - col2 - + col2 FROM tab1
----
-2970
-3306
-9312

query I rowsort
SELECT + - col0 + col2 * + col2 AS col2 FROM tab1 AS cor0
----
2913
3185
9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-3866
SELECT DISTINCT + - col0 DIV col2 + col2 AS col2 FROM tab1 AS cor0
----
54
56
96

skipif mysql # not compatible
query I rowsort label-3866
SELECT DISTINCT + - col0 / col2 + col2 AS col2 FROM tab1 AS cor0
----
54
56
96

query I rowsort
SELECT ALL - 4 * col1 + + col2 * - col2 AS col2 FROM tab1
----
-3020
-3289
-9268

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col0 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 49 col1 FROM tab0
----
49
49
49

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab0, tab0 cor1
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

query I rowsort
SELECT - col1 + ( - 36 ) AS col0 FROM tab0 cor0
----
-122
-127
-133

query I rowsort
SELECT + col2 + - 89 AS col2 FROM tab1 AS cor0
----
-32
-35
7

query I rowsort
SELECT + col0 * + col2 + - col2 AS col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL + col1 * ( 49 ) * cor0.col2 AS col0 FROM tab2 AS cor0
----
31654
41013
75166

query I rowsort
SELECT ALL - col2 * + 97 AS col1 FROM tab0 AS cor0
----
-3201
-7954
-97

query I rowsort
SELECT ALL - col1 * + cor0.col1 + - 95 FROM tab1 AS cor0
----
-195
-264
-771

query I rowsort
SELECT ALL - - col1 * col2 AS col2 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + 20 col2 FROM tab2 AS cor0
----
-58
-59
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-3879
SELECT DISTINCT col0 DIV ( - col2 ) FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-3879
SELECT DISTINCT col0 / ( - col2 ) FROM tab0
----
-1
-35
0

query I rowsort
SELECT DISTINCT - 22 AS col1 FROM tab2, tab2 AS cor0
----
-22

query I rowsort
SELECT col1 * 39 + 66 * col0 + + 73 FROM tab2 AS cor0
----
1744
5950
7522

query I rowsort
SELECT ALL + + col0 * + col1 + - col0 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-3883
SELECT + col0 * - col0 + 51 DIV col1 FROM tab2
----
-48
-6084
-6238

skipif mysql # not compatible
query I rowsort label-3883
SELECT + col0 * - col0 + 51 / col1 FROM tab2
----
-48
-6084
-6238

query I rowsort
SELECT DISTINCT + col2 * ( col2 ) FROM tab1
----
2916
3249
9216

query I rowsort
SELECT - col2 + + 95 FROM tab0
----
13
62
94

query I rowsort
SELECT 83 + - col1 FROM tab0
----
-14
-3
-8

query I rowsort
SELECT + 67 * - cor0.col2 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to a824d43c38437740529b595da5e3e321

query I rowsort
SELECT ALL - col1 - col1 AS col2 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT ALL + - cor0.col0 + col2 + - 94 AS col0 FROM tab2 AS cor0
----
-135
-146
-74

query I rowsort
SELECT 63 + 57 * + col0 AS col2 FROM tab1
----
234
3711
4623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - tab2.col1 - col0 * col2 AS col2 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT 26 * - ( + col0 ) * - 33 + + 60 * col2 * col2 AS col1 FROM tab0
----
30090
479802
85932

query I rowsort
SELECT - 45 + + col1 FROM tab0
----
41
46
52

query I rowsort
SELECT DISTINCT - col1 * + col1 * col2 AS col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3896
SELECT + 83 * col2 + - 41 DIV 49 + - col1 AS col0 FROM tab1 AS cor0
----
4456
4721
7955

skipif mysql # not compatible
query I rowsort label-3896
SELECT + 83 * col2 + - 41 / 49 + - col1 AS col0 FROM tab1 AS cor0
----
4456
4721
7955

query I rowsort
SELECT DISTINCT - col1 + + cor0.col2 * - col2 * + col0 FROM tab1 AS cor0
----
-207946
-737293
-8774

query I rowsort
SELECT ALL - + col1 * col1 AS col0 FROM tab1 cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 + - col0 * CAST ( col0 AS REAL ) AS col0 FROM tab1
----
-4039
-6304
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3900
SELECT ALL - col1 * - col2 + + ( ( - col2 ) + + 99 ) DIV col1 FROM tab0 AS cor0
----
2838
7462
98

skipif mysql # not compatible
query I rowsort label-3900
SELECT ALL - col1 * - col2 + + ( ( - col2 ) + + 99 ) / col1 FROM tab0 AS cor0
----
2838
7462
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3901
SELECT ALL - col0 + + col1 DIV cor0.col1 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-3901
SELECT ALL - col0 + + col1 / cor0.col1 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT DISTINCT + 44 * - col0 AS col0 FROM tab0 AS cor0
----
-1056
-1540
-3916

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3903
SELECT DISTINCT - col0 * + col1 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

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

query I rowsort
SELECT col0 * - col0 + col2 AS col1 FROM tab0 AS cor0
----
-1224
-543
-7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 62 + + cor0.col0 col2 FROM tab2 AS cor0
----
140
141
69

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 70 - + col2 * col2 col0 FROM tab2 AS cor0
----
-1374
-606
-659

query I rowsort
SELECT ALL - 49 + col1 * col1 * cor0.col0 AS col0 FROM tab0 cor0
----
177455
329266
736960

query I rowsort
SELECT DISTINCT + - col2 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT cor0.col2 * + col1 - col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL col0 * tab2.col2 * ( - tab2.col2 ) FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT ALL col0 * - cor0.col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-262144
-27
-512000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 col0 FROM tab1 cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( cor0.col1 ) - col0 col2 FROM tab0 AS cor0
----
2814
62
7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-3915
SELECT - col2 DIV cor0.col2 + col1 * + col2 * - 13 FROM tab1 AS cor0
----
-16225
-18253
-7411

skipif mysql # not compatible
query I rowsort label-3915
SELECT - col2 / cor0.col2 + col1 * + col2 * - 13 FROM tab1 AS cor0
----
-16225
-18253
-7411

query I rowsort
SELECT ALL + col1 + col2 - - col0 FROM tab0 AS cor0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-3917
SELECT ALL + col1 * + ( col1 ) DIV cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-3917
SELECT ALL + col1 * + ( col1 ) / cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3918
SELECT ALL + cor0.col2 * CAST( col2 AS SIGNED ) - col1 FROM tab0 AS cor0
----
-96
1003
6633

skipif mysql # not compatible
query I rowsort label-3918
SELECT ALL + cor0.col2 * CAST ( col2 AS INTEGER ) - col1 FROM tab0 AS cor0
----
-96
1003
6633

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col1 * + CAST ( 70 AS REAL ) AS col0 FROM tab0 AS cor0
----
-6020
-6370
-6790

query I rowsort
SELECT col1 + - 29 FROM tab2 AS cor0
----
-12
2
30

query I rowsort
SELECT col2 - ( ( - col0 ) ) * + ( col0 ) FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT col2 * - col2 + cor0.col1 * col1 AS col1 FROM tab1 AS cor0
----
-2240
-3149
-9047

query I rowsort
SELECT + 80 * 47 FROM tab2 cor0
----
3760
3760
3760

query I rowsort
SELECT ALL col0 - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ( 70 ) FROM tab0 cor0
----
70
70
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3926
SELECT DISTINCT - + 74 * col0 DIV col2 col0 FROM tab1 cor0
----
-4
-61
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3926
SELECT DISTINCT - + 74 * col0 / col2 col0 FROM tab1 cor0
----
-4
-61
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3927
SELECT ALL - - CAST( NULL AS SIGNED ) - 83 * - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3927
SELECT ALL - - CAST ( NULL AS INTEGER ) - 83 * - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 5 + + col1 FROM tab2 AS cor0
----
22
36
64

query I rowsort
SELECT + + col0 + col2 * + col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL ( + 86 ) AS col1 FROM tab0 AS cor0
----
86
86
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3931
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - 39 * + col0 + - ( 36 ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3931
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - 39 * + col0 + - ( 36 ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * 91 FROM tab1 cor0
----
1183
2366
910

query I rowsort
SELECT ALL - + 7 * ( col0 ) FROM tab2 AS cor0
----
-49
-546
-553

query I rowsort
SELECT DISTINCT - - col2 + ( col0 ) AS col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3935
SELECT - - CAST( NULL AS SIGNED ) + + col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3935
SELECT - - CAST ( NULL AS INTEGER ) + + col2 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3936
SELECT - + col0 * col1 DIV col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3936
SELECT - + col0 * col1 / col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT col1 * - col0 + col0 FROM tab2 cor0
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 20 + col0 * col2 col2 FROM tab1 AS cor0
----
142
3628
7660

query I rowsort
SELECT DISTINCT - 72 * - ( - cor0.col0 ) FROM tab0 AS cor0
----
-1728
-2520
-6408

onlyif mysql # use DIV operator for integer division
query I rowsort label-3940
SELECT DISTINCT - col1 DIV - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3940
SELECT DISTINCT - col1 / - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 13 col0 FROM tab2 AS cor0
----
13
13
13

query I rowsort
SELECT + ( + ( cor0.col0 ) ) * ( 89 * cor0.col2 ) AS col2 FROM tab0 AS cor0
----
3115
649522
70488

query I rowsort
SELECT ALL 71 AS col1 FROM tab1 AS cor0
----
71
71
71

query I rowsort
SELECT DISTINCT + - 17 + - ( col1 ) * - 22 AS col0 FROM tab1 AS cor0
----
203
269
555

query I rowsort
SELECT + cor0.col0 * - col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - ( + col2 ) * + cor0.col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3947
SELECT + + CAST( NULL AS DECIMAL ) * + 3 * + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3947
SELECT + + CAST ( NULL AS REAL ) * + 3 * + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 49 AS col2 FROM tab1 AS cor0
----
49
49
49

query I rowsort
SELECT - col1 * + 95 + - col2 AS col0 FROM tab0 AS cor0
----
-8203
-8727
-9216

query I rowsort
SELECT - - col0 + cor0.col0 * cor0.col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL 23 AS col1 FROM tab1, tab2, tab2 AS cor0, tab0 AS cor1
----
81 values hashing to d3b0357ceadb3a70da7f1649b1ef2a30

onlyif mysql # use DIV operator for integer division
query I rowsort label-3952
SELECT ALL tab2.col1 DIV 78 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3952
SELECT ALL tab2.col1 / 78 AS col2 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) - + tab1.col0 col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT 62 FROM tab1, tab1 cor0 CROSS JOIN tab2, tab0, tab1 AS cor1, tab2 AS cor2
----
729 values hashing to fb30a893e6c2246811fbadc38b014ed3

query I rowsort
SELECT ALL - 20 FROM tab1
----
-20
-20
-20

query I rowsort
SELECT ALL - ( - col0 ) - + ( + col1 ) * - col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 60 col0 FROM tab2
----
-60
-60
-60

query I rowsort
SELECT tab0.col2 * col1 * col2 FROM tab0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3959
SELECT - col1 DIV ( col1 ) FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3959
SELECT - col1 / ( col1 ) FROM tab2 cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3960
SELECT col0 DIV + col2 + tab0.col0 * - col1 AS col2 FROM tab0
----
-2064
-3360
-8098

skipif mysql # not compatible
query I rowsort label-3960
SELECT col0 / + col2 + tab0.col0 * - col1 AS col2 FROM tab0
----
-2064
-3360
-8098

query I rowsort
SELECT ALL 28 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT + cor0.col2 + - 50 * col0 FROM tab2 AS cor0
----
-323
-3874
-3912

query I rowsort
SELECT ALL - tab1.col0 * - col2 + - 57 AS col2 FROM tab1
----
105
3591
7623

query I rowsort
SELECT DISTINCT col0 + 59 * - ( col2 ) FROM tab1
----
-3183
-3299
-5584

skipif mysql # not compatible
query I rowsort
SELECT - col2 + CAST ( col0 AS REAL ) * tab1.col0 FROM tab1
----
-45
4039
6304

query I rowsort
SELECT DISTINCT - col2 + + ( cor0.col1 ) AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + - col2 + col2 * cor0.col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT ALL - - col2 * + 12 AS col0 FROM tab0 AS cor0
----
12
396
984

query I rowsort
SELECT col1 + - 63 FROM tab0 AS cor0
----
23
28
34

query I rowsort
SELECT - 64 + cor0.col2 FROM tab1 AS cor0
----
-10
-7
32

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

query I rowsort
SELECT DISTINCT + 44 AS col0 FROM tab0, tab1 AS cor0
----
44

query I rowsort
SELECT DISTINCT 49 * - col2 FROM tab1 cor0
----
-2646
-2793
-4704

query I rowsort
SELECT DISTINCT ( 61 ) * + col1 AS col1 FROM tab1 AS cor0
----
1586
610
793

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + ( - col0 ) + + col1 * col1 AS col0 FROM tab1 cor0
----
36
673
89

query I rowsort
SELECT DISTINCT tab0.col2 * + 37 + - col2 * col1 AS col0 FROM tab0
----
-1617
-4428
-60

query I rowsort
SELECT + - col1 * - cor0.col1 - ( col1 ) AS col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT ALL 48 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT 7 + col0 * - 49 + + cor0.col0 * col0 AS col2 FROM tab2 AS cor0
----
-287
2269
2377

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col1 * - col1 col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + - col0 * col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col0 + + col2 + + col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT col0 * col2 * ( ( tab1.col0 ) ) AS col1 FROM tab1
----
233472
486
614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col0 col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT + tab0.col0 * col1 * col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL + col2 * col0 * + col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT + col0 * ( - col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - - col1 * - 65 + col0 AS col1 FROM tab2 AS cor0
----
-1026
-2008
-3757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 + 94 col0 FROM tab1 cor0
----
148
151
190

query I rowsort
SELECT DISTINCT col1 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3992
SELECT ALL - + col1 - + cor0.col1 DIV 6 FROM tab0 AS cor0
----
-100
-106
-113

skipif mysql # not compatible
query I rowsort label-3992
SELECT ALL - + col1 - + cor0.col1 / 6 FROM tab0 AS cor0
----
-100
-106
-113

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3993
SELECT - + col1 + CAST( 23 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-3
10
13

skipif mysql # not compatible
query I rowsort label-3993
SELECT - + col1 + CAST ( 23 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-3
10
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-3994
SELECT ALL + 88 * + col2 + + col2 DIV col0 AS col1 FROM tab0
----
2905
7216
88

skipif mysql # not compatible
query I rowsort label-3994
SELECT ALL + 88 * + col2 + + col2 / col0 AS col1 FROM tab0
----
2905
7216
88

query I rowsort
SELECT ALL - cor0.col1 * - 10 FROM tab2 cor0
----
170
310
590

query I rowsort
SELECT + 69 FROM tab0, tab2, tab2 cor0, tab1 AS cor1
----
81 values hashing to dfada1ee7a4e3e5c74a063a1282769f9

query I rowsort
SELECT ALL - col1 * + 33 AS col0 FROM tab0 cor0
----
-2838
-3003
-3201

query I rowsort
SELECT ( - 43 ) * col1 + - col1 FROM tab0 AS cor0
----
-3784
-4004
-4268

query I rowsort
SELECT DISTINCT cor0.col0 * col2 * col0 AS col0 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4000
SELECT + CAST( 80 AS SIGNED ) FROM tab2 AS cor0
----
80
80
80

skipif mysql # not compatible
query I rowsort label-4000
SELECT + CAST ( 80 AS INTEGER ) FROM tab2 AS cor0
----
80
80
80

query I rowsort
SELECT ALL + + col1 + col2 + col2 * + 73 FROM tab2 AS cor0
----
1983
2029
2829

query I rowsort
SELECT ALL - + ( + col1 ) + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT - - 29 + col1 FROM tab2 AS cor0
----
46
60
88

query I rowsort
SELECT + 30 + col0 FROM tab1 AS cor0
----
110
33
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col0 + col2 * + 19 col2 FROM tab1
----
-3013
-4576
1017

query I rowsort
SELECT - col1 + - col2 + tab0.col0 AS col2 FROM tab0
----
-63
-84
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-4007
SELECT ALL + 15 DIV - col2 AS col0 FROM tab0 cor0
----
-15
0
0

skipif mysql # not compatible
query I rowsort label-4007
SELECT ALL + 15 / - col2 AS col0 FROM tab0 cor0
----
-15
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 * col0 col1 FROM tab2 cor0
----
1092
1106
98

query I rowsort
SELECT - + ( - col1 ) * 17 - cor0.col0 AS col2 FROM tab0 AS cor0
----
1438
1458
1614

query I rowsort
SELECT ALL + 18 FROM tab1 AS cor0
----
18
18
18

query I rowsort
SELECT ALL col1 * 31 * + col1 + col2 + 30 FROM tab0
----
229339
256823
291710

query I rowsort
SELECT DISTINCT tab1.col1 * 82 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
1066
2132
820

onlyif mysql # use DIV operator for integer division
query I rowsort label-4013
SELECT ALL + col2 DIV + col0 + + col0 AS col2 FROM tab0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-4013
SELECT ALL + col2 / + col0 + + col0 AS col2 FROM tab0
----
25
35
89

query I rowsort
SELECT ALL + col2 + 81 AS col1 FROM tab1
----
135
138
177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 * 29 col1 FROM tab0
----
1682
1682
1682

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col1 FROM tab2, tab2 cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - cor0.col0 col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - cor0.col0 * 20 FROM tab1 AS cor0
----
-1280
-1600
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 * - col2 col0 FROM tab0 cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT - - col1 * + col1 * + col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT - + col1 * ( + col2 * col1 ) + - cor0.col2 FROM tab1 cor0
----
-16320
-36558
-5757

query I rowsort
SELECT DISTINCT + col2 * + col2 + col1 * col0 + ( - 56 + col1 ) AS col0 FROM tab1 AS cor0
----
10213
2964
3843

onlyif mysql # use DIV operator for integer division
query I rowsort label-4023
SELECT DISTINCT - col0 + - col1 DIV 78 col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4023
SELECT DISTINCT - col0 + - col1 / 78 col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL col0 + - col2 * + tab2.col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT - ( col2 ) * col1 - col2 * col2 AS col1 FROM tab1
----
-10464
-3819
-4320

query I rowsort
SELECT ALL col2 * + tab1.col1 + col1 FROM tab1
----
1261
1430
580

query I rowsort
SELECT 48 - - col1 * - col0 AS col0 FROM tab2
----
-1295
-169
-4554

query I rowsort
SELECT ALL 49 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to e587c122dea39a2488ff88b884cea462

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4029
SELECT DISTINCT - cor0.col0 * CAST( NULL AS DECIMAL ) + - cor0.col0 * - col0 + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4029
SELECT DISTINCT - cor0.col0 * CAST ( NULL AS REAL ) + - cor0.col0 * - col0 + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL col0 * col1 + col0 * + col1 FROM tab1 cor0
----
1280
156
2080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + ( cor0.col2 ) * - col0 col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + col2 + col2 * col1 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL + col1 * - col2 - col2 AS col1 FROM tab1 cor0
----
-1344
-1458
-627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4034
SELECT ALL + - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4034
SELECT ALL + - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * - 42 AS col1 FROM tab1 AS cor0
----
-2268
-2394
-4032

query I rowsort
SELECT DISTINCT 11 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
11

query I rowsort
SELECT + cor0.col1 + 51 FROM tab1 AS cor0
----
61
64
77

query I rowsort
SELECT DISTINCT - 27 * col1 + + col2 * + col2 FROM tab2 AS cor0
----
-108
-917
985

query I rowsort
SELECT cor0.col0 + + 40 AS col0 FROM tab1 AS cor0
----
104
120
43

query I rowsort
SELECT DISTINCT - 12 * + col1 FROM tab1 AS cor0
----
-120
-156
-312

query I rowsort
SELECT + 6 + + col1 * col1 FROM tab0 cor0
----
7402
8287
9415

query I rowsort
SELECT DISTINCT - col0 * col0 * - 46 FROM tab0 AS cor0
----
26496
364366
56350

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4044
SELECT DISTINCT ( - col1 ) * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4044
SELECT DISTINCT ( - col1 ) * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4045
SELECT ALL - col1 * + col1 - - 30 DIV - col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-4045
SELECT ALL - col1 * + col1 - - 30 / - col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-4046
SELECT DISTINCT - col1 * + col1 DIV + ( col1 ) AS col1 FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4046
SELECT DISTINCT - col1 * + col1 / + ( col1 ) AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + col1 + 81 + - col0 * + col2 AS col1 FROM tab1 AS cor0
----
-3557
-55
-7586

query I rowsort
SELECT + col2 + - 26 FROM tab1 AS cor0
----
28
31
70

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-4050
SELECT - col2 + - ( col2 ) DIV col2 AS col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-4050
SELECT - col2 + - ( col2 ) / col2 AS col2 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT DISTINCT + - col2 * 77 AS col1 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT ALL cor0.col0 * + 34 + ( - col0 ) AS col1 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT DISTINCT + col0 * - col2 + col0 * col1 FROM tab2
----
-1659
2574
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + + col0 * col2 * col1 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-4056
SELECT - + 4 + - cor0.col1 DIV + ( + col1 ) AS col2 FROM tab0 AS cor0
----
-5
-5
-5

skipif mysql # not compatible
query I rowsort label-4056
SELECT - + 4 + - cor0.col1 / + ( + col1 ) AS col2 FROM tab0 AS cor0
----
-5
-5
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4057
SELECT col0 + col0 DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-4057
SELECT col0 + col0 / cor0.col0 AS col2 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT + 23 * - tab0.col0 AS col1 FROM tab0
----
-2047
-552
-805

query I rowsort
SELECT 87 * col2 FROM tab2 AS cor0
----
2262
2349
3306

query I rowsort
SELECT DISTINCT col0 * col2 * col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL - - ( - col1 ) AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - col1 * + col2 * col2 FROM tab1 cor0
----
-119808
-32490
-75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-4063
SELECT DISTINCT + - cor0.col1 DIV + cor1.col0 - cor0.col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
-17
-22
-31
-41
-59
-78

skipif mysql # not compatible
query I rowsort label-4063
SELECT DISTINCT + - cor0.col1 / + cor1.col0 - cor0.col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
-17
-22
-31
-41
-59
-78

query I rowsort
SELECT DISTINCT 31 * 37 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
1147

onlyif mysql # use DIV operator for integer division
query I rowsort label-4065
SELECT + tab0.col2 DIV 74 + + col1 FROM tab0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-4065
SELECT + tab0.col2 / 74 + + col1 FROM tab0
----
86
92
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4066
SELECT + - col1 DIV - 66 + col2 DIV - cor0.col0 FROM tab2 cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4066
SELECT + - col1 / - 66 + col2 / - cor0.col0 FROM tab2 cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + 16 col2 FROM tab0 AS cor0
----
-70
-75
-81

query I rowsort
SELECT 79 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT ALL 85 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT ALL + col0 * - 81 FROM tab1
----
-243
-5184
-6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + cor0.col1 col2 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT - col1 * col1 * col2 + + col2 FROM tab1 AS cor0
----
-16128
-36450
-5643

query I rowsort
SELECT ALL ( col1 ) * - col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT col2 + - 14 AS col1 FROM tab1 AS cor0
----
40
43
82

query I rowsort
SELECT - ( cor0.col1 ) * + col2 - + ( col1 + col2 ) AS col0 FROM tab2 cor0
----
-1619
-701
-895

query I rowsort
SELECT + cor0.col0 * col2 + + cor0.col0 * + col1 + col0 * + col1 FROM tab2 AS cor0
----
11232
5688
623

query I rowsort
SELECT + ( cor0.col0 ) AS col2 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) + + ( col2 ) col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - col1 + - col1 * col1 AS col0 FROM tab1
----
-110
-182
-702

query I rowsort
SELECT DISTINCT 28 + + col2 FROM tab0
----
110
29
61

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab2, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT - - col2 + cor0.col1 * - 13 FROM tab0 AS cor0
----
-1085
-1101
-1260

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + col2 col1 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4084
SELECT ALL - - col1 DIV col1 + col2 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-4084
SELECT ALL - - col1 / col1 + col2 FROM tab2 AS cor0
----
27
28
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col2 FROM tab1 AS cor0
----
35
35
35

query I rowsort
SELECT ALL 68 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT - tab1.col2 * col0 + - ( - col1 ) * col1 - + col2 FROM tab1
----
-3605
-7607
460

onlyif mysql # use DIV operator for integer division
query I rowsort label-4088
SELECT + col2 DIV 74 + 1 FROM tab0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-4088
SELECT + col2 / 74 + 1 FROM tab0
----
1
1
2

query I rowsort
SELECT DISTINCT + ( col0 ) + - cor0.col1 - col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4090
SELECT ALL + + col1 + col1 DIV col0 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-4090
SELECT ALL + + col1 + col1 / col0 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT DISTINCT + cor0.col2 + - col1 * - col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL - + 84 * - 31 FROM tab0 AS cor0
----
2604
2604
2604

query I rowsort
SELECT DISTINCT + 97 + col0 FROM tab0 AS cor0
----
121
132
186

onlyif mysql # use DIV operator for integer division
query I rowsort label-4094
SELECT - ( - 99 ) DIV + col0 - col2 * col1 FROM tab1 AS cor0
----
-1247
-1371
-569

skipif mysql # not compatible
query I rowsort label-4094
SELECT - ( - 99 ) / + col0 - col2 * col1 FROM tab1 AS cor0
----
-1247
-1371
-569

query I rowsort
SELECT DISTINCT + ( - 74 ) * cor0.col0 * - col0 + cor0.col2 FROM tab1 AS cor0
----
303161
473696
720

query I rowsort
SELECT DISTINCT col0 + - col1 * - cor0.col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - 82 - col1 AS col0 FROM tab0 cor0
----
-168
-173
-179

query I rowsort
SELECT - col2 * + ( col1 ) FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - - 45 + - cor0.col0 * - cor0.col0 FROM tab2 cor0
----
6129
6286
94

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( + col1 AS REAL ) + cor0.col1 - + col0 FROM tab1 AS cor0
----
-44
-54
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-4101
SELECT DISTINCT - col1 + + col1 DIV col0 AS col1 FROM tab1 cor0
----
-10
-13
-18

skipif mysql # not compatible
query I rowsort label-4101
SELECT DISTINCT - col1 + + col1 / col0 AS col1 FROM tab1 cor0
----
-10
-13
-18

query I rowsort
SELECT + 32 + + col1 AS col0 FROM tab2
----
49
63
91

query I rowsort
SELECT DISTINCT - + 62 * - col2 + - col1 AS col2 FROM tab2 AS cor0
----
1553
1643
2339

query I rowsort
SELECT ALL + + col0 * + col2 * - col1 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - col2 * + col1 - col1 AS col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL - cor0.col1 * col0 + col2 * col1 FROM tab2 cor0
----
-3068
-697
620

query I rowsort
SELECT DISTINCT col1 * + col2 + - col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-3068
-697
620

onlyif mysql # use DIV operator for integer division
query I rowsort label-4108
SELECT ALL - + col2 DIV + col2 + + cor0.col1 + - col0 col2 FROM tab0 AS cor0
----
1
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4108
SELECT ALL - + col2 / + col2 + + cor0.col1 + - col0 col2 FROM tab0 AS cor0
----
1
61
61

query I rowsort
SELECT ( - col2 ) * col1 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + col2 + 7 AS col1 FROM tab0 AS cor0
----
40
8
89

query I rowsort
SELECT ALL + col1 + col0 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4112
SELECT ALL CAST( - col0 AS SIGNED ) * col2 FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-4112
SELECT ALL CAST ( - col0 AS INTEGER ) * col2 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

onlyif mysql # use DIV operator for integer division
query I rowsort label-4114
SELECT ALL - 68 DIV - col0 AS col2 FROM tab1 AS cor0
----
0
1
22

skipif mysql # not compatible
query I rowsort label-4114
SELECT ALL - 68 / - col0 AS col2 FROM tab1 AS cor0
----
0
1
22

query I rowsort
SELECT ALL - 69 + col2 FROM tab1 AS cor0
----
-12
-15
27

query I rowsort
SELECT - col1 * + 78 * + col0 + + col2 FROM tab2 AS cor0
----
-104716
-16899
-358930

query I rowsort
SELECT DISTINCT + 23 FROM tab1, tab0 AS cor0
----
23

query I rowsort
SELECT DISTINCT - + ( col2 ) - + col2 * + col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-4119
SELECT DISTINCT - cor0.col0 DIV + col1 + col0 AS col0 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-4119
SELECT DISTINCT - cor0.col0 / + col1 + col0 AS col0 FROM tab2 AS cor0
----
7
75
77

query I rowsort
SELECT DISTINCT col2 * col0 * - col2 AS col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT + col2 + - col2 * - col2 AS col2 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-4122
SELECT ALL + - cor0.col0 DIV + col2 - + col0 FROM tab1 AS cor0
----
-3
-65
-80

skipif mysql # not compatible
query I rowsort label-4122
SELECT ALL + - cor0.col0 / + col2 - + col0 FROM tab1 AS cor0
----
-3
-65
-80

query I rowsort
SELECT + - col2 + + col1 * col0 AS col0 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT ALL - col1 * col0 + col2 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT + 28 + col0 FROM tab2 AS cor0
----
106
107
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4126
SELECT ALL CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4126
SELECT ALL CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + tab1.col1 * - col0 col1 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT ALL 34 + col0 FROM tab2
----
112
113
41

query I rowsort
SELECT ALL col0 * + col2 + + col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT + col0 + - col2 + col1 * col1 AS col1 FROM tab1 AS cor0
----
107
153
625

query I rowsort
SELECT + cor0.col1 * - col1 * - col0 + col0 + + col2 * col1 AS col0 FROM tab0 AS cor0
----
180366
329447
744560

query I rowsort
SELECT - col0 + + col2 + - col1 AS col0 FROM tab0 AS cor0
----
-131
-77
-98

query I rowsort
SELECT + col0 + - tab2.col2 * tab2.col0 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT - col2 AS col1 FROM tab0 WHERE NOT ( col1 ) <> NULL
----

query III rowsort
SELECT * FROM tab1 WHERE NULL NOT IN ( col0 / col0 - tab1.col2 )
----

query I rowsort
SELECT ALL + col1 - col0 * col2 AS col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT + col1 + col2 * + col2 FROM tab0
----
1175
6815
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab2 WHERE NOT + col0 NOT IN ( + col0 )
----
-26
-27
-38

query I rowsort
SELECT + col2 * col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL col1 + + tab0.col0 AS col0 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-4141
SELECT - + col2 DIV - col2 - - col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4141
SELECT - + col2 / - col2 - - col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT ALL - col0 + - col1 * col1 FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT ALL + col1 * + col1 + tab0.col1 * col1 FROM tab0
----
14792
16562
18818

query I rowsort
SELECT ALL - tab0.col1 + + col2 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL col0 + + col1 * + col0 + col0 * + col2 FROM tab1
----
243
4352
8800

onlyif mysql # use DIV operator for integer division
query I rowsort label-4146
SELECT DISTINCT - col0 DIV + col0 FROM tab0 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4146
SELECT DISTINCT - col0 / + col0 FROM tab0 cor0
----
-1

query I rowsort
SELECT col1 * cor0.col1 + + col1 + + col2 AS col1 FROM tab1 cor0
----
167
278
756

query I rowsort
SELECT - + col2 * + col2 + col1 + col0 * col2 FROM tab1 cor0
----
-1523
-2728
409

query I rowsort
SELECT + - col2 + col2 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col2 * tab0.col0 + + 6 FROM tab0
----
41
7304
798

query I rowsort
SELECT DISTINCT + col1 + - col2 * col2 * col2 FROM tab1
----
-157438
-185183
-884723

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4152
SELECT - + col2 + CAST( NULL AS DECIMAL ) / col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4152
SELECT - + col2 + CAST ( NULL AS REAL ) / col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4153
SELECT DISTINCT CAST( NULL AS SIGNED ) + col2 + + col2 AS col2 FROM tab2 AS cor0
----
NULL

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

query I rowsort
SELECT ALL + - ( + col0 ) + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + 79 * - col2 AS col1 FROM tab2 cor0
----
-2028
-2106
-2964

query I rowsort
SELECT DISTINCT + col1 * col0 * col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT + + ( - col2 ) * col1 + 30 AS col2 FROM tab0 AS cor0
----
-2808
-67
-7432

query I rowsort
SELECT DISTINCT - + cor0.col0 * - cor0.col0 + col1 + col0 * col2 AS col1 FROM tab2 AS cor0
----
269
8171
9260

query I rowsort
SELECT col2 * col2 * + tab2.col1 FROM tab2
----
22599
24548
39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-4160
SELECT DISTINCT + ( + col2 ) DIV - col0 + + col1 + + col0 FROM tab0 cor0
----
109
132
180

skipif mysql # not compatible
query I rowsort label-4160
SELECT DISTINCT + ( + col2 ) / - col0 + + col1 + + col0 FROM tab0 cor0
----
109
132
180

query I rowsort
SELECT - - col1 * - 4 FROM tab2 AS cor0
----
-124
-236
-68

query I rowsort
SELECT DISTINCT - ( 40 ) FROM tab0 AS cor0
----
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-4163
SELECT ALL + 85 DIV + col1 + col1 + + col0 * 53 AS col1 FROM tab0 AS cor0
----
1358
1952
4808

skipif mysql # not compatible
query I rowsort label-4163
SELECT ALL + 85 / + col1 + col1 + + col0 * 53 AS col1 FROM tab0 AS cor0
----
1358
1952
4808

query I rowsort
SELECT - 14 AS col2 FROM tab2 cor0
----
-14
-14
-14

query I rowsort
SELECT - + cor0.col1 - col0 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) * - col0 + + 20 * col1 col1 FROM tab0 AS cor0
----
3784
5335
9919

onlyif mysql # use DIV operator for integer division
query I rowsort label-4167
SELECT - + col2 DIV col1 AS col1 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4167
SELECT - + col2 / col1 AS col1 FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT + 13 * col2 AS col1 FROM tab1 cor0
----
1248
702
741

query I rowsort
SELECT ALL 65 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + + col0 col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + 32 * + col2 AS col2 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT DISTINCT - tab0.col0 + 94 FROM tab0, tab2 AS cor0
----
5
59
70

query I rowsort
SELECT - col2 - - ( - 30 ) AS col0 FROM tab1 cor0
----
-126
-84
-87

query I rowsort
SELECT DISTINCT + - col0 + + 91 FROM tab1 AS cor0
----
11
27
88

query I rowsort
SELECT + col2 + - cor0.col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL + 25 AS col2 FROM tab2
----
25
25
25

query I rowsort
SELECT ALL + col0 * + 49 FROM tab1 AS cor0
----
147
3136
3920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4178
SELECT - + col1 - + CAST( 26 AS SIGNED ) FROM tab0 AS cor0
----
-112
-117
-123

skipif mysql # not compatible
query I rowsort label-4178
SELECT - + col1 - + CAST ( 26 AS INTEGER ) FROM tab0 AS cor0
----
-112
-117
-123

query I rowsort
SELECT DISTINCT - - col1 + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL + + col1 + 32 AS col2 FROM tab0 AS cor0
----
118
123
129

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4181
SELECT DISTINCT + col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4181
SELECT DISTINCT + col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 + + col2 * + col2 * col0 FROM tab0 cor0
----
0
26112
598347

query I rowsort
SELECT + + col2 - ( col0 ) AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + + col0 * + col1 + col1 * col2 AS col1 FROM tab1 AS cor0
----
1210
1482
2288

onlyif mysql # use DIV operator for integer division
query I rowsort label-4185
SELECT ALL col1 + - 46 DIV col0 AS col2 FROM tab1 AS cor0
----
10
11
13

skipif mysql # not compatible
query I rowsort label-4185
SELECT ALL col1 + - 46 / col0 AS col2 FROM tab1 AS cor0
----
10
11
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4186
SELECT 38 - col2 * + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4186
SELECT 38 - col2 * + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + 99 - - col0 FROM tab1
----
102
163
179

query I rowsort
SELECT ALL - col2 * + 35 AS col0 FROM tab1 AS cor0
----
-1890
-1995
-3360

query I rowsort
SELECT + + col2 * col2 + 57 FROM tab1 cor0
----
2973
3306
9273

query I rowsort
SELECT ALL + col0 * - 76 FROM tab0 cor0
----
-1824
-2660
-6764

query I rowsort
SELECT - cor0.col2 * col1 - 33 AS col1 FROM tab1 AS cor0
----
-1281
-1437
-603

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4192
SELECT DISTINCT - col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-4192
SELECT DISTINCT - col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT 39 + col0 * + cor0.col2 FROM tab0 AS cor0
----
7337
74
831

query I rowsort
SELECT + + col0 + col0 + col1 * + col1 FROM tab2 AS cor0
----
3637
447
975

query I rowsort
SELECT + col0 * 59 AS col2 FROM tab1 cor0
----
177
3776
4720

query I rowsort
SELECT DISTINCT - - col1 * cor0.col2 + - ( - col1 ) AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ( - col1 ) + + col0 AS col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT + ( + col1 ) FROM tab0
----
86
91
97

query I rowsort
SELECT ( col2 ) + col1 * tab0.col0 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT 78 + - tab1.col0 * col0 * 94 FROM tab1
----
-384946
-601522
-768

query I rowsort
SELECT 34 + + tab0.col0 AS col1 FROM tab0
----
123
58
69

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 * col1 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
-16

query I rowsort
SELECT col0 + - col1 * tab0.col0 FROM tab0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + tab1.col1 col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ( - cor0.col2 ) + + ( - 34 ) * - cor0.col0 AS col1 FROM tab0 AS cor0
----
1189
2944
783

query I rowsort
SELECT ALL - cor0.col1 - cor0.col2 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 5f7b5c5678d2f6f42d8763f44ca95184

query I rowsort
SELECT DISTINCT + col0 + col1 * + col2 * 30 FROM tab0 AS cor0
----
223949
2945
85164

query I rowsort
SELECT ALL + 76 AS col0 FROM tab2 AS cor0
----
76
76
76

query I rowsort
SELECT DISTINCT cor0.col1 * col0 * - 28 AS col0 FROM tab1 AS cor0
----
-17920
-2184
-29120

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * - col2 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT cor0.col1 * col2 * + ( col2 ) AS col1 FROM tab0 AS cor0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 99 col1 FROM tab2, tab1, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to c841a8d826151b422ecdb71db0250739

query I rowsort
SELECT ALL col2 * - ( ( - col1 ) ) + col0 FROM tab1
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - 75 * 90 col0 FROM tab1
----
-6804
-6807
-6846

query I rowsort
SELECT ALL col1 + + col1 * - 48 FROM tab1 AS cor0
----
-1222
-470
-611

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4217
SELECT + + col1 + CAST( NULL AS DECIMAL ) * ( col1 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4217
SELECT + + col1 + CAST ( NULL AS REAL ) * ( col1 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 90 + - tab0.col2 FROM tab0, tab1 AS cor0
----
-123
-172
-91

query I rowsort
SELECT + ( cor0.col2 ) + + col1 * - 63 FROM tab1 AS cor0
----
-1584
-573
-723

onlyif mysql # use DIV operator for integer division
query I rowsort label-4220
SELECT DISTINCT - 44 * col1 * col1 + + ( - ( + col0 ) ) DIV col0 FROM tab2 AS cor0
----
-12717
-153165
-42285

skipif mysql # not compatible
query I rowsort label-4220
SELECT DISTINCT - 44 * col1 * col1 + + ( - ( + col0 ) ) / col0 FROM tab2 AS cor0
----
-12717
-153165
-42285

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4221
SELECT ALL + CAST( - col2 AS SIGNED ) FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4221
SELECT ALL + CAST ( - col2 AS INTEGER ) FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - - col1 + - 24 FROM tab2 cor0
----
-7
35
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - 33 ) * col1 + + col2 * - col1 col1 FROM tab0 AS cor0
----
-4459
0
3104

query I rowsort
SELECT ALL 60 * - col2 AS col2 FROM tab2 AS cor0
----
-1560
-1620
-2280

query I rowsort
SELECT - - 83 + - col2 * + col0 FROM tab1 AS cor0
----
-3565
-7597
-79

query I rowsort
SELECT DISTINCT + 36 - col0 FROM tab0 AS cor0
----
-53
1
12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4227
SELECT CAST( - ( + col1 ) AS SIGNED ) * cor0.col2 + 66 * col2 * 68 AS col0 FROM tab1 AS cor0
----
240948
255246
429600

skipif mysql # not compatible
query I rowsort label-4227
SELECT CAST ( - ( + col1 ) AS INTEGER ) * cor0.col2 + 66 * col2 * 68 AS col0 FROM tab1 AS cor0
----
240948
255246
429600

query I rowsort
SELECT - + 7 * col0 + + col2 AS col1 FROM tab2 cor0
----
-22
-515
-520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col2 ) col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - 4 + col2 FROM tab2 AS cor0
----
22
23
34

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 25 AS REAL ) FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT + + col1 * + 52 FROM tab2 AS cor0
----
1612
3068
884

query I rowsort
SELECT - + 58 - 23 AS col1 FROM tab2 AS cor0
----
-81
-81
-81

query I rowsort
SELECT ALL 1 + + 2 FROM tab1 AS cor0
----
3
3
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4235
SELECT ALL + ( col0 ) * - col0 + - CAST( NULL AS DECIMAL ) * + ( - col0 + col0 ) * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4235
SELECT ALL + ( col0 ) * - col0 + - CAST ( NULL AS REAL ) * + ( - col0 + col0 ) * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4236
SELECT DISTINCT - 70 DIV - col2 + - col2 DIV col1 AS col0 FROM tab1 AS cor0
----
-1
-4
-7

skipif mysql # not compatible
query I rowsort label-4236
SELECT DISTINCT - 70 / - col2 + - col2 / col1 AS col0 FROM tab1 AS cor0
----
-1
-4
-7

query I rowsort
SELECT DISTINCT - 56 * 57 FROM tab2
----
-3192

query I rowsort
SELECT DISTINCT + tab0.col2 FROM tab0, tab1 cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT - 67 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

query I rowsort
SELECT DISTINCT - cor0.col0 * 54 + + ( cor0.col1 ) FROM tab2, tab2 cor0
----
-347
-4153
-4249

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4241
SELECT ALL CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-4241
SELECT ALL CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col2 + col2 * col2 * + ( col1 ) FROM tab2 cor0
----
22626
24586
39910

query I rowsort
SELECT - 13 + - cor0.col2 FROM tab2 AS cor0
----
-39
-40
-51

query I rowsort
SELECT - col0 * col0 + 43 AS col2 FROM tab1 AS cor0
----
-4053
-6357
34

query I rowsort
SELECT col1 * cor0.col0 + 56 FROM tab2 AS cor0
----
1399
273
4658

onlyif mysql # use DIV operator for integer division
query I rowsort label-4246
SELECT 39 + col1 DIV - col1 AS col0 FROM tab2 AS cor0
----
38
38
38

skipif mysql # not compatible
query I rowsort label-4246
SELECT 39 + col1 / - col1 AS col0 FROM tab2 AS cor0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 93 col2 FROM tab2
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col1 col0 FROM tab2, tab1 AS cor0, tab0 cor1
----
86
91
97

query I rowsort
SELECT DISTINCT + col0 * col0 + + col2 AS col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT - col1 + + cor0.col0 * ( - col1 ) FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4252
SELECT + col2 DIV cor0.col0 AS col0 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4252
SELECT + col2 / cor0.col0 AS col0 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT DISTINCT + col2 + 11 AS col1 FROM tab0 AS cor0
----
12
44
93

query I rowsort
SELECT ALL + cor0.col0 * ( - col2 ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col1 + col1 * + col2 * + col1 AS col1 FROM tab0 AS cor0
----
244154
679133
9506

query I rowsort
SELECT + 24 * col2 * - col0 - col1 FROM tab0
----
-175243
-19094
-937

query I rowsort
SELECT col0 * - col1 + + 54 * + col0 FROM tab2
----
-390
161
2923

query I rowsort
SELECT ALL 26 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT - 7 * + col0 + - col0 * + tab0.col2 FROM tab0
----
-280
-7921
-960

query I rowsort
SELECT DISTINCT 49 * col0 FROM tab0
----
1176
1715
4361

query I rowsort
SELECT cor0.col0 + 87 AS col0 FROM tab2 cor0
----
165
166
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4262
SELECT - ( col2 ) - col0 DIV col0 AS col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-4262
SELECT - ( col2 ) - col0 / col0 AS col2 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2, tab1 AS cor3
----
3
64
80

query I rowsort
SELECT - - 8 * cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8bd6c39e77e44b2965773369dba6b816

query I rowsort
SELECT DISTINCT col1 + + ( + col2 ) * - col1 + col2 AS col1 FROM tab2 AS cor0
----
-1449
-591
-779

query I rowsort
SELECT ALL - + col0 * - ( col2 ) + + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - col0 + ( - col0 ) * col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT + 25 * - col2 * - col0 AS col1 FROM tab0
----
182450
19800
875

query I rowsort
SELECT ALL - ( col0 ) * - col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 50 FROM tab2, tab0, tab0 AS cor0
----
-50

query I rowsort
SELECT - col2 + - ( col2 + col2 ) AS col2 FROM tab1 AS cor0
----
-162
-171
-288

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 - 70 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 53b7a51bc3f909dcf8a82dd8c00ebcb6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 + - tab2.col1 * + col1 - - col0 col1 FROM tab2
----
-131
-3325
-947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - - col2 col2 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4275
SELECT - col1 DIV col1 + CAST( + col0 + col1 * - col2 AS SIGNED ) col0 FROM tab1 AS cor0
----
-1169
-1402
-507

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4275
SELECT - col1 / col1 + CAST ( + col0 + col1 * - col2 AS INTEGER ) col0 FROM tab1 AS cor0
----
-1169
-1402
-507

query I rowsort
SELECT DISTINCT - ( + tab0.col2 ) AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT 49 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-4278
SELECT DISTINCT col2 DIV - col1 - - ( tab2.col0 ) * - col0 FROM tab2
----
-49
-6084
-6243

skipif mysql # not compatible
query I rowsort label-4278
SELECT DISTINCT col2 / - col1 - - ( tab2.col0 ) * - col0 FROM tab2
----
-49
-6084
-6243

query I rowsort
SELECT - col0 + 68 * col2 FROM tab2 AS cor0
----
1690
1829
2505

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4280
SELECT + col2 * - CAST( NULL AS SIGNED ) / + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4280
SELECT + col2 * - CAST ( NULL AS INTEGER ) / + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 * ( - 93 ) + col1 FROM tab0 AS cor0
----
190
3155
7717

query I rowsort
SELECT ALL 58 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 cor1, tab2 AS cor2, tab1 cor3
----
243 values hashing to 35fbb9c8a846114caca5e1135cf8703c

query I rowsort
SELECT DISTINCT - + col0 + col1 * - 61 FROM tab2 AS cor0
----
-1116
-1898
-3677

query I rowsort
SELECT DISTINCT cor0.col0 * col1 * - ( col0 ) + ( 89 ) * - col0 AS col0 FROM tab2 AS cor0
----
-113128
-2142
-365898

query I rowsort
SELECT + col0 * col0 + - col0 AS col2 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT - col2 * + col2 + 16 FROM tab0 AS cor0
----
-1073
-6708
15

query I rowsort
SELECT ALL - col0 * - col0 * - col0 AS col0 FROM tab2 WHERE NULL NOT BETWEEN - tab2.col0 * col2 AND col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4288
SELECT ALL + col0 DIV + col0 + col2 AS col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-4288
SELECT ALL + col0 / + col0 + col2 AS col2 FROM tab1
----
55
58
97

query I rowsort
SELECT - col1 + - col0 * + col1 FROM tab0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4290
SELECT DISTINCT col0 * col0 - - col0 DIV - col1 FROM tab0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-4290
SELECT DISTINCT col0 * col0 - - col0 / - col1 FROM tab0
----
1225
576
7921

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL BETWEEN col1 * + col1 * - col2 AND - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4292
SELECT col2 - - col1 DIV tab1.col1 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-4292
SELECT col2 - - col1 / tab1.col1 FROM tab1
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 - col2 col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT col0 * - tab1.col1 AS col2 FROM tab1 WHERE NOT - col2 > NULL
----

query I rowsort
SELECT DISTINCT + col2 - - tab1.col0 AS col0 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4296
SELECT DISTINCT - col1 DIV + tab1.col0 + + col0 DIV col1 FROM tab1
----
-8
6

skipif mysql # not compatible
query I rowsort label-4296
SELECT DISTINCT - col1 / + tab1.col0 + + col0 / col1 FROM tab1
----
-8
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col0 * col2 col0 FROM tab0 WHERE col2 * - col2 > ( col2 )
----

query I rowsort
SELECT 54 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query III rowsort
SELECT * FROM tab1 WHERE tab1.col1 = col1 * col1 + - col1 / - col1 + - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4300
SELECT ALL + col0 DIV col2 + col0 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-4300
SELECT ALL + col0 / col2 + col0 FROM tab1
----
3
65
80

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 WHERE NOT col0 <> - col0
----

query I rowsort
SELECT col2 + col0 * + col1 FROM tab1
----
1136
132
697

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

query I rowsort
SELECT ALL col1 * - col2 * + col1 - - col2 * - col2 FROM tab1
----
-25440
-39420
-8949

query I rowsort
SELECT ALL + + col0 * - col2 - 86 * col1 * col1 FROM tab0 AS cor0
----
-636848
-719464
-809209

query I rowsort
SELECT DISTINCT 18 AS col2 FROM tab1 cor0
----
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + cor0.col1 col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - - col0 * + col1 AS col0 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4309
SELECT DISTINCT + + col0 DIV - col0 AS col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4309
SELECT DISTINCT + + col0 / - col0 AS col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT DISTINCT + 67 + - col1 FROM tab1 AS cor0
----
41
54
57

query I rowsort
SELECT ALL - - 82 * - col0 AS col2 FROM tab1 AS cor0
----
-246
-5248
-6560

query I rowsort
SELECT ALL + 84 * col2 * col1 AS col2 FROM tab2 AS cor0
----
128856
54264
70308

query I rowsort
SELECT + 58 AS col0 FROM tab1 cor0
----
58
58
58

query I rowsort
SELECT DISTINCT ( - col0 ) + cor0.col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT col2 * cor0.col2 * + ( col2 ) AS col0 FROM tab2 AS cor0
----
17576
19683
54872

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4316
SELECT DISTINCT - + col2 * - col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4316
SELECT DISTINCT - + col2 * - col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + + 11 * - col0 FROM tab1 AS cor0
----
-33
-704
-880

query I rowsort
SELECT ALL 72 * col2 + + col2 FROM tab1 AS cor0
----
3942
4161
7008

query I rowsort
SELECT + + ( col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - 40 + cor0.col0 * + col1 FROM tab0 AS cor0
----
2024
3355
8059

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4321
SELECT DISTINCT - col0 + CAST( NULL AS SIGNED ) * col1 FROM tab1 cor0
----
NULL

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

query I rowsort
SELECT - + cor0.col1 * 61 - cor0.col2 FROM tab2 AS cor0
----
-1075
-1918
-3625

query I rowsort
SELECT cor1.col2 * - 45 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab1 cor2
----
81 values hashing to c1844f478612e246edb854acbfaf0756

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

query I rowsort
SELECT ALL cor0.col0 + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to a842fe91e5dc1346a95ce3987ec1b2fb

query I rowsort
SELECT DISTINCT ( - 58 ) AS col2 FROM tab1 AS cor0
----
-58

query I rowsort
SELECT DISTINCT + 64 FROM tab1, tab1 AS cor0
----
64

query I rowsort
SELECT ALL - col0 + col2 * + col1 * - col0 + 26 AS col0 FROM tab1
----
-36518
-4189
-99894

query I rowsort
SELECT DISTINCT col2 * 85 + + col1 AS col2 FROM tab1
----
4616
4855
8173

query I rowsort
SELECT DISTINCT - col1 * col2 + col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT 71 AS col1 FROM tab1, tab0 cor0
----
71

query I rowsort
SELECT ALL col1 + col0 + tab1.col2 AS col1 FROM tab1
----
131
189
83

query I rowsort
SELECT ALL + 50 * - cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 6e4e5fd148c7526b4448665708cf5be5

query I rowsort
SELECT 44 + + 24 AS col0 FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT + - 11 + cor0.col1 FROM tab1 AS cor0
----
-1
15
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col0 * + col1 col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT 66 * + 41 FROM tab0
----
2706
2706
2706

onlyif mysql # use DIV operator for integer division
query I rowsort label-4338
SELECT + - col0 - 10 DIV col1 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4338
SELECT + - col0 - 10 / col1 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - col0 * + col1 * - col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - col2 * + 27 + col0 * + col2 + col0 FROM tab1 AS cor0
----
-1293
2173
5168

query I rowsort
SELECT ALL - col2 + col1 * 21 FROM tab2 AS cor0
----
1213
319
624

query I rowsort
SELECT - - col1 * - 11 + - col0 AS col0 FROM tab1 AS cor0
----
-174
-223
-289

onlyif mysql # use DIV operator for integer division
query I rowsort label-4343
SELECT DISTINCT + col2 - col0 DIV + 37 AS col1 FROM tab2 AS cor0
----
24
27
36

skipif mysql # not compatible
query I rowsort label-4343
SELECT DISTINCT + col2 - col0 / + 37 AS col1 FROM tab2 AS cor0
----
24
27
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col2 * - col2 col0 FROM tab1 AS cor0
----
-2942
-3259
-9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-4345
SELECT ALL col2 DIV CAST( + ( col1 ) AS SIGNED ) AS col2 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-4345
SELECT ALL col2 / CAST ( + ( col1 ) AS INTEGER ) AS col2 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT col0 + 45 AS col1 FROM tab0 AS cor0
----
134
69
80

query I rowsort
SELECT DISTINCT - + col1 + + 84 AS col0 FROM tab0 AS cor0
----
-13
-2
-7

query I rowsort
SELECT - col2 * col0 + - 31 + + col1 * ( + col2 ) FROM tab2 AS cor0
----
-2387
-525
617

query I rowsort
SELECT + 24 AS col0 FROM tab2, tab1, tab2 cor0
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

query I rowsort
SELECT ALL + tab1.col0 * col2 * 25 + - tab1.col0 * col1 FROM tab1
----
190960
3972
90560

query I rowsort
SELECT - cor0.col1 - - col2 * - col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT - - cor0.col1 + 36 FROM tab0 AS cor0
----
122
127
133

query I rowsort
SELECT - + col0 + - col0 * - cor0.col1 * col1 FROM tab2 AS cor0
----
22752
271440
6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4354
SELECT + cor0.col0 + - col0 DIV 20 AS col2 FROM tab2 AS cor0
----
7
75
76

skipif mysql # not compatible
query I rowsort label-4354
SELECT + cor0.col0 + - col0 / 20 AS col2 FROM tab2 AS cor0
----
7
75
76

query I rowsort
SELECT 31 * col2 + + col1 AS col2 FROM tab1 cor0
----
1700
1777
2989

query I rowsort
SELECT - - col0 + - 14 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
0
142
144

query I rowsort
SELECT col2 + - 99 AS col0 FROM tab2
----
-61
-72
-73

query I rowsort
SELECT DISTINCT ( col1 ) + + cor0.col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + - 29 * cor0.col2 FROM tab2 AS cor0
----
-1102
-754
-783

query I rowsort
SELECT 12 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to c60b9398e29d6382e0d15363f9325811

onlyif mysql # use DIV operator for integer division
query I rowsort label-4361
SELECT ALL col1 + tab2.col1 DIV - ( - ( col1 ) ) FROM tab2
----
18
32
60

skipif mysql # not compatible
query I rowsort label-4361
SELECT ALL col1 + tab2.col1 / - ( - ( col1 ) ) FROM tab2
----
18
32
60

query I rowsort
SELECT ALL 13 * - tab0.col0 * + 51 + - col1 AS col1 FROM tab0
----
-15998
-23302
-59098

onlyif mysql # use DIV operator for integer division
query I rowsort label-4363
SELECT - cor0.col2 DIV col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4363
SELECT - cor0.col2 / col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT - cor0.col0 - 48 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to b59f419e09e75eeadf17578073aee6e9

query I rowsort
SELECT ALL ( col0 ) + + col1 * col1 FROM tab1
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-4366
SELECT 15 DIV + col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4366
SELECT 15 / + col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - 2 * - col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT 24 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

onlyif mysql # use DIV operator for integer division
query I rowsort label-4369
SELECT ALL - - col2 DIV - cor0.col0 + 79 * - col1 FROM tab0 AS cor0
----
-6795
-7189
-7663

skipif mysql # not compatible
query I rowsort label-4369
SELECT ALL - - col2 / - cor0.col0 + 79 * - col1 FROM tab0 AS cor0
----
-6795
-7189
-7663

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4370
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4370
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - col0 - - col2 * + col1 AS col0 FROM tab0
----
2814
62
7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-4372
SELECT DISTINCT - col1 DIV - 90 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-4372
SELECT DISTINCT - col1 / - 90 FROM tab2
----
0

query I rowsort
SELECT - col2 * - 48 FROM tab1
----
2592
2736
4608

query I rowsort
SELECT cor0.col1 * col0 + + col0 * col1 + - col1 * col1 AS col2 FROM tab2 cor0
----
-527
2397
5723

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4375
SELECT col1 * CAST( NULL AS SIGNED ) + + col2 + - cor0.col0 * - 47 * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4375
SELECT col1 * CAST ( NULL AS INTEGER ) + + col2 + - cor0.col0 * - 47 * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 98 FROM tab1, tab2 cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT DISTINCT + cor1.col0 AS col1 FROM tab1, tab0 AS cor0, tab0 cor1
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col0 + col1 col2 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT + + col0 - col0 * col1 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT - + col0 + + col0 + cor0.col0 * + 29 AS col0 FROM tab1 AS cor0
----
1856
2320
87

query I rowsort
SELECT ALL + - 7 - - col0 FROM tab0 AS cor0
----
17
28
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4382
SELECT + col0 + col1 DIV 62 AS col2 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4382
SELECT + col0 + col1 / 62 AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - - col2 * col0 + - 45 AS col0 FROM tab0 AS cor0
----
-10
7253
747

onlyif mysql # use DIV operator for integer division
query I rowsort label-4384
SELECT ( 83 ) DIV - col1 + col1 * + col2 AS col1 FROM tab2
----
1533
642
835

skipif mysql # not compatible
query I rowsort label-4384
SELECT ( 83 ) / - col1 + col1 * + col2 AS col1 FROM tab2
----
1533
642
835

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4385
SELECT CAST( - 8 AS SIGNED ) FROM tab0
----
-8
-8
-8

skipif mysql # not compatible
query I rowsort label-4385
SELECT CAST ( - 8 AS INTEGER ) FROM tab0
----
-8
-8
-8

query I rowsort
SELECT - ( 11 ) AS col2 FROM tab0
----
-11
-11
-11

query I rowsort
SELECT - col0 + - col2 * ( col0 ) FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT - + cor0.col2 * 92 FROM tab2 cor0
----
-2392
-2484
-3496

query I rowsort
SELECT ALL + ( col0 ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - + col0 + - 32 FROM tab1 AS cor0
----
-112
-35
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 col0 FROM tab1, tab0, tab2 AS cor0
----
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4392
SELECT ( - col0 ) DIV + col0 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4392
SELECT ( - col0 ) / + col0 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT + col2 - - tab2.col0 FROM tab2
----
104
117
34

query I rowsort
SELECT 10 - col1 AS col2 FROM tab1
----
-16
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 * col0 col0 FROM tab2
----
553
6162
6241

query I rowsort
SELECT + col2 * + col1 - col0 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT + col2 * + 66 FROM tab1
----
3564
3762
6336

query I rowsort
SELECT ALL ( - 47 + col2 ) * col0 FROM tab2
----
-140
-1638
-711

query I rowsort
SELECT + 20 - col2 AS col0 FROM tab0
----
-13
-62
19

query I rowsort
SELECT DISTINCT ( + col2 ) * col2 * 84 FROM tab0
----
564816
84
91476

query I rowsort
SELECT 64 * - 33 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to f664409ed6605b404097d0abb962e1e3

query I rowsort
SELECT + - col0 + + ( col1 * col2 ) FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL - cor0.col2 * + col1 * - ( col0 ) + col0 AS col2 FROM tab2 cor0
----
119730
51113
5866

onlyif mysql # use DIV operator for integer division
query I rowsort label-4404
SELECT + cor0.col1 DIV - 16 FROM tab1, tab0 AS cor0
----
9 values hashing to 80dbed3a73423b6e9cabd59a6bf138a4

skipif mysql # not compatible
query I rowsort label-4404
SELECT + cor0.col1 / - 16 FROM tab1, tab0 AS cor0
----
9 values hashing to 80dbed3a73423b6e9cabd59a6bf138a4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * 65 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 060b4c2f91377db0bc5b536ca2adfaf6

query I rowsort
SELECT + col0 + + ( col0 ) * col0 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-4407
SELECT ALL - col0 DIV ( + col1 ) AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4407
SELECT ALL - col0 / ( + col1 ) AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT 43 + 21 AS col0 FROM tab1, tab0 AS cor0
----
64

query I rowsort
SELECT col1 + col1 * + col0 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT col1 * + 92 FROM tab0 AS cor0
----
7912
8372
8924

query I rowsort
SELECT - + col0 * 1 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT col0 * 36 * col1 FROM tab2
----
165672
48348
7812

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ( 92 ) AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT + + col2 + + col1 * - col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL - col0 * ( col2 ) + col2 + col0 AS col1 FROM tab1 AS cor0
----
-105
-3527
-7504

query I rowsort
SELECT DISTINCT - col1 * 42 + col1 FROM tab2 cor0
----
-1271
-2419
-697

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4419
SELECT + col2 DIV col1 + - col1 AS col2 FROM tab1 AS cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-4419
SELECT + col2 / col1 + - col1 AS col2 FROM tab1 AS cor0
----
-24
-5
-6

query I rowsort
SELECT tab0.col1 * 99 FROM tab0
----
8514
9009
9603

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 84 * 39 + - col0 col1 FROM tab2 AS cor0
----
-3283
-3354
-3355

query I rowsort
SELECT ALL - 11 * + col1 + + col2 AS col2 FROM tab2 AS cor0
----
-149
-314
-623

query I rowsort
SELECT DISTINCT - 37 + - col0 AS col1 FROM tab0 AS cor0
----
-126
-61
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4424
SELECT DISTINCT CAST( + 83 AS SIGNED ) * col1 + + col1 * 13 FROM tab0 cor0
----
8256
8736
9312

skipif mysql # not compatible
query I rowsort label-4424
SELECT DISTINCT CAST ( + 83 AS INTEGER ) * col1 + + col1 * 13 FROM tab0 cor0
----
8256
8736
9312

query I rowsort
SELECT - 48 * + 95 * col0 FROM tab2 AS cor0
----
-31920
-355680
-360240

query I rowsort
SELECT DISTINCT - 12 AS col1 FROM tab0, tab0 AS cor0
----
-12

query I rowsort
SELECT DISTINCT ( - cor0.col1 ) + - col1 * 99 AS col0 FROM tab0 AS cor0
----
-8600
-9100
-9700

query I rowsort
SELECT DISTINCT + - ( + col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + 46 ) + + col0 col1 FROM tab0 AS cor0
----
135
70
81

query I rowsort
SELECT + ( + col1 ) * + col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4431
SELECT ALL - col0 + - col2 + col0 DIV + 38 AS col2 FROM tab1 AS cor0
----
-120
-174
-57

skipif mysql # not compatible
query I rowsort label-4431
SELECT ALL - col0 + - col2 + col0 / + 38 AS col2 FROM tab1 AS cor0
----
-120
-174
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4432
SELECT ALL - CAST( col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4432
SELECT ALL - CAST ( col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT ( col1 ) + cor0.col0 * col0 AS col1 FROM tab1 AS cor0
----
35
4106
6413

onlyif mysql # use DIV operator for integer division
query I rowsort label-4434
SELECT ALL 89 + 8 * - col2 + - 78 DIV col2 FROM tab0 AS cor0
----
-177
-567
3

skipif mysql # not compatible
query I rowsort label-4434
SELECT ALL 89 + 8 * - col2 + - 78 / col2 FROM tab0 AS cor0
----
-177
-567
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col2 col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 84 + + col2 * + col1 FROM tab1 AS cor0
----
1332
1488
654

query I rowsort
SELECT - 98 * col0 AS col2 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT DISTINCT 25 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
25

query I rowsort
SELECT ALL - col2 + - col0 * + ( + col2 ) FROM tab2 cor0
----
-2054
-216
-3040

query I rowsort
SELECT ( col1 ) * col2 - + 93 FROM tab2 AS cor0
----
1441
553
744

query I rowsort
SELECT DISTINCT cor0.col2 - col1 * ( + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT - 65 * - col1 AS col1 FROM tab2 cor0
----
1105
2015
3835

query I rowsort
SELECT DISTINCT - 70 * col1 * col2 + + col1 FROM tab1 AS cor0
----
-39890
-87347
-98254

query I rowsort
SELECT ALL 79 - - cor0.col2 AS col2 FROM tab2 AS cor0
----
105
106
117

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col2 * - 99 AS col1 FROM tab2 AS cor0
----
151866
63954
82863

query I rowsort
SELECT ALL - + col2 * cor0.col1 - - col2 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 * + 42 * - col0 col1 FROM tab1 cor0
----
-153159
-322464
-6750

query I rowsort
SELECT ALL + + col0 * col2 + 45 FROM tab2 AS cor0
----
2073
234
3047

query I rowsort
SELECT DISTINCT + col2 * + 31 + col2 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT + col2 * - 17 + 55 FROM tab1 AS cor0
----
-1577
-863
-914

query I rowsort
SELECT ALL + col1 * + col1 + - col1 AS col1 FROM tab0
----
7310
8190
9312

query I rowsort
SELECT 5 * cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 8e5091446a038d11de77abb16480e82e

query I rowsort
SELECT DISTINCT 77 + - col1 + + col1 FROM tab1 cor0
----
77

query I rowsort
SELECT ALL + - 98 AS col1 FROM tab1 AS cor0
----
-98
-98
-98

query I rowsort
SELECT 15 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT - col2 + - col1 * - col0 AS col2 FROM tab2 cor0
----
1305
190
4576

query I rowsort
SELECT - 83 * - col1 + col2 FROM tab1
----
1175
2212
887

query I rowsort
SELECT + + ( - col0 ) * col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + - 19 + col0 AS col2 FROM tab1 AS cor0
----
-16
45
61

query I rowsort
SELECT 81 * col0 AS col0 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT ALL - cor0.col0 + col2 AS col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + 74 - col2 FROM tab2 AS cor0
----
36
47
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 * col0 col0 FROM tab1 AS cor0
----
-252
-5376
-6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4465
SELECT ALL col1 DIV col0 - - col2 AS col1 FROM tab1 AS cor0
----
57
62
96

skipif mysql # not compatible
query I rowsort label-4465
SELECT ALL col1 / col0 - - col2 AS col1 FROM tab1 AS cor0
----
57
62
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 99 col0 FROM tab0 AS cor0
----
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4467
SELECT ALL + CAST( + 56 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
110
113
152

skipif mysql # not compatible
query I rowsort label-4467
SELECT ALL + CAST ( + 56 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
110
113
152

query I rowsort
SELECT ALL + + col2 + + 69 + - col1 FROM tab2 cor0
----
36
65
90

query I rowsort
SELECT - - 22 + - col1 AS col0 FROM tab2 AS cor0
----
-37
-9
5

query I rowsort
SELECT - + col0 + + col1 * 36 AS col2 FROM tab2 cor0
----
1109
2046
533

onlyif mysql # use DIV operator for integer division
query I rowsort label-4471
SELECT DISTINCT - col2 + + col1 DIV + col1 AS col1 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-4471
SELECT DISTINCT - col2 + + col1 / + col1 AS col1 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT DISTINCT col0 + - tab1.col0 * col2 FROM tab1
----
-159
-3584
-7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4473
SELECT + + col1 * - CAST( 90 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-1170
-2340
-900

skipif mysql # not compatible
query I rowsort label-4473
SELECT + + col1 * - CAST ( 90 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-1170
-2340
-900

query I rowsort
SELECT ALL + col0 + 38 FROM tab2 AS cor0
----
116
117
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4475
SELECT DISTINCT - CAST( NULL AS SIGNED ) col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4475
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT + - col2 * - col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col2 * ( + col0 ) AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT tab0.col1 * + col0 * tab0.col1 AS col2 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT - col2 + + col1 * - ( col0 ) FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT - tab2.col2 + + 83 FROM tab2
----
45
56
57

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - cor0.col2 + 75 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to add5f6bcf2d137b8adb19dbdb910d211

query I rowsort
SELECT + ( + ( col0 ) ) + - 1 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT ALL - col2 * - 92 * 31 FROM tab1
----
154008
162564
273792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4485
SELECT - CAST( NULL AS SIGNED ) FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4485
SELECT - CAST ( NULL AS INTEGER ) FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4486
SELECT DISTINCT - tab1.col1 DIV col1 AS col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-4486
SELECT DISTINCT - tab1.col1 / col1 AS col0 FROM tab1
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4487
SELECT - + 97 DIV + col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-32

skipif mysql # not compatible
query I rowsort label-4487
SELECT - + 97 / + col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-32

onlyif mysql # use DIV operator for integer division
query I rowsort label-4488
SELECT ( 3 ) DIV col1 col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4488
SELECT ( 3 ) / col1 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * - col0 * tab2.col2 AS col1 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT + 67 + col2 FROM tab0
----
100
149
68

query I rowsort
SELECT DISTINCT + col0 * col0 * tab0.col1 AS col2 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT col2 * tab2.col0 + + 37 AS col1 FROM tab2
----
2065
226
3039

skipif mysql # not compatible
query I rowsort
SELECT + 69 + - col2 * CAST ( col1 AS REAL ) AS col2 FROM tab2
----
-1465
-577
-768

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT col1 * tab2.col0 + col2 + 69 AS col1 FROM tab2
----
1450
313
4697

onlyif mysql # use DIV operator for integer division
query I rowsort label-4496
SELECT DISTINCT + col2 + - col1 DIV ( - col2 ) FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4496
SELECT DISTINCT + col2 + - col1 / ( - col2 ) FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT + + 8 FROM tab1, tab0, tab2 AS cor0
----
8

query I rowsort
SELECT ALL + col1 * col2 + - 43 AS col2 FROM tab0 AS cor0
----
2795
54
7419

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4499
SELECT - - cor0.col0 * col0 + ( col0 ) * col2 * CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
19584
2450
657443

skipif mysql # not compatible
query I rowsort label-4499
SELECT - - cor0.col0 * col0 + ( col0 ) * col2 * CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
19584
2450
657443

query I rowsort
SELECT + 8 * - col1 AS col2 FROM tab2
----
-136
-248
-472

query I rowsort
SELECT ALL + cor0.col0 * 23 FROM tab0 AS cor0
----
2047
552
805

query I rowsort
SELECT cor0.col0 + + ( - col2 + + col2 ) FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4503
SELECT DISTINCT - col1 + col1 DIV + 59 AS col0 FROM tab0 cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-4503
SELECT DISTINCT - col1 + col1 / + 59 AS col0 FROM tab0 cor0
----
-85
-90
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4504
SELECT + col1 DIV - ( - col0 * - cor0.col2 ) AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4504
SELECT + col1 / - ( - col0 * - cor0.col2 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * col1 + col1 * col0 AS col0 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT - cor0.col0 + + 23 FROM tab2 cor0
----
-55
-56
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-4507
SELECT col1 * - 5 + 12 DIV - col0 FROM tab0 cor0
----
-430
-455
-485

skipif mysql # not compatible
query I rowsort label-4507
SELECT col1 * - 5 + 12 / - col0 FROM tab0 cor0
----
-430
-455
-485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * ( ( col1 ) ) col0 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-4509
SELECT 49 DIV cor0.col1 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-4509
SELECT 49 / cor0.col1 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL + 8 * 17 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c858b8cb6322023336d05b07ddc48417

skipif mysql # not compatible
query I rowsort
SELECT + 83 + col0 * CAST ( + col2 AS REAL ) FROM tab1 AS cor0
----
245
3731
7763

query I rowsort
SELECT - 4 + - tab2.col0 FROM tab2
----
-11
-82
-83

query I rowsort
SELECT ALL - 38 FROM tab2
----
-38
-38
-38

query I rowsort
SELECT ALL tab0.col2 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT + - col1 * - col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT - - 99 + col0 AS col0 FROM tab2 AS cor0
----
106
177
178

onlyif mysql # use DIV operator for integer division
query I rowsort label-4517
SELECT - - col1 * col0 + ( cor0.col1 ) DIV - col2 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-4517
SELECT - - col1 * col0 + ( cor0.col1 ) / - col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT cor0.col2 + - col0 * + col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL + col0 + - ( - col1 + - col0 ) * 78 * ( + col2 ) AS col2 FROM tab1 cor0
----
122151
329068
696464

query I rowsort
SELECT - col2 + - cor0.col1 * ( + col1 ) AS col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4521
SELECT DISTINCT cor0.col1 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

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

query I rowsort
SELECT ALL - - col2 - col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col1 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab1, tab1 AS cor0, tab0 AS cor1
----
81 values hashing to 2df272448a67587d4635afedff278dcc

onlyif mysql # use DIV operator for integer division
query I rowsort label-4525
SELECT + col0 * col0 DIV col0 + + col2 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-4525
SELECT + col0 * col0 / col0 + + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + - ( cor0.col1 ) + col2 - - cor0.col0 AS col2 FROM tab2 AS cor0
----
100
3
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4527
SELECT + CAST( NULL AS SIGNED ) * 56 / col2 + + 7 + - 96 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4527
SELECT + CAST ( NULL AS INTEGER ) * 56 / col2 + + 7 + - 96 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + col2 * col1 - 1 * - col2 AS col2 FROM tab0 AS cor0
----
2904
7626
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4529
SELECT - col2 * CAST( + 48 AS SIGNED ) FROM tab1
----
-2592
-2736
-4608

skipif mysql # not compatible
query I rowsort label-4529
SELECT - col2 * CAST ( + 48 AS INTEGER ) FROM tab1
----
-2592
-2736
-4608

query I rowsort
SELECT ALL - col1 * + ( col2 + - col2 * + col1 ) FROM tab1
----
14976
35100
5130

query I rowsort
SELECT DISTINCT - tab2.col2 * tab2.col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL - - ( - cor0.col0 ) FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT col2 * + 11 AS col2 FROM tab1
----
1056
594
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 61 col2 FROM tab0 AS cor0
----
61
61
61

query I rowsort
SELECT + + 95 + 57 * col2 AS col2 FROM tab2 AS cor0
----
1577
1634
2261

query I rowsort
SELECT ALL + col1 * col0 + cor0.col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT 43 + + col0 - col1 AS col2 FROM tab0
----
-19
-19
41

query I rowsort
SELECT ALL - col2 * + col0 + - 63 AS col0 FROM tab1 AS cor0
----
-225
-3711
-7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col1 ) * - col1 col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL 41 + col0 + col0 AS col0 FROM tab0 AS cor0
----
111
219
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4541
SELECT + col0 * - col1 + CAST( NULL AS SIGNED ) * + 3 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4541
SELECT + col0 * - col1 + CAST ( NULL AS INTEGER ) * + 3 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) * col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-4543
SELECT ALL + col2 DIV + col0 + - ( + 33 ) * col0 AS col0 FROM tab1 AS cor0
----
-2112
-2639
-81

skipif mysql # not compatible
query I rowsort label-4543
SELECT ALL + col2 / + col0 + - ( + 33 ) * col0 AS col0 FROM tab1 AS cor0
----
-2112
-2639
-81

query I rowsort
SELECT + ( col2 ) AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT col2 - 5 FROM tab0
----
-4
28
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4546
SELECT + tab1.col1 DIV + col0 + col2 * 53 FROM tab1
----
2870
3021
5088

skipif mysql # not compatible
query I rowsort label-4546
SELECT + tab1.col1 / + col0 + col2 * 53 FROM tab1
----
2870
3021
5088

query I rowsort
SELECT ALL - 5 + col1 + col0 AS col1 FROM tab0
----
105
127
175

query I rowsort
SELECT DISTINCT ( 59 ) + + col1 FROM tab0
----
145
150
156

query I rowsort
SELECT ALL tab1.col0 + 82 * col2 + - ( 45 ) * + col0 FROM tab1
----
1858
4296
4352

query I rowsort
SELECT ALL 49 * + col1 AS col0 FROM tab0
----
4214
4459
4753

query I rowsort
SELECT col0 * col1 + col1 AS col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT ALL + 91 * col0 + col0 * 15 + col2 FROM tab1
----
372
6841
8576

query I rowsort
SELECT DISTINCT + 30 * col0 FROM tab1 AS cor0
----
1920
2400
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * + col2 * - 83 + col1 * cor0.col1 col0 FROM tab0 AS cor0
----
12314
614015
73132

query I rowsort
SELECT - col1 * + col0 + col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - cor0.col2 col1 FROM tab2 AS cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( + cor0.col1 ) col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4558
SELECT + - 42 * cor0.col1 + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4558
SELECT + - 42 * cor0.col1 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab0 cor0
----
78

query I rowsort
SELECT cor0.col2 + + 48 * cor0.col0 AS col1 FROM tab2 AS cor0
----
363
3770
3830

query I rowsort
SELECT col1 * + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col0 * - col2 + + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + col0 col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL cor0.col2 - + col0 FROM tab0 AS cor0
----
-34
-7
9

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to b803f2d602a28da5cf35ddc7c7fa2eeb

query I rowsort
SELECT ALL + 6 + + cor0.col2 + - col2 FROM tab1 cor0
----
6
6
6

query I rowsort
SELECT 52 + + col2 * + col0 * - col2 AS col0 FROM tab0 cor0
----
-26084
-598384
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - col2 ) + col0 * col1 col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL + 85 * col2 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT ALL + ( col1 ) + + tab1.col2 FROM tab1
----
109
67
80

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab1 AS cor1, tab2, tab2 cor2
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT - 61 * - col2 AS col0 FROM tab1 AS cor0
----
3294
3477
5856

query I rowsort
SELECT col1 - + cor0.col2 AS col0 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4574
SELECT DISTINCT - + ( col1 ) * col0 * - CAST( col2 AS SIGNED ) + col1 col0 FROM tab2 AS cor0
----
119711
51051
5890

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4574
SELECT DISTINCT - + ( col1 ) * col0 * - CAST ( col2 AS INTEGER ) + col1 col0 FROM tab2 AS cor0
----
119711
51051
5890

query I rowsort
SELECT ALL col0 + col2 * col2 AS col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT - 98 + col1 FROM tab2 AS cor0
----
-39
-67
-81

query I rowsort
SELECT + col2 - - cor0.col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - 49 AS REAL ) + - col2 * - ( + col1 ) + col0 AS col2 FROM tab0 AS cor0
----
2813
7502
83

query I rowsort
SELECT DISTINCT + - ( - col2 ) + col0 * col0 FROM tab1 AS cor0
----
4153
63
6496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - 9 col2 FROM tab2
----
-2
69
70

query I rowsort
SELECT ALL tab1.col2 * - 40 AS col0 FROM tab1
----
-2160
-2280
-3840

query I rowsort
SELECT + 94 * + cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 5a61621ae68a1f7c2f6800f14053cc10

onlyif mysql # use DIV operator for integer division
query I rowsort label-4583
SELECT ALL - col2 DIV col0 AS col2 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-4583
SELECT ALL - col2 / col0 AS col2 FROM tab1
----
-1
-18
0

query I rowsort
SELECT + ( + 76 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT ALL 0 + col1 * col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-4586
SELECT - 31 DIV + col1 FROM tab1 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4586
SELECT - 31 / + col1 FROM tab1 AS cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT + + ( col0 ) * cor0.col0 * 75 FROM tab1 AS cor0
----
307200
480000
675

query I rowsort
SELECT - 50 * 75 AS col2 FROM tab2 AS cor0
----
-3750
-3750
-3750

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 + + tab1.col2 col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT - - 77 + 36 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to e8b0720b8386c308e7f43eb0f4e6aee1

query I rowsort
SELECT ALL - - col2 * - col2 + + col1 + - cor0.col0 FROM tab2 AS cor0
----
-1506
-695
-705

query I rowsort
SELECT ALL 60 * - col1 + 59 * col2 AS col0 FROM tab2 AS cor0
----
-2006
-267
1222

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 + col0 * ( + cor0.col0 + - col1 ) FROM tab0 AS cor0
----
-11579
-8459
-8884

query I rowsort
SELECT ALL - cor0.col2 * + col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + 18 - col2 FROM tab2 AS cor0
----
-20
-8
-9

query I rowsort
SELECT DISTINCT + - 26 + - col2 AS col2 FROM tab1 cor0
----
-122
-80
-83

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + 1 * col2 + - col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 55 * col2 AS col1 FROM tab1 cor0
----
-2970
-3135
-5280

query I rowsort
SELECT ALL - + 89 + + col2 FROM tab2 AS cor0
----
-51
-62
-63

query I rowsort
SELECT ALL col0 + 16 + col0 FROM tab0 AS cor0
----
194
64
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + cor0.col2 + + ( - col1 ) col1 FROM tab1 AS cor0
----
2
37
70

query I rowsort
SELECT - + col0 * col2 + cor0.col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT + col1 - col2 * ( + 28 ) FROM tab0
----
-2205
-838
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-4605
SELECT DISTINCT cor0.col2 DIV 67 AS col1 FROM tab2, tab0 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4605
SELECT DISTINCT cor0.col2 / 67 AS col1 FROM tab2, tab0 cor0
----
0
1

query I rowsort
SELECT - col0 + ( col2 ) * + col1 AS col2 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + - col1 * - col0 col2 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT - col2 * col2 * + col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

onlyif mysql # use DIV operator for integer division
query I rowsort label-4609
SELECT - col2 * ( col1 ) + col1 DIV col0 FROM tab2 AS cor0
----
-1534
-646
-833

skipif mysql # not compatible
query I rowsort label-4609
SELECT - col2 * ( col1 ) + col1 / col0 FROM tab2 AS cor0
----
-1534
-646
-833

query I rowsort
SELECT - col0 + + 92 FROM tab0 AS cor0
----
3
57
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-4611
SELECT - cor0.col2 + cor0.col0 DIV col2 FROM tab0 cor0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-4611
SELECT - cor0.col2 + cor0.col0 / col2 FROM tab0 cor0
----
-33
-81
34

query I rowsort
SELECT DISTINCT + 75 AS col2 FROM tab2 AS cor0
----
75

query I rowsort
SELECT - + 95 * - col1 + + col0 FROM tab0 AS cor0
----
8194
8734
9250

query I rowsort
SELECT + + 38 * col1 FROM tab2 AS cor0
----
1178
2242
646

query I rowsort
SELECT col2 + + col2 + col2 AS col2 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT + 35 * - col0 - col1 FROM tab0 cor0
----
-1322
-3206
-926

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + cor0.col1 col2 FROM tab1 AS cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 col1 FROM tab0, tab2 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT - + col0 + - ( + 23 * col2 + + 22 ) AS col1 FROM tab2 AS cor0
----
-650
-698
-975

onlyif mysql # use DIV operator for integer division
query I rowsort label-4620
SELECT col1 + col0 DIV - 5 AS col1 FROM tab2
----
2
30
44

skipif mysql # not compatible
query I rowsort label-4620
SELECT col1 + col0 / - 5 AS col1 FROM tab2
----
2
30
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 35 col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT - 25 + col2 * col1 AS col0 FROM tab1 AS cor0
----
1223
1379
545

onlyif mysql # use DIV operator for integer division
query I rowsort label-4623
SELECT - 8 DIV + col0 FROM tab1
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4623
SELECT - 8 / + col0 FROM tab1
----
-2
0
0

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( + tab1.col1 * + col2 * col2 )
----

query I rowsort
SELECT - col2 * col0 + + col2 FROM tab0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-4626
SELECT DISTINCT col0 DIV col1 + + col1 DIV col1 + + col2 FROM tab2
----
28
43

skipif mysql # not compatible
query I rowsort label-4626
SELECT DISTINCT col0 / col1 + + col1 / col1 + + col2 FROM tab2
----
28
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-4627
SELECT ALL + col2 * + col0 + col1 DIV - col0 + - tab0.col1 col1 FROM tab0
----
-64
703
7206

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4627
SELECT ALL + col2 * + col0 + col1 / - col0 + - tab0.col1 col1 FROM tab0
----
-64
703
7206

query I rowsort
SELECT col0 * col1 FROM tab1 WHERE NULL IN ( col2 * col2 )
----

query I rowsort
SELECT DISTINCT - col0 * col2 * + col2 AS col2 FROM tab1
----
-207936
-737280
-8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 col1 FROM tab2 WHERE ( NULL ) = ( NULL )
----

query I rowsort
SELECT col1 * tab2.col2 + - tab2.col1 * tab2.col0 * col2 FROM tab2
----
-118118
-5022
-50388

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col1 * - tab2.col1 col0 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT ALL col0 * col2 + col1 AS col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT tab2.col1 * + tab2.col2 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT col1 + - col1 + col1 AS col1 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col2 * + tab1.col2 col1 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT + col1 / + col1 FROM tab0 WHERE NOT ( NULL ) < ( NULL )
----

query I rowsort
SELECT ALL col2 * + col0 * col0 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT col1 FROM tab2 WHERE ( NULL ) IN ( - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 col2 FROM tab2
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4641
SELECT DISTINCT - cor0.col0 DIV - 92 AS col0 FROM tab1, tab1 AS cor0, tab1 cor1
----
0

skipif mysql # not compatible
query I rowsort label-4641
SELECT DISTINCT - cor0.col0 / - 92 AS col0 FROM tab1, tab1 AS cor0, tab1 cor1
----
0

query I rowsort
SELECT + - col2 + col0 * + ( + 18 ) * + col1 FROM tab2 AS cor0
----
24136
3879
82810

query I rowsort
SELECT 60 + col2 * + col2 AS col2 FROM tab1
----
2976
3309
9276

onlyif mysql # use DIV operator for integer division
query I rowsort label-4644
SELECT + col2 DIV col2 + + 13 FROM tab1 AS cor0
----
14
14
14

skipif mysql # not compatible
query I rowsort label-4644
SELECT + col2 / col2 + + 13 FROM tab1 AS cor0
----
14
14
14

query I rowsort
SELECT - - 40 * + cor0.col2 FROM tab1 AS cor0
----
2160
2280
3840

query I rowsort
SELECT ALL + 44 * - col2 * - 96 AS col1 FROM tab1 AS cor0
----
228096
240768
405504

query I rowsort
SELECT - - 31 * col0 + - col1 AS col2 FROM tab1 AS cor0
----
1974
2467
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 * - col1 col0 FROM tab2 AS cor0
----
-1615
-2945
-5605

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + col1 * col1 col0 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT DISTINCT - 88 + col0 AS col2 FROM tab1 cor0
----
-24
-8
-85

query I rowsort
SELECT - col2 + col1 + col2 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4652
SELECT DISTINCT + tab1.col0 * tab1.col2 DIV tab1.col1 AS col0 FROM tab1
----
364
590
6

skipif mysql # not compatible
query I rowsort label-4652
SELECT DISTINCT + tab1.col0 * tab1.col2 / tab1.col1 AS col0 FROM tab1
----
364
590
6

query I rowsort
SELECT - col0 + - col1 * col0 AS col0 FROM tab2
----
-1422
-224
-4680

query I rowsort
SELECT col2 + - tab2.col0 - col2 FROM tab2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4655
SELECT DISTINCT - col2 * col0 DIV tab1.col2 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4655
SELECT DISTINCT - col2 * col0 / tab1.col2 FROM tab1
----
-3
-64
-80

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL NOT BETWEEN col0 * + col1 AND ( col2 + col2 )
----

query I rowsort
SELECT + col2 * col0 FROM tab0 AS cor0 WHERE NULL NOT BETWEEN ( col1 ) AND col1
----

query I rowsort
SELECT ALL + col1 / - col1 AS col2 FROM tab2 AS cor0 WHERE NULL NOT IN ( + col1 / + col0 )
----

query I rowsort
SELECT col0 AS col1 FROM tab2 AS cor0 WHERE NOT + col0 * - col2 <= ( NULL )
----

query I rowsort
SELECT col2 + col1 AS col0 FROM tab1 AS cor0 WHERE + col0 + + col2 NOT IN ( + col2 )
----
109
67
80

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

query I rowsort
SELECT ALL + col0 * tab2.col0 - col2 FROM tab2
----
22
6058
6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-4663
SELECT DISTINCT + col2 DIV - col2 - + tab1.col0 AS col1 FROM tab1
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-4663
SELECT DISTINCT + col2 / - col2 - + tab1.col0 AS col1 FROM tab1
----
-4
-65
-81

query I rowsort
SELECT + col2 * + col0 + - col1 * col1 FROM tab1
----
-514
3548
7511

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col1 + col1 IN ( + col1 * col2 )
----

query I rowsort
SELECT DISTINCT - col0 * tab2.col1 * tab2.col2 AS col2 FROM tab2
----
-119652
-51034
-5859

query III rowsort
SELECT * FROM tab1 WHERE NOT ( + col0 ) IN ( tab1.col2 + - col2 * + col1 * col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT - col0 * - col0 - - col0 AS col1 FROM tab2
----
56
6162
6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4669
SELECT DISTINCT - CAST( col2 AS SIGNED ) * col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-4669
SELECT DISTINCT - CAST ( col2 AS INTEGER ) * col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4670
SELECT + col0 DIV col0 + + col0 * 16 * col2 col2 FROM tab0 AS cor0
----
116769
12673
561

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4670
SELECT + col0 / col0 + + col0 * 16 * col2 col2 FROM tab0 AS cor0
----
116769
12673
561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * ( cor0.col1 ) col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - - 73 AS col0 FROM tab0 AS cor0
----
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-4673
SELECT CAST( col0 AS SIGNED ) DIV - col0 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4673
SELECT CAST ( col0 AS INTEGER ) / - col0 FROM tab2
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4674
SELECT ALL + col1 + col0 DIV col1 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4674
SELECT ALL + col1 + col0 / col1 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT col0 + + 6 AS col2 FROM tab1 AS cor0
----
70
86
9

query I rowsort
SELECT DISTINCT + + 42 AS col0 FROM tab0 cor0
----
42

query I rowsort
SELECT - ( - 91 ) AS col2 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT ALL col0 * col0 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
1190
552
7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * col2 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 24 + 1 AS col0 FROM tab2 AS cor0
----
25

query I rowsort
SELECT 87 + - cor2.col2 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 87789de403f50e3cb6a8613161160afa

query I rowsort
SELECT ALL + 11 * col0 * cor0.col0 + col1 FROM tab0 AS cor0
----
13572
6422
87222

query I rowsort
SELECT ALL - col0 + ( col2 * - col1 ) FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT + - 18 + - col0 FROM tab2 AS cor0
----
-25
-96
-97

query I rowsort
SELECT + ( col0 ) + 95 FROM tab0 AS cor0
----
119
130
184

query I rowsort
SELECT + tab0.col1 + col1 AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT 78 + + 70 FROM tab2
----
148

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4688
SELECT + col2 + + col0 * + CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
2054
216
3040

skipif mysql # not compatible
query I rowsort label-4688
SELECT + col2 + + col0 * + CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT 55 + + col0 AS col1 FROM tab0 AS cor0
----
144
79
90

query I rowsort
SELECT 27 + - col1 * ( 95 ) FROM tab1 AS cor0
----
-1208
-2443
-923

query I rowsort
SELECT - col1 + col0 * col0 * col0 FROM tab2 AS cor0
----
312
474493
493022

query I rowsort
SELECT ALL + 71 + col1 AS col1 FROM tab2
----
102
130
88

query I rowsort
SELECT ALL col0 + + ( col2 ) AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL col2 + col2 * - col0 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT col0 + - ( + col1 ) FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT + col0 + col1 * 14 FROM tab2 AS cor0
----
317
441
904

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * + ( col0 ) * - col0 col1 FROM tab1 cor0
----
-233472
-486
-614400

query I rowsort
SELECT + col1 + + col0 * col2 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - - col1 + + cor0.col1 * + 3 FROM tab0 AS cor0
----
344
364
388

query I rowsort
SELECT ALL + col0 * ( col0 ) AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + cor0.col2 * 84 AS col2 FROM tab0 AS cor0
----
2772
6888
84

query I rowsort
SELECT DISTINCT + cor0.col1 + ( + cor0.col1 ) * - col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL - 79 * - col2 * + col1 AS col0 FROM tab0
----
224202
589498
7663

query I rowsort
SELECT ALL + 21 * col2 + 51 * - col2 AS col0 FROM tab2
----
-1140
-780
-810

query I rowsort
SELECT col2 + 81 FROM tab0
----
114
163
82

query I rowsort
SELECT ALL col1 * col1 + + cor0.col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1155
232
2805

skipif mysql # not compatible
query I rowsort
SELECT - + cor0.col1 * - CAST ( col0 AS REAL ) FROM tab0 cor0
----
2064
3395
8099

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

onlyif mysql # use DIV operator for integer division
query I rowsort label-4709
SELECT + ( + col0 ) + + 29 * 58 DIV + col2 FROM tab1 AS cor0
----
34
93
97

skipif mysql # not compatible
query I rowsort label-4709
SELECT + ( + col0 ) + + 29 * 58 / + col2 FROM tab1 AS cor0
----
34
93
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4710
SELECT + col0 DIV col1 + col2 col0 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4710
SELECT + col0 / col1 + col2 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - col0 * - col0 * - col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-4712
SELECT + cor0.col0 DIV col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-4712
SELECT + cor0.col0 / col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT ( - 17 ) + + col1 AS col0 FROM tab1
----
-4
-7
9

query I rowsort
SELECT ALL - ( - col0 ) * col1 * 72 + - col2 * + col1 AS col2 FROM tab2
----
14787
329810
96050

query I rowsort
SELECT + tab1.col0 + + tab1.col0 + tab1.col1 AS col1 FROM tab1
----
138
173
32

query I rowsort
SELECT ALL 17 + tab2.col1 * + tab2.col1 FROM tab2
----
306
3498
978

query I rowsort
SELECT ALL + ( + col2 * + tab0.col0 ) + ( col0 ) AS col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL - col0 + + 28 FROM tab1
----
-36
-52
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-4719
SELECT ALL 73 DIV + col1 FROM tab2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-4719
SELECT ALL 73 / + col1 FROM tab2
----
1
2
4

query I rowsort
SELECT cor0.col2 + - tab2.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5d3783b31e5c4f959adab60b38e1775a

query I rowsort
SELECT DISTINCT - + col0 + col1 AS col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL + + 7 * col2 FROM tab2 AS cor0
----
182
189
266

query I rowsort
SELECT + - 86 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
-8
554
954

query I rowsort
SELECT DISTINCT tab0.col2 * + tab0.col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - + cor1.col2 + + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT col0 + ( - col0 ) DIV + col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-4726
SELECT col0 + ( - col0 ) / + col0 FROM tab0
----
23
34
88

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 cor1, tab0, tab0 AS cor2
----
3645 values hashing to 4037d65571c1bbf6e0e7d759f858120e

query I rowsort
SELECT DISTINCT cor0.col1 + col1 AS col1 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT ALL - - cor0.col0 + + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4730
SELECT - - cor0.col0 DIV + ( + 62 ) + - col1 FROM tab1 cor0
----
-12
-26
-9

skipif mysql # not compatible
query I rowsort label-4730
SELECT - - cor0.col0 / + ( + 62 ) + - col1 FROM tab1 cor0
----
-12
-26
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + 67 col2 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT - col0 * 98 - cor0.col2 * - col2 AS col2 FROM tab1 AS cor0
----
-3023
1376
2622

query I rowsort
SELECT + col1 + + 81 * + col1 AS col2 FROM tab1
----
1066
2132
820

query I rowsort
SELECT + cor0.col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - col0 * - col0 + col2 AS col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT cor0.col2 * + col1 + col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4737
SELECT DISTINCT + 8 DIV col0 AS col0 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4737
SELECT DISTINCT + 8 / col0 AS col0 FROM tab0
----
0

query I rowsort
SELECT ALL - 18 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 4b8f1109b78a52c6ee572810d1973a42

query I rowsort
SELECT DISTINCT 97 AS col2 FROM tab1, tab0 AS cor0
----
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4740
SELECT DISTINCT - col2 + col1 DIV col0 AS col2 FROM tab2 AS cor0
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-4740
SELECT DISTINCT - col2 + col1 / col0 AS col2 FROM tab2 AS cor0
----
-23
-26
-38

query I rowsort
SELECT col0 + - col0 * - cor0.col2 + ( + col0 ) AS col0 FROM tab1 cor0
----
168
3776
7840

query I rowsort
SELECT - + 51 + col1 * - col2 - 33 AS col2 FROM tab0 AS cor0
----
-181
-2922
-7546

query I rowsort
SELECT ALL 44 AS col2 FROM tab0
----
44
44
44

query I rowsort
SELECT ( - cor0.col0 ) AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT 6 - - cor0.col2 FROM tab1 AS cor0
----
102
60
63

query I rowsort
SELECT col0 + + 35 AS col0 FROM tab2 AS cor0
----
113
114
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + - col0 col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - + col1 * + 62 FROM tab2 cor0
----
-1054
-1922
-3658

query I rowsort
SELECT - col0 + - col2 * col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4750
SELECT - - col2 * CAST( NULL AS SIGNED ) * + 23 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4750
SELECT - - col2 * CAST ( NULL AS INTEGER ) * + 23 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 51 + - col2 * - col1 AS col2 FROM tab0 AS cor0
----
148
2889
7513

query I rowsort
SELECT 83 * col2 AS col2 FROM tab2 AS cor0
----
2158
2241
3154

onlyif mysql # use DIV operator for integer division
query I rowsort label-4753
SELECT + ( - 38 ) + + col0 DIV + cor0.col0 FROM tab0 cor0
----
-37
-37
-37

skipif mysql # not compatible
query I rowsort label-4753
SELECT + ( - 38 ) + + col0 / + cor0.col0 FROM tab0 cor0
----
-37
-37
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - - 10 col2 FROM tab2 AS cor0
----
36
37
48

query I rowsort
SELECT ALL col0 + - 36 AS col0 FROM tab2 AS cor0
----
-29
42
43

query I rowsort
SELECT ALL - - col1 + - ( + col2 ) * col2 * - col2 FROM tab2 AS cor0
----
17635
19714
54889

onlyif mysql # use DIV operator for integer division
query I rowsort label-4757
SELECT cor0.col1 * cor0.col1 - ( + col0 + col0 ) DIV + cor0.col0 FROM tab2 AS cor0
----
287
3479
959

skipif mysql # not compatible
query I rowsort label-4757
SELECT cor0.col1 * cor0.col1 - ( + col0 + col0 ) / + cor0.col0 FROM tab2 AS cor0
----
287
3479
959

query I rowsort
SELECT DISTINCT - + cor0.col1 + col0 * col1 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - col2 * + ( 35 * col1 ) FROM tab2 AS cor0
----
-22610
-29295
-53690

query I rowsort
SELECT ALL + 28 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT ( - 84 ) AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT DISTINCT - 73 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
-73

query I rowsort
SELECT - tab2.col1 * + 84 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to eb88b8ca881fdb3b15100569c24556c4

query I rowsort
SELECT ALL 75 + - cor1.col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to f17a7a4f957089dfff0a554f21529fc5

query I rowsort
SELECT - cor0.col2 + ( ( - col2 ) + 24 ) AS col2 FROM tab2 AS cor0
----
-28
-30
-52

query I rowsort
SELECT - + col2 * cor0.col0 + + col0 + col0 FROM tab1 AS cor0
----
-156
-3520
-7520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col2 col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - - cor0.col1 + col0 * col1 * col1 FROM tab2 AS cor0
----
22848
271577
6758

query I rowsort
SELECT ALL 4 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4770
SELECT + col2 * ( - cor0.col2 ) * - col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ( + 58 * + col0 ) AS col1 FROM tab1
----
174
3712
4640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 21 * col2 ) col2 FROM tab0
----
-1722
-21
-693

query I rowsort
SELECT 35 FROM tab2, tab0, tab0 cor0, tab0 AS cor1
----
81 values hashing to ca814400b6361c20866ff8fe01717430

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 col1 FROM tab1, tab2 cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT + - col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT 39 * col2 AS col0 FROM tab0 cor0
----
1287
3198
39

query I rowsort
SELECT col0 + col1 * - col2 * tab0.col0 AS col2 FROM tab0
----
-3360
-664029
-68088

query I rowsort
SELECT ALL - 88 + - col2 * - 6 * + 96 AS col1 FROM tab2 AS cor0
----
14888
15464
21800

onlyif mysql # use DIV operator for integer division
query I rowsort label-4779
SELECT + 28 + - col2 DIV 47 FROM tab2 AS cor0
----
28
28
28

skipif mysql # not compatible
query I rowsort label-4779
SELECT + 28 + - col2 / 47 FROM tab2 AS cor0
----
28
28
28

query I rowsort
SELECT ALL - + 79 * col1 * + ( 85 ) + col2 AS col2 FROM tab1 AS cor0
----
-174536
-67093
-87199

query I rowsort
SELECT 29 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT DISTINCT + cor0.col1 * col2 + - cor0.col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - - 44 AS col0 FROM tab1 AS cor0
----
44

query I rowsort
SELECT ( - col0 ) * - 39 + 65 FROM tab1
----
182
2561
3185

query I rowsort
SELECT 82 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 99920d9f7cd9cdccef99cfa459ae6944

query I rowsort
SELECT + 28 + - 42 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

query I rowsort
SELECT ALL 42 AS col0 FROM tab1 AS cor0
----
42
42
42

query I rowsort
SELECT ALL + ( col1 ) * ( + col2 * col1 ) AS col0 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT + 51 + - col1 AS col2 FROM tab0 AS cor0
----
-35
-40
-46

query I rowsort
SELECT - + 0 + col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 + + cor0.col1 col2 FROM tab1, tab2 cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to df696bcf362839974ad3eadf66adb0a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4792
SELECT DISTINCT - col2 DIV ( + 64 ) + + cor0.col0 + col0 FROM tab0 AS cor0
----
177
48
70

skipif mysql # not compatible
query I rowsort label-4792
SELECT DISTINCT - col2 / ( + 64 ) + + cor0.col0 + col0 FROM tab0 AS cor0
----
177
48
70

query I rowsort
SELECT + col2 + + 29 AS col0 FROM tab0 AS cor0
----
111
30
62

query I rowsort
SELECT DISTINCT - - col0 * + col1 + - col1 * col1 FROM tab2 AS cor0
----
-744
1054
1121

onlyif mysql # use DIV operator for integer division
query I rowsort label-4795
SELECT ALL col0 + + col2 DIV col2 AS col2 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-4795
SELECT ALL col0 + + col2 / col2 AS col2 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT col0 * 89 FROM tab0 AS cor0
----
2136
3115
7921

query I rowsort
SELECT ALL + col0 * - ( cor0.col0 ) + cor0.col1 + - col2 AS col2 FROM tab1 AS cor0
----
-37
-4143
-6483

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4798
SELECT ALL - - col2 + - CAST( NULL AS SIGNED ) / + 67 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4798
SELECT ALL - - col2 + - CAST ( NULL AS INTEGER ) / + 67 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + 65 * col0 + col2 FROM tab0 AS cor0
----
134193
220676
526517

query I rowsort
SELECT + + cor0.col0 * - 17 FROM tab0 cor0
----
-1513
-408
-595

query I rowsort
SELECT DISTINCT + col2 * col2 - col2 AS col2 FROM tab1 cor0
----
2862
3192
9120

query I rowsort
SELECT 49 + - col2 * col1 AS col2 FROM tab2
----
-1485
-597
-788

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4803
SELECT DISTINCT - col1 * - CAST( NULL AS SIGNED ) + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4803
SELECT DISTINCT - col1 * - CAST ( NULL AS INTEGER ) + col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT 59 - col2 FROM tab0
----
-23
26
58

query I rowsort
SELECT DISTINCT + + 92 AS col0 FROM tab2 AS cor0
----
92

query I rowsort
SELECT ALL + - 30 * + col1 AS col0 FROM tab2 cor0
----
-1770
-510
-930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4807
SELECT - CAST( + 58 AS SIGNED ) + - col2 FROM tab0 AS cor0
----
-140
-59
-91

skipif mysql # not compatible
query I rowsort label-4807
SELECT - CAST ( + 58 AS INTEGER ) + - col2 FROM tab0 AS cor0
----
-140
-59
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 * col2 * cor0.col0 col2 FROM tab1 AS cor0
----
-153216
-322560
-6804

query I rowsort
SELECT - col2 + - col0 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT - col1 * + 4 AS col0 FROM tab0
----
-344
-364
-388

query I rowsort
SELECT DISTINCT col0 + - cor0.col1 - + cor0.col0 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT col2 + - 21 AS col0 FROM tab2 AS cor0
----
17
5
6

query I rowsort
SELECT ALL + + col2 + 34 FROM tab0 AS cor0
----
116
35
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4814
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * + cor0.col0 - + col1 AS col1 FROM tab1 AS cor0
----
NULL

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + 51 col1 FROM tab1 AS cor0
----
-13
-29
48

query I rowsort
SELECT ALL 30 * col0 * col2 AS col2 FROM tab2 AS cor0
----
5670
60840
90060

query I rowsort
SELECT 80 * - col2 + col1 FROM tab1 cor0
----
-4294
-4550
-7667

query I rowsort
SELECT DISTINCT ( - col0 ) + + col2 AS col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - + cor0.col1 * + col0 + + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT - + ( + col2 ) AS col0 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4821
SELECT ALL + + ( - col1 ) * col1 DIV + col2 FROM tab0 AS cor0
----
-100
-224
-9409

skipif mysql # not compatible
query I rowsort label-4821
SELECT ALL + + ( - col1 ) * col1 / + col2 FROM tab0 AS cor0
----
-100
-224
-9409

query I rowsort
SELECT - ( 78 ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

onlyif mysql # use DIV operator for integer division
query I rowsort label-4823
SELECT cor0.col1 DIV cor0.col2 FROM tab0, tab0 cor0
----
9 values hashing to 318c9ee2d951551d2809d5b794d537f4

skipif mysql # not compatible
query I rowsort label-4823
SELECT cor0.col1 / cor0.col2 FROM tab0, tab0 cor0
----
9 values hashing to 318c9ee2d951551d2809d5b794d537f4

query I rowsort
SELECT ALL 56 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT - tab0.col2 * - ( 50 ) AS col0 FROM tab0
----
1650
4100
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 75 col0 FROM tab0
----
-2475
-6150
-75

query I rowsort
SELECT - + cor0.col0 - ( 34 ) AS col1 FROM tab1 AS cor0
----
-114
-37
-98

query I rowsort
SELECT ALL + cor0.col1 * ( - col0 ) + col0 * - 47 AS col0 FROM tab2 AS cor0
----
-5056
-546
-8268

query I rowsort
SELECT col0 * - ( + col2 * - ( col2 ) ) + col0 * col0 FROM tab2 AS cor0
----
120317
5152
58812

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 98 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT - cor0.col0 * + col0 AS col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - - col0 * col1 + - 57 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1550
1239
374

query I rowsort
SELECT DISTINCT + col1 * col1 + + col1 * col0 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT DISTINCT - - ( + col0 ) + col1 * - 95 FROM tab0 AS cor0
----
-8146
-8556
-9180

onlyif mysql # use DIV operator for integer division
query I rowsort label-4835
SELECT - 21 + col0 DIV - col0 AS col2 FROM tab2
----
-22
-22
-22

skipif mysql # not compatible
query I rowsort label-4835
SELECT - 21 + col0 / - col0 AS col2 FROM tab2
----
-22
-22
-22

query I rowsort
SELECT ( 9 ) + + col2 AS col0 FROM tab0
----
10
42
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-4837
SELECT 99 + - col0 DIV 83 AS col2 FROM tab0 AS cor0
----
98
99
99

skipif mysql # not compatible
query I rowsort label-4837
SELECT 99 + - col0 / 83 AS col2 FROM tab0 AS cor0
----
98
99
99

query I rowsort
SELECT + 64 * + col1 AS col2 FROM tab0 AS cor0
----
5504
5824
6208

query I rowsort
SELECT - + 46 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + ( + col2 + + col1 * 88 ) col2 FROM tab1 AS cor0
----
1227
2316
927

onlyif mysql # use DIV operator for integer division
query I rowsort label-4841
SELECT DISTINCT + col1 + - col1 * col0 DIV + col0 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-4841
SELECT DISTINCT + col1 + - col1 * col0 / + col0 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4842
SELECT ALL + col1 DIV + col2 + - col1 * + col1 * - col1 FROM tab0 AS cor0
----
636058
753572
912770

skipif mysql # not compatible
query I rowsort label-4842
SELECT ALL + col1 / + col2 + - col1 * + col1 * - col1 FROM tab0 AS cor0
----
636058
753572
912770

query I rowsort
SELECT - ( col0 ) * + 66 + col2 FROM tab0 cor0
----
-1551
-2309
-5792

query I rowsort
SELECT DISTINCT 21 + 71 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
92

query I rowsort
SELECT ALL - col2 + - ( col0 ) * + cor0.col0 FROM tab0 cor0
----
-1226
-609
-8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-4846
SELECT ALL - col0 DIV - col1 + ( col1 ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4846
SELECT ALL - col0 / - col1 + ( col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + col1 * + 87 FROM tab0 AS cor0
----
7482
7917
8439

query I rowsort
SELECT + col2 * + ( + col2 * - col1 ) FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT - - cor0.col1 + col2 * + 20 FROM tab0 cor0
----
117
1731
746

query I rowsort
SELECT + tab2.col0 AS col0 FROM tab2, tab1, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT ALL - col1 * tab0.col2 - + col0 AS col1 FROM tab0
----
-132
-2862
-7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4852
SELECT col1 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4852
SELECT col1 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col2 + 95 * col0 * + col2 AS col0 FROM tab2 AS cor0
----
17982
192686
285228

query I rowsort
SELECT ALL + cor0.col2 * cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a477aa402dcd904394a585dfd5cfe837

query I rowsort
SELECT + + ( cor0.col2 ) + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + - 17 * 81 FROM tab1 AS cor0
----
-1377
-1377
-1377

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4857
SELECT col1 / - col0 + + col1 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4857
SELECT col1 / - col0 + + col1 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4858
SELECT DISTINCT CAST( + col1 AS SIGNED ) * + col1 col2 FROM tab0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4858
SELECT DISTINCT CAST ( + col1 AS INTEGER ) * + col1 col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT - 27 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0259a67676b131a4843853be4811b775

query I rowsort
SELECT ALL 98 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT + + 34 AS col2 FROM tab0 AS cor0
----
34
34
34

query I rowsort
SELECT + 80 AS col0 FROM tab1 cor0
----
80
80
80

query I rowsort
SELECT ALL + 59 * - 79 FROM tab1 AS cor0
----
-4661
-4661
-4661

query I rowsort
SELECT DISTINCT + + 93 - ( + col1 ) FROM tab1 AS cor0
----
67
80
83

query I rowsort
SELECT ALL ( + col2 ) AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - col2 * 46 FROM tab1 cor0
----
-2484
-2622
-4416

query I rowsort
SELECT ( + col2 ) * col2 + - ( + tab0.col2 * + col1 ) AS col2 FROM tab0
----
-1749
-738
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4868
SELECT DISTINCT - col2 DIV + cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4868
SELECT DISTINCT - col2 / + cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - ( + cor0.col1 ) + - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - ( 87 ) + col2 * col2 FROM tab1 AS cor0
----
2829
3162
9129

onlyif mysql # use DIV operator for integer division
query I rowsort label-4871
SELECT DISTINCT - 5 + col1 DIV col0 + col2 FROM tab0 AS cor0
----
-2
31
78

skipif mysql # not compatible
query I rowsort label-4871
SELECT DISTINCT - 5 + col1 / col0 + col2 FROM tab0 AS cor0
----
-2
31
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4872
SELECT ALL - - ( - col0 ) DIV col1 - - col0 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-4872
SELECT ALL - - ( - col0 ) / col1 - - col0 FROM tab2 AS cor0
----
7
75
77

query I rowsort
SELECT DISTINCT 3 * - col1 * col0 AS col2 FROM tab1 AS cor0
----
-1920
-234
-3120

query I rowsort
SELECT ALL ( - 20 ) * - col0 AS col1 FROM tab1 AS cor0
----
1280
1600
60

query I rowsort
SELECT ALL ( - 18 ) * + col1 + col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-106
-141
-439

onlyif mysql # use DIV operator for integer division
query I rowsort label-4876
SELECT DISTINCT - - col0 DIV ( + col2 ) + - cor0.col0 * ( + col1 ) FROM tab1 AS cor0
----
-1040
-639
-78

skipif mysql # not compatible
query I rowsort label-4876
SELECT DISTINCT - - col0 / ( + col2 ) + - cor0.col0 * ( + col1 ) FROM tab1 AS cor0
----
-1040
-639
-78

query I rowsort
SELECT ALL - + col1 * + 84 FROM tab1 cor0
----
-1092
-2184
-840

query I rowsort
SELECT DISTINCT + - 51 FROM tab2 AS cor0
----
-51

query I rowsort
SELECT ALL 76 + cor0.col2 + col0 FROM tab2 AS cor0
----
110
180
193

query I rowsort
SELECT DISTINCT - col1 * col1 * col1 AS col2 FROM tab0
----
-636056
-753571
-912673

onlyif mysql # use DIV operator for integer division
query I rowsort label-4881
SELECT - + col1 DIV col2 + col2 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-4881
SELECT - + col1 / col2 + col2 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + cor0.col0 + col0 + - cor0.col1 * + 12 FROM tab1 AS cor0
----
-306
4
8

query I rowsort
SELECT DISTINCT + col2 + + col2 + - 84 * 81 FROM tab2 AS cor0
----
-6728
-6750
-6752

query I rowsort
SELECT ALL - col2 + col0 * + cor0.col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT 50 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 68 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

query I rowsort
SELECT DISTINCT + col0 * - ( 18 ) FROM tab1 AS cor0
----
-1152
-1440
-54

query I rowsort
SELECT DISTINCT - - col2 * + 82 FROM tab0 AS cor0
----
2706
6724
82

query I rowsort
SELECT - - col1 * - 54 FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT - col0 + - 80 * + 25 FROM tab2 AS cor0
----
-2007
-2078
-2079

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - 58 col0 FROM tab0 AS cor0
----
-1914
-4756
-58

query I rowsort
SELECT DISTINCT + col1 * ( - col1 + col2 * ( col0 ) ) AS col2 FROM tab1
----
3536
36380
99671

query I rowsort
SELECT col1 + + cor0.col2 AS col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + col2 * + 1 FROM tab1
----
54
57
96

query I rowsort
SELECT - ( + col2 ) * - col1 * ( + col2 * col0 ) AS col1 FROM tab0 AS cor0
----
2247696
3395
54457676

query I rowsort
SELECT - 34 * - col1 FROM tab2 AS cor0
----
1054
2006
578

query I rowsort
SELECT DISTINCT - + 48 + cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-13
-24
41

query I rowsort
SELECT ALL + col0 * + 24 AS col2 FROM tab2
----
168
1872
1896

query I rowsort
SELECT - col0 * ( 17 ) FROM tab2
----
-119
-1326
-1343

query I rowsort
SELECT ALL + ( 66 ) AS col0 FROM tab2
----
66
66
66

query I rowsort
SELECT DISTINCT - 61 FROM tab1, tab2 cor0
----
-61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4902
SELECT DISTINCT - ( - ( col1 ) ) * CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4902
SELECT DISTINCT - ( - ( col1 ) ) * CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT - 51 FROM tab2, tab1 AS cor0
----
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-4904
SELECT ALL col1 DIV + tab2.col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4904
SELECT ALL col1 / + tab2.col0 FROM tab2
----
0
0
4

query I rowsort
SELECT DISTINCT - tab1.col1 * ( - tab1.col1 ) FROM tab1
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4906
SELECT DISTINCT + CAST( - col0 AS SIGNED ) + col1 FROM tab0 AS cor0
----
2
62

skipif mysql # not compatible
query I rowsort label-4906
SELECT DISTINCT + CAST ( - col0 AS INTEGER ) + col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL - ( - col1 ) * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - + ( + col1 ) + - col1 * ( 88 * col1 ) AS col0 FROM tab0 AS cor0
----
-650934
-728819
-828089

query I rowsort
SELECT ALL cor0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT - col0 * - col2 * + col0 + col0 - - col2 AS col1 FROM tab0
----
1261
19065
649693

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1, tab2, tab1 cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-4912
SELECT DISTINCT - col1 + - col2 * col1 DIV + 65 col1 FROM tab0
----
-129
-205
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4912
SELECT DISTINCT - col1 + - col2 * col1 / + 65 col1 FROM tab0
----
-129
-205
-98

query I rowsort
SELECT ALL + col0 + cor0.col2 * - col2 FROM tab0 AS cor0
----
-1065
-6635
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-4914
SELECT - - 5 + col2 DIV cor0.col0 AS col0 FROM tab2 cor0
----
5
5
8

skipif mysql # not compatible
query I rowsort label-4914
SELECT - - 5 + col2 / cor0.col0 AS col0 FROM tab2 cor0
----
5
5
8

query I rowsort
SELECT DISTINCT + 58 + col2 * col1 * col2 AS col0 FROM tab2 AS cor0
----
22657
24606
39942

query I rowsort
SELECT ALL + cor0.col2 * - ( - col0 ) + - col2 AS col2 FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-4917
SELECT + col1 DIV col0 + cor0.col0 FROM tab0 AS cor0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-4917
SELECT + col1 / col0 + cor0.col0 FROM tab0 AS cor0
----
27
37
90

query I rowsort
SELECT ALL - col0 + 58 * + col0 * + col1 AS col1 FROM tab2 AS cor0
----
12579
266838
77815

query I rowsort
SELECT DISTINCT col1 + 89 FROM tab2 AS cor0
----
106
120
148

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4920
SELECT + col1 + + CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4920
SELECT + col1 + + CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4921
SELECT ALL + col0 * col0 DIV - cor0.col2 FROM tab0 cor0
----
-1225
-17
-96

skipif mysql # not compatible
query I rowsort label-4921
SELECT ALL + col0 * col0 / - cor0.col2 FROM tab0 cor0
----
-1225
-17
-96

query I rowsort
SELECT ALL - cor0.col2 * - col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - + col1 * + cor0.col0 + + col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT col2 * - 55 FROM tab0 AS cor0
----
-1815
-4510
-55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4925
SELECT DISTINCT - col0 + col1 + + CAST( NULL AS SIGNED ) / + col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4925
SELECT DISTINCT - col0 + col1 + + CAST ( NULL AS INTEGER ) / + col1 FROM tab0
----
NULL

query I rowsort
SELECT - cor0.col2 + - ( col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4927
SELECT DISTINCT - col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

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

query I rowsort
SELECT DISTINCT - - col2 + + 98 AS col0 FROM tab2 AS cor0
----
124
125
136

onlyif mysql # use DIV operator for integer division
query I rowsort label-4929
SELECT cor0.col1 DIV cor0.col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4929
SELECT cor0.col1 / cor0.col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT - col2 * + col2 * + ( col2 ) FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT col1 * + col1 + col1 * col2 AS col0 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT ALL + tab2.col1 + col0 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL - 26 * col1 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-324
-418
-679

query I rowsort
SELECT ( 89 ) FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT - + col1 * cor0.col2 - - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-4936
SELECT col0 * + col0 DIV col0 + col2 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-4936
SELECT col0 * + col0 / col0 + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + 6 * col1 - - col0 FROM tab2 AS cor0
----
181
193
432

onlyif mysql # use DIV operator for integer division
query I rowsort label-4938
SELECT - + col1 * cor0.col2 DIV + col0 - + col1 * col1 * col2 FROM tab1 AS cor0
----
-16239
-36972
-5708

skipif mysql # not compatible
query I rowsort label-4938
SELECT - + col1 * cor0.col2 / + col0 - + col1 * col1 * col2 FROM tab1 AS cor0
----
-16239
-36972
-5708

onlyif mysql # use DIV operator for integer division
query I rowsort label-4939
SELECT col1 DIV col0 + col0 * cor0.col0 - col0 * + col1 col1 FROM tab2 AS cor0
----
-164
1482
4898

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4939
SELECT col1 / col0 + col0 * cor0.col0 - col0 * + col1 col1 FROM tab2 AS cor0
----
-164
1482
4898

query I rowsort
SELECT ( + cor0.col2 ) + + col2 + + col2 * col0 FROM tab0 AS cor0
----
37
7462
858

query I rowsort
SELECT - col0 * + col1 + - col0 + tab2.col1 FROM tab2
----
-1405
-193
-4621

query I rowsort
SELECT col0 * col0 + col2 + - col2 * + col0 AS col2 FROM tab2
----
-113
3277
4082

query I rowsort
SELECT col1 * cor0.col1 + - col0 FROM tab1 cor0
----
36
673
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4944
SELECT + col0 * col0 - col2 DIV + col1 col0 FROM tab2 AS cor0
----
49
6084
6239

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4944
SELECT + col0 * col0 - col2 / + col1 col0 FROM tab2 AS cor0
----
49
6084
6239

query I rowsort
SELECT + - col2 + col2 * - col2 * + col0 + col1 FROM tab1 AS cor0
----
-207983
-737363
-8776

query I rowsort
SELECT DISTINCT + + cor0.col0 - col1 * ( + col1 ) AS col2 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT ALL col2 + 24 * + 27 AS col1 FROM tab1 AS cor0
----
702
705
744

query I rowsort
SELECT ALL cor0.col0 + - ( 12 + + col1 ) AS col1 FROM tab1 AS cor0
----
-35
42
55

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 AS col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT + col0 * + 12 AS col1 FROM tab1 AS cor0
----
36
768
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + + col2 + 48 FROM tab0 AS cor0
----
130
49
81

query I rowsort
SELECT - cor0.col0 + + 38 FROM tab0 AS cor0
----
-51
14
3

query I rowsort
SELECT - - col0 * 53 AS col0 FROM tab2 AS cor0
----
371
4134
4187

query I rowsort
SELECT ALL + col2 * 31 FROM tab0 AS cor0
----
1023
2542
31

query I rowsort
SELECT ALL + + col1 * 37 * - col0 FROM tab0 AS cor0
----
-125615
-299663
-76368

query I rowsort
SELECT + col0 + - col0 * + col1 * + col2 FROM tab1 AS cor0
----
-36416
-4209
-99760

query I rowsort
SELECT DISTINCT - - col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + - col0 * - 82 FROM tab0 AS cor0
----
1968
2870
7298

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col2 - + cor1.col0 col2 FROM tab0, tab2 cor0, tab0 AS cor1
----
-171
-36
-57

query I rowsort
SELECT - - cor0.col0 * + col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 WHERE NOT col2 IN ( col2 ) OR NOT col0 - + col0 * col2 NOT IN ( + col1 )
----

query I rowsort
SELECT + cor0.col1 + - col1 * + cor0.col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + + col1 * cor0.col1 + col0 AS col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT - cor0.col2 * - col2 + col0 AS col0 FROM tab0 cor0
----
1113
36
6813

query I rowsort
SELECT ALL + col1 * + col2 + - col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT col0 - - col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + - col1 - col0 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + col0 * col2 * - col2 AS col1 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT ALL col0 + cor0.col0 AS col2 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT - col1 + col0 * col0 AS col1 FROM tab1
----
-17
4086
6387

query I rowsort
SELECT - col1 AS col0 FROM tab1 WHERE NOT ( col2 ) BETWEEN NULL AND + col1 * + col0
----

query I rowsort
SELECT + 1 + - col1 FROM tab2
----
-16
-30
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4974
SELECT col1 * col0 DIV - col1 AS col0 FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-4974
SELECT col1 * col0 / - col1 AS col0 FROM tab2 cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - tab0.col2 col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + cor0.col2 + + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT + - col0 * + col0 + + col2 AS col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT - ( tab2.col1 ) * + col2 * - col0 AS col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL + 51 + col2 + ( + 6 ) FROM tab0 AS cor0
----
139
58
90

query I rowsort
SELECT ALL + 73 + + cor0.col2 + - col0 AS col0 FROM tab1 AS cor0
----
124
66
89

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 + col0 + cor0.col1 AS col2 FROM tab1 AS cor0
----
191
3722
7773

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 - col2 AS col1 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT - 37 * + col0 AS col2 FROM tab0 AS cor0
----
-1295
-3293
-888

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4984
SELECT DISTINCT CAST( NULL AS DECIMAL ) + cor0.col2 FROM tab1, tab2 AS cor0
----
NULL

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

query I rowsort
SELECT DISTINCT + + col1 + 34 AS col1 FROM tab0 AS cor0
----
120
125
131

query I rowsort
SELECT DISTINCT - col2 + - 96 FROM tab0 cor0
----
-129
-178
-97

query I rowsort
SELECT - + col0 * + ( col1 ) FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4988
SELECT DISTINCT + cor0.col1 + - CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4988
SELECT DISTINCT + cor0.col1 + - CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * - 43 col2 FROM tab1 cor0
----
-2322
-2451
-4128

query I rowsort
SELECT + 78 + col0 FROM tab1 AS cor0
----
142
158
81

query I rowsort
SELECT + col0 + + col0 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
1163
514
7919

query I rowsort
SELECT ( - col1 ) * + cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4993
SELECT ALL - CAST( NULL AS SIGNED ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT ( - col1 ) + - col1 FROM tab2 AS cor0
----
-118
-34
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) * - col1 * 57 - - col0 col0 FROM tab1 AS cor0
----
-36416
-4443
-59200

query I rowsort
SELECT ALL - 31 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c6c8eebeb1a59f7c046402e25630c0ac

query I rowsort
SELECT ALL - 64 FROM tab0 cor0
----
-64
-64
-64

query I rowsort
SELECT ALL col0 + - 78 FROM tab0 AS cor0
----
-43
-54
11

query I rowsort
SELECT - col2 + - cor0.col2 * 96 FROM tab2 AS cor0
----
-2522
-2619
-3686

query I rowsort
SELECT ALL - 98 AS col0 FROM tab1 cor0
----
-98
-98
-98

query I rowsort
SELECT + + 7 + col2 FROM tab1 AS cor0
----
103
61
64

query I rowsort
SELECT ALL + col1 * - col1 + ( + col0 * col2 ) FROM tab0 AS cor0
----
-6604
-9374
-983

query I rowsort
SELECT DISTINCT 13 + col0 + col0 FROM tab1 AS cor0
----
141
173
19

query I rowsort
SELECT DISTINCT - col2 * - col2 * 24 + 43 + col1 FROM tab0 AS cor0
----
161510
164
26265

query I rowsort
SELECT ALL + col1 + + col1 * + col0 AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT ALL - 12 + - ( col2 + 75 ) FROM tab0
----
-120
-169
-88

query I rowsort
SELECT ALL 9 + - 17 AS col0 FROM tab1
----
-8
-8
-8

query I rowsort
SELECT + 92 * col0 + col1 FROM tab0
----
2294
3317
8279

query I rowsort
SELECT DISTINCT - - cor0.col0 + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL - 78 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT ( col0 ) + col1 + col0 FROM tab1 AS cor0
----
138
173
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5012
SELECT DISTINCT col1 + col1 * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5012
SELECT DISTINCT col1 + col1 * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5013
SELECT - + col1 DIV - col1 + col2 + col1 FROM tab1 AS cor0
----
110
68
81

skipif mysql # not compatible
query I rowsort label-5013
SELECT - + col1 / - col1 + col2 + col1 FROM tab1 AS cor0
----
110
68
81

query I rowsort
SELECT DISTINCT 73 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
73

query I rowsort
SELECT tab2.col2 + 13 AS col2 FROM tab2
----
39
40
51

query I rowsort
SELECT + 50 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT DISTINCT tab1.col2 + tab1.col0 * - ( col0 ) FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT - 76 FROM tab0, tab2, tab1 AS cor0
----
-76

query I rowsort
SELECT ALL - col1 * col1 + - col2 AS col1 FROM tab2
----
-327
-3507
-988

query I rowsort
SELECT ( - col2 ) * - col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - 21 FROM tab0
----
-21

query I rowsort
SELECT 14 FROM tab1, tab0 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT + col1 - + 66 AS col0 FROM tab1
----
-40
-53
-56

query I rowsort
SELECT ALL ( - 79 ) AS col2 FROM tab2 AS cor0
----
-79
-79
-79

query I rowsort
SELECT col0 * - col1 + 11 AS col2 FROM tab2
----
-1332
-206
-4591

query I rowsort
SELECT - col1 + - ( + 46 ) * - col0 FROM tab1
----
112
2934
3667

query I rowsort
SELECT ALL col0 * cor0.col1 * col1 + col0 AS col0 FROM tab0 AS cor0
----
177528
329350
737098

query I rowsort
SELECT - ( col1 ) + col0 + + col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5029
SELECT DISTINCT - col2 DIV - 60 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5029
SELECT DISTINCT - col2 / - 60 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT - - 51 FROM tab2 AS cor0
----
51

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

query I rowsort
SELECT ALL + + 96 AS col2 FROM tab2 AS cor0
----
96
96
96

query I rowsort
SELECT + 60 + ( - cor0.col0 ) + - col2 AS col0 FROM tab0 cor0
----
-111
24
3

query I rowsort
SELECT ALL ( 44 ) * col2 AS col0 FROM tab0 AS cor0
----
1452
3608
44

query I rowsort
SELECT ALL - + ( - col2 ) + cor0.col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - - 27 AS col2 FROM tab2 AS cor0
----
27
27
27

query I rowsort
SELECT - col0 * col1 + col0 * - ( col2 ) + + col1 FROM tab0 AS cor0
----
-15306
-2770
-3333

query I rowsort
SELECT ALL - + 31 + - 69 * - col0 FROM tab2 AS cor0
----
452
5351
5420

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 84 + col1 col0 FROM tab2 AS cor0
----
-25
-53
-67

query I rowsort
SELECT - col2 - + 46 FROM tab0 cor0
----
-128
-47
-79

query I rowsort
SELECT - 2 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to ec11209ab257030053484fc13a1f6d17

query I rowsort
SELECT - 9 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to caf28657beb43049740febe1fa9ded5a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 10 ) col0 FROM tab2
----
10
10
10

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + col0 AS REAL ) * - col0 * + 58 FROM tab2
----
2842
352872
361978

onlyif mysql # use DIV operator for integer division
query I rowsort label-5045
SELECT - col2 DIV ( ( cor0.col2 ) ) FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5045
SELECT - col2 / ( ( cor0.col2 ) ) FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col0 + col1 + - 36 FROM tab0
----
144
74
96

query I rowsort
SELECT + col0 * col2 + - ( col0 ) AS col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL + 78 AS col2 FROM tab0 AS cor0
----
78
78
78

query I rowsort
SELECT + ( - col1 ) * ( col0 ) AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5050
SELECT + col0 * + col0 + - CAST( + col0 AS SIGNED ) * col0 * col2 + col2 FROM tab0 AS cor0
----
-18399
-641519
1

skipif mysql # not compatible
query I rowsort label-5050
SELECT + col0 * + col0 + - CAST ( + col0 AS INTEGER ) * col0 * col2 + col2 FROM tab0 AS cor0
----
-18399
-641519
1

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 * col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT - - ( - tab1.col2 ) AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT ALL + + col1 * + 28 FROM tab0 AS cor0
----
2408
2548
2716

query I rowsort
SELECT DISTINCT col0 + + 20 FROM tab0 AS cor0
----
109
44
55

query I rowsort
SELECT ALL col1 * ( + 90 + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
1000
1339
3016

query I rowsort
SELECT - col2 + 79 * col1 FROM tab0 AS cor0
----
6761
7107
7662

query I rowsort
SELECT col0 * col1 + 47 AS col2 FROM tab1 AS cor0
----
1087
125
687

query I rowsort
SELECT - - col0 * - ( cor0.col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - cor0.col2 * 72 * col2 + + col2 AS col2 FROM tab0 AS cor0
----
-484046
-71
-78375

query I rowsort
SELECT + col1 * + 95 + - col1 FROM tab0 AS cor0
----
8084
8554
9118

query I rowsort
SELECT ALL + col1 + col1 * 95 AS col2 FROM tab2
----
1632
2976
5664

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab2, tab0 AS cor0
----
57

query I rowsort
SELECT + cor0.col2 + + col1 AS col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT - col0 * - col0 + 76 AS col2 FROM tab0 AS cor0
----
1301
652
7997

query I rowsort
SELECT ALL - col2 + - col1 AS col0 FROM tab1
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5066
SELECT ALL - CAST( - col0 AS SIGNED ) + col1 * col1 AS col0 FROM tab1 AS cor0
----
164
249
679

skipif mysql # not compatible
query I rowsort label-5066
SELECT ALL - CAST ( - col0 AS INTEGER ) + col1 * col1 AS col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT col1 * 8 FROM tab1 AS cor0
----
104
208
80

query I rowsort
SELECT ALL - + 81 * + col1 + col1 FROM tab0 AS cor0
----
-6880
-7280
-7760

query I rowsort
SELECT + - 25 * - col2 AS col2 FROM tab0 AS cor0
----
2050
25
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 28 col1 FROM tab0 AS cor0
----
-2296
-28
-924

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col0 col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL ( + col0 ) + - col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL + ( + col1 ) * col0 + col2 + col2 AS col0 FROM tab1 AS cor0
----
1232
186
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-5074
SELECT 45 * col2 + + col2 * col0 DIV - col0 AS col2 FROM tab1 AS cor0
----
2376
2508
4224

skipif mysql # not compatible
query I rowsort label-5074
SELECT 45 * col2 + + col2 * col0 / - col0 AS col2 FROM tab1 AS cor0
----
2376
2508
4224

query I rowsort
SELECT - + 48 + col2 * - col1 FROM tab2 AS cor0
----
-1582
-694
-885

query I rowsort
SELECT ALL - 50 * col1 AS col2 FROM tab0 AS cor0
----
-4300
-4550
-4850

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + col0 col0 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5078
SELECT - ( col0 ) - 79 DIV + col1 FROM tab1 AS cor0
----
-6
-71
-86

skipif mysql # not compatible
query I rowsort label-5078
SELECT - ( col0 ) - 79 / + col1 FROM tab1 AS cor0
----
-6
-71
-86

query I rowsort
SELECT DISTINCT + col2 - + col1 * col1 AS col0 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT - ( col0 ) * 28 AS col1 FROM tab0 AS cor0
----
-2492
-672
-980

query I rowsort
SELECT - + col2 * + cor0.col2 + col1 * 44 FROM tab2 AS cor0
----
-696
1920
635

query I rowsort
SELECT - + 30 AS col0 FROM tab1 AS cor0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT 42 + + cor0.col1 FROM tab2 AS cor0
----
101
59
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5084
SELECT + col2 - col2 * + CAST( - col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
2970
3306
9312

skipif mysql # not compatible
query I rowsort label-5084
SELECT + col2 - col2 * + CAST ( - col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL 81 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

query I rowsort
SELECT ALL + col0 - 13 AS col2 FROM tab2 AS cor0
----
-6
65
66

query I rowsort
SELECT DISTINCT + col2 + + ( cor0.col0 * col0 ) FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT + + col0 * col2 + 87 + 20 * + col2 FROM tab1 AS cor0
----
1329
4875
9687

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5089
SELECT DISTINCT 4 * - 53 + col2 + - CAST( col2 AS SIGNED ) AS col0 FROM tab2
----
-212

skipif mysql # not compatible
query I rowsort label-5089
SELECT DISTINCT 4 * - 53 + col2 + - CAST ( col2 AS INTEGER ) AS col0 FROM tab2
----
-212

query I rowsort
SELECT DISTINCT + col1 + + col1 + - col2 * 37 FROM tab0
----
-1049
-2852
157

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 * + col2 col2 FROM tab1
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 + ( tab1.col0 ) col1 FROM tab1
----
102
25
86

query I rowsort
SELECT DISTINCT 20 + - col1 FROM tab1 AS cor0
----
-6
10
7

query I rowsort
SELECT DISTINCT + + 91 * + col2 FROM tab0 AS cor0
----
3003
7462
91

query I rowsort
SELECT 45 * + col1 * + col0 FROM tab1 AS cor0
----
28800
3510
46800

query I rowsort
SELECT ALL + - col1 * + col2 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - col0 + + col1 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT + - 97 FROM tab1, tab2, tab2 cor0, tab0
----
81 values hashing to a85708f93e08f0a017b33cd7912642fd

query I rowsort
SELECT DISTINCT - 56 * col0 + col0 * col2 + 74 AS col0 FROM tab2
----
-129
-1348
-2266

query I rowsort
SELECT DISTINCT - 44 - - ( - cor0.col1 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-54
-57
-70

query I rowsort
SELECT ALL + col2 * + col2 * 55 FROM tab0
----
369820
55
59895

query I rowsort
SELECT DISTINCT - - ( cor0.col0 ) + + ( - cor0.col2 * - col2 ) AS col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL - - 54 * col1 FROM tab1 AS cor0
----
1404
540
702

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col1 FROM tab0 cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5105
SELECT ALL + 26 DIV col1 AS col0 FROM tab1 AS cor0
----
1
2
2

skipif mysql # not compatible
query I rowsort label-5105
SELECT ALL + 26 / col1 AS col0 FROM tab1 AS cor0
----
1
2
2

query I rowsort
SELECT DISTINCT + - cor0.col0 * col0 AS col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + 30 * - col0 FROM tab0 AS cor0
----
-1050
-2670
-720

query I rowsort
SELECT DISTINCT col0 - col2 AS col1 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL - col0 * col2 + - cor0.col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + - col0 + + 45 FROM tab0 AS cor0
----
-44
10
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5111
SELECT ALL + CAST( NULL AS SIGNED ) * + cor0.col1 + + col0 FROM tab0 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT - col2 + col0 + col1 AS col2 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT DISTINCT 90 * - col2 FROM tab0 AS cor0
----
-2970
-7380
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5114
SELECT ALL + CAST( NULL AS SIGNED ) * - col0 + + col2 * ( 31 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5114
SELECT ALL + CAST ( NULL AS INTEGER ) * - col0 + + col2 * ( 31 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col2 ) + + col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * + 45 AS col1 FROM tab1 AS cor0
----
1170
450
585

query I rowsort
SELECT - 14 * col1 + + col1 + col2 * - col0 AS col0 FROM tab0 AS cor0
----
-1296
-1910
-8481

query I rowsort
SELECT ALL 24 FROM tab0, tab1 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

onlyif mysql # use DIV operator for integer division
query I rowsort label-5119
SELECT DISTINCT + col1 DIV - col2 AS col1 FROM tab0 cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-5119
SELECT DISTINCT + col1 / - col2 AS col1 FROM tab0 cor0
----
-1
-2
-97

query I rowsort
SELECT ALL + + ( col2 ) * - col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5121
SELECT ALL + ( col2 ) DIV col0 + - col0 FROM tab0 AS cor0
----
-23
-35
-89

skipif mysql # not compatible
query I rowsort label-5121
SELECT ALL + ( col2 ) / col0 + - col0 FROM tab0 AS cor0
----
-23
-35
-89

query I rowsort
SELECT ALL + col2 * ( + col2 ) + ( col1 ) AS col2 FROM tab2 cor0
----
1461
735
760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 67 col1 FROM tab2 cor0
----
-67
-67
-67

query I rowsort
SELECT + + 14 - - col1 FROM tab1 AS cor0
----
24
27
40

query I rowsort
SELECT DISTINCT - 71 + col2 + + col1 AS col1 FROM tab2 AS cor0
----
-13
-16
14

query I rowsort
SELECT ALL - col2 + - ( - col1 ) FROM tab2
----
-21
33
4

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( - col0 AS REAL ) + col2 * col0 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-5128
SELECT DISTINCT - 91 * col2 + + col1 DIV col2 + col1 AS col0 FROM tab0 AS cor0
----
-2915
-7370
103

skipif mysql # not compatible
query I rowsort label-5128
SELECT DISTINCT - 91 * col2 + + col1 / col2 + col1 AS col0 FROM tab0 AS cor0
----
-2915
-7370
103

query I rowsort
SELECT ALL + col0 - col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5130
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + col0 * col2 + ( + cor0.col2 + col2 ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5130
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + col0 * col2 + ( + cor0.col2 + col2 ) FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 69 + col0 col0 FROM tab2 AS cor0
----
-62
10
9

query I rowsort
SELECT ALL + - cor0.col1 AS col2 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT - col2 * + cor0.col0 * - col0 AS col2 FROM tab1 AS cor0
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-5134
SELECT + 48 DIV + 39 col1 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5134
SELECT + 48 / + 39 col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - col0 * - 39 + - col2 FROM tab0 AS cor0
----
1364
3389
903

onlyif mysql # use DIV operator for integer division
query I rowsort label-5136
SELECT cor0.col2 + 2 DIV - cor1.col0 col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5136
SELECT cor0.col2 + 2 / - cor1.col0 col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col1 * col2 - + 28 FROM tab1 cor0
----
1220
1376
542

query I rowsort
SELECT ALL + col1 * - col1 + col0 + + col1 AS col0 FROM tab0 cor0
----
-7286
-8101
-9277

query I rowsort
SELECT cor0.col0 + - col1 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - 62 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT ALL + col0 * col2 * col0 + ( + col2 + - col0 ) * - ( col2 ) FROM tab0
----
1259
18711
650096

query I rowsort
SELECT DISTINCT - - col2 * + ( + col2 * - col0 ) AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL col2 * cor0.col0 - - col0 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT col0 - - col1 * + col2 * col1 FROM tab1
----
16304
36507
5764

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 64 + 79 col0 FROM tab1, tab2 AS cor0
----
143

query I rowsort
SELECT 79 + - col0 FROM tab1 AS cor0
----
-1
15
76

query I rowsort
SELECT ALL + col0 * col1 * - col0 - col1 FROM tab2 AS cor0
----
-106114
-1550
-359015

query I rowsort
SELECT 76 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT + 8 + - col1 * col1 FROM tab1 AS cor0
----
-161
-668
-92

query I rowsort
SELECT DISTINCT + 60 + col2 AS col0 FROM tab0
----
142
61
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5151
SELECT DISTINCT - ( - col1 ) * - tab2.col2 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5151
SELECT DISTINCT - ( - col1 ) * - tab2.col2 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5152
SELECT + + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5152
SELECT + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + 98 AS col0 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5154
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - 86 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5154
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - 86 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT + - ( col0 ) + + col0 * col0 + col2 AS col0 FROM tab0 AS cor0
----
1191
585
7914

query I rowsort
SELECT - + ( + cor0.col1 ) + - col1 + col0 * col1 AS col2 FROM tab1 cor0
----
1014
26
620

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5157
SELECT + CAST( NULL AS SIGNED ) * cor0.col0 + + col1 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT col0 * - tab2.col1 + col1 * + col2 FROM tab2
----
-3068
-697
620

query I rowsort
SELECT ALL + col0 + ( 25 ) * + col1 + 52 FROM tab0
----
2226
2416
2512

query I rowsort
SELECT - ( 2 ) * col1 + - col0 AS col2 FROM tab0 AS cor0
----
-196
-229
-271

query I rowsort
SELECT col1 - col0 * col1 FROM tab2 AS cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-5162
SELECT col2 DIV + ( col1 * + col1 + col0 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5162
SELECT col2 / + ( col1 * + col1 + col0 ) FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + col2 * - col0 + + col2 * + col2 FROM tab0
----
-34
-574
297

query I rowsort
SELECT - 18 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT ALL tab1.col0 * ( - tab1.col2 ) * col1 AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT + + 19 - + cor1.col2 AS col2 FROM tab2, tab2 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to d0e28cd3c9f7992d327180315a7aaaec

query I rowsort
SELECT DISTINCT + col0 * col1 + col1 * ( + col1 ) + col1 FROM tab1 AS cor0
----
1222
750
780

query I rowsort
SELECT + - col1 * 34 FROM tab2 cor0
----
-1054
-2006
-578

query I rowsort
SELECT ( - col2 ) + col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - 18 + col0 + - col0 * col1 * 16 AS col0 FROM tab0 AS cor0
----
-129513
-33018
-54303

query I rowsort
SELECT ALL + 32 AS col0 FROM tab0
----
32
32
32

query I rowsort
SELECT ALL + col1 + col0 * + col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT - 83 * col0 AS col1 FROM tab0 AS cor0
----
-1992
-2905
-7387

onlyif mysql # use DIV operator for integer division
query I rowsort label-5175
SELECT ALL - ( col1 ) * + col1 DIV + col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5175
SELECT ALL - ( col1 ) * + col1 / + col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - ( - tab0.col0 ) + col1 FROM tab0
----
110
132
180

query I rowsort
SELECT - - col0 * + cor0.col0 AS col1 FROM tab2 cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5178
SELECT 66 DIV col0 AS col2 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5178
SELECT 66 / col0 AS col2 FROM tab0
----
0
1
2

query I rowsort
SELECT DISTINCT col2 * col1 - col0 AS col2 FROM tab0
----
2814
62
7373

query I rowsort
SELECT DISTINCT 56 + col0 * + col2 * - ( col1 ) - - col1 FROM tab1
----
-36414
-4130
-99771

query I rowsort
SELECT 65 + cor0.col2 * col0 + col2 FROM tab2 AS cor0
----
2119
281
3105

query I rowsort
SELECT 32 * + col1 * + cor0.col1 + ( col2 ) + ( + col0 ) AS col1 FROM tab0 AS cor0
----
236729
265163
301124

onlyif mysql # use DIV operator for integer division
query I rowsort label-5183
SELECT DISTINCT + 16 + + col2 DIV + ( - col1 ) FROM tab2
----
14
16

skipif mysql # not compatible
query I rowsort label-5183
SELECT DISTINCT + 16 + + col2 / + ( - col1 ) FROM tab2
----
14
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5184
SELECT + col0 + col1 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5184
SELECT + col0 + col1 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( + col2 ) + col0 * + 38 FROM tab0 cor0
----
1329
3300
879

query I rowsort
SELECT - + col1 * col2 + + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

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

query I rowsort
SELECT - - col2 + + col1 * + 65 * + col2 FROM tab2 cor0
----
42028
54432
99736

query I rowsort
SELECT - ( col2 ) * 94 + col0 FROM tab2 AS cor0
----
-2366
-2531
-3493

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * cor0.col1 + ( + col1 ) * - col0 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 55 * 43 + + col1 FROM tab2 AS cor0
----
2382
2396
2424

query I rowsort
SELECT - 8 + - col0 * - col0 AS col2 FROM tab1 AS cor0
----
1
4088
6392

query I rowsort
SELECT 28 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5194
SELECT ALL + tab2.col2 / CAST( NULL AS SIGNED ) col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5194
SELECT ALL + tab2.col2 / CAST ( NULL AS INTEGER ) col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) + cor0.col2 * - 10 + - 21 * col2 col2 FROM tab2 cor0
----
-1099
-728
-830

query I rowsort
SELECT + - cor0.col0 + + col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 * 93 FROM tab2 cor0
----
17577
188604
279186

query I rowsort
SELECT DISTINCT + - col2 + - col0 * - col1 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT - - col2 - - col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col2 * ( 36 ) * - col2 + col0 AS col1 FROM tab1 cor0
----
-104973
-116900
-331696

query I rowsort
SELECT - + col2 - - 57 FROM tab1 AS cor0
----
-39
0
3

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col0 * col1 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT ALL + + col0 * 37 FROM tab0 AS cor0
----
1295
3293
888

onlyif mysql # use DIV operator for integer division
query I rowsort label-5204
SELECT DISTINCT - col1 DIV ( - 69 ) + + col1 AS col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5204
SELECT DISTINCT - col1 / ( - 69 ) + + col1 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col0 + - 65 AS col0 FROM tab0 AS cor0
----
-100
-154
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5206
SELECT + ( - col0 ) * - ( - ( col1 ) ) - + col0 DIV + 18 FROM tab1
----
-1044
-643
-78

skipif mysql # not compatible
query I rowsort label-5206
SELECT + ( - col0 ) * - ( - ( col1 ) ) - + col0 / + 18 FROM tab1
----
-1044
-643
-78

query I rowsort
SELECT DISTINCT - col1 * - ( col1 ) + + col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT ALL + 78 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT ALL - col0 * col1 * col2 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - col1 * 85 * + tab0.col1 + col1 + - 39 * - col2 AS col0 FROM tab0
----
-627287
-700596
-799629

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5211
SELECT ALL - - col2 + + CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-5211
SELECT ALL - - col2 + + CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5212
SELECT + - col2 + CAST( NULL AS SIGNED ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5212
SELECT + - col2 + CAST ( NULL AS INTEGER ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * + col1 * col1 - col2 AS col0 FROM tab1 AS cor0
----
17522
2101
943

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - cor0.col0 AS REAL ) AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT - col1 + - 98 * col1 FROM tab2
----
-1683
-3069
-5841

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT - col0 + col1 * col1 * - col1 FROM tab2 AS cor0
----
-205457
-29798
-4992

query I rowsort
SELECT cor1.col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
243 values hashing to 63f734facb33901524f6f2c799118db4

query I rowsort
SELECT + 24 FROM tab1, tab0 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to dfdfceb3acab6f866df9d676c07043ad

onlyif mysql # use DIV operator for integer division
query I rowsort label-5220
SELECT ALL col1 DIV - ( col1 * + 52 ) AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5220
SELECT ALL col1 / - ( col1 * + 52 ) AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + ( col0 ) * - col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + 91 - col1 FROM tab0
----
-6
0
5

query I rowsort
SELECT col2 * - tab0.col0 + col2 * col0 FROM tab0
----
0
0
0

query I rowsort
SELECT cor1.col0 FROM tab2, tab1 AS cor0, tab0 cor1, tab0 cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

onlyif mysql # use DIV operator for integer division
query I rowsort label-5225
SELECT DISTINCT + 26 DIV - col0 AS col0 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-5225
SELECT DISTINCT + 26 / - col0 AS col0 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT ALL + ( + tab2.col1 + + ( col1 ) ) FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT - + 97 * cor0.col1 * - ( 29 ) AS col0 FROM tab2 AS cor0
----
165967
47821
87203

query I rowsort
SELECT DISTINCT + 35 * col1 + - col1 AS col0 FROM tab1 AS cor0
----
340
442
884

query I rowsort
SELECT DISTINCT - col2 + col0 * col2 FROM tab0 cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-5230
SELECT + + col0 + col1 DIV 8 AS col2 FROM tab1 AS cor0
----
6
65
81

skipif mysql # not compatible
query I rowsort label-5230
SELECT + + col0 + col1 / 8 AS col2 FROM tab1 AS cor0
----
6
65
81

query I rowsort
SELECT ALL + - col0 + col1 * cor0.col1 * col1 AS col2 FROM tab2 AS cor0
----
205301
29784
4834

query I rowsort
SELECT ( + col2 + + col0 ) FROM tab1
----
121
176
57

query I rowsort
SELECT 92 + - cor0.col0 FROM tab2 cor0
----
13
14
85

query I rowsort
SELECT ALL + + col0 + col2 * - 42 AS col0 FROM tab1 AS cor0
----
-2265
-2330
-3952

query I rowsort
SELECT DISTINCT col0 * + ( - col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5236
SELECT DISTINCT + + col2 + CAST( NULL AS SIGNED ) * + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5236
SELECT DISTINCT + + col2 + CAST ( NULL AS INTEGER ) * + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col1 + - 12 AS col2 FROM tab2 AS cor0
----
-29
-43
-71

query I rowsort
SELECT - ( + cor0.col1 ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - ( col0 ) + - col2 + + col2 FROM tab1
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5240
SELECT DISTINCT col1 + col2 * - col2 + + CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5240
SELECT DISTINCT col1 + col2 * - col2 + + CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT - col0 * cor0.col2 + - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL + 71 * + col2 - col0 AS col0 FROM tab0 AS cor0
----
2319
36
5733

query I rowsort
SELECT ALL - ( - 46 ) + col0 AS col1 FROM tab1 AS cor0
----
110
126
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-5244
SELECT ALL - + col2 DIV - col1 - - col0 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5244
SELECT ALL - + col2 / - col1 - - col0 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 26 + tab2.col2 * col1 AS col2 FROM tab2
----
1560
672
863

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 69 col1 FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT ALL + - col1 + - 19 AS col0 FROM tab1 cor0
----
-29
-32
-45

query I rowsort
SELECT DISTINCT - + 81 + col0 FROM tab1 AS cor0
----
-1
-17
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5250
SELECT DISTINCT - 61 DIV + col1 - + cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5250
SELECT DISTINCT - 61 / + col1 - + cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ( col0 ) + col1 * + col2 * - 60 FROM tab1 AS cor0
----
-34136
-74800
-84237

query I rowsort
SELECT DISTINCT + ( + col2 ) * col2 - col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT DISTINCT cor0.col2 * - 97 FROM tab2, tab0 AS cor0
----
-3201
-7954
-97

query I rowsort
SELECT DISTINCT + - ( + ( - col0 ) ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + - col1 + col0 * + col1 AS col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL + col0 * col0 + cor0.col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT + + col0 * - cor0.col0 + 7 * - col2 FROM tab1 AS cor0
----
-387
-4495
-7072

query I rowsort
SELECT ALL - 62 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-1612
-620
-806

query I rowsort
SELECT DISTINCT col0 + col2 * col1 + + col0 FROM tab1 AS cor0
----
1408
1410
698

query I rowsort
SELECT - col0 * col1 + + col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - + col0 * col0 + + col1 * col1 FROM tab2 AS cor0
----
-2603
-5952
912

query I rowsort
SELECT ALL + + col0 + + cor0.col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - - ( - col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT col0 + - 71 * + tab1.col0 FROM tab1
----
-210
-4480
-5600

onlyif mysql # use DIV operator for integer division
query I rowsort label-5266
SELECT ALL col1 + col0 DIV col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-5266
SELECT ALL col1 + col0 / col1 FROM tab1
----
16
19
26

query I rowsort
SELECT + + col1 * + ( + 26 * + col2 ) + - col0 + + col1 * col1 AS col2 FROM tab0 AS cor0
----
11896
202204
81160

onlyif mysql # use DIV operator for integer division
query I rowsort label-5268
SELECT cor0.col1 DIV + col2 + + ( col2 * col1 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-5268
SELECT cor0.col1 / + col2 + + ( col2 * col1 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 * ( - 33 ) + - col2 FROM tab1 AS cor0
----
-387
-525
-912

query I rowsort
SELECT + - col1 + + col2 + - col2 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + col1 + + col1 * col0 * + col0 FROM tab1 AS cor0
----
260
40970
83213

onlyif mysql # use DIV operator for integer division
query I rowsort label-5272
SELECT DISTINCT - col2 + + 96 DIV + col1 AS col2 FROM tab0 AS cor0
----
-1
-32
-81

skipif mysql # not compatible
query I rowsort label-5272
SELECT DISTINCT - col2 + + 96 / + col1 AS col2 FROM tab0 AS cor0
----
-1
-32
-81

query I rowsort
SELECT 83 + col0 * col0 FROM tab1 AS cor0
----
4179
6483
92

query I rowsort
SELECT - col2 * col1 + - col1 + - col0 AS col0 FROM tab0 AS cor0
----
-229
-2948
-7642

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) - + ( + col2 * col2 ) FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT ( - 62 ) FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-62

query I rowsort
SELECT + - 26 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 4e49eac022daeae6f88f610644ba3754

query I rowsort
SELECT ( col1 ) * + ( + cor0.col0 ) FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) + col2 * col0 col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - cor0.col0 - col0 * col2 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT col0 + + ( col1 ) AS col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - col1 * + col0 * - ( col0 ) FROM tab1
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-5283
SELECT ALL 36 DIV + col0 AS col2 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5283
SELECT ALL 36 / + col0 AS col2 FROM tab0
----
0
1
1

query I rowsort
SELECT - - cor0.col1 + cor0.col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + - col0 * col2 + col0 * - col2 * col0 FROM tab0 AS cor0
----
-1260
-19800
-656820

onlyif mysql # use DIV operator for integer division
query I rowsort label-5286
SELECT - col1 * - col0 DIV + col0 AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5286
SELECT - col1 * - col0 / + col0 AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + col2 - + col1 AS col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 + + col1 * - col2 FROM tab2 cor0
----
-648
2356
494

query I rowsort
SELECT - col0 * cor0.col1 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-5290
SELECT ALL col1 * col1 - - col0 * col0 DIV col0 AS col0 FROM tab0
----
7420
8370
9444

skipif mysql # not compatible
query I rowsort label-5290
SELECT ALL col1 * col1 - - col0 * col0 / col0 AS col0 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT col1 - tab0.col2 AS col2 FROM tab0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5292
SELECT DISTINCT + col1 DIV + col0 - col0 AS col0 FROM tab1
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-5292
SELECT DISTINCT + col1 / + col0 - col0 AS col0 FROM tab1
----
-64
-80
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5293
SELECT + col2 + col1 * col2 DIV col0 - col1 FROM tab0
----
-94
65
74

skipif mysql # not compatible
query I rowsort label-5293
SELECT + col2 + col1 * col2 / col0 - col1 FROM tab0
----
-94
65
74

query I rowsort
SELECT + ( col2 * - col0 ) AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT ( + 13 ) * + col2 AS col2 FROM tab0
----
1066
13
429

query I rowsort
SELECT ( 69 ) FROM tab0
----
69
69
69

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT ( NOT NULL NOT IN ( col0 ) ) AND NOT ( NULL ) NOT IN ( col0 ) OR + col1 NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL + 99 + col0 * + col2 AS col1 FROM tab1 AS cor0
----
261
3747
7779

query I rowsort
SELECT DISTINCT col0 + cor0.col1 + cor0.col1 FROM tab1 AS cor0
----
106
55
84

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

query I rowsort
SELECT 24 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-240
-312
-624

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

query I rowsort
SELECT DISTINCT 41 * + col1 AS col0 FROM tab1 AS cor0
----
1066
410
533

onlyif mysql # use DIV operator for integer division
query I rowsort label-5304
SELECT 17 + + col1 DIV + col1 AS col1 FROM tab1
----
18
18
18

skipif mysql # not compatible
query I rowsort label-5304
SELECT 17 + + col1 / + col1 AS col1 FROM tab1
----
18
18
18

query I rowsort
SELECT - col0 + ( col1 ) FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT - 26 + - tab0.col0 * tab0.col0 FROM tab0, tab0 AS cor0
----
-1251
-602
-7947

query I rowsort
SELECT DISTINCT col0 * col1 + + col0 AS col2 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT ( + col0 + + col1 ) FROM tab0
----
110
132
180

query I rowsort
SELECT + col1 - + tab1.col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL col0 * - col0 AS col2 FROM tab2
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5311
SELECT - 99 DIV + col1 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5311
SELECT - 99 / + col1 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + ( 88 ) + + col0 FROM tab0
----
112
123
177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 52 * col0 col0 FROM tab2
----
364
4056
4108

onlyif mysql # use DIV operator for integer division
query I rowsort label-5314
SELECT DISTINCT + - ( + col1 ) * cor0.col1 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5314
SELECT DISTINCT + - ( + col1 ) * cor0.col1 / cor0.col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + col0 * + 6 AS col1 FROM tab0 AS cor0
----
144
210
534

query I rowsort
SELECT ALL + col0 + - col2 AS col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ( 94 ) AS col2 FROM tab1 AS cor0
----
94
94
94

query I rowsort
SELECT - col2 * cor0.col0 - 54 AS col0 FROM tab0 cor0
----
-7352
-846
-89

query I rowsort
SELECT DISTINCT - col1 + - cor0.col0 * col2 AS col0 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT + ( col2 ) + - col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + col1 * col2 + ( - col0 ) * col1 AS col0 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT DISTINCT - - col2 * - col1 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + cor0.col2 + col0 + cor0.col0 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT DISTINCT 58 * - col2 AS col1 FROM tab0 AS cor0
----
-1914
-4756
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 * col0 col1 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT ALL + - 30 * - col1 FROM tab2 cor0
----
1770
510
930

query I rowsort
SELECT ALL + col2 * + col0 * 39 FROM tab0 AS cor0
----
1365
284622
30888

query I rowsort
SELECT + 64 + + col2 * col1 FROM tab2
----
1598
710
901

query I rowsort
SELECT col0 + - col0 * - col2 AS col0 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5330
SELECT 53 - - col2 DIV - tab2.col1 FROM tab2
----
51
53
53

skipif mysql # not compatible
query I rowsort label-5330
SELECT 53 - - col2 / - tab2.col1 FROM tab2
----
51
53
53

query I rowsort
SELECT ALL - 42 AS col1 FROM tab1
----
-42
-42
-42

query I rowsort
SELECT + 23 - - col2 * + col0 FROM tab0
----
58
7321
815

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - cor0.col2 + ( - cor0.col1 + ( - col0 ) ) * cor0.col1 col2 FROM tab0 AS cor0
----
-12769
-8668
-9082

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5334
SELECT DISTINCT - cor0.col2 + col1 * col2 * + col1 + - CAST( col0 AS SIGNED ) FROM tab2 cor0
----
10865
25913
90402

skipif mysql # not compatible
query I rowsort label-5334
SELECT DISTINCT - cor0.col2 + col1 * col2 * + col1 + - CAST ( col0 AS INTEGER ) FROM tab2 cor0
----
10865
25913
90402

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + col0 * - ( cor0.col0 ) - - col1 col0 FROM tab2 cor0
----
-11
-5947
-6145

query I rowsort
SELECT ALL cor0.col0 * col0 + col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL col2 - + ( - col1 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + col1 + 72 * - col0 FROM tab1 AS cor0
----
-190
-4598
-5747

query I rowsort
SELECT ALL col1 + 56 * - col1 + + col2 FROM tab0 AS cor0
----
-4697
-4923
-5334

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5340
SELECT ALL + col2 + - CAST( NULL AS DECIMAL ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5340
SELECT ALL + col2 + - CAST ( NULL AS REAL ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * + 97 AS col2 FROM tab0 AS cor0
----
8342
8827
9409

query I rowsort
SELECT DISTINCT col1 * col1 * col2 + - col2 FROM tab2 AS cor0
----
10944
25920
90480

query I rowsort
SELECT ALL - col2 + ( - 8 ) + col2 FROM tab1 cor0
----
-8
-8
-8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5344
SELECT DISTINCT + + col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5344
SELECT DISTINCT + + col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col0 + col1 * - col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL 65 AS col2 FROM tab2 cor0
----
65
65
65

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT - cor0.col2 + - cor0.col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - col0 + + ( col2 * + tab2.col0 ) FROM tab2
----
182
1950
2923

query I rowsort
SELECT + cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - 59 + ( - col2 ) * - col1 AS col0 FROM tab1 cor0
----
1189
1345
511

query I rowsort
SELECT - - col2 * - 10 AS col1 FROM tab2 AS cor0
----
-260
-270
-380

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) * cor0.col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL + cor0.col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - 88 AS col0 FROM tab2, tab2 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 00f4aded8ec5b6d9904061ce3da09e20

query I rowsort
SELECT - + col1 * - 25 AS col2 FROM tab2 cor0
----
1475
425
775

query I rowsort
SELECT ALL + + ( col0 ) + - col1 * cor0.col2 * 9 AS col1 FROM tab1 cor0
----
-11152
-12633
-5066

query I rowsort
SELECT ALL - + col0 * 58 + - col0 AS col1 FROM tab1 AS cor0
----
-177
-3776
-4720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5360
SELECT ALL + + CAST( - col0 AS SIGNED ) * cor0.col0 * + col1 FROM tab1 AS cor0
----
-234
-40960
-83200

skipif mysql # not compatible
query I rowsort label-5360
SELECT ALL + + CAST ( - col0 AS INTEGER ) * cor0.col0 * + col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT + col2 + col0 * - col2 AS col0 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL + 91 - - col1 FROM tab2 AS cor0
----
108
122
150

query I rowsort
SELECT + + col1 + + col2 * - col2 AS col1 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT ALL + col1 * - col1 + + col2 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT + col0 * col0 * 26 FROM tab1 AS cor0
----
106496
166400
234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * col2 col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT col0 * - col2 * col2 AS col1 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT ALL col2 + + 9 * + 88 AS col2 FROM tab1 AS cor0
----
846
849
888

query I rowsort
SELECT col0 * + 0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 97 * tab0.col1 col0 FROM tab0
----
717412
803257
912673

query I rowsort
SELECT + col0 + 76 AS col2 FROM tab1 AS cor0
----
140
156
79

query I rowsort
SELECT col2 * col2 + + ( col1 ) + - cor0.col0 * + 14 FROM tab2 AS cor0
----
-357
355
662

onlyif mysql # use DIV operator for integer division
query I rowsort label-5373
SELECT ALL + col1 DIV ( + col1 ) AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5373
SELECT ALL + col1 / ( + col1 ) AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + - 7 + + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
19
3
6

query I rowsort
SELECT DISTINCT - + 21 * - col0 AS col2 FROM tab2 AS cor0
----
147
1638
1659

query I rowsort
SELECT ALL - 70 * cor0.col2 + col2 AS col1 FROM tab1 AS cor0
----
-3726
-3933
-6624

onlyif mysql # use DIV operator for integer division
query I rowsort label-5377
SELECT + - col2 + - 27 * col1 + col2 DIV + ( + 1 ) AS col1 FROM tab1 AS cor0
----
-270
-351
-702

skipif mysql # not compatible
query I rowsort label-5377
SELECT + - col2 + - 27 * col1 + col2 / + ( + 1 ) AS col1 FROM tab1 AS cor0
----
-270
-351
-702

query I rowsort
SELECT DISTINCT col0 * 92 AS col2 FROM tab0
----
2208
3220
8188

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5380
SELECT - col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5380
SELECT - col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * 16 AS col0 FROM tab1 AS cor0
----
160
208
416

query I rowsort
SELECT ( col0 * - col1 ) FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT - col1 * + ( - col1 ) AS col2 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
1
33
82

query I rowsort
SELECT - 98 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 24 col0 FROM tab0 AS cor0
----
24
24
24

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
-26
-27
-38

query I rowsort
SELECT ALL - 99 * - col1 + cor0.col1 * col1 AS col2 FROM tab0 AS cor0
----
15910
17290
19012

query I rowsort
SELECT + col0 * - col0 * - col1 AS col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT - + col0 + + col0 * - col1 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT - 65 * col1 FROM tab0 cor0
----
-5590
-5915
-6305

query I rowsort
SELECT + - cor0.col0 + cor0.col0 * col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + 88 * col1 + - 61 AS col2 FROM tab2
----
1435
2667
5131

query I rowsort
SELECT - + 35 AS col1 FROM tab2 AS cor0
----
-35
-35
-35

query I rowsort
SELECT ALL - 11 + - col0 AS col0 FROM tab0 cor0
----
-100
-35
-46

query I rowsort
SELECT DISTINCT - 11 + - cor0.col1 FROM tab1 AS cor0
----
-21
-24
-37

query I rowsort
SELECT - 59 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT DISTINCT + col0 + + col2 * col2 AS col0 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT ALL + col0 + 92 * 6 AS col0 FROM tab2 AS cor0
----
559
630
631

query I rowsort
SELECT DISTINCT col1 + - 71 FROM tab2 AS cor0
----
-12
-40
-54

onlyif mysql # use DIV operator for integer division
query I rowsort label-5401
SELECT ALL + col0 + - 61 * col1 DIV col0 FROM tab0 AS cor0
----
-134
-194
27

skipif mysql # not compatible
query I rowsort label-5401
SELECT ALL + col0 + - 61 * col1 / col0 FROM tab0 AS cor0
----
-134
-194
27

query I rowsort
SELECT DISTINCT + + col0 * - 26 + - col1 AS col1 FROM tab0 AS cor0
----
-1007
-2405
-710

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col1 + + CAST ( col1 AS REAL ) col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col0 * - 65 AS col1 FROM tab1 AS cor0
----
195
4160
5200

query I rowsort
SELECT DISTINCT col2 * - ( 45 ) FROM tab0 cor0
----
-1485
-3690
-45

query I rowsort
SELECT ALL + + col2 * ( - col0 ) + - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT - col2 * + cor0.col0 + cor0.col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + col1 + + col0 AS col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - ( - tab1.col2 ) FROM tab1
----
54
57
96

query I rowsort
SELECT - + 64 + 18 AS col2 FROM tab2 AS cor0
----
-46
-46
-46

query I rowsort
SELECT - col2 + + 11 * + cor0.col2 * - ( + col0 ) AS col0 FROM tab1 AS cor0
----
-1836
-40185
-84576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 * - col0 col2 FROM tab1 AS cor0
----
294
6272
7840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * cor0.col1 col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ( col1 ) + + cor0.col2 * - ( - 23 + - cor0.col2 ) AS col2 FROM tab2 AS cor0
----
1333
1381
2335

query I rowsort
SELECT - ( col0 ) + - col0 AS col2 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT - col1 + - 16 AS col2 FROM tab2 AS cor0
----
-33
-47
-75

query I rowsort
SELECT 11 + col2 * col0 FROM tab1 AS cor0
----
173
3659
7691

query I rowsort
SELECT - - cor0.col0 * - col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + - ( col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + col2 * + 4 FROM tab1
----
216
228
384

onlyif mysql # use DIV operator for integer division
query I rowsort label-5421
SELECT DISTINCT 61 * col2 DIV - col0 + + 34 FROM tab0
----
-22
-49
33

skipif mysql # not compatible
query I rowsort label-5421
SELECT DISTINCT 61 * col2 / - col0 + + 34 FROM tab0
----
-22
-49
33

query I rowsort
SELECT - 65 * col2 - col2 AS col0 FROM tab1
----
-3564
-3762
-6336

query I rowsort
SELECT + tab2.col1 + col2 + - tab2.col1 * col0 FROM tab2
----
-1288
-159
-4517

query I rowsort
SELECT ALL col1 FROM tab2 WHERE NOT - col1 * col2 IN ( col1 )
----
17
31
59

query I rowsort
SELECT col1 + - col0 + - col2 * + tab2.col2 * tab2.col1 AS col2 FROM tab2
----
-22575
-24610
-39903

query I rowsort
SELECT + col0 * col2 + + col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT col0 * col1 + cor0.col2 * - cor0.col0 FROM tab0 AS cor0
----
1272
3360
801

query I rowsort
SELECT ALL - col1 * - col0 - tab2.col1 * + col0 * - col1 AS col1 FROM tab2
----
24174
276120
6944

query I rowsort
SELECT col2 + col2 + tab2.col1 AS col1 FROM tab2
----
111
85
93

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) <= - col1 * col0
----

query I rowsort
SELECT DISTINCT + col2 * + col2 - col0 AS col0 FROM tab2
----
1365
598
722

onlyif mysql # use DIV operator for integer division
query I rowsort label-5432
SELECT DISTINCT tab0.col1 + + col1 DIV col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5432
SELECT DISTINCT tab0.col1 + + col1 / col1 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT + tab1.col0 + col0 FROM tab1 WHERE col2 >= NULL
----

query I rowsort
SELECT col0 * + col1 AS col1 FROM tab0 WHERE NOT col2 * - col0 IN ( col0 + + col1 )
----
2064
3395
8099

query III rowsort
SELECT * FROM tab1 WHERE NOT col2 NOT IN ( - col1 + col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - tab2.col0 col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL tab1.col2 * + col1 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL + col0 - + tab0.col2 FROM tab0
----
-9
34
7

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

query I rowsort
SELECT - col0 + col1 * tab1.col1 AS col0 FROM tab1
----
36
673
89

query I rowsort
SELECT - - col1 - col1 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT col2 * + tab0.col0 * - col0 + col1 + - col1 * + col0 AS col0 FROM tab0
----
-20986
-4523
-657530

onlyif mysql # use DIV operator for integer division
query I rowsort label-5443
SELECT + col0 + col1 DIV + col0 col2 FROM tab0 cor0
----
27
37
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5443
SELECT + col0 + col1 / + col0 col2 FROM tab0 cor0
----
27
37
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5444
SELECT DISTINCT + col1 + + cor0.col2 DIV - col0 AS col1 FROM tab2 AS cor0
----
17
28
59

skipif mysql # not compatible
query I rowsort label-5444
SELECT DISTINCT + col1 + + cor0.col2 / - col0 AS col1 FROM tab2 AS cor0
----
17
28
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5445
SELECT + col1 - col1 DIV col0 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-5445
SELECT + col1 - col1 / col0 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 * - col1 AS col0 FROM tab0 cor0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT col0 * col1 + cor0.col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - col0 - - col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT col0 * + col0 - - col2 AS col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT DISTINCT - col2 - col0 * col1 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - col2 * col2 + + col1 * + col2 AS col2 FROM tab2 AS cor0
----
-798
108
858

onlyif mysql # use DIV operator for integer division
query I rowsort label-5452
SELECT DISTINCT - col1 DIV - col1 + + col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-5452
SELECT DISTINCT - col1 / - col1 + + col2 FROM tab1 AS cor0
----
55
58
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5453
SELECT + col2 DIV - col2 + + col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-5453
SELECT + col2 / - col2 + + col0 FROM tab0
----
23
34
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5454
SELECT DISTINCT + col0 * + col2 + col1 DIV cor0.col1 FROM tab0 AS cor0
----
36
7299
793

skipif mysql # not compatible
query I rowsort label-5454
SELECT DISTINCT + col0 * + col2 + col1 / cor0.col1 FROM tab0 AS cor0
----
36
7299
793

query I rowsort
SELECT ALL - tab0.col0 * - tab0.col2 + - col2 * + col1 AS col2 FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT col0 * - col0 + col0 * col1 AS col2 FROM tab1
----
-3456
-5360
69

query I rowsort
SELECT DISTINCT + col0 + 10 FROM tab0 AS cor0
----
34
45
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5458
SELECT ALL - col1 - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + cor0.col2 + + 68 AS col1 FROM tab2 AS cor0
----
106
94
95

query I rowsort
SELECT DISTINCT + col2 + col2 + cor0.col2 * - col0 FROM tab2 AS cor0
----
-135
-1976
-2926

query I rowsort
SELECT DISTINCT + col2 + + 25 * 75 FROM tab1 AS cor0
----
1929
1932
1971

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * - ( 54 * + cor0.col0 ) + col2 col2 FROM tab2 AS cor0
----
2673
328562
337052

query I rowsort
SELECT col2 + 27 AS col2 FROM tab1 AS cor0
----
123
81
84

query I rowsort
SELECT - col1 * col2 - + col2 * - cor0.col0 FROM tab1 AS cor0
----
-1242
3078
6432

onlyif mysql # use DIV operator for integer division
query I rowsort label-5465
SELECT DISTINCT col1 + col1 DIV tab0.col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5465
SELECT DISTINCT col1 + col1 / tab0.col1 FROM tab0
----
87
92
98

query I rowsort
SELECT - - col1 - + 30 * ( col2 ) FROM tab0 AS cor0
----
-2369
-904
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-5467
SELECT + cor0.col0 + + ( + col2 ) DIV - col0 AS col2 FROM tab0 AS cor0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-5467
SELECT + cor0.col0 + + ( + col2 ) / - col0 AS col2 FROM tab0 AS cor0
----
23
35
89

query I rowsort
SELECT - + ( - col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - 10 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-5470
SELECT DISTINCT + 67 DIV col1 - ( col1 ) AS col0 FROM tab2 cor0
----
-14
-29
-58

skipif mysql # not compatible
query I rowsort label-5470
SELECT DISTINCT + 67 / col1 - ( col1 ) AS col0 FROM tab2 cor0
----
-14
-29
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-5471
SELECT DISTINCT + col0 DIV tab1.col0 + + col2 * col0 * col1 FROM tab1
----
36481
4213
99841

skipif mysql # not compatible
query I rowsort label-5471
SELECT DISTINCT + col0 / tab1.col0 + + col2 * col0 * col1 FROM tab1
----
36481
4213
99841

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL > - col0
----

query I rowsort
SELECT + col0 * - tab2.col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col2 + col1 - + col0 AS col1 FROM tab0
----
63
84
95

query I rowsort
SELECT ALL - col1 FROM tab2 WHERE NOT NULL NOT IN ( + col1 + + col1 )
----

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

query I rowsort
SELECT tab1.col2 + tab1.col1 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL + tab0.col1 - col2 * tab0.col2 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT ALL - 27 + - col0 FROM tab1
----
-107
-30
-91

query I rowsort
SELECT col1 + + col1 + tab1.col0 AS col1 FROM tab1
----
106
55
84

query I rowsort
SELECT ALL + + col2 + + cor0.col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT cor1.col1 AS col1 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5483
SELECT + + cor0.col0 * + col2 * + CAST( col1 AS SIGNED ) + col2 * 60 AS col2 FROM tab1 AS cor0
----
105600
39900
7452

skipif mysql # not compatible
query I rowsort label-5483
SELECT + + cor0.col0 * + col2 * + CAST ( col1 AS INTEGER ) + col2 * 60 AS col2 FROM tab1 AS cor0
----
105600
39900
7452

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 * col2 col0 FROM tab0 AS cor0
----
-1023
-2542
-31

query I rowsort
SELECT - ( 75 ) AS col2 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT + 24 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5487
SELECT + CAST( NULL AS SIGNED ) + 8 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5487
SELECT + CAST ( NULL AS INTEGER ) + 8 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-5488
SELECT ALL - - ( - 30 ) + col0 DIV col1 col1 FROM tab1 AS cor0
----
-24
-24
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5488
SELECT ALL - - ( - 30 ) + col0 / col1 col1 FROM tab1 AS cor0
----
-24
-24
-30

onlyif mysql # use DIV operator for integer division
query I rowsort label-5489
SELECT DISTINCT + - col1 DIV 58 + - col2 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
189
2027
3002

skipif mysql # not compatible
query I rowsort label-5489
SELECT DISTINCT + - col1 / 58 + - col2 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
189
2027
3002

query I rowsort
SELECT + 52 * - ( + col1 ) FROM tab0 cor0
----
-4472
-4732
-5044

query I rowsort
SELECT ALL - + col2 - + 31 FROM tab2 AS cor0
----
-57
-58
-69

query I rowsort
SELECT - - 69 + 69 AS col2 FROM tab0 AS cor0
----
138
138
138

query I rowsort
SELECT ( + col1 ) * + col2 AS col1 FROM tab2 cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5494
SELECT ALL + + col0 DIV col1 AS col2 FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-5494
SELECT ALL + + col0 / col1 AS col2 FROM tab1 cor0
----
0
6
6

query I rowsort
SELECT - 90 * + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b4386c655dc1c0c29847623350fac32f

query I rowsort
SELECT + 53 * col1 + tab0.col2 FROM tab0
----
4591
4905
5142

query I rowsort
SELECT DISTINCT - col0 * - 92 AS col2 FROM tab1
----
276
5888
7360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 10 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT DISTINCT + ( 79 * - col1 ) FROM tab1
----
-1027
-2054
-790

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab2, tab0 AS cor2
----
7
78
79

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 WHERE NOT ( NULL ) = NULL
----

query I rowsort
SELECT - col1 * ( col1 ) + - col2 AS col2 FROM tab2 AS cor0
----
-327
-3507
-988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 * - col0 col0 FROM tab2
----
49
546
553

query I rowsort
SELECT tab1.col1 * + 40 FROM tab1
----
1040
400
520

query I rowsort
SELECT + 39 + - 95 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

query I rowsort
SELECT + 61 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT DISTINCT - col0 + + col1 * - ( - tab2.col1 ) FROM tab2
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 55 col1 FROM tab1, tab2 AS cor0
----
55

query I rowsort
SELECT - col2 + - 80 + + col0 * - col2 FROM tab0
----
-116
-7460
-905

query I rowsort
SELECT - + col1 + + ( cor0.col1 * col1 ) AS col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT DISTINCT col0 + - ( 73 ) + col1 * + 52 FROM tab0
----
4423
4748
5006

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 18 AS REAL ) * + col1 AS col1 FROM tab2 cor0
----
1062
306
558

query I rowsort
SELECT ALL 30 FROM tab0, tab0 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT 15 + - col1 AS col0 FROM tab1 AS cor0
----
-11
2
5

query I rowsort
SELECT + col1 + + cor0.col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5516
SELECT ALL CAST( col2 AS SIGNED ) + col2 col1 FROM tab1 AS cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5516
SELECT ALL CAST ( col2 AS INTEGER ) + col2 col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL - 75 AS col0 FROM tab0 AS cor0
----
-75
-75
-75

query I rowsort
SELECT ALL + 42 + + col0 * - col2 * - col1 FROM tab2 AS cor0
----
119694
51076
5901

query I rowsort
SELECT + 65 * col0 * col2 FROM tab0 AS cor0
----
2275
474370
51480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 6 - + col0 col0 FROM tab0
----
-18
-29
-83

query I rowsort
SELECT + col1 + col0 * + col0 + - col0 FROM tab0
----
1287
638
7923

query I rowsort
SELECT DISTINCT 3 * col2 - + 98 AS col0 FROM tab1
----
190
64
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-5523
SELECT 22 DIV col0 + - col2 + 32 AS col2 FROM tab1
----
-15
-25
-64

skipif mysql # not compatible
query I rowsort label-5523
SELECT 22 / col0 + - col2 + 32 AS col2 FROM tab1
----
-15
-25
-64

query I rowsort
SELECT DISTINCT 8 - - tab2.col2 AS col1 FROM tab2
----
34
35
46

query I rowsort
SELECT col1 * tab0.col2 - col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT DISTINCT ( + col0 ) + ( - col2 ) * - col1 - - col0 FROM tab0
----
167
2886
7640

onlyif mysql # use DIV operator for integer division
query I rowsort label-5527
SELECT - col1 * col1 DIV + 32 FROM tab0 AS cor0
----
-231
-258
-294

skipif mysql # not compatible
query I rowsort label-5527
SELECT - col1 * col1 / + 32 FROM tab0 AS cor0
----
-231
-258
-294

onlyif mysql # use DIV operator for integer division
query I rowsort label-5528
SELECT - - col1 DIV col1 + - cor0.col0 * - 95 AS col0 FROM tab1 AS cor0
----
286
6081
7601

skipif mysql # not compatible
query I rowsort label-5528
SELECT - - col1 / col1 + - cor0.col0 * - 95 AS col0 FROM tab1 AS cor0
----
286
6081
7601

query I rowsort
SELECT DISTINCT + + col0 * ( - col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT col1 + - 0 * + col1 + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5531
SELECT - + col2 + col1 DIV col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-5531
SELECT - + col2 + col1 / col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT col0 * + 36 + col0 * - cor0.col2 - col1 FROM tab1 AS cor0
----
-1354
-4813
-80

query I rowsort
SELECT DISTINCT - col2 + + col0 * - 24 FROM tab0 AS cor0
----
-2218
-609
-841

query I rowsort
SELECT DISTINCT + col1 + - col0 + + col1 AS col1 FROM tab2 AS cor0
----
-45
40
55

query I rowsort
SELECT DISTINCT + - col2 + col1 AS col0 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + col2 + col2 - - col0 AS col2 FROM tab0 AS cor0
----
253
37
90

query I rowsort
SELECT ALL - col1 * + ( col0 ) AS col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL 28 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 21 col1 FROM tab2
----
21

query I rowsort
SELECT ALL + + col2 + - ( col2 + + cor0.col2 ) AS col1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ALL - - cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * cor0.col2 - + col1 col0 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT + col2 * col0 + col2 * - col0 * - cor0.col2 FROM tab0 AS cor0
----
26928
605734
70

query I rowsort
SELECT ALL + 39 + cor0.col2 * - 90 + col2 FROM tab2 AS cor0
----
-2275
-2364
-3343

query I rowsort
SELECT DISTINCT + + 15 + col0 AS col1 FROM tab0 AS cor0
----
104
39
50

query I rowsort
SELECT - 60 + col1 * + 63 FROM tab0 cor0
----
5358
5673
6051

query I rowsort
SELECT ALL - 6 * col0 + col0 AS col1 FROM tab0
----
-120
-175
-445

query I rowsort
SELECT DISTINCT ( - 73 ) + + col1 FROM tab0
----
13
18
24

query I rowsort
SELECT - + ( + col0 ) * col1 + 7 + col2 FROM tab2 AS cor0
----
-1298
-183
-4569

onlyif mysql # use DIV operator for integer division
query I rowsort label-5550
SELECT ALL - ( + col0 ) * - col1 + + 19 DIV cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-5550
SELECT ALL - ( + col0 ) * - col1 + + 19 / cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 17 * col1 + 59 * col0 FROM tab0 AS cor0
----
2878
3714
6798

query I rowsort
SELECT 37 * + col2 FROM tab2
----
1406
962
999

onlyif mysql # use DIV operator for integer division
query I rowsort label-5553
SELECT ALL - col1 * - col1 DIV col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5553
SELECT ALL - col1 * - col1 / col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ( ( - col1 ) ) * 93 - col2 AS col2 FROM tab1 AS cor0
----
-1305
-2472
-987

query I rowsort
SELECT DISTINCT - 56 + col2 * + col0 AS col2 FROM tab0 AS cor0
----
-21
7242
736

query I rowsort
SELECT DISTINCT col0 - 49 * + col1 FROM tab1 AS cor0
----
-1271
-426
-557

query I rowsort
SELECT + col2 * - col0 + cor0.col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT + 47 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT col2 + 74 AS col2 FROM tab2
----
100
101
112

onlyif mysql # use DIV operator for integer division
query I rowsort label-5560
SELECT col2 DIV - 35 + - tab1.col0 DIV - col0 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5560
SELECT col2 / - 35 + - tab1.col0 / - col0 FROM tab1
----
-1
0
0

query I rowsort
SELECT DISTINCT + 51 * - 31 + - col1 FROM tab0
----
-1667
-1672
-1678

query I rowsort
SELECT - col1 * 74 AS col1 FROM tab2 AS cor0
----
-1258
-2294
-4366

query I rowsort
SELECT ALL - ( - cor0.col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + col1 * 47 AS col2 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT DISTINCT + col1 * + col2 + + col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT col1 + 79 FROM tab2 AS cor0
----
110
138
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5567
SELECT ALL + CAST( + col1 AS SIGNED ) * col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-5567
SELECT ALL + CAST ( + col1 AS INTEGER ) * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + - col2 - - 99 AS col0 FROM tab0 AS cor0
----
17
66
98

query I rowsort
SELECT DISTINCT + + 17 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT - col2 * 35 + col1 + - 93 AS col0 FROM tab1 AS cor0
----
-1957
-2078
-3440

query I rowsort
SELECT DISTINCT - 46 * - col1 * + col2 AS col0 FROM tab2 AS cor0
----
29716
38502
70564

query I rowsort
SELECT - col0 * 10 FROM tab2 cor0
----
-70
-780
-790

query I rowsort
SELECT DISTINCT cor0.col2 * + 86 FROM tab1 AS cor0
----
4644
4902
8256

onlyif mysql # use DIV operator for integer division
query I rowsort label-5574
SELECT ALL 42 DIV + col2 FROM tab0
----
0
1
42

skipif mysql # not compatible
query I rowsort label-5574
SELECT ALL 42 / + col2 FROM tab0
----
0
1
42

query I rowsort
SELECT ALL col1 * 65 FROM tab1
----
1690
650
845

onlyif mysql # use DIV operator for integer division
query I rowsort label-5576
SELECT ALL - col0 + col2 DIV + col2 + - tab1.col0 FROM tab1
----
-127
-159
-5

skipif mysql # not compatible
query I rowsort label-5576
SELECT ALL - col0 + col2 / + col2 + - tab1.col0 FROM tab1
----
-127
-159
-5

query I rowsort
SELECT + 81 * + col1 * col0 + - ( col0 ) AS col1 FROM tab2
----
108704
17570
372684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col1 col0 FROM tab1 cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + - col0 col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - + 45 FROM tab2 cor0
----
-45
-45
-45

query I rowsort
SELECT ( + col0 ) + - 51 + - col2 FROM tab2 cor0
----
-10
-71
1

query I rowsort
SELECT - cor0.col2 + col1 + ( ( - col1 ) ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ( - col0 ) - + cor0.col0 * + col1 * col1 FROM tab0 AS cor0
----
-177528
-329350
-737098

query I rowsort
SELECT - col1 + - cor0.col2 + col0 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT - ( cor0.col0 ) - cor0.col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + + cor0.col1 * + 31 FROM tab0 AS cor0
----
2666
2821
3007

query I rowsort
SELECT DISTINCT col2 + 90 FROM tab2 AS cor0
----
116
117
128

query I rowsort
SELECT ALL + col2 + + 13 FROM tab0 AS cor0
----
14
46
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL - - col0 * - CAST ( ( - col1 ) AS REAL ) * cor0.col0 col2 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT + col2 * col1 AS col1 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5591
SELECT - col1 + CAST( + col2 AS SIGNED ) * col0 FROM tab1 cor0
----
136
3638
7667

skipif mysql # not compatible
query I rowsort label-5591
SELECT - col1 + CAST ( + col2 AS INTEGER ) * col0 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT col2 + + 15 FROM tab0 AS cor0
----
16
48
97

query I rowsort
SELECT DISTINCT + - col0 * + 45 + col0 FROM tab1 AS cor0
----
-132
-2816
-3520

query I rowsort
SELECT ALL - col1 + 81 AS col0 FROM tab0 AS cor0
----
-10
-16
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5595
SELECT - - cor0.col2 * CAST( NULL AS SIGNED ) + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + - ( 83 ) FROM tab1 AS cor0
----
-83
-83
-83

query I rowsort
SELECT - 33 * + col1 FROM tab0 cor0
----
-2838
-3003
-3201

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
17
31
59

query I rowsort
SELECT DISTINCT - 85 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 AS cor2
----
-85

query I rowsort
SELECT 97 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5601
SELECT ALL - col0 DIV 1 AS col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5601
SELECT ALL - col0 / 1 AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + 32 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d30a2acbf33c88274474306936d3227b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT DISTINCT - - 1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
1

query I rowsort
SELECT - 0 + col2 * - 31 AS col0 FROM tab0 AS cor0
----
-1023
-2542
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 col1 FROM tab0 cor0
----
47
47
47

query I rowsort
SELECT + 43 * - col0 FROM tab1 AS cor0
----
-129
-2752
-3440

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5608
SELECT + cor0.col0 + + col1 * CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5608
SELECT + cor0.col0 + + col1 * CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 + + col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * + 51 FROM tab0 AS cor0
----
1683
4182
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5611
SELECT + - col0 DIV + col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5611
SELECT + - col0 / + col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + 10 + - col0 * cor0.col2 * - col1 AS col2 FROM tab2 AS cor0
----
119662
51044
5869

onlyif mysql # use DIV operator for integer division
query I rowsort label-5613
SELECT + col2 * 2 - + col0 DIV col1 FROM tab1 AS cor0
----
108
108
186

skipif mysql # not compatible
query I rowsort label-5613
SELECT + col2 * 2 - + col0 / col1 FROM tab1 AS cor0
----
108
108
186

query I rowsort
SELECT + ( col2 ) + - col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5615
SELECT + CAST( 34 AS SIGNED ) + - col2 AS col0 FROM tab2 AS cor0
----
-4
7
8

skipif mysql # not compatible
query I rowsort label-5615
SELECT + CAST ( 34 AS INTEGER ) + - col2 AS col0 FROM tab2 AS cor0
----
-4
7
8

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * col1 + CAST ( col2 + col1 AS REAL ) FROM tab0 AS cor0
----
2183
3493
8272

query I rowsort
SELECT + + 92 * col0 + ( - 86 ) * cor0.col2 AS col0 FROM tab2 AS cor0
----
-1678
4000
4940

query I rowsort
SELECT DISTINCT + ( - col2 ) * - col1 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT - 81 * - cor0.col2 FROM tab2, tab2 AS cor0
----
2106
2187
3078

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5620
SELECT CAST( + 8 AS SIGNED ) * col1 FROM tab0
----
688
728
776

skipif mysql # not compatible
query I rowsort label-5620
SELECT CAST ( + 8 AS INTEGER ) * col1 FROM tab0
----
688
728
776

query I rowsort
SELECT + ( col0 + + col1 * ( col0 ) ) AS col2 FROM tab2
----
1422
224
4680

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
3645 values hashing to 07504092eb64a26979c0bde05f7718cb

onlyif mysql # use DIV operator for integer division
query I rowsort label-5623
SELECT DISTINCT - col2 - col1 DIV + ( col0 ) AS col0 FROM tab1 AS cor0
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-5623
SELECT DISTINCT - col2 - col1 / + ( col0 ) AS col0 FROM tab1 AS cor0
----
-57
-62
-96

query I rowsort
SELECT DISTINCT + - ( + col2 ) - col1 * col0 AS col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT - col2 * col1 - col1 AS col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL + + 12 + cor0.col1 FROM tab2 cor0
----
29
43
71

query I rowsort
SELECT DISTINCT - cor0.col0 - - col0 * - 96 FROM tab1 AS cor0
----
-291
-6208
-7760

query I rowsort
SELECT 15 * - 71 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 19a6c46c2d8b92de08858f0a96dae6d0

query I rowsort
SELECT ( + col0 ) + - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + - 22 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-154
-1716
-1738

query I rowsort
SELECT + - col1 * col0 + 75 FROM tab1 AS cor0
----
-3
-565
-965

query I rowsort
SELECT ALL 98 FROM tab0, tab2 cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT + cor0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ( col1 * 24 ) + ( + tab2.col0 ) AS col2 FROM tab2
----
1494
487
751

query I rowsort
SELECT DISTINCT + 96 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5636
SELECT - 75 + col1 DIV - col2 + + col0 AS col1 FROM tab1 AS cor0
----
-11
-72
5

skipif mysql # not compatible
query I rowsort label-5636
SELECT - 75 + col1 / - col2 + + col0 AS col1 FROM tab1 AS cor0
----
-11
-72
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5637
SELECT DISTINCT - col0 * col1 DIV 78 AS col0 FROM tab2 AS cor0
----
-17
-2
-59

skipif mysql # not compatible
query I rowsort label-5637
SELECT DISTINCT - col0 * col1 / 78 AS col0 FROM tab2 AS cor0
----
-17
-2
-59

query I rowsort
SELECT ALL col2 * - col0 + col2 AS col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL col1 * 56 FROM tab1
----
1456
560
728

query I rowsort
SELECT ALL ( 54 ) + cor0.col0 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 9c288fd64a8a229a540278eeec5a5562

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5641
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5641
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - 5 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5643
SELECT col2 DIV - col0 col0 FROM tab2 AS cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5643
SELECT col2 / - col0 col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT col1 * - ( + col2 ) - col0 AS col0 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT col0 + 86 * tab0.col2 * col2 FROM tab0
----
121
578353
93678

query I rowsort
SELECT - col1 * col1 * col1 AS col0 FROM tab0 AS cor0
----
-636056
-753571
-912673

onlyif mysql # use DIV operator for integer division
query I rowsort label-5647
SELECT 33 + col2 DIV + col1 FROM tab0 AS cor0
----
33
33
33

skipif mysql # not compatible
query I rowsort label-5647
SELECT 33 + col2 / + col1 FROM tab0 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT + - ( - col1 ) + - col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + + ( - col1 ) * col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - ( cor0.col1 ) * + col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + col0 * 94 * - col0 AS col2 FROM tab2 AS cor0
----
-4606
-571896
-586654

query I rowsort
SELECT + - col2 * col2 * + col0 AS col0 FROM tab1 AS cor0
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-5653
SELECT col1 DIV - 99 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5653
SELECT col1 / - 99 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5654
SELECT DISTINCT CAST( NULL AS DECIMAL ) + - col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5654
SELECT DISTINCT CAST ( NULL AS REAL ) + - col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col2 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - + cor0.col1 * - 7 FROM tab1 AS cor0
----
182
70
91

query I rowsort
SELECT ALL - col0 + + 19 FROM tab1 AS cor0
----
-45
-61
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5658
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5658
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col1 * col2 col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT col2 - + ( + col0 ) FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5662
SELECT + col1 * - CAST( 51 AS SIGNED ) + col1 FROM tab0 AS cor0
----
-4300
-4550
-4850

skipif mysql # not compatible
query I rowsort label-5662
SELECT + col1 * - CAST ( 51 AS INTEGER ) + col1 FROM tab0 AS cor0
----
-4300
-4550
-4850

query I rowsort
SELECT ALL + col2 + col2 * 18 - + col0 AS col1 FROM tab0 AS cor0
----
-16
1469
603

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

query I rowsort
SELECT - col2 + 22 FROM tab2 AS cor0
----
-16
-4
-5

query I rowsort
SELECT DISTINCT + col2 * - ( - ( col0 ) ) + col1 + col2 AS col0 FROM tab0 AS cor0
----
133
7471
911

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5667
SELECT DISTINCT + col2 + CAST( NULL AS SIGNED ) * + col0 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5667
SELECT DISTINCT + col2 + CAST ( NULL AS INTEGER ) * + col0 AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5668
SELECT + col1 DIV 96 + - 24 - col0 FROM tab2
----
-102
-103
-31

skipif mysql # not compatible
query I rowsort label-5668
SELECT + col1 / 96 + - 24 - col0 FROM tab2
----
-102
-103
-31

onlyif mysql # use DIV operator for integer division
query I rowsort label-5669
SELECT col2 * col0 + - col1 DIV + col2 FROM tab0
----
-62
7297
790

skipif mysql # not compatible
query I rowsort label-5669
SELECT col2 * col0 + - col1 / + col2 FROM tab0
----
-62
7297
790

query I rowsort
SELECT DISTINCT col1 * - col1 + ( tab2.col0 ) FROM tab2
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-5671
SELECT - col2 DIV 38 FROM tab1
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-5671
SELECT - col2 / 38 FROM tab1
----
-1
-1
-2

query I rowsort
SELECT ALL 10 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT ALL 22 + + col0 * cor0.col0 * 15 FROM tab2 cor0
----
757
91282
93637

query I rowsort
SELECT cor0.col0 * + col2 + - col0 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-5675
SELECT - 32 DIV + col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5675
SELECT - 32 / + col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - col2 + + ( - col2 + + col1 ) * + col1 AS col1 FROM tab2
----
-395
1921
97

query I rowsort
SELECT col0 + 74 AS col0 FROM tab1
----
138
154
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 76 + col2 * cor0.col2 col2 FROM tab0 AS cor0
----
1165
6800
77

query I rowsort
SELECT DISTINCT - - ( + col2 ) - ( 3 ) AS col1 FROM tab0 AS cor0
----
-2
30
79

query I rowsort
SELECT DISTINCT - col2 - cor0.col1 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - - 33 * + col2 AS col1 FROM tab0 cor0
----
1089
2706
33

query I rowsort
SELECT DISTINCT 56 * - col2 + col1 AS col0 FROM tab1 AS cor0
----
-2998
-3182
-5363

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5683
SELECT ALL + + 0 - cor0.col1 * CAST( + col0 AS SIGNED ) FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-5683
SELECT ALL + + 0 - cor0.col1 * CAST ( + col0 AS INTEGER ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - col0 * - col2 + 17 + + col1 AS col0 FROM tab1 AS cor0
----
205
3675
7710

onlyif mysql # use DIV operator for integer division
query I rowsort label-5685
SELECT ALL col2 + + cor0.col0 + + col2 DIV + cor0.col0 FROM tab0 AS cor0
----
171
36
58

skipif mysql # not compatible
query I rowsort label-5685
SELECT ALL col2 + + cor0.col0 + + col2 / + cor0.col0 FROM tab0 AS cor0
----
171
36
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-5686
SELECT ALL - cor0.col2 - - col0 DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-5686
SELECT ALL - cor0.col2 - - col0 / - cor0.col0 AS col2 FROM tab2 AS cor0
----
-27
-28
-39

query I rowsort
SELECT - col2 + - col2 * col1 * + col0 FROM tab1
----
-36537
-4266
-99936

query I rowsort
SELECT DISTINCT - - col1 * - col2 * 40 FROM tab2 AS cor0
----
-25840
-33480
-61360

query I rowsort
SELECT + + cor0.col2 + + col0 * + col1 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL - - 90 * col1 FROM tab2 cor0
----
1530
2790
5310

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

query I rowsort
SELECT - 32 * - col0 AS col0 FROM tab2 AS cor0
----
224
2496
2528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 * + col1 col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT ( + col2 ) * col0 AS col0 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5695
SELECT DISTINCT col0 * col0 DIV + 68 FROM tab0
----
116
18
8

skipif mysql # not compatible
query I rowsort label-5695
SELECT DISTINCT col0 * col0 / + 68 FROM tab0
----
116
18
8

query I rowsort
SELECT ALL + 55 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to c59acfbb70996777fa5053195838c3d6

query I rowsort
SELECT ALL + + col2 + - cor0.col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT col0 * - col1 * + col0 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT ALL + cor0.col0 + 37 FROM tab1 cor0
----
101
117
40

query I rowsort
SELECT DISTINCT - col2 * - 85 FROM tab2 AS cor0
----
2210
2295
3230

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5701
SELECT CAST( NULL AS SIGNED ) * tab2.col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5701
SELECT CAST ( NULL AS INTEGER ) * tab2.col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 55 * + tab0.col2 AS col0 FROM tab0
----
1815
4510
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 * + col1 col1 FROM tab1 AS cor0
----
1118
430
559

onlyif mysql # use DIV operator for integer division
query I rowsort label-5704
SELECT ( cor0.col1 ) DIV col1 + col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-5704
SELECT ( cor0.col1 ) / col1 + col1 FROM tab2 AS cor0
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-5705
SELECT DISTINCT - - col0 * - col1 DIV - col1 + col2 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-5705
SELECT DISTINCT - - col0 * - col1 / - col1 + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - + col2 * - 55 + - col0 FROM tab1 cor0
----
2967
3071
5200

onlyif mysql # use DIV operator for integer division
query I rowsort label-5707
SELECT - + col2 + - col1 DIV + cor0.col2 col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5707
SELECT - + col2 + - col1 / + cor0.col2 col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + + 67 AS col2 FROM tab2 cor0
----
67
67
67

query I rowsort
SELECT ALL - - 8 + - 86 FROM tab1 AS cor0
----
-78
-78
-78

query I rowsort
SELECT col0 * - cor0.col1 * 69 AS col0 FROM tab1 AS cor0
----
-44160
-5382
-71760

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col2 AS REAL ) AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT ( - col0 + + col2 ) * 29 * + 40 FROM tab1
----
-8120
18560
59160

query I rowsort
SELECT ALL - col1 + cor0.col0 + - col1 FROM tab0 AS cor0
----
-148
-159
-93

query I rowsort
SELECT ALL - col0 - col2 AS col0 FROM tab1 cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5715
SELECT DISTINCT - col2 - col0 * CAST( NULL AS SIGNED ) * ( + col2 * - CAST( + col0 AS SIGNED ) ) FROM tab1 AS cor0
----
NULL

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

query I rowsort
SELECT DISTINCT + - col2 * col0 + 7 FROM tab2 AS cor0
----
-182
-2021
-2995

query I rowsort
SELECT + - 85 * + col1 - cor0.col2 FROM tab0 AS cor0
----
-7343
-7817
-8246

query I rowsort
SELECT ALL - - 77 + col1 AS col2 FROM tab2 AS cor0
----
108
136
94

query I rowsort
SELECT cor1.col1 AS col1 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + tab1.col2 + col1 * col2 col0 FROM tab1
----
1357
1484
637

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5721
SELECT - CAST( - col1 + col2 AS SIGNED ) * + col0 AS col0 FROM tab2
----
-1659
2574
28

skipif mysql # not compatible
query I rowsort label-5721
SELECT - CAST ( - col1 + col2 AS INTEGER ) * + col0 AS col0 FROM tab2
----
-1659
2574
28

query I rowsort
SELECT 37 + 65 * col1 + - 88 * col1 * col0 FROM tab0
----
-176005
-292418
-706760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5723
SELECT + col0 + col0 DIV - col0 + + col2 FROM tab1 cor0
----
120
175
56

skipif mysql # not compatible
query I rowsort label-5723
SELECT + col0 + col0 / - col0 + + col2 FROM tab1 cor0
----
120
175
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5724
SELECT DISTINCT cor1.col2 * + CAST( NULL AS DECIMAL ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5724
SELECT DISTINCT cor1.col2 * + CAST ( NULL AS REAL ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT + 30 * - 55 AS col2 FROM tab1
----
-1650

query I rowsort
SELECT + col2 * tab0.col0 * col1 - + col2 AS col1 FROM tab0
----
3394
664036
68079

query I rowsort
SELECT + 96 * - col2 - - col0 * + col1 AS col0 FROM tab0
----
-1104
227
3299

query I rowsort
SELECT - + 97 AS col0 FROM tab2 cor0
----
-97
-97
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5729
SELECT + - col1 DIV col0 + col1 * + 10 AS col2 FROM tab2 AS cor0
----
170
306
590

skipif mysql # not compatible
query I rowsort label-5729
SELECT + - col1 / col0 + col1 * + 10 AS col2 FROM tab2 AS cor0
----
170
306
590

query I rowsort
SELECT + col0 + col0 + + ( - 2 ) FROM tab2 AS cor0
----
12
154
156

query I rowsort
SELECT - + 82 AS col1 FROM tab1 cor0
----
-82
-82
-82

query I rowsort
SELECT ALL + 86 * col2 AS col1 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT DISTINCT + + 98 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
98

query I rowsort
SELECT + col2 + 92 * + col2 FROM tab0 AS cor0
----
3069
7626
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 * - ( - 79 ) col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0a7b3705af930169bcf1e59cb54b187c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5736
SELECT + + CAST( NULL AS SIGNED ) * ( cor0.col0 ) + - ( col2 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5736
SELECT + + CAST ( NULL AS INTEGER ) * ( cor0.col0 ) + - ( col2 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - col2 ) + col0 + - col2 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 14 + col1 col1 FROM tab0 cor0
----
72
77
83

query I rowsort
SELECT + - col2 * 12 FROM tab1 AS cor0
----
-1152
-648
-684

query I rowsort
SELECT ALL - + col2 * 33 AS col1 FROM tab1 cor0
----
-1782
-1881
-3168

query I rowsort
SELECT - + ( + col1 ) + col0 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT - col0 * - col1 + cor0.col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col0 + col1 AS col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + 3 * - col1 FROM tab1 AS cor0
----
-30
-39
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5745
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + + col0 * col2 / + col1 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5745
SELECT DISTINCT - CAST ( NULL AS REAL ) + + col0 * col2 / + col1 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - tab2.col1 * + 7 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7393a1e48852eb71f07d3d15d03f2ed6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - col2 + - col2 col2 FROM tab1 AS cor0
----
-105
-112
-50

query I rowsort
SELECT ALL - - 1 * + cor0.col2 + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + col2 * + 62 FROM tab2 AS cor0
----
-1612
-1674
-2356

query I rowsort
SELECT - + col0 * - cor0.col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col2 - - col1 AS col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5752
SELECT DISTINCT - col2 DIV + col2 + + col2 AS col1 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-5752
SELECT DISTINCT - col2 / + col2 + + col2 AS col1 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT DISTINCT 40 - col0 AS col0 FROM tab2 AS cor0
----
-38
-39
33

query I rowsort
SELECT ALL 95 + - col1 * + col2 AS col1 FROM tab1 AS cor0
----
-1153
-1309
-475

query I rowsort
SELECT ALL + ( 32 ) + + cor0.col2 * 53 AS col2 FROM tab0 AS cor0
----
1781
4378
85

query I rowsort
SELECT - + ( + 36 ) + - col1 FROM tab0 AS cor0
----
-122
-127
-133

query I rowsort
SELECT ALL + ( col2 ) + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + + ( col0 ) AS col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + 23 * + 59 AS col2 FROM tab2 AS cor0
----
1357

onlyif mysql # use DIV operator for integer division
query I rowsort label-5760
SELECT DISTINCT ( col2 ) DIV col1 AS col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5760
SELECT DISTINCT ( col2 ) / col1 AS col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ( col0 ) - col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-5762
SELECT DISTINCT - col0 * col0 + + col2 DIV - cor0.col1 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6243

skipif mysql # not compatible
query I rowsort label-5762
SELECT DISTINCT - col0 * col0 + + col2 / - cor0.col1 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6243

onlyif mysql # use DIV operator for integer division
query I rowsort label-5763
SELECT + col2 * col0 DIV col1 + ( col2 ) - - col1 * + col1 FROM tab2
----
3541
503
994

skipif mysql # not compatible
query I rowsort label-5763
SELECT + col2 * col0 / col1 + ( col2 ) - - col1 * + col1 FROM tab2
----
3541
503
994

query I rowsort
SELECT DISTINCT 18 * col0 FROM tab2 AS cor0
----
126
1404
1422

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5765
SELECT + col1 * col0 - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5765
SELECT + col1 * col0 - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 20 * - col0 FROM tab2 AS cor0
----
-140
-1560
-1580

query I rowsort
SELECT ( 5 ) + - col0 * + ( col2 ) FROM tab1
----
-157
-3643
-7675

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to 380241bbc503a31e70494611a87ffd99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5769
SELECT ALL + - cor0.col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL cor0.col1 + - 11 AS col1 FROM tab0 AS cor0
----
75
80
86

query I rowsort
SELECT + col1 * - col1 + col1 AS col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT + 54 + + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to f87cf42144c40769f6ac8e0643671808

query I rowsort
SELECT + 20 * + col1 AS col2 FROM tab2
----
1180
340
620

query I rowsort
SELECT - - col0 + ( col0 ) FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5775
SELECT ALL - col0 + CAST( - col1 AS SIGNED ) * col1 FROM tab2 AS cor0
----
-3559
-368
-968

skipif mysql # not compatible
query I rowsort label-5775
SELECT ALL - col0 + CAST ( - col1 AS INTEGER ) * col1 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab0, tab2 AS cor0
----
82

query I rowsort
SELECT + 48 * 33 FROM tab2, tab1 AS cor0
----
9 values hashing to 6e06129d5e137deef55d8e6dec681152

query I rowsort
SELECT 78 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5779
SELECT - col2 DIV - col1 + + 23 FROM tab2
----
23
23
25

skipif mysql # not compatible
query I rowsort label-5779
SELECT - col2 / - col1 + + 23 FROM tab2
----
23
23
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-5780
SELECT + col0 DIV + col0 + 65 FROM tab1 AS cor0
----
66
66
66

skipif mysql # not compatible
query I rowsort label-5780
SELECT + col0 / + col0 + 65 FROM tab1 AS cor0
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT - - col1 + - cor0.col1 * col2 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab2 WHERE ( NULL ) BETWEEN col1 AND NULL
----

query I rowsort
SELECT col2 * - col2 + - col1 FROM tab0
----
-1175
-6815
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5785
SELECT + - col1 DIV + cor0.col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5785
SELECT + - col1 / + cor0.col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 * col2 * col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT ALL - + col1 * + col0 + col2 * - cor0.col1 + + col2 AS col2 FROM tab0 AS cor0
----
-15479
-3491
-4869

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT NULL BETWEEN ( NULL ) AND cor0.col2 + - col2 * - col1 * - col2 OR ( NULL ) NOT IN ( + col1 + col0 * + cor0.col0 )
----

query I rowsort
SELECT DISTINCT col0 * col0 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-5790
SELECT DISTINCT - col2 DIV + col1 AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5790
SELECT DISTINCT - col2 / + col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT col2 FROM tab0 WHERE NOT - col0 >= NULL
----

query IIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 WHERE + cor0.col0 <= NULL
----

query I rowsort
SELECT ALL - col0 + + col1 * + col2 * col1 AS col1 FROM tab0 AS cor0
----
244044
678953
9374

query I rowsort
SELECT ALL - - cor0.col0 + col1 * - col2 FROM tab1 cor0
----
-1168
-1401
-506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col1 * tab1.col0 + tab1.col0 col2 FROM tab1
----
-13440
-2025
-6336

query I rowsort
SELECT col0 + col2 * col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT col1 * col1 + cor0.col0 FROM tab2 AS cor0
----
3559
368
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 + + col2 col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT + col0 * col1 + col0 * col1 AS col0 FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT + col2 * + col1 + cor0.col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - col2 * col1 + - col0 * + col1 AS col1 FROM tab1 AS cor0
----
-1210
-1482
-2288

onlyif mysql # use DIV operator for integer division
query I rowsort label-5802
SELECT col2 DIV col1 + - col2 * - col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
119652
51036
5859

skipif mysql # not compatible
query I rowsort label-5802
SELECT col2 / col1 + - col2 * - col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
119652
51036
5859

query I rowsort
SELECT + + col0 + + col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + cor0.col1 * cor0.col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL + + col1 + - cor0.col0 FROM tab0 AS cor0
----
2
62
62

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE col0 = NULL OR NOT NULL <> ( + col0 )
----

query I rowsort
SELECT + col1 * col2 * cor0.col0 AS col0 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT - - col0 * - col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col2 - + col1 * tab2.col1 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT ALL + tab2.col0 * + col1 * + col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT + 92 AS col0 FROM tab1 cor0
----
92
92
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-5812
SELECT DISTINCT + - cor0.col0 DIV col1 FROM tab1 cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-5812
SELECT DISTINCT + - cor0.col0 / col1 FROM tab1 cor0
----
-6
0

query I rowsort
SELECT - col2 + col2 + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL tab0.col1 + + col1 AS col1 FROM tab0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5815
SELECT ALL - CAST( NULL AS DECIMAL ) col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5815
SELECT ALL - CAST ( NULL AS REAL ) col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5817
SELECT col0 * - CAST( - col2 + col2 AS SIGNED ) * + 33 AS col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5817
SELECT col0 * - CAST ( - col2 + col2 AS INTEGER ) * + 33 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL col0 + + col2 FROM tab2 WHERE NOT ( col0 + col0 ) <> - col0
----

query I rowsort
SELECT + col1 * col2 + col1 AS col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab1 WHERE NOT NULL NOT IN ( col0 * + col1 + - tab1.col1 )
----

query I rowsort
SELECT ALL + tab0.col0 * + col0 + tab0.col1 * + col2 + - col2 FROM tab0
----
1321
15301
3381

query I rowsort
SELECT DISTINCT + col1 * col2 + col1 - col2 AS col2 FROM tab1
----
1165
1376
523

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col1 * + col0 + col2 col2 FROM tab1
----
1149
158
707

onlyif mysql # use DIV operator for integer division
query I rowsort label-5824
SELECT + col0 DIV col1 + col1 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-5824
SELECT + col0 / col1 + col1 FROM tab2
----
21
31
60

query I rowsort
SELECT DISTINCT col1 - col0 * - col1 * - col1 AS col2 FROM tab1
----
-13507
-2002
-6390

query I rowsort
SELECT - col1 * col2 - col2 AS col0 FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT ALL tab1.col1 - - tab1.col0 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL col2 * + col1 * col0 AS col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT - tab0.col0 * col2 * + col2 AS col2 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT col2 * - col2 + - col0 AS col0 FROM tab1
----
-2919
-3313
-9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 + col1 col2 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT DISTINCT col1 * col2 * tab1.col0 + + col0 FROM tab1
----
36544
4215
99920

onlyif mysql # use DIV operator for integer division
query I rowsort label-5833
SELECT + tab1.col1 + - col1 * tab1.col0 + tab1.col2 DIV - col0 AS col0 FROM tab1
----
-1028
-630
-70

skipif mysql # not compatible
query I rowsort label-5833
SELECT + tab1.col1 + - col1 * tab1.col0 + tab1.col2 / - col0 AS col0 FROM tab1
----
-1028
-630
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + col1 + - tab0.col1 col1 FROM tab0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5835
SELECT ALL - col2 DIV - tab2.col0 - + tab2.col0 col0 FROM tab2
----
-4
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5835
SELECT ALL - col2 / - tab2.col0 - + tab2.col0 col0 FROM tab2
----
-4
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5836
SELECT DISTINCT + col1 DIV col1 + col0 AS col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-5836
SELECT DISTINCT + col1 / col1 + col0 AS col2 FROM tab1
----
4
65
81

query I rowsort
SELECT ALL + col1 + col0 AS col1 FROM tab2 WHERE NOT + col0 >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5838
SELECT DISTINCT - col0 DIV col0 + + ( + col1 ) DIV 24 AS col0 FROM tab0 AS cor0
----
2
3

skipif mysql # not compatible
query I rowsort label-5838
SELECT DISTINCT - col0 / col0 + + ( + col1 ) / 24 AS col0 FROM tab0 AS cor0
----
2
3

query I rowsort
SELECT ALL + col2 * 1 * col2 - col1 AS col0 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT ALL + + col1 * + col0 + 96 FROM tab2 AS cor0
----
1439
313
4698

query I rowsort
SELECT ALL + col0 + - cor0.col1 - 59 AS col2 FROM tab2 AS cor0
----
-40
-83
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5842
SELECT DISTINCT - col2 * + 80 * + col0 + + col2 * CAST( + col2 AS SIGNED ) * + col1 - col0 AS col2 FROM tab0 AS cor0
----
-2738
27955
30270

skipif mysql # not compatible
query I rowsort label-5842
SELECT DISTINCT - col2 * + 80 * + col0 + + col2 * CAST ( + col2 AS INTEGER ) * + col1 - col0 AS col2 FROM tab0 AS cor0
----
-2738
27955
30270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 col2 FROM tab2
----
68
68
68

query I rowsort
SELECT col1 * col2 + - col0 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT col0 - 77 FROM tab0 AS cor0
----
-42
-53
12

query I rowsort
SELECT DISTINCT + col1 + 10 AS col0 FROM tab2 AS cor0
----
27
41
69

query I rowsort
SELECT - col1 * 64 FROM tab0 AS cor0
----
-5504
-5824
-6208

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5848
SELECT ALL col0 * - col1 * CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5848
SELECT ALL col0 * - col1 * CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - - tab1.col0 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - col1 * - col1 * 12 AS col1 FROM tab1
----
1200
2028
8112

query I rowsort
SELECT ALL - tab2.col0 - 19 FROM tab2
----
-26
-97
-98

query I rowsort
SELECT - 20 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to eb3a66728062963cccbd15bd2f5c9eee

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col1 col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - col1 - - col1 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col0 + - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a0a4c231133cfd36c763126477bbb464

query I rowsort
SELECT ALL ( 4 ) * + tab2.col2 FROM tab2
----
104
108
152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 + - col0 * - ( + 27 ) col0 FROM tab0
----
-5878
-6748
-8464

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5858
SELECT + + CAST( NULL AS SIGNED ) / col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5858
SELECT + + CAST ( NULL AS INTEGER ) / col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 85 * ( col0 ) AS col2 FROM tab2
----
595
6630
6715

query I rowsort
SELECT ALL - 45 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

query I rowsort
SELECT - cor0.col1 * col2 * 54 AS col1 FROM tab2 cor0
----
-34884
-45198
-82836

onlyif mysql # use DIV operator for integer division
query I rowsort label-5862
SELECT col0 + cor0.col2 DIV cor0.col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5862
SELECT col0 + cor0.col2 / cor0.col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - + cor0.col1 + - col0 * - col1 AS col0 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT - - ( - col2 ) * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5865
SELECT ALL - 19 DIV + col2 AS col0 FROM tab0
----
-19
0
0

skipif mysql # not compatible
query I rowsort label-5865
SELECT ALL - 19 / + col2 AS col0 FROM tab0
----
-19
0
0

query I rowsort
SELECT ALL - + cor1.col2 FROM tab0, tab2 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

query I rowsort
SELECT + 59 * col2 + ( col0 + col0 ) * col0 FROM tab1
----
11555
18464
3204

query I rowsort
SELECT + col1 * col1 + 79 AS col1 FROM tab1 AS cor0
----
179
248
755

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + col1 * - col2 * col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT ALL + col1 + + col1 AS col2 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT col0 * - col2 + - 44 AS col0 FROM tab2 cor0
----
-2072
-233
-3046

query I rowsort
SELECT + col1 * ( - cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + + cor0.col1 * 55 AS col2 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT col0 * col2 + + 29 FROM tab1
----
191
3677
7709

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col2 + col0 ) col1 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL + + col1 * + col0 * col0 FROM tab1 cor0
----
234
40960
83200

query I rowsort
SELECT ALL + - col0 + col0 * + col0 AS col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT - + 5 AS col2 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 4f346dd2f65047c836c6957f80f0ef9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5880
SELECT col1 DIV + col1 + - col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-5880
SELECT col1 / + col1 + - col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 + col0 col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL + 26 * 68 AS col1 FROM tab1 AS cor0
----
1768
1768
1768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5883
SELECT ALL - + 41 - + col0 DIV - col0 FROM tab0 cor0
----
-40
-40
-40

skipif mysql # not compatible
query I rowsort label-5883
SELECT ALL - + 41 - + col0 / - col0 FROM tab0 cor0
----
-40
-40
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 86 - col2 * ( cor0.col0 ) col0 FROM tab0 AS cor0
----
-246
2046
51

query I rowsort
SELECT DISTINCT - 22 * + col0 FROM tab1 cor0
----
-1408
-1760
-66

query I rowsort
SELECT ( 13 ) AS col2 FROM tab1
----
13
13
13

query I rowsort
SELECT + + 76 * cor0.col0 + 86 FROM tab0 cor0
----
1910
2746
6850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5888
SELECT cor0.col1 + - col2 / CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5888
SELECT cor0.col1 + - col2 / CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5890
SELECT tab1.col0 DIV 47 + - tab1.col0 * + col2 AS col2 FROM tab1
----
-162
-3647
-7679

skipif mysql # not compatible
query I rowsort label-5890
SELECT tab1.col0 / 47 + - tab1.col0 * + col2 AS col2 FROM tab1
----
-162
-3647
-7679

query I rowsort
SELECT - 30 * col0 + + col1 FROM tab0
----
-2579
-634
-953

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5892
SELECT + CAST( NULL AS SIGNED ) + tab0.col1 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5892
SELECT + CAST ( NULL AS INTEGER ) + tab0.col1 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col0 * + 67 FROM tab2 cor0
----
-469
-5226
-5293

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 + col1 * col2 col0 FROM tab1
----
-70
1326
208

onlyif mysql # use DIV operator for integer division
query I rowsort label-5895
SELECT cor1.col0 DIV - 48 + - cor0.col1 + - cor1.col0 * 21 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to adaf1385a6a34e59e5946c35f0079081

skipif mysql # not compatible
query I rowsort label-5895
SELECT cor1.col0 / - 48 + - cor0.col1 + - cor1.col0 * 21 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to adaf1385a6a34e59e5946c35f0079081

query I rowsort
SELECT DISTINCT - tab0.col1 * ( col2 ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col0 * - 21 FROM tab2
----
-147
-1638
-1659

query I rowsort
SELECT ALL cor0.col0 * - cor0.col1 + + 88 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 7336055cf43e766b127a5c6e8a3707d9

query I rowsort
SELECT ( 42 ) FROM tab2
----
42
42
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * 30 col2 FROM tab2 AS cor0
----
-210
-2340
-2370

query I rowsort
SELECT 68 * + 42 AS col1 FROM tab2 AS cor0
----
2856
2856
2856

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col0 AS REAL ) + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT 78 FROM tab0, tab1 AS cor0, tab2 cor1, tab0 AS cor2
----
78

query I rowsort
SELECT ALL + ( 25 ) FROM tab0 AS cor0
----
25
25
25

query I rowsort
SELECT ALL + 90 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5906
SELECT DISTINCT + + CAST( col2 AS SIGNED ) * col0 * 83 AS col0 FROM tab2 AS cor0
----
15687
168324
249166

skipif mysql # not compatible
query I rowsort label-5906
SELECT DISTINCT + + CAST ( col2 AS INTEGER ) * col0 * 83 AS col0 FROM tab2 AS cor0
----
15687
168324
249166

query I rowsort
SELECT - 76 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d90b4aa5f03b4a149aa925c4a88acca0

query I rowsort
SELECT DISTINCT - col1 + - col1 + 51 * col2 AS col1 FROM tab0
----
-143
1511
4000

query I rowsort
SELECT ALL - tab1.col1 + col1 * col0 FROM tab1
----
1027
52
630

query I rowsort
SELECT DISTINCT + 63 + col1 AS col2 FROM tab1
----
73
76
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col1 + 29 col1 FROM tab1
----
-1011
-49
-611

query I rowsort
SELECT + col0 * col1 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL 83 + + col1 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
106
16
29

query I rowsort
SELECT DISTINCT + col2 + col2 * - col1 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL - 21 + col0 + - ( + col2 ) * col0 FROM tab2
----
-1971
-203
-2944

query I rowsort
SELECT ALL col1 + col1 * col2 * - 10 + col0 AS col1 FROM tab0
----
-28270
-74440
-838

onlyif mysql # use DIV operator for integer division
query I rowsort label-5917
SELECT - tab0.col0 DIV col0 AS col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5917
SELECT - tab0.col0 / col0 AS col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT ALL + col2 * - col0 + - col2 AS col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ( - col0 ) * - 25 FROM tab0 AS cor0
----
2225
600
875

query I rowsort
SELECT DISTINCT + - col2 + 73 * col2 AS col0 FROM tab2 AS cor0
----
1872
1944
2736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + 59 * + 10 col1 FROM tab1 AS cor0
----
600
603
616

query I rowsort
SELECT DISTINCT col0 * col1 * 77 FROM tab1 cor0
----
49280
6006
80080

query I rowsort
SELECT - col0 + col1 * col0 + - col1 AS col0 FROM tab1 AS cor0
----
49
566
947

query I rowsort
SELECT - col1 + + 24 AS col1 FROM tab0 AS cor0
----
-62
-67
-73

query I rowsort
SELECT DISTINCT - col1 * col1 * + 69 AS col0 FROM tab2 cor0
----
-19941
-240189
-66309

query I rowsort
SELECT col2 * - ( + 98 + cor0.col0 * + col2 ) AS col2 FROM tab1 AS cor0
----
-14040
-213522
-746688

query I rowsort
SELECT - col2 * + cor0.col1 + + 95 FROM tab2 AS cor0
----
-1439
-551
-742

query I rowsort
SELECT DISTINCT 50 + col1 + + col0 AS col2 FROM tab1
----
124
143
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5929
SELECT - col0 * 43 DIV 66 AS col1 FROM tab1 AS cor0
----
-1
-41
-52

skipif mysql # not compatible
query I rowsort label-5929
SELECT - col0 * 43 / 66 AS col1 FROM tab1 AS cor0
----
-1
-41
-52

query I rowsort
SELECT DISTINCT cor0.col1 * 23 + col1 FROM tab2 AS cor0
----
1416
408
744

query I rowsort
SELECT + col1 * 7 FROM tab0
----
602
637
679

query I rowsort
SELECT ALL 71 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT + cor0.col2 * col2 * - col1 + col1 FROM tab1 cor0
----
-119795
-32480
-75790

onlyif mysql # use DIV operator for integer division
query I rowsort label-5934
SELECT + - col1 DIV + col2 + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5934
SELECT + - col1 / + col2 + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT cor0.col1 + + col1 * col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - 15 * - col1 AS col2 FROM tab1 AS cor0
----
150
195
390

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) * - col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + ( + col1 ) * col1 * 68 AS col0 FROM tab1 AS cor0
----
11492
45968
6800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 2 + col2 col1 FROM tab1 AS cor0
----
-64
-71
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5940
SELECT - CAST( NULL AS SIGNED ) * col2 * + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT - ( + col1 ) * + col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT cor0.col2 + 16 FROM tab2 AS cor0
----
42
43
54

query I rowsort
SELECT ALL + + ( col0 ) * ( + col1 ) FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + - col0 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT ( - col2 ) * col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT ( + col0 ) * - tab2.col1 + - col0 AS col1 FROM tab2
----
-1422
-224
-4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + - col0 * col1 + + col1 * + col1 col0 FROM tab1 AS cor0
----
-550
-884
572

query I rowsort
SELECT + ( - 84 ) + col2 AS col2 FROM tab2 AS cor0
----
-46
-57
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-5949
SELECT DISTINCT 41 DIV col0 AS col1 FROM tab1 AS cor0
----
0
13

skipif mysql # not compatible
query I rowsort label-5949
SELECT DISTINCT 41 / col0 AS col1 FROM tab1 AS cor0
----
0
13

query I rowsort
SELECT DISTINCT col0 * + 14 + + col1 * + 46 FROM tab1 AS cor0
----
1238
1356
1718

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( 5 ) col0 FROM tab2 AS cor0
----
5
5
5

query I rowsort
SELECT - 37 * - col0 + col1 FROM tab2 AS cor0
----
290
2940
2945

query I rowsort
SELECT - 61 AS col1 FROM tab0 AS cor0
----
-61
-61
-61

query I rowsort
SELECT + + col2 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + 54 * col0 FROM tab2 AS cor0
----
378
4212
4266

query I rowsort
SELECT ALL - 9 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
63
702
711

onlyif mysql # use DIV operator for integer division
query I rowsort label-5957
SELECT ALL 60 DIV col0 AS col0 FROM tab0 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-5957
SELECT ALL 60 / col0 AS col0 FROM tab0 cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 73 * + col0 AS col0 FROM tab2
----
511
5694
5767

query I rowsort
SELECT DISTINCT + col2 * + col0 + - 27 * col2 + ( - 86 ) * - col2 FROM tab2 AS cor0
----
1782
3562
5244

query I rowsort
SELECT - + col1 + 72 * col2 AS col2 FROM tab1 AS cor0
----
3862
4094
6899

query I rowsort
SELECT ALL - col0 + - col2 * + col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT - col1 + col0 * cor0.col0 AS col1 FROM tab1 cor0
----
-17
4086
6387

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 * - col1 + + col2 * - col0 * CAST ( - cor0.col2 AS REAL ) AS col1 FROM tab1 AS cor0
----
10152
208506
738528

query I rowsort
SELECT DISTINCT + + col1 * - ( + 68 ) - + col1 FROM tab1 AS cor0
----
-1794
-690
-897

query I rowsort
SELECT + col2 * 99 * col0 FROM tab0 AS cor0
----
3465
722502
78408

query I rowsort
SELECT - col2 + + ( + 4 * - col2 ) + 46 AS col0 FROM tab2 AS cor0
----
-144
-84
-89

skipif mysql # not compatible
query I rowsort
SELECT - + cor0.col0 * CAST ( + 30 * col2 AS REAL ) + col0 FROM tab0 AS cor0
----
-1015
-218851
-23736

onlyif mysql # use DIV operator for integer division
query I rowsort label-5969
SELECT + - col2 + col0 DIV + col2 FROM tab1 cor0
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-5969
SELECT + - col2 + col0 / + col2 FROM tab1 cor0
----
-54
-56
-96

query I rowsort
SELECT ALL - col2 + col0 * + col2 * - col2 FROM tab2 AS cor0
----
-114114
-5130
-52754

query I rowsort
SELECT + + col2 + + 6 AS col1 FROM tab0 AS cor0
----
39
7
88

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT - cor1.col2 FROM tab0 cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT col1 * + col1 - 5 FROM tab1
----
164
671
95

query I rowsort
SELECT - ( 5 ) + col1 AS col1 FROM tab0 AS cor0
----
81
86
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-5976
SELECT DISTINCT col0 + col2 DIV 46 AS col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5976
SELECT DISTINCT col0 + col2 / 46 AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT col2 + tab0.col2 * + col0 AS col2 FROM tab0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-5978
SELECT DISTINCT + + col2 * col0 DIV + col1 AS col2 FROM tab1 AS cor0
----
364
590
6

skipif mysql # not compatible
query I rowsort label-5978
SELECT DISTINCT + + col2 * col0 / + col1 AS col2 FROM tab1 AS cor0
----
364
590
6

query I rowsort
SELECT ALL - col2 * - 26 + col2 * ( ( col1 ) ) FROM tab1 AS cor0
----
2052
2808
3744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5980
SELECT DISTINCT + col2 * col2 + + cor0.col0 + + CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-61
1027
6722

skipif mysql # not compatible
query I rowsort label-5980
SELECT DISTINCT + col2 * col2 + + cor0.col0 + + CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-61
1027
6722

query I rowsort
SELECT + col0 + 40 * col1 - col1 FROM tab1
----
1017
454
587

query I rowsort
SELECT col2 + - 73 AS col2 FROM tab1
----
-16
-19
23

query I rowsort
SELECT 15 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5984
SELECT col2 + - col2 * col2 DIV - col1 + col0 FROM tab0
----
244
36
69

skipif mysql # not compatible
query I rowsort label-5984
SELECT col2 + - col2 * col2 / - col1 + col0 FROM tab0
----
244
36
69

query I rowsort
SELECT col0 + col2 * - 41 + + col1 FROM tab1
----
-2185
-2263
-3843

query I rowsort
SELECT - col2 * ( 69 ) + - col2 * col0 * col1 AS col1 FROM tab0
----
-3464
-669776
-70389

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2
----
3645 values hashing to 5d64bf87effa587b137e9591cd2c54bf

query I rowsort
SELECT ALL 21 + 14 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
81 values hashing to ca814400b6361c20866ff8fe01717430

onlyif mysql # use DIV operator for integer division
query I rowsort label-5989
SELECT + col0 * + ( col1 ) + + col2 DIV col2 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-5989
SELECT + col0 * + ( col1 ) + + col2 / col2 FROM tab1 AS cor0
----
1041
641
79

query I rowsort
SELECT ALL cor0.col0 * - col2 - col1 AS col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL - - 36 + col2 FROM tab1 AS cor0
----
132
90
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5992
SELECT ALL + + CAST( NULL AS SIGNED ) - 59 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5992
SELECT ALL + + CAST ( NULL AS INTEGER ) - 59 * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + ( col1 * col2 ) FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - + ( - col0 ) + cor0.col0 - ( - col0 ) AS col0 FROM tab0 AS cor0
----
105
267
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5995
SELECT + + CAST( NULL AS SIGNED ) FROM tab1 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5995
SELECT + + CAST ( NULL AS INTEGER ) FROM tab1 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) * col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + cor0.col2 + + col1 * - 73 FROM tab0 AS cor0
----
-6245
-6561
-7080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col1 col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT col2 + + 18 AS col2 FROM tab2 AS cor0
----
44
45
56

query I rowsort
SELECT + + col1 + - cor0.col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col0 * ( col2 ) - - col2 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT ALL col2 - col1 * - 14 FROM tab2 AS cor0
----
276
461
852

query I rowsort
SELECT ALL col1 + + 88 FROM tab0 AS cor0
----
174
179
185

query I rowsort
SELECT DISTINCT - 90 * + 93 FROM tab2, tab2 cor0
----
-8370

query I rowsort
SELECT col2 + ( - 2 ) AS col1 FROM tab0 AS cor0
----
-1
31
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6006
SELECT - cor0.col2 * + cor0.col2 - col2 DIV - col1 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-6006
SELECT - cor0.col2 * + cor0.col2 - col2 / - col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - col1 + ( - 66 ) AS col2 FROM tab2 AS cor0
----
-125
-83
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col1 * - col1 col0 FROM tab1 AS cor0
----
-157
-265
-730

onlyif mysql # use DIV operator for integer division
query I rowsort label-6009
SELECT + - col0 DIV col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6009
SELECT + - col0 / col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6010
SELECT ALL + + 57 * - col0 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6010
SELECT ALL + + 57 * - col0 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 6 * - col2 AS col1 FROM tab2 AS cor0
----
-156
-162
-228

query I rowsort
SELECT DISTINCT - 34 + col1 * + col2 FROM tab2 AS cor0
----
1500
612
803

query I rowsort
SELECT + ( col1 ) + ( - ( col1 ) ) AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6014
SELECT + col2 + col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6014
SELECT + col2 + col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6015
SELECT - - col2 DIV cor0.col0 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6015
SELECT - - col2 / cor0.col0 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT - col0 * ( - ( + col1 ) ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT ALL - 34 FROM tab1, tab1 cor0
----
9 values hashing to 40442a74794ded4c78101eefe525a5bb

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( col0 AS REAL ) + + col2 + col2 FROM tab1 AS cor0
----
105
112
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 66 col2 FROM tab2 AS cor0
----
66
66
66

query I rowsort
SELECT - ( - col1 ) + + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT col2 * + col0 + + tab1.col2 * - col1 FROM tab1
----
-1242
3078
6432

query I rowsort
SELECT ALL 15 + col0 AS col0 FROM tab2
----
22
93
94

query I rowsort
SELECT ALL 11 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT + col0 + ( + col0 + col0 ) AS col2 FROM tab1
----
192
240
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6026
SELECT + col0 DIV + col1 + col2 * col0 * col0 FROM tab0 AS cor0
----
1225
19008
649522

skipif mysql # not compatible
query I rowsort label-6026
SELECT + col0 / + col1 + col2 * col0 * col0 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-6027
SELECT DISTINCT - col1 + cor0.col1 * - col2 DIV cor0.col2 FROM tab1 AS cor0
----
-20
-26
-52

skipif mysql # not compatible
query I rowsort label-6027
SELECT DISTINCT - col1 + cor0.col1 * - col2 / cor0.col2 FROM tab1 AS cor0
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + - col1 * - col1 col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT - 37 + col0 AS col0 FROM tab0 cor0
----
-13
-2
52

query I rowsort
SELECT ( + ( col0 ) * - ( - col2 ) ) FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 85 AS col0 FROM tab0, tab2, tab2 AS cor0
----
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6032
SELECT DISTINCT ( col0 ) DIV + 73 - ( + col1 ) AS col2 FROM tab2
----
-16
-31
-58

skipif mysql # not compatible
query I rowsort label-6032
SELECT DISTINCT ( col0 ) / + 73 - ( + col1 ) AS col2 FROM tab2
----
-16
-31
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-6033
SELECT col1 DIV + col0 + + col1 AS col2 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-6033
SELECT col1 / + col0 + + col1 AS col2 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT 65 * col2 AS col1 FROM tab1
----
3510
3705
6240

query I rowsort
SELECT col0 + - col0 * - col0 AS col2 FROM tab1 AS cor0
----
12
4160
6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col0 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT col2 * cor0.col1 + + ( col0 * - cor0.col0 ) AS col2 FROM tab1 cor0
----
-3526
-5152
1395

query I rowsort
SELECT 53 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col1 * - col2 col2 FROM tab1
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-6040
SELECT ALL + col2 DIV - col2 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6040
SELECT ALL + col2 / - col2 AS col0 FROM tab0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6041
SELECT - col2 + - 34 DIV col0 FROM tab2 AS cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-6041
SELECT - col2 + - 34 / col0 FROM tab2 AS cor0
----
-26
-31
-38

query I rowsort
SELECT + col2 * + ( col0 ) + - 48 * col2 AS col2 FROM tab2 AS cor0
----
-1107
1178
780

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 43 AS REAL ) AS col0 FROM tab1 AS cor0
----
43
43
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-6044
SELECT DISTINCT + col0 * CAST( + col2 AS SIGNED ) DIV + col1 FROM tab0
----
0
80
9

skipif mysql # not compatible
query I rowsort label-6044
SELECT DISTINCT + col0 * CAST ( + col2 AS INTEGER ) / + col1 FROM tab0
----
0
80
9

query I rowsort
SELECT ALL - 4 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 39ed23475412c3cbba02ecdd2d7018e6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6046
SELECT ( col2 ) * - cor0.col0 * + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6046
SELECT ( col2 ) * - cor0.col0 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6047
SELECT col2 DIV 88 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6047
SELECT col2 / 88 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 95 * - col1 FROM tab0
----
8170
8645
9215

query I rowsort
SELECT 50 - + col2 AS col2 FROM tab2
----
12
23
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-6050
SELECT DISTINCT + ( col0 ) + + col1 DIV col1 col1 FROM tab0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6050
SELECT DISTINCT + ( col0 ) + + col1 / col1 col1 FROM tab0
----
25
36
90

query I rowsort
SELECT DISTINCT col1 * + col2 + 34 FROM tab1
----
1282
1438
604

query I rowsort
SELECT - 54 * - col1 FROM tab2
----
1674
3186
918

query I rowsort
SELECT col1 * - col1 - - 34 FROM tab0
----
-7362
-8247
-9375

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + cor0.col1 * ( + col2 ) col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT + - col1 * + 82 * col1 AS col1 FROM tab2 AS cor0
----
-23698
-285442
-78802

query I rowsort
SELECT - - col1 * col2 + col0 FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT - col2 * - 69 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT - - col1 * 11 AS col0 FROM tab2 AS cor0
----
187
341
649

query I rowsort
SELECT + col2 + ( - col2 ) AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + 69 FROM tab2 cor0
----
107
95
96

query I rowsort
SELECT col2 * col2 + - 73 * - col1 AS col0 FROM tab0 AS cor0
----
13367
7082
7367

onlyif mysql # use DIV operator for integer division
query I rowsort label-6062
SELECT col0 DIV 31 AS col0 FROM tab2 cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-6062
SELECT col0 / 31 AS col0 FROM tab2 cor0
----
0
2
2

query I rowsort
SELECT ALL + - col2 + ( col2 ) * + col1 * col0 AS col0 FROM tab1 AS cor0
----
36423
4158
99744

query I rowsort
SELECT + + ( 99 ) AS col0 FROM tab1 AS cor0
----
99
99
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6065
SELECT - ( - col2 ) DIV - col1 - - col1 AS col2 FROM tab2 AS cor0
----
15
31
59

skipif mysql # not compatible
query I rowsort label-6065
SELECT - ( - col2 ) / - col1 - - col1 AS col2 FROM tab2 AS cor0
----
15
31
59

query I rowsort
SELECT - + 54 + col2 AS col2 FROM tab1 AS cor0
----
0
3
42

query I rowsort
SELECT - 64 - - col1 * - col0 FROM tab1 cor0
----
-1104
-142
-704

query I rowsort
SELECT ALL + 94 * col0 - + col1 FROM tab1
----
256
6006
7507

query I rowsort
SELECT ALL - col0 + - 55 + col1 FROM tab2 cor0
----
-117
-31
-74

query I rowsort
SELECT + + col0 * col0 * col1 - col1 AS col0 FROM tab2 AS cor0
----
106080
1488
358897

query I rowsort
SELECT 20 + 95 * cor0.col2 AS col2 FROM tab1 AS cor0
----
5150
5435
9140

query I rowsort
SELECT + ( ( + col2 ) ) * cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - col1 + + 41 FROM tab2 AS cor0
----
-18
10
24

query I rowsort
SELECT + + 61 * col2 + cor0.col1 + ( - col0 ) * - col0 * cor0.col1 FROM tab2 AS cor0
----
108432
3197
360601

onlyif mysql # use DIV operator for integer division
query I rowsort label-6075
SELECT - 35 DIV + col1 FROM tab1 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-6075
SELECT - 35 / + col1 FROM tab1 AS cor0
----
-1
-2
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6076
SELECT DISTINCT - cor0.col0 * cor0.col1 DIV col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6076
SELECT DISTINCT - cor0.col0 * cor0.col1 / col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6077
SELECT ALL - cor0.col2 * col1 DIV col1 AS col0 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6077
SELECT ALL - cor0.col2 * col1 / col1 AS col0 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT + cor0.col1 + col2 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL cor1.col0 FROM tab2, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT + 31 + col0 AS col2 FROM tab1 cor0
----
111
34
95

query I rowsort
SELECT DISTINCT + col1 * col2 * col2 AS col0 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT DISTINCT - cor0.col1 + - col2 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ( col2 ) * cor0.col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL 16 + - col1 AS col0 FROM tab1 AS cor0
----
-10
3
6

query I rowsort
SELECT DISTINCT + 81 * col1 + cor0.col2 + - col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-3229
-5251
2151

query I rowsort
SELECT ALL + col0 * + col2 + - col1 FROM tab0 cor0
----
-62
706
7207

query I rowsort
SELECT DISTINCT + 33 AS col2 FROM tab0 AS cor0
----
33

query I rowsort
SELECT - col0 * col0 + col1 AS col2 FROM tab2 cor0
----
-18
-6025
-6224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + - col2 * + cor0.col1 col0 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - 24 - - col1 FROM tab1
----
-11
-14
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6092
SELECT CAST( 93 AS SIGNED ) * col2 + col0 * col2 + - tab0.col2 FROM tab0
----
127
14842
3828

skipif mysql # not compatible
query I rowsort label-6092
SELECT CAST ( 93 AS INTEGER ) * col2 + col0 * col2 + - tab0.col2 FROM tab0
----
127
14842
3828

onlyif mysql # use DIV operator for integer division
query I rowsort label-6093
SELECT col2 DIV col2 + col1 + col1 * col0 FROM tab1
----
105
1054
651

skipif mysql # not compatible
query I rowsort label-6093
SELECT col2 / col2 + col1 + col1 * col0 FROM tab1
----
105
1054
651

query I rowsort
SELECT DISTINCT + 91 - + col2 * col0 AS col1 FROM tab1
----
-3557
-71
-7589

query I rowsort
SELECT ALL 17 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ALL + 51 * - col1 - col2 AS col1 FROM tab1
----
-1380
-567
-759

query I rowsort
SELECT DISTINCT + 12 * cor0.col0 * cor0.col2 FROM tab1 AS cor0
----
1944
43776
92160

query I rowsort
SELECT DISTINCT + cor0.col1 + col1 * col1 AS col2 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT + col2 + col2 - col1 FROM tab0 AS cor0
----
-20
-95
73

query I rowsort
SELECT ALL col0 + col0 * col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL + col1 * col0 - col0 * col2 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT ALL + + col0 - col1 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL col2 + - 46 * col2 + col1 * - col0 AS col0 FROM tab0 AS cor0
----
-11789
-3440
-3549

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + 79 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

onlyif mysql # use DIV operator for integer division
query I rowsort label-6106
SELECT + 2 DIV col2 + - col2 * col1 FROM tab0
----
-2838
-7462
-95

skipif mysql # not compatible
query I rowsort label-6106
SELECT + 2 / col2 + - col2 * col1 FROM tab0
----
-2838
-7462
-95

query I rowsort
SELECT DISTINCT col0 * + col0 - col2 AS col2 FROM tab2
----
22
6058
6203

query I rowsort
SELECT DISTINCT 4 - - col0 * col2 AS col2 FROM tab2
----
193
2032
3006

query I rowsort
SELECT col0 * col0 + col1 * + col2 FROM tab0
----
1322
15383
3414

query I rowsort
SELECT DISTINCT - ( + col0 ) * col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT 97 * col2 FROM tab0 AS cor0
----
3201
7954
97

query I rowsort
SELECT DISTINCT + - 78 + + 7 * - col1 * col2 FROM tab1 AS cor0
----
-4068
-8814
-9906

query I rowsort
SELECT 68 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT DISTINCT + 91 + - ( col1 ) FROM tab0 AS cor0
----
-6
0
5

query I rowsort
SELECT DISTINCT - + col1 * col1 + + col2 AS col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT ALL ( 57 ) AS col0 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT - - 89 AS col1 FROM tab0 AS cor0
----
89
89
89

query I rowsort
SELECT - + cor0.col0 + - col0 * + col0 * cor0.col0 + + col0 AS col1 FROM tab2 AS cor0
----
-343
-474552
-493039

query I rowsort
SELECT ALL col0 * + 95 * - col0 FROM tab1 AS cor0
----
-389120
-608000
-855

query I rowsort
SELECT + - col0 - 91 AS col0 FROM tab2 AS cor0
----
-169
-170
-98

query I rowsort
SELECT DISTINCT + col2 + ( col1 ) AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT 18 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT - 64 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 + col0 col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + col2 * - col1 + + col1 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * ( 60 * - col1 ) + + col2 col2 FROM tab2 AS cor0
----
38798
50247
92066

onlyif mysql # use DIV operator for integer division
query I rowsort label-6127
SELECT + col0 + col2 + - col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
126
183
59

skipif mysql # not compatible
query I rowsort label-6127
SELECT + col0 + col2 + - col2 / - col1 AS col1 FROM tab1 AS cor0
----
126
183
59

query I rowsort
SELECT DISTINCT col2 + ( + col1 ) * + col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6129
SELECT + cor0.col2 * + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6129
SELECT + cor0.col2 * + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6130
SELECT ALL + col1 DIV ( col0 ) + cor0.col2 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-6130
SELECT ALL + col1 / ( col0 ) + cor0.col2 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT cor0.col0 + col2 + + 48 * + col1 FROM tab1 cor0
----
1305
601
800

onlyif mysql # use DIV operator for integer division
query I rowsort label-6132
SELECT ( col1 ) + col1 DIV - col0 - - col2 * + col1 AS col2 FROM tab0 AS cor0
----
192
2921
7552

skipif mysql # not compatible
query I rowsort label-6132
SELECT ( col1 ) + col1 / - col0 - - col2 * + col1 AS col2 FROM tab0 AS cor0
----
192
2921
7552

query I rowsort
SELECT ALL - 67 * - 17 FROM tab0 AS cor0
----
1139
1139
1139

query I rowsort
SELECT DISTINCT + ( + col0 ) * + col1 + col0 + - col1 FROM tab1 AS cor0
----
1107
55
694

query I rowsort
SELECT - cor0.col0 + 4 * + col1 + 31 FROM tab2 AS cor0
----
148
189
20

query I rowsort
SELECT - col1 + - ( cor0.col0 ) * + 59 + col1 * - col0 FROM tab0 AS cor0
----
-13441
-3566
-5557

query I rowsort
SELECT - ( ( + col2 ) ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL 42 * col1 AS col2 FROM tab1 AS cor0
----
1092
420
546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 95 col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 26 col2 FROM tab0
----
26

query I rowsort
SELECT DISTINCT - 7 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-7

query I rowsort
SELECT DISTINCT - - 92 FROM tab0, tab1, tab1 AS cor0
----
92

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1, tab0 AS cor0 WHERE NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6144
SELECT col0 * - ( + col2 ) + col2 + col1 DIV + col2 FROM tab0 AS cor0
----
-7215
-757
63

skipif mysql # not compatible
query I rowsort label-6144
SELECT col0 * - ( + col2 ) + col2 + col1 / + col2 FROM tab0 AS cor0
----
-7215
-757
63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6145
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6145
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL + ( col0 ) * - col1 AS col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6147
SELECT ALL + + 35 DIV + col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6147
SELECT ALL + + 35 / + col2 AS col0 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - ( col2 ) * - 84 FROM tab0 AS cor0
----
2772
6888
84

query I rowsort
SELECT col1 * cor0.col0 + col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - col0 + col0 + col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + + 13 + + col1 AS col1 FROM tab1 AS cor0
----
23
26
39

query I rowsort
SELECT ALL + 47 + col1 * - col2 AS col1 FROM tab0 AS cor0
----
-2791
-50
-7415

query I rowsort
SELECT DISTINCT + col1 + - col0 * - col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL + col0 - tab1.col0 AS col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6155
SELECT + CAST( NULL AS SIGNED ) * + col0 + col2 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6155
SELECT + CAST ( NULL AS INTEGER ) * + col0 + col2 AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6156
SELECT ALL - col1 + col2 DIV - col1 FROM tab1
----
-15
-20
-28

skipif mysql # not compatible
query I rowsort label-6156
SELECT ALL - col1 + col2 / - col1 FROM tab1
----
-15
-20
-28

query I rowsort
SELECT DISTINCT - col2 + col1 * 62 FROM tab0
----
5299
5560
6013

query I rowsort
SELECT DISTINCT col2 + + col0 * col1 + col2 * col2 * col0 AS col2 FROM tab1
----
208633
738416
8880

query I rowsort
SELECT + col1 * col2 - + ( - col0 ) AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - ( + col0 ) * + cor0.col2 - 49 AS col1 FROM tab0 AS cor0
----
-7347
-84
-841

skipif mysql # not compatible
query I rowsort
SELECT ALL + col1 + col0 * CAST ( - col0 AS REAL ) AS col1 FROM tab1
----
-4086
-6387
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-6162
SELECT DISTINCT col2 * + col1 + + 97 DIV - 75 FROM tab1
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-6162
SELECT DISTINCT col2 * + col1 + + 97 / - 75 FROM tab1
----
1247
1403
569

query I rowsort
SELECT ALL tab1.col2 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + cor0.col0 * 11 FROM tab2 AS cor0
----
77
858
869

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6165
SELECT ALL tab1.col2 * CAST( col1 * col2 AS SIGNED ) col2 FROM tab1
----
119808
32490
75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6165
SELECT ALL tab1.col2 * CAST ( col1 * col2 AS INTEGER ) col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT 66 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1716
660
858

query I rowsort
SELECT ( cor0.col1 ) + col0 AS col0 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6168
SELECT - CAST( NULL AS DECIMAL ) + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6168
SELECT - CAST ( NULL AS REAL ) + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6169
SELECT col0 - col0 * col2 DIV 52 FROM tab1 AS cor0
----
-6
-67
0

skipif mysql # not compatible
query I rowsort label-6169
SELECT col0 - col0 * col2 / 52 FROM tab1 AS cor0
----
-6
-67
0

query I rowsort
SELECT ALL 47 AS col2 FROM tab2 AS cor0
----
47
47
47

query I rowsort
SELECT DISTINCT - col2 + col1 * col2 AS col1 FROM tab2 cor0
----
1508
608
810

query I rowsort
SELECT col0 * + 79 FROM tab2 AS cor0
----
553
6162
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6173
SELECT DISTINCT - CAST( - col0 AS SIGNED ) col1 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6173
SELECT DISTINCT - CAST ( - col0 AS INTEGER ) col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 57 * - col2 AS col2 FROM tab1 cor0
----
-3078
-3249
-5472

query I rowsort
SELECT DISTINCT - col1 * col0 + + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + ( 89 ) FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT ALL - ( col2 ) + col1 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6178
SELECT DISTINCT - 85 DIV 69 - - col0 * CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
-163
-3649
-7681

skipif mysql # not compatible
query I rowsort label-6178
SELECT DISTINCT - 85 / 69 - - col0 * CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
-163
-3649
-7681

query I rowsort
SELECT DISTINCT - col0 + - 70 AS col0 FROM tab1 AS cor0
----
-134
-150
-73

query I rowsort
SELECT col2 * - 4 FROM tab1 cor0
----
-216
-228
-384

query I rowsort
SELECT DISTINCT - 80 + col2 - - col0 AS col0 FROM tab0 AS cor0
----
-23
-44
91

query I rowsort
SELECT ALL - 45 + - 82 AS col0 FROM tab1 AS cor0
----
-127
-127
-127

onlyif mysql # use DIV operator for integer division
query I rowsort label-6183
SELECT ALL 6 DIV cor0.col1 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-6183
SELECT ALL 6 / cor0.col1 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-6184
SELECT 92 DIV tab2.col0 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 30059525963e6a5b29a2a621770fff65

skipif mysql # not compatible
query I rowsort label-6184
SELECT 92 / tab2.col0 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 30059525963e6a5b29a2a621770fff65

query I rowsort
SELECT col0 + + 13 * tab1.col1 FROM tab1
----
194
249
341

query I rowsort
SELECT ALL - col2 * 41 AS col0 FROM tab1
----
-2214
-2337
-3936

query I rowsort
SELECT DISTINCT - 20 AS col1 FROM tab2
----
-20

query I rowsort
SELECT + ( 93 ) FROM tab0 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6189
SELECT 60 + col0 DIV + col0 AS col2 FROM tab1 AS cor0
----
61
61
61

skipif mysql # not compatible
query I rowsort label-6189
SELECT 60 + col0 / + col0 AS col2 FROM tab1 AS cor0
----
61
61
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-6190
SELECT DISTINCT - - col2 + - ( - cor0.col2 ) DIV cor0.col0 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-6190
SELECT DISTINCT - - col2 + - ( - cor0.col2 ) / cor0.col0 FROM tab2 AS cor0
----
26
30
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6191
SELECT - ( + cor0.col2 ) + col1 DIV col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-6191
SELECT - ( + cor0.col2 ) + col1 / col1 FROM tab1 AS cor0
----
-53
-56
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6192
SELECT DISTINCT + 16 + col1 DIV - col1 FROM tab1 AS cor0
----
15

skipif mysql # not compatible
query I rowsort label-6192
SELECT DISTINCT + 16 + col1 / - col1 FROM tab1 AS cor0
----
15

query I rowsort
SELECT DISTINCT - col2 * - col0 - + 26 AS col1 FROM tab1 AS cor0
----
136
3622
7654

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 * - cor0.col2 + cor0.col2 col0 FROM tab0 AS cor0
----
2541
6314
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 98 + + col1 * + 62 col2 FROM tab1 AS cor0
----
1514
522
708

query I rowsort
SELECT DISTINCT - + col2 + + col2 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT col2 + - col0 * + ( + 29 ) * + col1 + + col2 * - col0 AS col2 FROM tab2 cor0
----
-135460
-41911
-6455

query I rowsort
SELECT ALL col2 + - col0 * col0 AS col1 FROM tab1 cor0
----
-4039
-6304
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-6199
SELECT DISTINCT col1 DIV + col2 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6199
SELECT DISTINCT col1 / + col2 AS col2 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6200
SELECT DISTINCT - cor0.col2 / + col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6200
SELECT DISTINCT - cor0.col2 / + col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + - 2 * cor0.col0 + 64 AS col2 FROM tab0 cor0
----
-114
-6
16

query I rowsort
SELECT - ( col2 ) + + tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + ( col0 ) + + col0 + + col2 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT - 52 * + col0 * - col1 AS col2 FROM tab1 AS cor0
----
33280
4056
54080

query I rowsort
SELECT cor0.col1 + + col2 * ( col0 ) FROM tab0 AS cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 * 35 * col1 col2 FROM tab0 AS cor0
----
261170
3395
99330

query I rowsort
SELECT DISTINCT col0 + + 0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL col2 * cor0.col2 + + col2 * - col0 FROM tab2 AS cor0
----
-1352
-1558
540

query I rowsort
SELECT ALL + cor0.col2 * - 27 FROM tab0 AS cor0
----
-2214
-27
-891

query I rowsort
SELECT + - col0 + - col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT ALL - - cor0.col0 + col2 + - ( cor0.col2 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL col1 * 41 + ( - col0 ) * 42 FROM tab0 AS cor0
----
-7
2507
2518

query I rowsort
SELECT DISTINCT - + col2 * - 6 + + col2 FROM tab0 AS cor0
----
231
574
7

query I rowsort
SELECT - col0 * + 69 AS col1 FROM tab2 AS cor0
----
-483
-5382
-5451

query I rowsort
SELECT - col0 * col0 + + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT - col0 + ( + 15 + - col2 ) FROM tab1 cor0
----
-106
-161
-42

query I rowsort
SELECT ALL - + col2 + col1 * cor0.col1 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT DISTINCT + col0 * + col1 + 4 AS col0 FROM tab0 AS cor0
----
2068
3399
8103

query I rowsort
SELECT + + col1 + 78 FROM tab1 cor0
----
104
88
91

query I rowsort
SELECT col1 + + 13 AS col2 FROM tab0 AS cor0
----
104
110
99

query I rowsort
SELECT - + 36 * + cor0.col1 FROM tab0 AS cor0
----
-3096
-3276
-3492

query I rowsort
SELECT DISTINCT - tab1.col2 * - col2 * - col2 FROM tab1
----
-157464
-185193
-884736

query I rowsort
SELECT + cor0.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6224
SELECT DISTINCT CAST( 9 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
9

skipif mysql # not compatible
query I rowsort label-6224
SELECT DISTINCT CAST ( 9 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
9

query I rowsort
SELECT ( col2 ) * - col1 + cor0.col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ( 10 ) FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT col1 * col0 + - 53 * - col0 AS col0 FROM tab2
----
5530
588
8736

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 160649b428b8d254517cd2096e054d21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6229
SELECT tab0.col2 * CAST( NULL AS SIGNED ) * + 84 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6229
SELECT tab0.col2 * CAST ( NULL AS INTEGER ) * + 84 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - col2 * 51 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
-103428
-153102
-9639

query I rowsort
SELECT - + col0 + + ( 34 ) FROM tab1 AS cor0
----
-30
-46
31

query I rowsort
SELECT + + col0 + col0 * + 94 AS col0 FROM tab2 AS cor0
----
665
7410
7505

query I rowsort
SELECT - col2 * 25 FROM tab1 cor0
----
-1350
-1425
-2400

query I rowsort
SELECT 87 + - col1 * col0 AS col2 FROM tab1
----
-553
-953
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL + 21 * 99 FROM tab1 AS cor0
----
2079
2079
2079

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * - ( + col0 ) col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( cor0.col1 ) col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - col0 * 19 FROM tab1 AS cor0
----
-1216
-1520
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6240
SELECT - - col0 DIV + 70 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6240
SELECT - - col0 / + 70 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 34 col0 FROM tab0 AS cor0
----
52
57
63

query I rowsort
SELECT DISTINCT - 29 AS col2 FROM tab1 cor0
----
-29

query I rowsort
SELECT DISTINCT - 15 + + col2 FROM tab2 AS cor0
----
11
12
23

query I rowsort
SELECT + 30 * - col1 + 42 FROM tab1 AS cor0
----
-258
-348
-738

query I rowsort
SELECT ALL 45 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT + + col1 * - col1 * + col0 AS col0 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT - col0 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1328
-1407
-634

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

query I rowsort
SELECT + - ( + col0 ) + + col2 * col0 * col0 FROM tab1 AS cor0
----
233408
483
614320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 * col1 col0 FROM tab2 AS cor0
----
1426
2714
782

onlyif mysql # use DIV operator for integer division
query I rowsort label-6251
SELECT + col0 * + col1 * - 78 + col0 DIV col1 FROM tab1 AS cor0
----
-49914
-6084
-81114

skipif mysql # not compatible
query I rowsort label-6251
SELECT + col0 * + col1 * - 78 + col0 / col1 FROM tab1 AS cor0
----
-49914
-6084
-81114

onlyif mysql # use DIV operator for integer division
query I rowsort label-6252
SELECT + 87 DIV - col2 FROM tab0 cor0
----
-1
-2
-87

skipif mysql # not compatible
query I rowsort label-6252
SELECT + 87 / - col2 FROM tab0 cor0
----
-1
-2
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6253
SELECT - - cor0.col2 DIV + col1 + + col1 AS col0 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-6253
SELECT - - cor0.col2 / + col1 + + col1 AS col0 FROM tab2 AS cor0
----
19
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6254
SELECT - + col1 DIV col2 + 18 AS col0 FROM tab0 AS cor0
----
-79
16
17

skipif mysql # not compatible
query I rowsort label-6254
SELECT - + col1 / col2 + 18 AS col0 FROM tab0 AS cor0
----
-79
16
17

query I rowsort
SELECT - 77 + col1 FROM tab1 AS cor0
----
-51
-64
-67

query I rowsort
SELECT + col1 * + col2 + + 18 FROM tab0 cor0
----
115
2856
7480

query I rowsort
SELECT + - col1 * col0 + - 56 FROM tab2 AS cor0
----
-1399
-273
-4658

query I rowsort
SELECT + 2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT 48 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT - + cor0.col2 * col2 - + col1 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT col0 * cor0.col0 - col1 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL - - cor0.col1 * - cor0.col2 + cor0.col1 * cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + cor0.col0 - - 92 * col0 FROM tab2 AS cor0
----
651
7254
7347

query I rowsort
SELECT ALL 55 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6265
SELECT ALL col0 DIV tab0.col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6265
SELECT ALL col0 / tab0.col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col1 + - col2 * col0 AS col2 FROM tab0 AS cor0
----
-132
-7389
-878

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-6268
SELECT + 22 * + col0 + + cor0.col1 DIV - cor0.col1 AS col0 FROM tab2 AS cor0
----
153
1715
1737

skipif mysql # not compatible
query I rowsort label-6268
SELECT + 22 * + col0 + + cor0.col1 / - cor0.col1 AS col0 FROM tab2 AS cor0
----
153
1715
1737

query I rowsort
SELECT ALL - + ( 4 ) FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 39ed23475412c3cbba02ecdd2d7018e6

query I rowsort
SELECT DISTINCT - 81 - + col1 FROM tab0
----
-167
-172
-178

query I rowsort
SELECT + col0 * 74 FROM tab0
----
1776
2590
6586

onlyif mysql # use DIV operator for integer division
query I rowsort label-6272
SELECT ALL col1 DIV ( + col2 ) FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6272
SELECT ALL col1 / ( + col2 ) FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT - 66 * col1 FROM tab1
----
-1716
-660
-858

query I rowsort
SELECT ALL col0 * ( 3 + + col1 ) AS col1 FROM tab1 AS cor0
----
1280
832
87

query I rowsort
SELECT DISTINCT 63 FROM tab2, tab0 AS cor0
----
63

query I rowsort
SELECT DISTINCT + col0 + + 28 + col2 FROM tab1 AS cor0
----
149
204
85

query I rowsort
SELECT - col1 + + 40 AS col0 FROM tab1 AS cor0
----
14
27
30

query I rowsort
SELECT DISTINCT col1 * + 28 FROM tab2 AS cor0
----
1652
476
868

query I rowsort
SELECT DISTINCT tab0.col2 - - 19 FROM tab0
----
101
20
52

query I rowsort
SELECT + 8 * + col2 AS col2 FROM tab2 AS cor0
----
208
216
304

query I rowsort
SELECT ALL ( 50 ) FROM tab2 AS cor0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col2 ) + cor0.col2 * col2 col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT - col1 * ( 23 ) + - col2 * col1 FROM tab0
----
-2328
-4816
-9555

query I rowsort
SELECT + col1 * ( - 90 ) FROM tab1 AS cor0
----
-1170
-2340
-900

query I rowsort
SELECT col0 + + col1 - tab2.col1 * - tab2.col0 AS col2 FROM tab2
----
1439
255
4739

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col2 col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL + - 23 + + col0 AS col2 FROM tab2 AS cor0
----
-16
55
56

query I rowsort
SELECT ALL - col1 + + col0 * - col2 AS col2 FROM tab2 cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL ( + col0 ) + 94 AS col1 FROM tab0 AS cor0
----
118
129
183

query I rowsort
SELECT DISTINCT - col0 * + col1 * - ( col1 ) FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT DISTINCT col0 + col2 + col0 FROM tab0
----
260
71
81

query I rowsort
SELECT ALL ( col2 * + tab0.col0 ) AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT + col1 + - 74 AS col2 FROM tab1 AS cor0
----
-48
-61
-64

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1, tab2, tab0 AS cor0, tab0
----
10
13
26

query I rowsort
SELECT ALL - 95 AS col1 FROM tab0
----
-95
-95
-95

query I rowsort
SELECT DISTINCT + 27 * tab0.col0 FROM tab0
----
2403
648
945

query I rowsort
SELECT DISTINCT + col1 * + tab1.col1 AS col2 FROM tab1
----
100
169
676

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

query I rowsort
SELECT ALL + col0 + col0 + - cor0.col0 FROM tab0 cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6301
SELECT - cor0.col0 * - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6301
SELECT - cor0.col0 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 * ( + col2 ) - - col1 FROM tab1 AS cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 + - 29 col0 FROM tab1 AS cor0
----
-26
35
51

query I rowsort
SELECT ALL - + col0 + ( col1 ) * - col2 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT col1 - ( + 58 * - col0 ) AS col0 FROM tab0 AS cor0
----
1478
2127
5253

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT + col2 + ( + ( + col2 ) ) FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * - 99 col0 FROM tab1 AS cor0
----
-1287
-2574
-990

query I rowsort
SELECT col1 + cor0.col2 * 16 FROM tab0 AS cor0
----
113
1403
614

query I rowsort
SELECT + + col0 + 33 * col2 FROM tab1 AS cor0
----
1785
1945
3248

query I rowsort
SELECT ALL - col0 * - 15 FROM tab0 AS cor0
----
1335
360
525

query I rowsort
SELECT col0 * + 14 FROM tab0 AS cor0
----
1246
336
490

onlyif mysql # use DIV operator for integer division
query I rowsort label-6313
SELECT DISTINCT + + cor0.col2 * 56 + + col0 - + col0 DIV cor0.col0 col0 FROM tab1 AS cor0
----
3026
3255
5455

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6313
SELECT DISTINCT + + cor0.col2 * 56 + + col0 - + col0 / cor0.col0 col0 FROM tab1 AS cor0
----
3026
3255
5455

query I rowsort
SELECT - col1 * ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT col2 + - col2 - col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - 6 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
-156
-162
-228

query I rowsort
SELECT + 49 * col2 + col2 FROM tab0 AS cor0
----
1650
4100
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6318
SELECT - CAST( NULL AS SIGNED ) * + tab2.col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6318
SELECT - CAST ( NULL AS INTEGER ) * + tab2.col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 + ( - col1 ) FROM tab2 AS cor0
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) * - col0 * CAST ( + 19 AS INTEGER ) + col0 FROM tab0 cor0
----
-138573
-15024
-630

query I rowsort
SELECT DISTINCT + 84 AS col0 FROM tab2 cor0
----
84

query I rowsort
SELECT DISTINCT ( - 88 ) AS col0 FROM tab0 AS cor0
----
-88

query I rowsort
SELECT + 18 * cor0.col2 - col0 FROM tab2 AS cor0
----
390
479
605

query I rowsort
SELECT ALL - col1 + col1 + col2 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6325
SELECT ALL col2 DIV col0 + + col1 + col2 * 66 * col2 FROM tab2 AS cor0
----
44675
48148
95321

skipif mysql # not compatible
query I rowsort label-6325
SELECT ALL col2 / col0 + + col1 + col2 * 66 * col2 FROM tab2 AS cor0
----
44675
48148
95321

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 84 + + col1 + - col0 col2 FROM tab2 cor0
----
-103
-146
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6327
SELECT DISTINCT - CAST( + col2 AS SIGNED ) col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6327
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) col1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6328
SELECT 38 * col1 DIV col1 + - ( col2 * cor0.col1 ) FROM tab2 cor0
----
-1496
-608
-799

skipif mysql # not compatible
query I rowsort label-6328
SELECT 38 * col1 / col1 + - ( col2 * cor0.col1 ) FROM tab2 cor0
----
-1496
-608
-799

query I rowsort
SELECT DISTINCT + col0 * 35 AS col1 FROM tab0 AS cor0
----
1225
3115
840

query I rowsort
SELECT ALL - col2 + col0 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT 8 + col0 * col1 AS col0 FROM tab0 cor0
----
2072
3403
8107

onlyif mysql # use DIV operator for integer division
query I rowsort label-6332
SELECT ALL - col1 + + ( - col1 ) DIV ( + 3 ) AS col0 FROM tab0 AS cor0
----
-114
-121
-129

skipif mysql # not compatible
query I rowsort label-6332
SELECT ALL - col1 + + ( - col1 ) / ( + 3 ) AS col0 FROM tab0 AS cor0
----
-114
-121
-129

query I rowsort
SELECT + + col2 + - col0 * + ( + 17 ) * + col2 AS col2 FROM tab0 AS cor0
----
-123984
-13431
-594

query I rowsort
SELECT ALL - - 92 * - col0 * col0 AS col1 FROM tab0 AS cor0
----
-112700
-52992
-728732

query I rowsort
SELECT - ( + 0 + + cor1.col2 ) AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT 2 * col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - 61 * col1 AS col1 FROM tab0 AS cor0
----
-5246
-5551
-5917

query I rowsort
SELECT - 36 * - col1 FROM tab0 AS cor0
----
3096
3276
3492

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6339
SELECT - CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6339
SELECT - CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6340
SELECT + col1 * - CAST( 25 * col1 AS SIGNED ) + ( col1 ) FROM tab0
----
-184814
-206934
-235128

skipif mysql # not compatible
query I rowsort label-6340
SELECT + col1 * - CAST ( 25 * col1 AS INTEGER ) + ( col1 ) FROM tab0
----
-184814
-206934
-235128

query I rowsort
SELECT ALL col1 * - 36 * col2 AS col2 FROM tab2
----
-23256
-30132
-55224

query I rowsort
SELECT DISTINCT + col0 + + col2 * + col1 * cor0.col2 FROM tab0 AS cor0
----
132
611973
93678

query I rowsort
SELECT ALL - ( + col1 ) * col0 + 92 AS col1 FROM tab1 AS cor0
----
-548
-948
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( col0 ) * col2 + 14 col0 FROM tab2 AS cor0
----
-175
-2014
-2988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6345
SELECT CAST( NULL AS SIGNED ) * + col2 FROM tab1 cor0
----
NULL
NULL
NULL

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6346
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6346
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col2 ) * - col0 col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + 12 + + col1 FROM tab1 AS cor0
----
22
25
38

query I rowsort
SELECT DISTINCT 98 * - tab1.col0 * - col2 + 57 AS col2 FROM tab1
----
15933
357561
752697

query I rowsort
SELECT ALL + col1 * col1 - col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT col1 * 19 + + col2 FROM tab1 AS cor0
----
247
343
548

query I rowsort
SELECT ALL col1 + - 47 * col2 + col0 * col1 AS col1 FROM tab0 AS cor0
----
3445
4336
599

query I rowsort
SELECT - col2 * ( col1 ) * - col1 FROM tab1
----
16224
36504
5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6354
SELECT ALL + - col0 * CAST( NULL AS DECIMAL ) + col0 - + col2 * - 8 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6354
SELECT ALL + - col0 * CAST ( NULL AS REAL ) + col0 - + col2 * - 8 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * 5 + - col1 FROM tab1 cor0
----
-156
-60
-78

query I rowsort
SELECT cor1.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT 83 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT - col0 + - col1 + 56 FROM tab0 cor0
----
-124
-54
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6359
SELECT col0 + + col2 DIV ( + col1 ) - - col2 FROM tab1 AS cor0
----
126
183
59

skipif mysql # not compatible
query I rowsort label-6359
SELECT col0 + + col2 / ( + col1 ) - - col2 FROM tab1 AS cor0
----
126
183
59

query I rowsort
SELECT cor0.col2 * + col2 - + cor0.col1 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
10464
3819
4320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + 83 + - col0 col0 FROM tab2 AS cor0
----
574
6396
6478

query I rowsort
SELECT - + ( - cor0.col0 ) + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL - ( - col2 ) + - col0 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT - 63 + cor0.col0 AS col1 FROM tab2 AS cor0
----
-56
15
16

query I rowsort
SELECT cor0.col2 FROM tab2, tab1 cor0, tab0 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT col1 + col2 * 73 AS col0 FROM tab0
----
170
2495
6077

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab1, tab0, tab2 AS cor0, tab0 AS cor1
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6368
SELECT + col0 + + cor0.col0 * col2 DIV 39 AS col0 FROM tab0 AS cor0
----
276
35
44

skipif mysql # not compatible
query I rowsort label-6368
SELECT + col0 + + cor0.col0 * col2 / 39 AS col0 FROM tab0 AS cor0
----
276
35
44

query I rowsort
SELECT + col1 * - col1 - - 24 AS col2 FROM tab0 AS cor0
----
-7372
-8257
-9385

query I rowsort
SELECT + - col2 * - col1 + ( + col0 ) + col1 FROM tab2 AS cor0
----
1671
742
875

onlyif mysql # use DIV operator for integer division
query I rowsort label-6371
SELECT + - col0 + ( col2 ) + col1 DIV 60 FROM tab0 cor0
----
-33
-6
10

skipif mysql # not compatible
query I rowsort label-6371
SELECT + - col0 + ( col2 ) + col1 / 60 FROM tab0 cor0
----
-33
-6
10

query I rowsort
SELECT - cor0.col0 * 86 AS col2 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT - col2 - - 13 AS col0 FROM tab2 AS cor0
----
-13
-14
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 + - col0 * + tab2.col1 + col1 col1 FROM tab2
----
-1247
-179
-4465

onlyif mysql # use DIV operator for integer division
query I rowsort label-6375
SELECT DISTINCT 97 DIV col0 FROM tab2
----
1
13

skipif mysql # not compatible
query I rowsort label-6375
SELECT DISTINCT 97 / col0 FROM tab2
----
1
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6376
SELECT CAST( NULL AS DECIMAL ) + ( + col1 ) * ( tab1.col0 + + col0 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6376
SELECT CAST ( NULL AS REAL ) + ( + col1 ) * ( tab1.col0 + + col0 ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6377
SELECT CAST( - col0 AS SIGNED ) AS col2 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-6377
SELECT CAST ( - col0 AS INTEGER ) AS col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + - col2 * 61 AS col1 FROM tab1 cor0
----
-3294
-3477
-5856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + ( 95 ) * + col2 AS col0 FROM tab1 cor0
----
5130
5415
9120

query I rowsort
SELECT - + col0 * - 74 FROM tab1 AS cor0
----
222
4736
5920

query I rowsort
SELECT DISTINCT - - col2 * col0 + - 85 * col2 * cor0.col0 FROM tab2 AS cor0
----
-15876
-170352
-252168

query I rowsort
SELECT DISTINCT + - 21 * col1 AS col0 FROM tab1 AS cor0
----
-210
-273
-546

query I rowsort
SELECT DISTINCT - col0 * - col2 + - col0 AS col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL - 40 FROM tab2 cor0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT col0 * - col2 + col1 * - col0 - col1 * col2 FROM tab1 AS cor0
----
-1644
-4858
-9968

query I rowsort
SELECT 51 * + col2 AS col0 FROM tab1 AS cor0
----
2754
2907
4896

query I rowsort
SELECT DISTINCT - 19 * col1 AS col1 FROM tab2 AS cor0
----
-1121
-323
-589

query I rowsort
SELECT + col1 + 82 AS col1 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT col0 - 20 AS col1 FROM tab2 AS cor0
----
-13
58
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6391
SELECT - col2 * CAST( col0 AS SIGNED ) AS col2 FROM tab2 cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-6391
SELECT - col2 * CAST ( col0 AS INTEGER ) AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT cor0.col2 * + col0 + + col1 * col2 AS col0 FROM tab2 AS cor0
----
1026
3562
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-6393
SELECT ALL - col2 * 41 DIV - 43 AS col0 FROM tab0 AS cor0
----
0
31
78

skipif mysql # not compatible
query I rowsort label-6393
SELECT ALL - col2 * 41 / - 43 AS col0 FROM tab0 AS cor0
----
0
31
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6394
SELECT DISTINCT - cor0.col0 DIV - 79 AS col1 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6394
SELECT DISTINCT - cor0.col0 / - 79 AS col1 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT + col0 * col1 + - col0 FROM tab0 cor0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-6396
SELECT - col1 DIV 84 + + col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6396
SELECT - col1 / 84 + + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - col2 + 90 AS col1 FROM tab1 AS cor0
----
-6
33
36

query I rowsort
SELECT DISTINCT + - 93 * 40 + col0 FROM tab1 AS cor0
----
-3640
-3656
-3717

query I rowsort
SELECT ALL + - col2 + cor0.col1 * - col1 AS col1 FROM tab1 AS cor0
----
-157
-265
-730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6400
SELECT - - CAST( NULL AS SIGNED ) * col2 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6400
SELECT - - CAST ( NULL AS INTEGER ) * col2 + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 48 * tab0.col2 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
-1584
-3936
-48

query I rowsort
SELECT ALL col2 + 83 AS col0 FROM tab2 AS cor0
----
109
110
121

query I rowsort
SELECT - - 85 * + col2 + + col2 FROM tab1 AS cor0
----
4644
4902
8256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 26 + - cor0.col0 col1 FROM tab0 AS cor0
----
-63
-9
2

query I rowsort
SELECT DISTINCT + 73 AS col2 FROM tab2, tab0 AS cor0
----
73

query I rowsort
SELECT DISTINCT + col2 * 22 + col0 * col1 AS col0 FROM tab2
----
2179
5174
811

query I rowsort
SELECT DISTINCT + col0 + 35 + - col2 FROM tab2
----
15
76
87

query I rowsort
SELECT ALL col2 * - 5 + tab0.col2 FROM tab0
----
-132
-328
-4

query I rowsort
SELECT DISTINCT - tab0.col0 + col0 + col2 * - col2 AS col0 FROM tab0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6410
SELECT DISTINCT col0 * - CAST( NULL AS SIGNED ) * col2 + col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6410
SELECT DISTINCT col0 * - CAST ( NULL AS INTEGER ) * col2 + col1 FROM tab2
----
NULL

query I rowsort
SELECT col0 - - 91 FROM tab1
----
155
171
94

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT + col1 - + col1 * col0 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT - + 4 * - col1 AS col0 FROM tab0 cor0
----
344
364
388

query I rowsort
SELECT ALL + + col2 * col2 + - col2 AS col0 FROM tab1 cor0
----
2862
3192
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-6416
SELECT ALL - + col2 DIV 13 + - col1 FROM tab0 AS cor0
----
-88
-97
-97

skipif mysql # not compatible
query I rowsort label-6416
SELECT ALL - + col2 / 13 + - col1 FROM tab0 AS cor0
----
-88
-97
-97

query I rowsort
SELECT col1 + col1 * + cor0.col1 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6418
SELECT DISTINCT - CAST( col2 AS SIGNED ) * + col2 + - col0 AS col1 FROM tab2 AS cor0
----
-1523
-736
-754

skipif mysql # not compatible
query I rowsort label-6418
SELECT DISTINCT - CAST ( col2 AS INTEGER ) * + col2 + - col0 AS col1 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT ALL col2 * - col1 + col2 * tab1.col1 * tab1.col1 AS col2 FROM tab1
----
14976
35100
5130

query I rowsort
SELECT + - col2 * + col1 + col1 * col0 * + col1 AS col1 FROM tab2 AS cor0
----
22185
269984
5890

query I rowsort
SELECT + 46 * - col2 FROM tab2
----
-1196
-1242
-1748

query I rowsort
SELECT + + 32 + col0 FROM tab0 cor0
----
121
56
67

query I rowsort
SELECT - ( tab0.col2 ) AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL - 80 * col2 + col2 FROM tab0 AS cor0
----
-2607
-6478
-79

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-6426
SELECT DISTINCT + 7 DIV - col0 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-6426
SELECT DISTINCT + 7 / - col0 FROM tab2
----
-1
0

query I rowsort
SELECT + col0 + col1 - 91 FROM tab2
----
-53
46
5

query I rowsort
SELECT ALL - ( + col2 ) - col2 * col1 AS col2 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT ALL 14 - + col0 FROM tab2
----
-64
-65
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6430
SELECT ALL + col2 * CAST( col1 AS SIGNED ) + col0 * + col2 col0 FROM tab1 AS cor0
----
1566
4218
8928

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6430
SELECT ALL + col2 * CAST ( col1 AS INTEGER ) + col0 * + col2 col0 FROM tab1 AS cor0
----
1566
4218
8928

query I rowsort
SELECT ALL + col1 * + cor0.col0 + 13 * col2 - col1 FROM tab0 AS cor0
----
2407
3311
9074

query I rowsort
SELECT ALL col1 - - tab2.col1 * col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT DISTINCT - 77 * tab1.col2 FROM tab1
----
-4158
-4389
-7392

query I rowsort
SELECT col0 * col1 + - col0 FROM tab1
----
576
75
960

query I rowsort
SELECT 4 * - tab1.col2 + + col1 AS col0 FROM tab1
----
-190
-218
-371

onlyif mysql # use DIV operator for integer division
query I rowsort label-6436
SELECT ALL ( col0 ) DIV col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6436
SELECT ALL ( col0 ) / col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + tab2.col2 * ( 10 ) FROM tab2, tab2 AS cor0
----
9 values hashing to daf30803acc158430e9342e85963898a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 col2 FROM tab0
----
-74
-74
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col2 col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT + col1 + + 0 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL - col0 + ( + 45 ) FROM tab2 AS cor0
----
-33
-34
38

query I rowsort
SELECT DISTINCT + col0 + + col1 + - col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6443
SELECT DISTINCT + col1 * - CAST( - col2 * col2 AS SIGNED ) + col0 AS col2 FROM tab2 AS cor0
----
22606
24627
39962

skipif mysql # not compatible
query I rowsort label-6443
SELECT DISTINCT + col1 * - CAST ( - col2 * col2 AS INTEGER ) + col0 AS col2 FROM tab2 AS cor0
----
22606
24627
39962

query I rowsort
SELECT DISTINCT - - cor0.col2 + + 55 * + col2 AS col2 FROM tab2 AS cor0
----
1456
1512
2128

query I rowsort
SELECT ALL + col2 * col0 + + ( + cor0.col1 ) * - col2 - col1 * + col2 FROM tab2 AS cor0
----
-1040
-1485
1710

query I rowsort
SELECT col0 + - 33 AS col1 FROM tab2 AS cor0
----
-26
45
46

query I rowsort
SELECT - + col1 + 28 * + cor0.col1 FROM tab2 AS cor0
----
1593
459
837

query I rowsort
SELECT DISTINCT - cor0.col2 + + 69 FROM tab1 cor0
----
-27
12
15

query I rowsort
SELECT + col2 + + 45 * col1 AS col0 FROM tab0 AS cor0
----
3903
4177
4366

query I rowsort
SELECT DISTINCT + col2 + 87 * cor0.col1 FROM tab2 AS cor0
----
1517
2724
5159

onlyif mysql # use DIV operator for integer division
query I rowsort label-6451
SELECT ALL + - col2 DIV - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6451
SELECT ALL + - col2 / - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col0 + col1 * 83 AS col2 FROM tab0 cor0
----
7114
7464
8016

query I rowsort
SELECT DISTINCT + col0 + - col0 * ( col0 * cor0.col1 ) FROM tab2 AS cor0
----
-106018
-1512
-358878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6454
SELECT ALL - col0 * + CAST( - 8 + - col0 AS SIGNED ) FROM tab0 AS cor0
----
1505
768
8633

skipif mysql # not compatible
query I rowsort label-6454
SELECT ALL - col0 * + CAST ( - 8 + - col0 AS INTEGER ) FROM tab0 AS cor0
----
1505
768
8633

onlyif mysql # use DIV operator for integer division
query I rowsort label-6455
SELECT col2 - 68 DIV - 88 AS col1 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6455
SELECT col2 - 68 / - 88 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + col0 * + col2 + 0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6457
SELECT DISTINCT col1 + - col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6457
SELECT DISTINCT col1 + - col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT col1 * col2 + + ( col1 ) AS col1 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-6459
SELECT ALL col2 * col1 DIV + col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6459
SELECT ALL col2 * col1 / + col1 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL ( + col2 ) * col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + col2 + col1 + - col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - - col2 + col1 * + col0 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + cor0.col0 * ( 75 * col1 ) + - cor0.col2 AS col2 FROM tab1 AS cor0
----
47943
5796
77904

query I rowsort
SELECT - col1 + col1 * col1 * - col2 AS col2 FROM tab1 AS cor0
----
-16237
-36530
-5710

skipif mysql # not compatible
query I rowsort
SELECT - + col2 * + CAST ( + col2 AS REAL ) * - cor0.col1 + - col2 AS col1 FROM tab2 AS cor0
----
22572
24510
39858

query I rowsort
SELECT - - col2 * col2 * - col0 + col0 AS col0 FROM tab2 AS cor0
----
-113997
-5096
-52650

query I rowsort
SELECT ALL + - col2 + cor0.col1 * + col0 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-6468
SELECT ( - col1 ) DIV - col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6468
SELECT ( - col1 ) / - col1 AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6469
SELECT ALL + - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6469
SELECT ALL + - CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 + 10 col1 FROM tab1 AS cor0
----
99

query I rowsort
SELECT + 29 - - col1 FROM tab1 AS cor0
----
39
42
55

query I rowsort
SELECT ALL + cor0.col1 * ( + col0 ) FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - + 17 + + col1 FROM tab0 AS cor0
----
69
74
80

query I rowsort
SELECT tab1.col0 AS col2 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # use DIV operator for integer division
query I rowsort label-6475
SELECT + - col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6475
SELECT + - col1 / - col2 AS col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT ( 17 ) * col0 AS col1 FROM tab1 AS cor0
----
1088
1360
51

query I rowsort
SELECT col0 * col0 * col1 AS col1 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT 88 * tab1.col2 FROM tab1
----
4752
5016
8448

query I rowsort
SELECT cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - col2 - - col2 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT ALL + - cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 89 * + col1 + 60 col1 FROM tab1 AS cor0
----
1217
2374
950

query I rowsort
SELECT DISTINCT + - col2 * + col2 + col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT + 50 + - col2 - col0 FROM tab2 AS cor0
----
-54
-67
16

query I rowsort
SELECT - ( - col1 ) + + col1 * cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
118922
49622
720902

query I rowsort
SELECT DISTINCT - + 84 * col0 + 18 * 50 + col0 * - col1 FROM tab0 cor0
----
-14675
-3180
-5435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) col0 FROM tab0
----
24
35
89

query I rowsort
SELECT + 56 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT - 46 AS col0 FROM tab0
----
-46
-46
-46

query I rowsort
SELECT DISTINCT 58 - - col0 FROM tab2
----
136
137
65

query I rowsort
SELECT + col1 * col1 * - col0 + col0 AS col1 FROM tab0 AS cor0
----
-177480
-329280
-736920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 55 col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6493
SELECT ALL + col1 DIV col0 + 62 - 23 * + col0 FROM tab2
----
-1732
-1755
-95

skipif mysql # not compatible
query I rowsort label-6493
SELECT ALL + col1 / col0 + 62 - 23 * + col0 FROM tab2
----
-1732
-1755
-95

query I rowsort
SELECT - col1 * col0 + 68 AS col0 FROM tab2 AS cor0
----
-1275
-149
-4534

query I rowsort
SELECT ALL + col1 * - 4 AS col2 FROM tab1
----
-104
-40
-52

query I rowsort
SELECT ALL col1 * 75 * + col0 FROM tab1 cor0
----
48000
5850
78000

query I rowsort
SELECT ALL 49 FROM tab1, tab2 cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to a02dd7564e9916176c021434a3977a05

query I rowsort
SELECT + + cor0.col0 * 19 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT + - cor0.col1 * + 11 AS col0 FROM tab1 AS cor0
----
-110
-143
-286

query I rowsort
SELECT - cor0.col1 * - cor0.col1 AS col0 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT - + cor0.col1 + ( col1 * col1 ) FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT 71 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

query I rowsort
SELECT + - ( cor0.col1 ) * cor0.col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 93 * - col0 FROM tab2 AS cor0
----
651
7254
7347

query I rowsort
SELECT ALL - ( + col0 ) + col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - 94 FROM tab1, tab1 AS cor0
----
-94

query I rowsort
SELECT ALL + ( col0 ) - col1 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col0 + ( - 40 ) AS col0 FROM tab2
----
-33
38
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 + + col1 col0 FROM tab1
----
104
1053
650

query I rowsort
SELECT - col1 + col2 + - 81 FROM tab1
----
-34
-53
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6513
SELECT - + col2 * + col0 + cor0.col1 DIV col2 + + 58 col1 FROM tab1 AS cor0
----
-104
-3590
-7622

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6513
SELECT - + col2 * + col0 + cor0.col1 / col2 + + 58 col1 FROM tab1 AS cor0
----
-104
-3590
-7622

query I rowsort
SELECT tab0.col1 + - 15 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b56f3e9275c057dd52029d987d39b458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 1 ) col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - - col0 * col2 + - col1 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6517
SELECT + CAST( NULL AS SIGNED ) / 66 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6517
SELECT + CAST ( NULL AS INTEGER ) / 66 + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 3 * col0 + - col0 * 98 FROM tab1
----
-303
-6464
-8080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6519
SELECT DISTINCT CAST( 60 AS SIGNED ) * col0 * - col0 + - 50 - col1 AS col1 FROM tab2 AS cor0
----
-3021
-365149
-374527

skipif mysql # not compatible
query I rowsort label-6519
SELECT DISTINCT CAST ( 60 AS INTEGER ) * col0 * - col0 + - 50 - col1 AS col1 FROM tab2 AS cor0
----
-3021
-365149
-374527

query I rowsort
SELECT ALL ( - col2 ) * + col2 + - col2 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT - - 2 * 69 AS col0 FROM tab2 AS cor0
----
138
138
138

query I rowsort
SELECT ALL - - 77 * - col1 AS col0 FROM tab0 AS cor0
----
-6622
-7007
-7469

query I rowsort
SELECT + col2 + - 10 * col1 FROM tab1 AS cor0
----
-206
-34
-43

query I rowsort
SELECT ALL + + 53 * - col0 * col2 + - col2 * - col0 - col1 AS col0 FROM tab1 AS cor0
----
-189706
-399373
-8450

query I rowsort
SELECT ALL + cor0.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + 32 * - ( col2 ) FROM tab2 AS cor0
----
-1216
-832
-864

query I rowsort
SELECT DISTINCT + col2 * - 51 AS col2 FROM tab1 AS cor0
----
-2754
-2907
-4896

query I rowsort
SELECT - col1 * - cor0.col0 + 18 FROM tab1 cor0
----
1058
658
96

query I rowsort
SELECT 53 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT + 69 - + col2 AS col2 FROM tab1 AS cor0
----
-27
12
15

query I rowsort
SELECT ALL + col1 * + col0 * + 92 FROM tab0 AS cor0
----
189888
312340
745108

query I rowsort
SELECT + col1 + + cor0.col2 + - 33 AS col0 FROM tab0 cor0
----
140
65
86

query I rowsort
SELECT 94 * + col1 FROM tab0 cor0
----
8084
8554
9118

query I rowsort
SELECT + cor0.col2 - col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - col0 * - col0 + col1 * col0 FROM tab2 AS cor0
----
10686
266
7584

query I rowsort
SELECT ALL + + col0 * 73 AS col2 FROM tab1 AS cor0
----
219
4672
5840

query I rowsort
SELECT ALL + col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col1 - cor0.col2 col1 FROM tab1 AS cor0
----
-106
-122
-77

query I rowsort
SELECT - cor0.col0 + - col2 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + col2 + 18 * + col0 * + cor0.col1 + - col0 FROM tab1 AS cor0
----
11513
1455
18736

onlyif mysql # use DIV operator for integer division
query I rowsort label-6541
SELECT cor0.col1 + col2 DIV col0 + - col0 * + col0 FROM tab0 AS cor0
----
-1128
-489
-7830

skipif mysql # not compatible
query I rowsort label-6541
SELECT cor0.col1 + col2 / col0 + - col0 * + col0 FROM tab0 AS cor0
----
-1128
-489
-7830

query I rowsort
SELECT DISTINCT + col2 + + 73 FROM tab2 AS cor0
----
100
111
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6543
SELECT - col0 + CAST( 72 AS SIGNED ) * col2 AS col2 FROM tab1 AS cor0
----
3885
4040
6832

skipif mysql # not compatible
query I rowsort label-6543
SELECT - col0 + CAST ( 72 AS INTEGER ) * col2 AS col2 FROM tab1 AS cor0
----
3885
4040
6832

query I rowsort
SELECT ALL - tab0.col0 * + col0 * 38 AS col1 FROM tab0
----
-21888
-300998
-46550

onlyif mysql # use DIV operator for integer division
query I rowsort label-6545
SELECT DISTINCT + col1 DIV - col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-6545
SELECT DISTINCT + col1 / - col2 FROM tab1
----
0

query I rowsort
SELECT - + col2 * - 25 + col1 FROM tab1 AS cor0
----
1376
1435
2413

query I rowsort
SELECT ALL - col1 * 55 FROM tab1 AS cor0
----
-1430
-550
-715

query I rowsort
SELECT - col0 * 0 + + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col1 + 65 + 31 * col0 AS col1 FROM tab0 AS cor0
----
1247
2915
895

query I rowsort
SELECT col0 * 67 + + col1 * col0 AS col1 FROM tab2 AS cor0
----
6636
686
9828

query I rowsort
SELECT - - cor0.col2 + - 79 - - col0 FROM tab1 AS cor0
----
-22
42
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6552
SELECT + col0 DIV col0 col2 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6552
SELECT + col0 / col0 col2 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6553
SELECT col1 * + col2 * + col0 + + col2 DIV + CAST( - col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
36475
4210
99833

skipif mysql # not compatible
query I rowsort label-6553
SELECT col1 * + col2 * + col0 + + col2 / + CAST ( - col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
36475
4210
99833

query I rowsort
SELECT DISTINCT + col0 + col1 * + cor0.col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT + - col2 - - 4 AS col0 FROM tab0 AS cor0
----
-29
-78
3

query I rowsort
SELECT + 72 + + col1 FROM tab0
----
158
163
169

query I rowsort
SELECT ALL col0 + cor0.col1 * col2 + + col0 * col0 AS col0 FROM tab2 AS cor0
----
6966
7696
893

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6558
SELECT + CAST( NULL AS SIGNED ) + cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + + 40 + + cor0.col2 FROM tab1 AS cor0
----
136
94
97

query I rowsort
SELECT DISTINCT tab1.col2 + col2 * ( - col1 ) FROM tab1
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-6561
SELECT + - col2 DIV col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-6561
SELECT + - col2 / col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT + col1 + col2 + col0 AS col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT ( cor0.col0 ) * col2 + - col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + 97 * + col0 + - col1 FROM tab1 AS cor0
----
265
6198
7747

query I rowsort
SELECT DISTINCT 58 AS col1 FROM tab2, tab2 cor0
----
58

query I rowsort
SELECT DISTINCT - col1 * + col1 + ( col0 ) + col2 FROM tab1
----
-619
21
7

query I rowsort
SELECT ALL col0 + + ( + 32 ) AS col2 FROM tab2
----
110
111
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 + col1 col1 FROM tab2
----
113
196
69

query I rowsort
SELECT DISTINCT col2 * col0 + - col1 FROM tab2
----
158
1969
2985

query I rowsort
SELECT + col0 + - 69 AS col1 FROM tab0
----
-34
-45
20

query I rowsort
SELECT col1 + ( - tab0.col0 * + col0 ) FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + + col1 + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL + 47 * - col1 FROM tab2 AS cor0
----
-1457
-2773
-799

query I rowsort
SELECT DISTINCT - + ( col0 ) * col0 + + cor0.col1 AS col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - col1 * + col2 + + col2 * cor0.col2 FROM tab2 AS cor0
----
-108
-858
798

query I rowsort
SELECT DISTINCT 75 * + col1 - 88 FROM tab2 AS cor0
----
1187
2237
4337

query I rowsort
SELECT - - ( col1 ) + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL - - 19 * - col0 AS col2 FROM tab0 AS cor0
----
-1691
-456
-665

query I rowsort
SELECT DISTINCT + + col2 * cor0.col0 + col2 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT ALL ( + col2 ) - - 33 AS col0 FROM tab2 AS cor0
----
59
60
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 * - col2 + + col1 col0 FROM tab0 AS cor0
----
-1729
-4419
42

query I rowsort
SELECT DISTINCT 85 + + col2 + col1 FROM tab2 AS cor0
----
140
143
170

query I rowsort
SELECT + 74 - col1 AS col0 FROM tab0
----
-12
-17
-23

query I rowsort
SELECT ALL + - 61 * 26 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 1f8ec03fb1ea74a7402d36bf0ab99c21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6585
SELECT ALL + 55 DIV col0 + 28 col2 FROM tab0 AS cor0
----
28
29
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6585
SELECT ALL + 55 / col0 + 28 col2 FROM tab0 AS cor0
----
28
29
30

query I rowsort
SELECT ALL + + col0 * cor0.col2 + col0 AS col1 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL - 23 + col2 + + col0 FROM tab0 AS cor0
----
13
148
34

query I rowsort
SELECT DISTINCT + + col1 * - col0 + - cor0.col2 * + col0 AS col2 FROM tab1 AS cor0
----
-240
-4288
-8720

query I rowsort
SELECT DISTINCT tab0.col1 + col2 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT - col1 + col2 * - col0 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT ALL + col0 * col1 + col1 AS col0 FROM tab2
----
1360
248
4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col2 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - + col1 * col1 + col1 FROM tab1 cor0
----
-156
-650
-90

query I rowsort
SELECT + - cor0.col0 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col1 * + col0 * tab0.col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT - + col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 - col0 col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL - tab1.col0 + + col0 * col1 AS col0 FROM tab1
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-6599
SELECT DISTINCT ( col1 ) * col0 * + cor0.col0 + cor0.col0 * - cor0.col0 + col0 DIV + col0 FROM tab1 AS cor0
----
226
36865
76801

skipif mysql # not compatible
query I rowsort label-6599
SELECT DISTINCT ( col1 ) * col0 * + cor0.col0 + cor0.col0 * - cor0.col0 + col0 / + col0 FROM tab1 AS cor0
----
226
36865
76801

query I rowsort
SELECT ALL - 52 AS col1 FROM tab0
----
-52
-52
-52

query I rowsort
SELECT ALL - 82 * cor0.col1 FROM tab0 AS cor0
----
-7052
-7462
-7954

query I rowsort
SELECT + + 31 * cor0.col2 FROM tab1 AS cor0
----
1674
1767
2976

query I rowsort
SELECT - + col2 * col2 + + col0 * - cor0.col2 FROM tab2 AS cor0
----
-2704
-4446
-918

onlyif mysql # use DIV operator for integer division
query I rowsort label-6604
SELECT + col0 + col2 DIV col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6604
SELECT + col0 + col2 / col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6605
SELECT + + col2 DIV + col2 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6605
SELECT + + col2 / + col2 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT + cor0.col1 * + col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL ( tab0.col2 ) * + col1 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + cor0.col1 * cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 24458b87d784ecaf9184f99bd12fb51a

query I rowsort
SELECT + tab1.col1 - col0 * - tab1.col0 * + col1 FROM tab1
----
260
40970
83213

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL NOT IN ( tab0.col2 * - tab0.col2 )
----

query I rowsort
SELECT + col0 - + tab1.col1 * col2 AS col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + col1 * tab0.col0 + col0 FROM tab0 WHERE NOT NULL > NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE + col0 NOT BETWEEN NULL AND - col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL col0 FROM tab0 WHERE NOT col2 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT + col0 * - col1 + col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT - col0 FROM tab1 WHERE ( + col1 ) > col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + cor0.col1 * - ( - 63 ) col0 FROM tab0 AS cor0
----
5385
5651
6110

query I rowsort
SELECT DISTINCT col1 * + col2 + col2 AS col1 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT - col1 - col0 AS col1 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT ALL - - col2 + col2 * ( + 57 * col0 ) FROM tab0 AS cor0
----
1996
416068
45177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + tab0.col1 - col0 col0 FROM tab0
----
2814
62
7373

query I rowsort
SELECT - col1 FROM tab1 WHERE NOT ( + col1 * col0 ) < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6623
SELECT ALL - col0 * tab1.col0 + col0 DIV - tab1.col1 AS col0 FROM tab1
----
-4102
-6406
-9

skipif mysql # not compatible
query I rowsort label-6623
SELECT ALL - col0 * tab1.col0 + col0 / - tab1.col1 AS col0 FROM tab1
----
-4102
-6406
-9

query I rowsort
SELECT - col1 * col2 + - col2 + - col2 FROM tab1
----
-1440
-1512
-684

query I rowsort
SELECT DISTINCT col0 FROM tab2 AS cor0 WHERE NULL > + col2
----

query I rowsort
SELECT DISTINCT col0 + col1 FROM tab1 AS cor0 WHERE NOT NULL IN ( col2 + cor0.col2 / col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE col2 BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col0 * + tab0.col2 AS col1 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 * - tab0.col0 col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL col2 * + col2 AS col1 FROM tab2 WHERE col1 * - col0 < ( col2 )
----
1444
676
729

query I rowsort
SELECT ALL + col1 / col0 AS col2 FROM tab2 WHERE NOT + col1 * col0 BETWEEN NULL AND NULL
----

query I rowsort
SELECT tab2.col1 * - col2 * col1 - + col1 FROM tab2
----
-10999
-25978
-90565

query I rowsort
SELECT + tab1.col0 - - col2 * col0 AS col1 FROM tab1
----
165
3712
7760

query I rowsort
SELECT + tab1.col0 FROM tab1 WHERE NOT ( NULL ) >= NULL
----

query I rowsort
SELECT DISTINCT - - col1 + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT 35 * col0 - col2 FROM tab1 AS cor0
----
2183
2704
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6637
SELECT ALL + cor0.col2 + + col1 DIV 28 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6637
SELECT ALL + cor0.col2 + + col1 / 28 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6638
SELECT ALL ( + col2 ) DIV - 14 AS col1 FROM tab0 cor0
----
-2
-5
0

skipif mysql # not compatible
query I rowsort label-6638
SELECT ALL ( + col2 ) / - 14 AS col1 FROM tab0 cor0
----
-2
-5
0

query I rowsort
SELECT DISTINCT + 33 * col0 + - 39 * ( col1 ) + + 40 FROM tab2 AS cor0
----
-938
1984
313

query I rowsort
SELECT ALL ( col0 ) + - ( - col1 ) AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT cor0.col2 + col1 - - 59 FROM tab1 AS cor0
----
126
139
168

query I rowsort
SELECT DISTINCT - col1 + + col1 * 22 AS col0 FROM tab0 AS cor0
----
1806
1911
2037

query I rowsort
SELECT ALL + + col0 * cor0.col0 + - 63 FROM tab0 cor0
----
1162
513
7858

query I rowsort
SELECT - + col1 * + col1 + - 49 AS col1 FROM tab0 AS cor0
----
-7445
-8330
-9458

query I rowsort
SELECT DISTINCT + 62 + - col2 + cor0.col1 FROM tab1 AS cor0
----
-21
15
34

query I rowsort
SELECT DISTINCT + 84 + - col0 AS col2 FROM tab2 AS cor0
----
5
6
77

query I rowsort
SELECT - col1 + - col2 * + col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL - + 85 AS col2 FROM tab0 cor0
----
-85
-85
-85

query I rowsort
SELECT 52 + col0 AS col0 FROM tab0
----
141
76
87

query I rowsort
SELECT 19 * - col0 + + col1 + + ( - tab0.col1 ) FROM tab0
----
-1691
-456
-665

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

query I rowsort
SELECT ( + col1 ) + col1 + col1 AS col2 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT ALL col0 + col0 * - col0 FROM tab0
----
-1190
-552
-7832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6654
SELECT + - col0 / CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6654
SELECT + - col0 / CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + col2 + col0 * + ( + col2 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT + cor0.col0 + - col2 - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-1
-7291
-801

query I rowsort
SELECT ALL + 94 * - col0 + + 63 * col2 AS col0 FROM tab1 AS cor0
----
-1472
-2425
3120

query I rowsort
SELECT DISTINCT + ( - col1 ) * col0 + 44 + + col1 FROM tab2 AS cor0
----
-1282
-142
-4499

query I rowsort
SELECT col2 * 28 - - col1 AS col0 FROM tab0
----
1010
125
2387

onlyif mysql # use DIV operator for integer division
query I rowsort label-6660
SELECT DISTINCT + col0 DIV + col1 - - col0 AS col1 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-6660
SELECT DISTINCT + col0 / + col1 - - col0 AS col1 FROM tab1 AS cor0
----
3
70
86

query I rowsort
SELECT - col0 + + ( + col2 ) * + col2 FROM tab2
----
1365
598
722

query I rowsort
SELECT ALL + 53 - + 68 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 cor2
----
81 values hashing to af17c026b0658d7a3496b8b16be82ec5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6663
SELECT col2 + + CAST( NULL AS SIGNED ) * col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6663
SELECT col2 + + CAST ( NULL AS INTEGER ) * col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 - - tab1.col0 * + col1 FROM tab1
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-6665
SELECT + col2 DIV 27 AS col0 FROM tab0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-6665
SELECT + col2 / 27 AS col0 FROM tab0
----
0
1
3

query I rowsort
SELECT 42 * + col1 FROM tab2
----
1302
2478
714

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6667
SELECT + CAST( - col1 AS SIGNED ) * - col2 + - ( col0 ) * - cor0.col1 FROM tab0 AS cor0
----
15561
3492
4902

skipif mysql # not compatible
query I rowsort label-6667
SELECT + CAST ( - col1 AS INTEGER ) * - col2 + - ( col0 ) * - cor0.col1 FROM tab0 AS cor0
----
15561
3492
4902

query I rowsort
SELECT ALL 13 + + col0 + col0 AS col0 FROM tab0 AS cor0
----
191
61
83

query I rowsort
SELECT ALL + + col0 * - 32 FROM tab1 AS cor0
----
-2048
-2560
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6670
SELECT ALL - CAST( NULL AS SIGNED ) * + tab2.col1 col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6670
SELECT ALL - CAST ( NULL AS INTEGER ) * + tab2.col1 col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 0 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT - col0 * + col1 + + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - + col2 + + ( col2 ) * ( 37 ) AS col0 FROM tab0 AS cor0
----
1188
2952
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6674
SELECT ALL + CAST( NULL AS SIGNED ) - 32 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6674
SELECT ALL + CAST ( NULL AS INTEGER ) - 32 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6675
SELECT DISTINCT + CAST( - 26 AS SIGNED ) AS col2 FROM tab0 cor0
----
-26

skipif mysql # not compatible
query I rowsort label-6675
SELECT DISTINCT + CAST ( - 26 AS INTEGER ) AS col2 FROM tab0 cor0
----
-26

query I rowsort
SELECT 7 * 54 AS col2 FROM tab0 AS cor0
----
378
378
378

onlyif mysql # use DIV operator for integer division
query I rowsort label-6677
SELECT ALL - 81 DIV cor0.col0 + ( + col2 ) * - col1 FROM tab2 AS cor0
----
-1535
-647
-848

skipif mysql # not compatible
query I rowsort label-6677
SELECT ALL - 81 / cor0.col0 + ( + col2 ) * - col1 FROM tab2 AS cor0
----
-1535
-647
-848

query I rowsort
SELECT ALL + 19 AS col0 FROM tab0 cor0
----
19
19
19

query I rowsort
SELECT ALL + + col0 + + cor0.col1 * + col1 FROM tab0 AS cor0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * + col2 + - col2 col0 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT col1 * - 45 AS col0 FROM tab2
----
-1395
-2655
-765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * col2 * + col0 + col2 col2 FROM tab1 AS cor0
----
-233415
-432
-614304

query I rowsort
SELECT - - col2 * 97 + + 87 FROM tab2 AS cor0
----
2609
2706
3773

query I rowsort
SELECT DISTINCT col1 + + col2 * col0 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + col0 + cor0.col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-6686
SELECT + col2 DIV - 89 col2 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6686
SELECT + col2 / - 89 col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - - col1 * ( col1 + + col0 ) FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT - 55 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to b90e74bece5521b514096c5b6e105fde

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 12 * col2 col0 FROM tab2 AS cor0
----
-2268
-24336
-36024

onlyif mysql # use DIV operator for integer division
query I rowsort label-6690
SELECT DISTINCT + - col1 DIV + cor0.col1 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6690
SELECT DISTINCT + - col1 / + cor0.col1 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT ALL + + col0 * 86 FROM tab1 cor0
----
258
5504
6880

query I rowsort
SELECT DISTINCT + - col0 * - 72 FROM tab2 AS cor0
----
504
5616
5688

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6693
SELECT ALL CAST( NULL AS SIGNED ) * + 86 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6693
SELECT ALL CAST ( NULL AS INTEGER ) * + 86 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6694
SELECT 87 DIV 45 AS col2 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6694
SELECT 87 / 45 AS col2 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - + 58 FROM tab2 cor0
----
-58

query I rowsort
SELECT 50 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT - 48 * 0 - + cor0.col2 * - 80 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 79f72d04a7ecce7d7d83e3c6954a7413

query I rowsort
SELECT ALL col1 * - ( - ( col0 ) * tab0.col2 ) AS col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT 55 FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT + 43 + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 4f6754358707c7fc95ce3272305c285b

query I rowsort
SELECT ALL + col1 * col2 * col0 AS col2 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6702
SELECT + col0 DIV + 5 AS col2 FROM tab1
----
0
12
16

skipif mysql # not compatible
query I rowsort label-6702
SELECT + col0 / + 5 AS col2 FROM tab1
----
0
12
16

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 AS cor1, tab2, tab1 cor2
----
3645 values hashing to ae08f1949fd59e00b049f28175217e60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6704
SELECT ALL col1 DIV col2 AS col1 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6704
SELECT ALL col1 / col2 AS col1 FROM tab0
----
1
2
97

query I rowsort
SELECT - - cor0.col1 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + 96 AS col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT DISTINCT - tab2.col2 * - tab2.col1 AS col1 FROM tab2, tab1 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT ( - 83 ) * col2 + + col0 * col1 - col0 FROM tab1 AS cor0
----
-4155
-4407
-7008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6709
SELECT + CAST( 79 AS SIGNED ) + col1 AS col1 FROM tab2 AS cor0
----
110
138
96

skipif mysql # not compatible
query I rowsort label-6709
SELECT + CAST ( 79 AS INTEGER ) + col1 AS col1 FROM tab2 AS cor0
----
110
138
96

query I rowsort
SELECT + 72 * + col1 * + tab2.col2 FROM tab2
----
110448
46512
60264

query I rowsort
SELECT ALL - col2 - - col1 AS col0 FROM tab0 cor0
----
53
9
96

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

query I rowsort
SELECT + ( col1 ) + + ( col2 + - col1 ) * 63 FROM tab2 AS cor0
----
-2020
-221
1340

query I rowsort
SELECT + 4 + col0 * + col2 FROM tab0 AS cor0
----
39
7302
796

query I rowsort
SELECT + col2 * tab2.col0 + - tab2.col2 AS col0 FROM tab2
----
162
2002
2964

query I rowsort
SELECT DISTINCT + col1 + - col1 * + 81 AS col0 FROM tab1
----
-1040
-2080
-800

query I rowsort
SELECT DISTINCT col2 * col2 + 47 + + col0 FROM tab1
----
2966
3360
9343

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 col0 FROM tab0
----
62
62
62

query I rowsort
SELECT - col0 - - col2 * - ( + col0 ) FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT col2 * - 60 FROM tab0 AS cor0
----
-1980
-4920
-60

query I rowsort
SELECT col2 * ( - col0 ) AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6722
SELECT DISTINCT col2 DIV col0 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-1343
-214
-4602

skipif mysql # not compatible
query I rowsort label-6722
SELECT DISTINCT col2 / col0 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-1343
-214
-4602

query I rowsort
SELECT ALL - - cor0.col2 * - col1 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - cor0.col1 + col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL - col2 * + ( + 12 + + cor0.col0 ) FROM tab0 AS cor0
----
-1188
-47
-8282

query I rowsort
SELECT ALL - - col1 * - col1 - col1 FROM tab0 cor0
----
-7482
-8372
-9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6727
SELECT ALL col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-6728
SELECT DISTINCT + - col0 DIV col0 + - 46 FROM tab0 AS cor0
----
-47

skipif mysql # not compatible
query I rowsort label-6728
SELECT DISTINCT + - col0 / col0 + - 46 FROM tab0 AS cor0
----
-47

query I rowsort
SELECT ALL + col0 - 82 * 95 FROM tab0 cor0
----
-7701
-7755
-7766

query I rowsort
SELECT col0 + cor0.col2 + - col1 AS col1 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT - ( + 84 ) + col1 + ( + 0 * - col1 ) AS col0 FROM tab0 AS cor0
----
13
2
7

query I rowsort
SELECT + col2 * - col1 + col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6733
SELECT ALL + CAST( col2 AS SIGNED ) col0 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6733
SELECT ALL + CAST ( col2 AS INTEGER ) col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT 19 * 98 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-13034
-145236
-147098

query I rowsort
SELECT DISTINCT + + 69 + - 1 AS col1 FROM tab1 cor0
----
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6736
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6736
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - - col2 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col1 + - 0 + col0 * + col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT - col1 - - ( col0 ) FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ( ( + col1 ) ) + col2 + col1 AS col1 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT + ( - cor0.col2 ) + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT col0 * - col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 53 + - col1 FROM tab1 AS cor0
----
27
40
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-6744
SELECT ALL - - col0 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6744
SELECT ALL - - col0 / col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6745
SELECT DISTINCT - + col1 DIV cor0.col1 FROM tab1 AS cor0
----
-1

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

query I rowsort
SELECT ALL + - col1 * ( col1 ) AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6747
SELECT DISTINCT + + col0 * + CAST( - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-6747
SELECT DISTINCT + + col0 * + CAST ( - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col1 * 92 AS col0 FROM tab1 AS cor0
----
-1196
-2392
-920

query I rowsort
SELECT DISTINCT - col1 * 50 + + 57 * + col0 * 18 FROM tab1 AS cor0
----
1778
65164
81430

query I rowsort
SELECT ALL + col2 * + col0 + col1 * cor0.col2 AS col2 FROM tab1 cor0
----
1566
4218
8928

query I rowsort
SELECT - - col1 * 62 * - col1 FROM tab0 AS cor0
----
-458552
-513422
-583358

query I rowsort
SELECT DISTINCT col0 + ( col0 ) AS col2 FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * cor0.col1 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col1 * + cor0.col2 * 48 FROM tab1 AS cor0
----
-27360
-59904
-67392

onlyif mysql # use DIV operator for integer division
query I rowsort label-6755
SELECT DISTINCT - - col0 DIV - col2 FROM tab1 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6755
SELECT DISTINCT - - col0 / - col2 FROM tab1 cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6756
SELECT col0 DIV col2 AS col0 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6756
SELECT col0 / col2 AS col0 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT ALL - cor0.col2 * - col1 + col0 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT DISTINCT col0 - col2 AS col1 FROM tab1 cor0
----
-16
-51
7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2, tab0 cor3
----
3645 values hashing to 625894990bdb8a9e41da1ea8f0cabaa3

query I rowsort
SELECT - ( - 90 ) + + col0 + col0 * 8 FROM tab2 AS cor0
----
153
792
801

query I rowsort
SELECT - ( col2 ) + - col0 + cor0.col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + 35 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT - col1 + - 98 * - col2 AS col0 FROM tab2
----
2489
2615
3707

query I rowsort
SELECT DISTINCT col0 - ( - col2 ) AS col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT 70 FROM tab2, tab2 cor0
----
70

query I rowsort
SELECT + col0 + col0 * cor0.col1 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - + 93 AS col1 FROM tab0 AS cor0
----
-93
-93
-93

query I rowsort
SELECT ALL + 78 + + col2 FROM tab0 AS cor0
----
111
160
79

query I rowsort
SELECT ALL - col1 + col0 * col0 - - 50 AS col1 FROM tab1 AS cor0
----
33
4136
6437

query I rowsort
SELECT ALL col2 + - col1 * ( - ( col0 ) ) FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
17
31
59

query I rowsort
SELECT ALL 83 * col0 FROM tab0
----
1992
2905
7387

query I rowsort
SELECT - col1 + - 5 * 76 * + cor0.col2 FROM tab0 AS cor0
----
-12626
-31251
-477

query I rowsort
SELECT ALL + 27 AS col1 FROM tab0
----
27
27
27

query I rowsort
SELECT + 8 - + col2 AS col1 FROM tab1
----
-46
-49
-88

query I rowsort
SELECT ALL + 70 * col2 FROM tab2
----
1820
1890
2660

query I rowsort
SELECT tab2.col0 + + col0 * + col1 FROM tab2
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6778
SELECT ALL col2 DIV + col2 col1 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6778
SELECT ALL col2 / + col2 col1 FROM tab0
----
1
1
1

query I rowsort
SELECT + - col0 * - ( - col2 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + + col2 * 17 AS col2 FROM tab2 AS cor0
----
442
459
646

onlyif mysql # use DIV operator for integer division
query I rowsort label-6781
SELECT ALL col0 + + col0 DIV - col0 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-6781
SELECT ALL col0 + + col0 / - col0 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT DISTINCT + col0 * ( 41 ) FROM tab0 AS cor0
----
1435
3649
984

query I rowsort
SELECT DISTINCT - col0 * 90 + col0 * + col2 AS col0 FROM tab0
----
-1368
-3115
-712

query I rowsort
SELECT - ( ( col0 ) * + col0 ) + col0 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT DISTINCT 43 + col2 AS col0 FROM tab0
----
125
44
76

query I rowsort
SELECT DISTINCT - 9 FROM tab1, tab2 cor0
----
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6787
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + 41 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6787
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + 41 FROM tab0
----
NULL

query I rowsort
SELECT ALL 35 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
3115
840

query I rowsort
SELECT ALL - + 30 AS col1 FROM tab2 AS cor0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT col1 + - col2 AS col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + + col2 + - cor0.col0 * col0 AS col1 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT ( col0 ) + + tab1.col1 * 42 AS col1 FROM tab1
----
1095
484
626

query I rowsort
SELECT - col2 + col1 * - 44 FROM tab1 AS cor0
----
-1198
-497
-668

query I rowsort
SELECT ( + col1 + tab2.col1 ) AS col2 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT - cor1.col0 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT ALL - col0 * - col1 + col2 * col1 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT ALL col0 + cor0.col1 * - col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - 11 + cor0.col2 * + ( + cor0.col1 + + cor0.col0 * + col2 ) AS col2 FROM tab0 AS cor0
----
121
28963
605887

query I rowsort
SELECT DISTINCT + 14 * cor0.col0 AS col0 FROM tab2 AS cor0
----
1092
1106
98

query I rowsort
SELECT cor0.col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - - 1 * col2 * col0 + col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + col0 + - col1 + 11 AS col1 FROM tab0 AS cor0
----
-51
-51
9

query I rowsort
SELECT + 2 * 8 + cor0.col1 * col0 AS col1 FROM tab0 AS cor0
----
2080
3411
8115

query I rowsort
SELECT + 34 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT ALL - - 10 * col2 + cor0.col0 FROM tab1 AS cor0
----
1040
543
634

query I rowsort
SELECT DISTINCT 34 * - col2 FROM tab2
----
-1292
-884
-918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( ( - col0 ) ) col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT cor0.col0 + cor0.col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - - col0 + 27 FROM tab1 AS cor0
----
107
30
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * + col2 - ( + col2 ) col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT - col0 * - col1 + - 79 AS col1 FROM tab1
----
-1
561
961

query I rowsort
SELECT 83 * + col0 + 30 + col0 AS col2 FROM tab2
----
618
6582
6666

query I rowsort
SELECT DISTINCT col0 * - col2 + 68 AS col2 FROM tab2
----
-121
-1960
-2934

query I rowsort
SELECT ALL - 68 FROM tab0, tab1 AS cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

query I rowsort
SELECT col1 * col2 * - col0 + cor0.col2 FROM tab0 AS cor0
----
-3394
-664036
-68079

onlyif mysql # use DIV operator for integer division
query I rowsort label-6817
SELECT col1 DIV + ( col2 ) + - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6817
SELECT col1 / + ( col2 ) + - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT col0 + + 96 AS col2 FROM tab0 AS cor0
----
120
131
185

onlyif mysql # use DIV operator for integer division
query I rowsort label-6819
SELECT ALL + col0 DIV ( - 63 + + col1 ) AS col2 FROM tab0
----
1
1
3

skipif mysql # not compatible
query I rowsort label-6819
SELECT ALL + col0 / ( - 63 + + col1 ) AS col2 FROM tab0
----
1
1
3

query I rowsort
SELECT - cor0.col2 + + 9 * col0 AS col1 FROM tab1 AS cor0
----
-27
519
624

query I rowsort
SELECT ALL - col0 * - col0 * col2 FROM tab0 AS cor0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col1 * col0 col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT - + ( cor0.col1 ) + + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL col1 * - cor0.col1 - col1 AS col1 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ALL - col0 * 85 FROM tab2
----
-595
-6630
-6715

query I rowsort
SELECT ALL + tab0.col1 * 5 FROM tab0
----
430
455
485

query I rowsort
SELECT col2 * - tab0.col1 + + col0 AS col1 FROM tab0
----
-2814
-62
-7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6828
SELECT col2 + + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6828
SELECT col2 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6829
SELECT + CAST( - col1 AS SIGNED ) * + col1 * + 39 AS col2 FROM tab0 AS cor0
----
-288444
-322959
-366951

skipif mysql # not compatible
query I rowsort label-6829
SELECT + CAST ( - col1 AS INTEGER ) * + col1 * + 39 AS col2 FROM tab0 AS cor0
----
-288444
-322959
-366951

query I rowsort
SELECT + 63 + col0 FROM tab2 AS cor0
----
141
142
70

query I rowsort
SELECT DISTINCT + - 7 + col0 * - col1 + + cor0.col2 * col2 FROM tab0 cor0
----
-1382
-3401
-982

query I rowsort
SELECT DISTINCT 89 - + col2 * - col1 AS col0 FROM tab0 AS cor0
----
186
2927
7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6833
SELECT ALL + CAST( NULL AS SIGNED ) + + 35 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6833
SELECT ALL + CAST ( NULL AS INTEGER ) + + 35 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 * col1 + + col0 AS col2 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT DISTINCT + ( + col2 ) * + col2 + 72 FROM tab2 AS cor0
----
1516
748
801

onlyif mysql # use DIV operator for integer division
query I rowsort label-6836
SELECT - 25 + col2 DIV - col2 AS col1 FROM tab1 AS cor0
----
-26
-26
-26

skipif mysql # not compatible
query I rowsort label-6836
SELECT - 25 + col2 / - col2 AS col1 FROM tab1 AS cor0
----
-26
-26
-26

query I rowsort
SELECT DISTINCT + col2 * col0 + - col2 * + col1 FROM tab0 cor0
----
-164
-2046
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 83 * 69 col0 FROM tab1 AS cor0
----
5727
5727
5727

query I rowsort
SELECT 48 + - col1 AS col2 FROM tab0 AS cor0
----
-38
-43
-49

query I rowsort
SELECT DISTINCT - col0 * ( cor0.col1 ) + - col1 AS col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL ( cor0.col2 ) * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL col2 * ( col1 * col0 ) FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT 99 - + col1 * + 64 AS col1 FROM tab2
----
-1885
-3677
-989

query I rowsort
SELECT 43 + col0 * - col1 FROM tab2 cor0
----
-1300
-174
-4559

query I rowsort
SELECT + col1 * + 18 + col2 AS col2 FROM tab0 AS cor0
----
1581
1720
1747

query I rowsort
SELECT - col0 + - ( + 98 ) FROM tab0 AS cor0
----
-122
-133
-187

query I rowsort
SELECT ALL - col0 * - col0 + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT + - col1 + + col0 * col1 AS col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT col0 * - col0 + col0 * + col0 + + col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6850
SELECT + 92 DIV + cor0.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 730b8a577fdba3362d4d98f720c132c4

skipif mysql # not compatible
query I rowsort label-6850
SELECT + 92 / + cor0.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 730b8a577fdba3362d4d98f720c132c4

query I rowsort
SELECT ALL + col1 + ( 63 ) FROM tab2 AS cor0
----
122
80
94

query I rowsort
SELECT DISTINCT - cor0.col0 + - 69 * 39 FROM tab2 AS cor0
----
-2698
-2769
-2770

query I rowsort
SELECT ALL ( - tab1.col2 ) * - col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - - col1 * col0 - - cor0.col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - col0 + col0 * col2 AS col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT - cor0.col2 * - ( - ( col1 ) ) + cor0.col0 * - col0 + col2 AS col2 FROM tab1 AS cor0
----
-1359
-4609
-7552

onlyif mysql # use DIV operator for integer division
query I rowsort label-6857
SELECT tab0.col1 DIV + 55 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-6857
SELECT tab0.col1 / + 55 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 68 col1 FROM tab2, tab1 AS cor0
----
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-6859
SELECT DISTINCT - - col0 + + col0 DIV col0 AS col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-6859
SELECT DISTINCT - - col0 + + col0 / col0 AS col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT ALL + col1 + + ( col0 ) * - col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + - col2 * - col2 + cor0.col2 FROM tab0 cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6862
SELECT ALL + col0 DIV - col1 AS col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-6862
SELECT ALL + col0 / - col1 AS col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL + - col2 + + 36 FROM tab1 AS cor0
----
-18
-21
-60

query I rowsort
SELECT ALL + col2 * - col0 + cor0.col2 * col1 FROM tab0 AS cor0
----
164
2046
62

query I rowsort
SELECT DISTINCT - - col0 * cor0.col1 * ( col0 ) FROM tab2 AS cor0
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 * + tab2.col0 col1 FROM tab2
----
1422
224
4680

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( col2 + + col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 * col1 col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL col0 - + tab1.col2 * + col0 AS col0 FROM tab1
----
-159
-3584
-7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 * + col1 + col0 * + col2 col1 FROM tab2
----
-117624
-48032
-5670

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 * - col2 col1 FROM tab1
----
-2862
-3192
-9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col0 * + col0 col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT ALL tab1.col0 - + col2 AS col1 FROM tab1
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 + col1 col2 FROM tab0
----
119
173
98

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( tab1.col0 * col2 ) <> ( + col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT * FROM tab0 WHERE NOT ( + col1 ) NOT IN ( tab0.col1 + col2 )
----

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0, tab0 cor1, tab1 cor2
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT - col1 * - col2 * + 35 AS col2 FROM tab2 AS cor0
----
22610
29295
53690

query I rowsort
SELECT DISTINCT + col0 - - col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT 94 + col2 * ( + col0 ) FROM tab0 AS cor0
----
129
7392
886

query I rowsort
SELECT ALL col1 + col0 * col1 + col2 FROM tab0
----
2183
3493
8272

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( + col1 * + tab0.col0 + col1 )
----

query I rowsort
SELECT col0 * - tab1.col2 * col0 + col0 FROM tab1
----
-233408
-483
-614320

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col1 + col0 > col1
----

query I rowsort
SELECT - col0 + col2 + tab0.col2 * col0 AS col1 FROM tab0
----
1
7291
801

query I rowsort
SELECT DISTINCT col2 * + col2 FROM tab0 WHERE NULL = ( - col1 - - col0 / col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col0 + col0 IN ( + col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col2 + tab1.col0 + tab1.col2 AS col2 FROM tab1
----
111
178
272

query I rowsort
SELECT ALL + + col1 * - col2 * ( col0 + col1 ) AS col1 FROM tab1 AS cor0
----
-116064
-40716
-42180

query I rowsort
SELECT col1 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-21
33
4

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6892
SELECT col2 * + cor0.col0 + - CAST( - 96 AS SIGNED ) FROM tab2 AS cor0
----
2124
285
3098

skipif mysql # not compatible
query I rowsort label-6892
SELECT col2 * + cor0.col0 + - CAST ( - 96 AS INTEGER ) FROM tab2 AS cor0
----
2124
285
3098

query I rowsort
SELECT DISTINCT - 86 + + col2 FROM tab2 cor0
----
-48
-59
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6894
SELECT - col0 + col2 DIV + 91 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-6894
SELECT - col0 + col2 / + 91 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + 27 * - 14 + + col0 FROM tab0
----
-289
-343
-354

onlyif mysql # use DIV operator for integer division
query I rowsort label-6896
SELECT - - col0 + cor0.col2 DIV col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6896
SELECT - - col0 + cor0.col2 / col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT - + col0 * - col1 + ( col2 + col2 ) * col0 FROM tab2 AS cor0
----
595
7347
8658

onlyif mysql # use DIV operator for integer division
query I rowsort label-6898
SELECT - + col2 + - col1 DIV col2 FROM tab0 AS cor0
----
-35
-83
-98

skipif mysql # not compatible
query I rowsort label-6898
SELECT - + col2 + - col1 / col2 FROM tab0 AS cor0
----
-35
-83
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6899
SELECT + + col2 * CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL + 99 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT + ( col2 * + col1 ) AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT - 93 * 36 * cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f073548b9b4fb2987a1ec1d07f5ae39f

query I rowsort
SELECT DISTINCT + 13 * col0 FROM tab1
----
1040
39
832

query I rowsort
SELECT + ( cor0.col1 ) * - 68 FROM tab1, tab2 AS cor0
----
9 values hashing to 2fdd4cfb0b35b796e309f1b4c404bbf1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6905
SELECT - cor0.col0 DIV - cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-6905
SELECT - cor0.col0 / - cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
3
70
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 75 - col2 col0 FROM tab0 AS cor0
----
-6483
-6907
-7276

query I rowsort
SELECT + tab2.col0 + - 80 FROM tab2
----
-1
-2
-73

query I rowsort
SELECT ALL cor0.col0 - 18 FROM tab2 cor0 CROSS JOIN tab1, tab2 cor1
----
27 values hashing to f0f32a750e7fc9dfd0d35bd4a47c7c49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6909
SELECT ALL CAST( NULL AS SIGNED ) / col1 + col0 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6909
SELECT ALL CAST ( NULL AS INTEGER ) / col1 + col0 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6910
SELECT col1 * col1 DIV col1 AS col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6910
SELECT col1 * col1 / col1 AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT 40 * 31 + col1 * + 33 AS col2 FROM tab2
----
1801
2263
3187

query I rowsort
SELECT ALL 42 + col2 * - col2 * - 48 AS col0 FROM tab0 cor0
----
322794
52314
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6913
SELECT CAST( + cor0.col2 AS SIGNED ) + - col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-6913
SELECT CAST ( + cor0.col2 AS INTEGER ) + - col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + col1 * 17 AS col2 FROM tab1 AS cor0
----
170
221
442

query I rowsort
SELECT 28 * - col2 * col0 AS col2 FROM tab0
----
-204344
-22176
-980

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 - col2 col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT + cor1.col1 + - cor1.col2 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6918
SELECT ALL 42 DIV + col0 - - col0 * col1 AS col1 FROM tab2
----
1343
223
4602

skipif mysql # not compatible
query I rowsort label-6918
SELECT ALL 42 / + col0 - - col0 * col1 AS col1 FROM tab2
----
1343
223
4602

query I rowsort
SELECT + - cor0.col0 + - col2 FROM tab0 cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6920
SELECT + - col1 DIV - cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6920
SELECT + - col1 / - cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL ( - col0 ) * + col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - ( + col0 ) * cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + - col1 + - cor0.col1 * col2 AS col0 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT - + 36 * + col2 * col2 - col0 * + col1 AS col2 FROM tab2 AS cor0
----
-26461
-28938
-53327

query I rowsort
SELECT ALL - ( - cor0.col1 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col1 * - cor0.col2 + - col0 + col1 * col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - + 48 * col2 FROM tab0 AS cor0
----
-1584
-3936
-48

query I rowsort
SELECT - + col0 * - col0 + - col0 + - col1 * col2 FROM tab2 AS cor0
----
-795
4472
5516

query I rowsort
SELECT + + col2 * col1 + col1 + - col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ( - col0 ) * - col1 * tab0.col1 AS col0 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT col0 + - tab2.col0 AS col0 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6932
SELECT ( - col2 ) DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6932
SELECT ( - col2 ) / - col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col2 ) * + col1 col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT col1 * col0 FROM tab0 AS cor0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT ALL cor0.col1 * - cor0.col2 * - col2 + col1 * col0 * cor0.col2 FROM tab0 AS cor0
----
1276002
161766
3492

query I rowsort
SELECT ALL tab1.col1 * tab1.col1 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT - col2 + col2 AS col2 FROM tab2 WHERE ( + col0 + + col1 ) IN ( tab2.col2 * col0 + + col1 * + col1 )
----

query I rowsort
SELECT DISTINCT + col2 + col1 + + col1 AS col0 FROM tab2 WHERE NULL IN ( - col0 * col1 * - col1 )
----

query I rowsort
SELECT - col1 * - tab1.col1 - + col2 AS col0 FROM tab1
----
43
622
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6940
SELECT col1 * col1 DIV col2 FROM tab0
----
100
224
9409

skipif mysql # not compatible
query I rowsort label-6940
SELECT col1 * col1 / col2 FROM tab0
----
100
224
9409

query I rowsort
SELECT DISTINCT - col1 + + col2 - col0 FROM tab2
----
-11
-111
-58

query I rowsort
SELECT ALL + col2 + - col0 - tab1.col2 * - col0 FROM tab1
----
213
3641
7696

query I rowsort
SELECT + col1 * col1 * - tab2.col1 FROM tab2
----
-205379
-29791
-4913

onlyif mysql # use DIV operator for integer division
query I rowsort label-6944
SELECT ALL col1 DIV - tab0.col2 AS col1 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6944
SELECT ALL col1 / - tab0.col2 AS col1 FROM tab0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - - col0 * - col1 col0 FROM tab0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-6946
SELECT col2 DIV col0 + - col0 AS col2 FROM tab1
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-6946
SELECT col2 / col0 + - col0 AS col2 FROM tab1
----
-64
-79
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col0 col0 FROM tab2 WHERE ( NULL ) <> ( NULL )
----

query I rowsort
SELECT + tab2.col2 * col1 * col2 AS col0 FROM tab2
----
22599
24548
39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6949
SELECT tab1.col2 + col1 DIV + col0 col0 FROM tab1
----
57
62
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6949
SELECT tab1.col2 + col1 / + col0 col0 FROM tab1
----
57
62
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6950
SELECT DISTINCT col1 DIV + tab2.col0 FROM tab2
----
0
4

skipif mysql # not compatible
query I rowsort label-6950
SELECT DISTINCT col1 / + tab2.col0 FROM tab2
----
0
4

query I rowsort
SELECT col0 + col2 + + col1 FROM tab0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-6952
SELECT DISTINCT col2 + col2 * col2 DIV + col0 FROM tab0 AS cor0
----
1
157
78

skipif mysql # not compatible
query I rowsort label-6952
SELECT DISTINCT col2 + col2 * col2 / + col0 FROM tab0 AS cor0
----
1
157
78

query I rowsort
SELECT DISTINCT - tab1.col2 * + col1 AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + col0 + + col0 * + col1 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT ALL col1 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-6956
SELECT DISTINCT + tab2.col0 DIV + col1 + + col0 FROM tab2
----
7
79
83

skipif mysql # not compatible
query I rowsort label-6956
SELECT DISTINCT + tab2.col0 / + col1 + + col0 FROM tab2
----
7
79
83

query I rowsort
SELECT col0 * col1 - col0 FROM tab1
----
576
75
960

query I rowsort
SELECT ALL col2 + - col1 * tab0.col0 * col1 AS col2 FROM tab0
----
-177471
-329314
-736927

query I rowsort
SELECT DISTINCT + col2 * - col2 + col1 AS col1 FROM tab2
----
-1427
-617
-698

query I rowsort
SELECT col1 * col2 + col0 * col1 AS col1 FROM tab1
----
1210
1482
2288

query I rowsort
SELECT col2 * col2 * tab2.col1 AS col1 FROM tab2
----
22599
24548
39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6962
SELECT - col2 * + cor0.col0 DIV col0 AS col1 FROM tab1 cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6962
SELECT - col2 * + cor0.col0 / col0 AS col1 FROM tab1 cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * + col1 * col2 col2 FROM tab2 AS cor0
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * + col0 col0 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6965
SELECT - cor0.col1 DIV - col0 AS col2 FROM tab1 cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6965
SELECT - cor0.col1 / - col0 AS col2 FROM tab1 cor0
----
0
0
8

query I rowsort
SELECT cor0.col1 + - col0 * - col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + col1 + ( - col0 * col2 ) FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL col2 - 92 FROM tab1 AS cor0
----
-35
-38
4

query I rowsort
SELECT DISTINCT - col0 * + col2 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + + 38 - col2 AS col0 FROM tab1 AS cor0
----
-16
-19
-58

query I rowsort
SELECT 72 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

query I rowsort
SELECT col1 + 48 * col2 + - col2 AS col2 FROM tab1
----
2564
2689
4525

query I rowsort
SELECT tab0.col1 * 97 FROM tab0
----
8342
8827
9409

query I rowsort
SELECT DISTINCT col1 * + col0 * + col0 + - col2 FROM tab2
----
106059
1492
358930

query I rowsort
SELECT + col1 + - ( col2 ) AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT tab2.col0 * + col0 * - ( col2 ) + col2 AS col0 FROM tab2
----
-1296
-158158
-237120

query I rowsort
SELECT DISTINCT + col2 + + 97 FROM tab1
----
151
154
193

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 CROSS JOIN tab2, tab1 cor1, tab0 AS cor2
----
3645 values hashing to 9d746e15fdb5adcb43a7518cd9743eb3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6980
SELECT CAST( + 5 AS SIGNED ) * + col0 + + 66 FROM tab0
----
186
241
511

skipif mysql # not compatible
query I rowsort label-6980
SELECT CAST ( + 5 AS INTEGER ) * + col0 + + 66 FROM tab0
----
186
241
511

query I rowsort
SELECT ALL + col1 * 9 AS col2 FROM tab1 AS cor0
----
117
234
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6982
SELECT cor0.col1 DIV 7 + - col1 FROM tab1 AS cor0
----
-12
-23
-9

skipif mysql # not compatible
query I rowsort label-6982
SELECT cor0.col1 / 7 + - col1 FROM tab1 AS cor0
----
-12
-23
-9

query I rowsort
SELECT DISTINCT - ( + col1 ) * col0 * - col0 + - 35 + col2 AS col1 FROM tab1 AS cor0
----
253
40982
83261

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6984
SELECT ALL + CAST( NULL AS SIGNED ) + + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6984
SELECT ALL + CAST ( NULL AS INTEGER ) + + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 * 35 AS col0 FROM tab2 AS cor0
----
-245
-2730
-2765

query I rowsort
SELECT ALL - 35 * + col1 FROM tab2 AS cor0
----
-1085
-2065
-595

query I rowsort
SELECT ALL + 37 AS col1 FROM tab1 AS cor0
----
37
37
37

query I rowsort
SELECT - col0 * + col2 - col1 * - col1 AS col2 FROM tab0
----
6604
9374
983

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col1 ) col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col0 * + cor0.col0 + + 40 AS col2 FROM tab0 AS cor0
----
1265
616
7961

query I rowsort
SELECT DISTINCT - ( col0 * + col1 ) + - col2 * col0 AS col0 FROM tab2
----
-406
-4345
-6630

onlyif mysql # use DIV operator for integer division
query I rowsort label-6992
SELECT ALL - col0 * col1 DIV 90 + + 44 * - col0 AS col2 FROM tab0
----
-1078
-1577
-4005

skipif mysql # not compatible
query I rowsort label-6992
SELECT ALL - col0 * col1 / 90 + + 44 * - col0 AS col2 FROM tab0
----
-1078
-1577
-4005

onlyif mysql # use DIV operator for integer division
query I rowsort label-6993
SELECT ALL - 42 DIV col2 + col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-6993
SELECT ALL - 42 / col2 + col0 FROM tab1
----
3
64
80

query I rowsort
SELECT - cor0.col2 + - 74 FROM tab0 AS cor0
----
-107
-156
-75

query I rowsort
SELECT ALL - col2 + ( - col0 ) * col2 AS col1 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT + + cor0.col1 * 88 AS col0 FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT ALL + col1 * + 98 * - col0 + col1 * + col2 FROM tab0
----
-199434
-332613
-786240

query I rowsort
SELECT ALL tab1.col2 + + ( + 32 ) * - col1 AS col0 FROM tab1
----
-263
-320
-778

query I rowsort
SELECT ALL + col1 + 77 * col1 + col0 * col1 * col2 AS col0 FROM tab1 AS cor0
----
100854
37260
6240

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7000
SELECT - + col2 + CAST( NULL AS DECIMAL ) * - col2 / col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7000
SELECT - + col2 + CAST ( NULL AS REAL ) * - col2 / col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7001
SELECT DISTINCT + col2 DIV + 1 + col1 FROM tab0 cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-7001
SELECT DISTINCT + col2 / + 1 + col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT cor0.col2 * - col1 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 - 59 * - cor0.col1 col0 FROM tab2 AS cor0
----
1082
1836
3559

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * ( col0 ) col1 FROM tab0
----
1225
576
7921

query I rowsort
SELECT - col0 * + 69 FROM tab1
----
-207
-4416
-5520

query I rowsort
SELECT DISTINCT + col2 + + 53 FROM tab0 AS cor0
----
135
54
86

query I rowsort
SELECT ALL - cor0.col1 - 66 FROM tab1 AS cor0
----
-76
-79
-92

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - col0 * 25 - + cor0.col1 * - col2 AS col0 FROM tab0 AS cor0
----
-778
2238
5237

query I rowsort
SELECT DISTINCT - col1 + 13 * cor0.col1 * + col0 AS col2 FROM tab2 AS cor0
----
17442
2790
59767

query I rowsort
SELECT ALL - col2 * - col0 + cor0.col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL + col1 - col1 * cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
-10965
-25916
-90447

query I rowsort
SELECT ALL - col2 + 69 FROM tab1 AS cor0
----
-27
12
15

query I rowsort
SELECT DISTINCT + col0 + - 16 FROM tab1 AS cor0
----
-13
48
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7015
SELECT DISTINCT + cor0.col0 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7015
SELECT DISTINCT + cor0.col0 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + - col0 * + cor0.col1 - col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL + col0 * 35 AS col1 FROM tab2 AS cor0
----
245
2730
2765

query I rowsort
SELECT - ( col1 ) * + col0 + ( 51 ) FROM tab0 AS cor0
----
-2013
-3344
-8048

query I rowsort
SELECT DISTINCT + cor0.col2 + 31 + col2 FROM tab2 AS cor0
----
107
83
85

query I rowsort
SELECT + col1 + 30 * cor0.col2 FROM tab2 AS cor0
----
1157
839
841

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

query I rowsort
SELECT - col0 + + col1 * 42 FROM tab1 cor0
----
1089
356
466

query I rowsort
SELECT ALL - + ( - col2 ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab2, tab2 cor2
----
3645 values hashing to f1fc3f16747aca82b54b2b759d1f5ea2

query I rowsort
SELECT ( ( + cor0.col2 ) + ( cor0.col0 ) ) AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 75f21515f5e6f5fe2301266aeb130551

query I rowsort
SELECT DISTINCT ( + col0 ) * + 20 AS col1 FROM tab2 cor0
----
140
1560
1580

query I rowsort
SELECT DISTINCT - col0 * + col1 * col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - 63 FROM tab2
----
-63

onlyif mysql # use DIV operator for integer division
query I rowsort label-7029
SELECT - col2 + + 1 DIV + col1 col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7029
SELECT - col2 + + 1 / + col1 col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL tab1.col0 * + col0 + + tab1.col1 FROM tab1
----
35
4106
6413

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0 WHERE NOT NULL > NULL
----

query I rowsort
SELECT ( + col2 ) * cor0.col1 * 8 - col1 FROM tab1 cor0
----
11206
4550
9971

query I rowsort
SELECT ALL cor1.col2 + + ( ( - cor1.col2 ) ) AS col0 FROM tab2 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-7034
SELECT DISTINCT col0 * col2 - 67 * col0 DIV tab2.col1 FROM tab2
----
174
1940
2691

skipif mysql # not compatible
query I rowsort label-7034
SELECT DISTINCT col0 * col2 - 67 * col0 / tab2.col1 FROM tab2
----
174
1940
2691

query I rowsort
SELECT DISTINCT + + 53 AS col1 FROM tab0, tab2, tab2 cor0
----
53

query I rowsort
SELECT - ( - col1 ) - col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 + - col0 * - col1 + tab1.col1 * + col0 col0 FROM tab1
----
1363
2163
239

onlyif mysql # use DIV operator for integer division
query I rowsort label-7038
SELECT col1 DIV col2 + - col1 * + col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-7038
SELECT col1 / col2 + - col1 * + col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + 81 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
81

query I rowsort
SELECT ALL col1 * col1 - 1 AS col2 FROM tab2
----
288
3480
960

query I rowsort
SELECT - 23 * col2 AS col0 FROM tab1
----
-1242
-1311
-2208

query I rowsort
SELECT - 85 + col2 FROM tab1 cor0
----
-28
-31
11

query I rowsort
SELECT - col1 + cor0.col2 * cor0.col2 FROM tab1 cor0
----
2890
3239
9203

query I rowsort
SELECT - col1 * 38 FROM tab1 AS cor0
----
-380
-494
-988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 + col2 col0 FROM tab2 cor0
----
-1508
-608
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7046
SELECT - CAST( - col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7046
SELECT - CAST ( - col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col2 * 28 FROM tab1 AS cor0
----
1512
1596
2688

query I rowsort
SELECT DISTINCT + 60 FROM tab1, tab1 cor0, tab0 cor1
----
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-7049
SELECT + 33 DIV - col1 col2 FROM tab2 AS cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7049
SELECT + 33 / - col1 col2 FROM tab2 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7050
SELECT ALL 43 * col1 DIV - tab1.col0 col0 FROM tab1
----
-372
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7050
SELECT ALL 43 * col1 / - tab1.col0 col0 FROM tab1
----
-372
-6
-6

query I rowsort
SELECT ALL - + 57 + - col1 * col2 AS col2 FROM tab1 AS cor0
----
-1305
-1461
-627

query I rowsort
SELECT - - cor0.col1 * 47 * + col0 AS col0 FROM tab2 AS cor0
----
10199
216294
63121

query I rowsort
SELECT - cor0.col2 + - ( cor1.col2 ) FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a582da03198ceb1f8eae9e62016b0a89

query I rowsort
SELECT ALL - col0 + 25 AS col0 FROM tab2 AS cor0
----
-53
-54
18

query I rowsort
SELECT DISTINCT - + col2 * - col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col2 * 72 * + col2 FROM tab2 AS cor0
----
103968
48672
52488

query I rowsort
SELECT ALL - cor1.col0 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 67 col1 FROM tab2 AS cor0
----
67
67
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7059
SELECT DISTINCT + 17 DIV + col1 FROM tab2 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-7059
SELECT DISTINCT + 17 / + col1 FROM tab2 cor0
----
0
1

query I rowsort
SELECT 94 * + col2 FROM tab0 cor0
----
3102
7708
94

query I rowsort
SELECT - + 71 * + cor0.col2 FROM tab2 AS cor0
----
-1846
-1917
-2698

query I rowsort
SELECT DISTINCT - - col0 * + col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 53 * col2 * - ( + 44 * - col0 ) + 60 col0 FROM tab0 cor0
----
17018996
1847004
81680

query I rowsort
SELECT ALL 48 * col0 FROM tab0 AS cor0
----
1152
1680
4272

query I rowsort
SELECT ALL - ( + col2 ) * + ( col0 ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + - 4 + + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-293
-3485
-965

query I rowsort
SELECT DISTINCT + + col0 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL col0 * col2 * col1 AS col2 FROM tab2
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 37 * - col0 * + col0 col1 FROM tab0
----
-21312
-293077
-45325

query I rowsort
SELECT - ( + col1 + + col1 ) FROM tab0
----
-172
-182
-194

query I rowsort
SELECT - 89 + + tab2.col2 FROM tab2
----
-51
-62
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7072
SELECT ALL col2 * - CAST( - 43 AS SIGNED ) col0 FROM tab2 AS cor0
----
1118
1161
1634

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7072
SELECT ALL col2 * - CAST ( - 43 AS INTEGER ) col0 FROM tab2 AS cor0
----
1118
1161
1634

query I rowsort
SELECT cor0.col0 + - col2 AS col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - + col2 - 75 * - col1 AS col0 FROM tab1 AS cor0
----
1896
693
879

query I rowsort
SELECT ALL - + col0 + 3 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-34
-41
75

query I rowsort
SELECT DISTINCT - col1 + + ( + 70 * + col0 ) AS col0 FROM tab1 AS cor0
----
184
4470
5587

query I rowsort
SELECT - col0 * 68 * col1 AS col2 FROM tab1 AS cor0
----
-43520
-5304
-70720

query I rowsort
SELECT - col0 * col1 + ( + col0 ) AS col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - - col0 + + col2 * ( - cor0.col1 * + 89 ) FROM tab2 AS cor0
----
-136448
-57415
-74486

query I rowsort
SELECT col2 + 71 * + col2 * - col1 FROM tab1 AS cor0
----
-40413
-88512
-99630

query I rowsort
SELECT ALL col0 * - 58 AS col2 FROM tab0 AS cor0
----
-1392
-2030
-5162

onlyif mysql # use DIV operator for integer division
query I rowsort label-7082
SELECT ALL col2 DIV + tab2.col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-7082
SELECT ALL col2 / + tab2.col0 FROM tab2
----
0
0
3

query I rowsort
SELECT ALL + + ( col0 ) * + col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ( col2 ) * + col2 AS col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - - 45 * col0 AS col1 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT col1 * col1 - - ( col1 ) AS col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT + 51 + - cor0.col2 AS col0 FROM tab0 cor0
----
-31
18
50

query I rowsort
SELECT col1 * - col1 - + col0 * col1 FROM tab0 AS cor0
----
-12804
-16380
-9460

query I rowsort
SELECT - 41 * - col2 + ( 55 ) + + cor0.col0 AS col2 FROM tab2 AS cor0
----
1169
1199
1692

query I rowsort
SELECT + 18 * cor0.col0 - + ( + col0 ) FROM tab1 AS cor0
----
1088
1360
51

query I rowsort
SELECT - col2 * + ( - 47 ) AS col0 FROM tab1 AS cor0
----
2538
2679
4512

query I rowsort
SELECT col1 + 15 * cor0.col1 FROM tab0 cor0
----
1376
1456
1552

query I rowsort
SELECT + ( col0 ) * + tab1.col0 * 15 AS col0 FROM tab1
----
135
61440
96000

query I rowsort
SELECT 4 + - tab1.col2 * + col1 * col1 FROM tab1
----
-16220
-36500
-5696

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - col1 AS REAL ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - col1 * col2 * - cor0.col1 + ( col2 ) * - col2 AS col2 FROM tab1 AS cor0
----
2451
33588
7008

query I rowsort
SELECT 27 + 85 AS col0 FROM tab2 AS cor0
----
112
112
112

onlyif mysql # use DIV operator for integer division
query I rowsort label-7098
SELECT ALL + + ( + col0 ) DIV col0 + - col2 AS col1 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-7098
SELECT ALL + + ( + col0 ) / col0 + - col2 AS col1 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT DISTINCT + - 6 AS col2 FROM tab2 AS cor0
----
-6

query I rowsort
SELECT ALL ( 19 ) FROM tab2 AS cor0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + ( + col0 + + col1 * - 15 ) col2 FROM tab2 AS cor0
----
12366
20982
6688

query I rowsort
SELECT DISTINCT - ( col1 ) * col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col0 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - + col2 * + col1 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + 19 AS col1 FROM tab0 AS cor0
----
19
19
19

query I rowsort
SELECT DISTINCT 25 + + 74 FROM tab1 AS cor0
----
99

query I rowsort
SELECT DISTINCT + col1 * 8 AS col0 FROM tab1
----
104
208
80

query I rowsort
SELECT - + 5 AS col2 FROM tab2 cor0
----
-5
-5
-5

query I rowsort
SELECT col2 - + ( tab0.col2 + - tab0.col1 ) AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT col0 * - col1 + - 23 FROM tab2
----
-1366
-240
-4625

query I rowsort
SELECT DISTINCT - col1 * 77 AS col0 FROM tab1
----
-1001
-2002
-770

query I rowsort
SELECT + 25 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + 58 * - col0 col0 FROM tab0 AS cor0
----
-1478
-2127
-5253

query I rowsort
SELECT DISTINCT + col2 + col1 * col0 FROM tab2 AS cor0
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 + col2 ) col0 FROM tab0
----
171
36
57

query I rowsort
SELECT - + 26 FROM tab0 cor0
----
-26
-26
-26

query I rowsort
SELECT ( - 7 ) FROM tab2
----
-7
-7
-7

query I rowsort
SELECT DISTINCT 10 FROM tab0, tab2 AS cor0
----
10

query I rowsort
SELECT - col1 + col2 * - col2 * + col2 FROM tab1
----
-157490
-185203
-884749

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 col2 FROM tab1
----
54
54
54

query I rowsort
SELECT col1 * col2 * + col0 FROM tab2 AS cor0
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * tab1.col1 col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL + + col0 + - 38 + - col0 * - cor0.col2 * - col2 AS col1 FROM tab0 AS cor0
----
-26150
-38
-598385

query I rowsort
SELECT DISTINCT col1 + - 64 AS col1 FROM tab2 AS cor0
----
-33
-47
-5

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 * - col1 AS col2 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT + col1 + + 52 AS col0 FROM tab1 AS cor0
----
62
65
78

query I rowsort
SELECT DISTINCT - col0 * 28 * col2 AS col0 FROM tab2
----
-5292
-56784
-84056

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col0 * + col2 col2 FROM tab1 AS cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - col0 AS REAL ) * col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - col2 * - col1 - + cor0.col1 * - col1 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT ALL + - 2 * col2 * - col1 FROM tab1 AS cor0
----
1140
2496
2808

query I rowsort
SELECT ALL ( - 77 ) AS col1 FROM tab0 AS cor0
----
-77
-77
-77

query I rowsort
SELECT - col2 + col1 * col1 AS col0 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT - - 11 FROM tab1 AS cor0
----
11
11
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-7136
SELECT col0 DIV + cor0.col0 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7136
SELECT col0 / + cor0.col0 AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7137
SELECT col1 * col1 DIV 53 FROM tab0 AS cor0
----
139
156
177

skipif mysql # not compatible
query I rowsort label-7137
SELECT col1 * col1 / 53 FROM tab0 AS cor0
----
139
156
177

query I rowsort
SELECT - col0 * + col2 * - col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT - + col1 + + cor0.col1 * cor0.col2 AS col0 FROM tab0 AS cor0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 2 * col0 col2 FROM tab0
----
178
48
70

query I rowsort
SELECT + ( cor0.col0 ) AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # use DIV operator for integer division
query I rowsort label-7142
SELECT DISTINCT - col1 DIV 69 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7142
SELECT DISTINCT - col1 / 69 FROM tab1 AS cor0
----
0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2, tab1 AS cor3
----
3645 values hashing to f1666fadc663c90ea9374fcb108b4477

query I rowsort
SELECT DISTINCT cor0.col2 * 21 AS col1 FROM tab2, tab1 cor0
----
1134
1197
2016

query I rowsort
SELECT - 39 * - col2 FROM tab1 AS cor0
----
2106
2223
3744

query I rowsort
SELECT - - 9 FROM tab0, tab2 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7147
SELECT - CAST( NULL AS SIGNED ) * - col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7147
SELECT - CAST ( NULL AS INTEGER ) * - col0 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( col0 ) col0 FROM tab0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 73 col0 FROM tab1, tab2, tab0 cor0
----
73

query I rowsort
SELECT DISTINCT + 62 * - cor0.col1 AS col1 FROM tab1, tab2, tab1 AS cor0
----
-1612
-620
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col2 col2 FROM tab2
----
104
117
34

query I rowsort
SELECT - ( cor0.col1 ) + col1 * col1 * - col1 + + col0 AS col1 FROM tab2 AS cor0
----
-205360
-29815
-4851

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( tab2.col1 ) * tab2.col2 col0 FROM tab2, tab0, tab1 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + col2 + col0 * - col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT - - 66 * col1 FROM tab1 cor0
----
1716
660
858

query I rowsort
SELECT DISTINCT - col1 * col0 + 27 FROM tab2 AS cor0
----
-1316
-190
-4575

onlyif mysql # use DIV operator for integer division
query I rowsort label-7157
SELECT ALL col2 + + col2 DIV col1 AS col2 FROM tab1
----
103
56
62

skipif mysql # not compatible
query I rowsort label-7157
SELECT ALL col2 + + col2 / col1 AS col2 FROM tab1
----
103
56
62

query I rowsort
SELECT col2 * col2 + - ( + col0 ) FROM tab2
----
1365
598
722

query I rowsort
SELECT - col2 * cor0.col2 + + 86 AS col2 FROM tab0 AS cor0
----
-1003
-6638
85

query I rowsort
SELECT - col2 * + col2 + ( col1 + col0 ) FROM tab1 AS cor0
----
-2887
-3175
-9123

query I rowsort
SELECT DISTINCT 35 + col0 * + ( ( - col0 ) ) * - 81 AS col0 FROM tab2
----
4004
492839
505556

query I rowsort
SELECT ALL + - col2 * - 50 + ( + col2 ) AS col0 FROM tab2 AS cor0
----
1326
1377
1938

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7163
SELECT ALL col1 + CAST( cor0.col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-7163
SELECT ALL col1 + CAST ( cor0.col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + cor1.col2 * cor0.col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d8d0e84ff69d3696408058ba5bec0900

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7165
SELECT DISTINCT + col2 * CAST( col2 + col1 AS SIGNED ) FROM tab2 AS cor0
----
1566
2090
2210

skipif mysql # not compatible
query I rowsort label-7165
SELECT DISTINCT + col2 * CAST ( col2 + col1 AS INTEGER ) FROM tab2 AS cor0
----
1566
2090
2210

onlyif mysql # use DIV operator for integer division
query I rowsort label-7166
SELECT ( + col0 ) DIV + col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7166
SELECT ( + col0 ) / + col2 FROM tab0
----
0
1
35

query I rowsort
SELECT - 17 * ( - tab1.col1 ) * - col0 - col0 AS col1 FROM tab1
----
-10944
-1329
-17760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7168
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab2, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7168
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab2, tab2 AS cor0
----
NULL

query I rowsort
SELECT + ( + col1 ) * col2 + - col2 + - tab1.col0 * col1 * - 91 FROM tab1
----
58753
8448
95792

query I rowsort
SELECT DISTINCT - tab2.col0 - 53 FROM tab2
----
-131
-132
-60

query I rowsort
SELECT DISTINCT + - 93 + - ( col1 ) * 1 AS col0 FROM tab1 AS cor0
----
-103
-106
-119

query I rowsort
SELECT + + col1 - ( col0 ) FROM tab0 cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7173
SELECT ALL + col2 DIV col0 + - col2 + - col2 AS col1 FROM tab2 cor0
----
-51
-52
-76

skipif mysql # not compatible
query I rowsort label-7173
SELECT ALL + col2 / col0 + - col2 + - col2 AS col1 FROM tab2 cor0
----
-51
-52
-76

query I rowsort
SELECT - col0 * col2 - + col2 * + col1 AS col1 FROM tab2 AS cor0
----
-1026
-3562
-3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-7175
SELECT DISTINCT - 1 DIV col1 - - col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7175
SELECT DISTINCT - 1 / col1 - - col1 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col1 * col1 + + col1 * 88 * 61 FROM tab1 AS cor0
----
140244
53780
69953

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7177
SELECT DISTINCT + CAST( - cor0.col1 AS SIGNED ) + + cor0.col2 col0 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7177
SELECT DISTINCT + CAST ( - cor0.col1 AS INTEGER ) + + cor0.col2 col0 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col2 ) * - col0 + - col0 + + col2 * - col2 col1 FROM tab0 AS cor0
----
-1
-321
485

onlyif mysql # use DIV operator for integer division
query I rowsort label-7179
SELECT ALL col2 DIV col1 - - ( 47 + + cor0.col0 * 80 ) AS col1 FROM tab1 AS cor0
----
289
5172
6454

skipif mysql # not compatible
query I rowsort label-7179
SELECT ALL col2 / col1 - - ( 47 + + cor0.col0 * 80 ) AS col1 FROM tab1 AS cor0
----
289
5172
6454

query I rowsort
SELECT ALL - col1 * col2 - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ( + col2 ) * cor0.col1 AS col2 FROM tab0 cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + - col2 col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT col0 + + cor0.col2 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL + 7 AS col2 FROM tab1 AS cor0
----
7
7
7

query I rowsort
SELECT ALL - cor0.col2 * + col0 - + cor0.col0 * col0 FROM tab0 AS cor0
----
-1260
-1368
-15219

query I rowsort
SELECT + 66 + + col1 AS col1 FROM tab1 AS cor0
----
76
79
92

query I rowsort
SELECT DISTINCT + 2 + - col1 AS col2 FROM tab2 AS cor0
----
-15
-29
-57

query I rowsort
SELECT DISTINCT col1 + col1 * 27 FROM tab1 AS cor0
----
280
364
728

onlyif mysql # use DIV operator for integer division
query I rowsort label-7189
SELECT ALL - - cor0.col1 + - col1 DIV - col2 + col1 AS col2 FROM tab1 cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-7189
SELECT ALL - - cor0.col1 + - col1 / - col2 + col1 AS col2 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT 27 AS col1 FROM tab0 cor0
----
27
27
27

query I rowsort
SELECT DISTINCT - + 93 FROM tab0 AS cor0
----
-93

query I rowsort
SELECT ALL + 34 * - cor0.col2 + col2 FROM tab1 AS cor0
----
-1782
-1881
-3168

query I rowsort
SELECT - 67 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

query I rowsort
SELECT DISTINCT tab2.col2 * + 52 AS col1 FROM tab2
----
1352
1404
1976

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col2 * + 57 AS col0 FROM tab0 cor0
----
1905
4763
92

query I rowsort
SELECT col0 * + 93 FROM tab0 AS cor0
----
2232
3255
8277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * ( col1 ) col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ( 89 ) - col0 AS col1 FROM tab0 AS cor0
----
0
54
65

query I rowsort
SELECT ALL - - col0 * + col1 + + col2 * + ( 11 * cor0.col0 ) AS col2 FROM tab1 cor0
----
1860
40768
85520

query I rowsort
SELECT DISTINCT + col2 * cor0.col2 - - cor0.col2 AS col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT - ( 96 ) AS col2 FROM tab0 AS cor0
----
-96

query I rowsort
SELECT ALL - col2 + cor0.col0 * + col1 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT - + col1 + - col0 * - col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT - - col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - 9 + - col2 AS col1 FROM tab2 cor0
----
-35
-36
-47

query I rowsort
SELECT + - col1 * 98 + col0 FROM tab1 AS cor0
----
-1194
-2545
-916

query I rowsort
SELECT ALL 61 - col1 AS col2 FROM tab1 AS cor0
----
35
48
51

query I rowsort
SELECT + cor0.col2 * ( col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL 21 + - col1 AS col1 FROM tab1 cor0
----
-5
11
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7210
SELECT DISTINCT + col1 DIV col1 - + col1 * - 34 AS col2 FROM tab0 AS cor0
----
2925
3095
3299

skipif mysql # not compatible
query I rowsort label-7210
SELECT DISTINCT + col1 / col1 - + col1 * - 34 AS col2 FROM tab0 AS cor0
----
2925
3095
3299

query I rowsort
SELECT - + col1 * col1 + + col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT - 97 - - col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
3551
65
7583

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7213
SELECT CAST( NULL AS SIGNED ) - col2 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + - col0 * 38 + + col1 AS col0 FROM tab0 AS cor0
----
-1233
-3291
-826

query I rowsort
SELECT 78 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
111
160
79

query I rowsort
SELECT DISTINCT 36 FROM tab2 cor0
----
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-7217
SELECT - col2 DIV - col2 AS col1 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7217
SELECT - col2 / - col2 AS col1 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT + 32 * col1 AS col2 FROM tab2 AS cor0
----
1888
544
992

query I rowsort
SELECT ALL + 69 FROM tab2 cor0
----
69
69
69

query I rowsort
SELECT DISTINCT - - 91 * col0 AS col1 FROM tab1 cor0
----
273
5824
7280

query I rowsort
SELECT ALL + 35 AS col2 FROM tab2 cor0
----
35
35
35

query I rowsort
SELECT - col1 + - 32 FROM tab2
----
-49
-63
-91

query I rowsort
SELECT ALL - col0 * - col1 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - + 89 * cor0.col1 FROM tab1 AS cor0
----
-1157
-2314
-890

query I rowsort
SELECT ALL ( col2 ) * cor0.col0 AS col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + 41 + col2 FROM tab0 AS cor0
----
123
42
74

query I rowsort
SELECT + 87 * cor0.col2 + col1 * 9 * - col2 FROM tab2 AS cor0
----
-11544
-2508
-5184

query I rowsort
SELECT DISTINCT col1 * col0 * tab2.col2 AS col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL col2 * + col2 * + ( col2 * + col0 + - col1 ) FROM tab0
----
-62
48459868
768834

query I rowsort
SELECT + col1 + + 0 FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + - 64 col2 FROM tab2 AS cor0
----
1470
582
773

query I rowsort
SELECT - - col0 * ( + 71 * col1 ) + + col1 AS col1 FROM tab0 cor0
----
146630
241142
575120

query I rowsort
SELECT ALL 61 AS col2 FROM tab2
----
61
61
61

query I rowsort
SELECT ALL + tab1.col2 * tab1.col1 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT - + cor1.col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
-86
-91
-97

query I rowsort
SELECT ALL + col2 * + 20 AS col0 FROM tab2
----
520
540
760

query I rowsort
SELECT DISTINCT + - col0 * 0 FROM tab0 cor0
----
0

query I rowsort
SELECT - col1 + + col2 * - 87 AS col0 FROM tab2 AS cor0
----
-2321
-2380
-3323

onlyif mysql # use DIV operator for integer division
query I rowsort label-7239
SELECT - + cor0.col1 DIV 71 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7239
SELECT - + cor0.col1 / 71 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 * 6 FROM tab1 cor0
----
324
342
576

query I rowsort
SELECT cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-7242
SELECT ALL + ( - ( tab2.col2 ) ) * col2 + + col2 DIV + tab2.col0 FROM tab2
----
-1444
-676
-726

skipif mysql # not compatible
query I rowsort label-7242
SELECT ALL + ( - ( tab2.col2 ) ) * col2 + + col2 / + tab2.col0 FROM tab2
----
-1444
-676
-726

query I rowsort
SELECT DISTINCT ( + ( + col2 ) ) + ( col1 ) AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL - 77 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT ALL + 8 + col0 FROM tab2 AS cor0
----
15
86
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-7246
SELECT + + col2 DIV col1 + - col0 * - col0 AS col1 FROM tab1 AS cor0
----
11
4101
6407

skipif mysql # not compatible
query I rowsort label-7246
SELECT + + col2 / col1 + - col0 * - col0 AS col1 FROM tab1 AS cor0
----
11
4101
6407

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 * - col1 col2 FROM tab0
----
2494
2639
2813

query I rowsort
SELECT + 5 * + cor0.col0 + - 36 FROM tab2 AS cor0
----
-1
354
359

onlyif mysql # use DIV operator for integer division
query I rowsort label-7249
SELECT - col2 DIV col2 + - CAST( - cor0.col2 AS SIGNED ) FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-7249
SELECT - col2 / col2 + - CAST ( - cor0.col2 AS INTEGER ) FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT DISTINCT - 57 + col0 * col2 * + ( col2 * cor0.col1 ) AS col2 FROM tab1 cor0
----
2079303
227391
9584583

query I rowsort
SELECT - 50 + - cor0.col0 FROM tab0 AS cor0
----
-139
-74
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7252
SELECT DISTINCT + col1 * - cor0.col2 + - 44 DIV col2 col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7252
SELECT DISTINCT + col1 * - cor0.col2 + - 44 / col2 col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab1 cor1, tab2 AS cor2
----
3645 values hashing to b6efe6f7ec1a3daa3cc6ea9dd7d13455

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

query I rowsort
SELECT - ( + 73 ) * col2 FROM tab2 AS cor0
----
-1898
-1971
-2774

query I rowsort
SELECT DISTINCT + ( - col1 ) + + col1 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 71 col2 FROM tab2 AS cor0
----
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-7258
SELECT - col2 * - cor0.col0 DIV col0 + 64 AS col1 FROM tab0 AS cor0
----
146
65
97

skipif mysql # not compatible
query I rowsort label-7258
SELECT - col2 * - cor0.col0 / col0 + 64 AS col1 FROM tab0 AS cor0
----
146
65
97

query I rowsort
SELECT - col2 + col2 * col1 AS col0 FROM tab0 cor0
----
2805
7380
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7260
SELECT + ( 25 ) DIV - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7260
SELECT + ( 25 ) / - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + 4 + - col0 FROM tab0 AS cor0
----
-28
-39
-93

query I rowsort
SELECT ALL + 5 * col2 FROM tab1 AS cor0
----
270
285
480

query I rowsort
SELECT DISTINCT 13 AS col2 FROM tab0 AS cor0
----
13

query I rowsort
SELECT col1 * + col1 * ( 89 ) FROM tab0 cor0
----
658244
737009
837401

query I rowsort
SELECT - + col1 + col0 * + col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT - col1 + + col1 * cor0.col2 + + col0 FROM tab0 cor0
----
2776
35
7460

query I rowsort
SELECT - - col2 + 15 + - col0 * - cor0.col1 * - 50 AS col1 FROM tab2 AS cor0
----
-10808
-230059
-67097

query I rowsort
SELECT - col1 * + col0 + + 98 - col1 * ( col1 ) FROM tab0 AS cor0
----
-12706
-16282
-9362

query I rowsort
SELECT - col2 * col1 + 57 + col1 * col2 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT ALL col0 + + tab2.col1 * + 66 AS col1 FROM tab2
----
1201
2053
3972

query I rowsort
SELECT ALL 30 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7272
SELECT ALL + tab2.col2 DIV 27 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7272
SELECT ALL + tab2.col2 / 27 FROM tab2
----
0
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7273
SELECT ALL - col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7273
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 80 + + ( + col2 ) * - col2 AS col2 FROM tab0 AS cor0
----
-1009
-6644
79

query I rowsort
SELECT ALL + ( cor0.col1 ) * col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - cor0.col2 + + 64 * + col0 FROM tab2 AS cor0
----
421
4966
5018

query I rowsort
SELECT ALL tab0.col1 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - col2 * 40 AS col2 FROM tab2
----
-1040
-1080
-1520

query I rowsort
SELECT ALL col0 - col0 * ( - col0 ) * col2 AS col2 FROM tab1
----
233536
489
614480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7280
SELECT col1 * CAST( 93 * col0 AS SIGNED ) + CAST( ( col1 ) AS SIGNED ) + + ( + col0 ) FROM tab2
----
124995
20219
428123

skipif mysql # not compatible
query I rowsort label-7280
SELECT col1 * CAST ( 93 * col0 AS INTEGER ) + CAST ( ( col1 ) AS INTEGER ) + + ( + col0 ) FROM tab2
----
124995
20219
428123

query I rowsort
SELECT DISTINCT col1 + - col1 - - col1 FROM tab2
----
17
31
59

query I rowsort
SELECT 24 * ( tab2.col1 ) AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to b75cb998cabbe845b6dc7d1474941d53

query I rowsort
SELECT ( - cor0.col0 ) + col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT col2 + - col2 * col1 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7285
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 25 * col2 + col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7285
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 25 * col2 + col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - - ( col2 ) + col1 * 97 * col1 FROM tab1 AS cor0
----
16489
65626
9757

onlyif mysql # use DIV operator for integer division
query I rowsort label-7287
SELECT DISTINCT + 32 + + col0 DIV col1 FROM tab1 AS cor0
----
32
38

skipif mysql # not compatible
query I rowsort label-7287
SELECT DISTINCT + 32 + + col0 / col1 FROM tab1 AS cor0
----
32
38

query I rowsort
SELECT DISTINCT col1 - + 40 * + tab0.col1 AS col2 FROM tab0
----
-3354
-3549
-3783

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7289
SELECT DISTINCT - col2 - CAST( col0 AS SIGNED ) AS col0 FROM tab0
----
-171
-36
-57

skipif mysql # not compatible
query I rowsort label-7289
SELECT DISTINCT - col2 - CAST ( col0 AS INTEGER ) AS col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT ALL tab1.col1 * - col2 + col1 FROM tab1
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7291
SELECT - CAST( + col2 AS SIGNED ) * - col0 FROM tab2
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-7291
SELECT - CAST ( + col2 AS INTEGER ) * - col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + 79 * col2 * - col2 + 72 AS col1 FROM tab1
----
-230292
-256599
-727992

query I rowsort
SELECT ( - 52 ) FROM tab2
----
-52
-52
-52

query I rowsort
SELECT col0 + 10 FROM tab1
----
13
74
90

query I rowsort
SELECT 64 * + ( col0 ) + col0 FROM tab0
----
1560
2275
5785

onlyif mysql # use DIV operator for integer division
query I rowsort label-7296
SELECT 57 + + cor0.col1 DIV + col1 FROM tab2 AS cor0
----
58
58
58

skipif mysql # not compatible
query I rowsort label-7296
SELECT 57 + + cor0.col1 / + col1 FROM tab2 AS cor0
----
58
58
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * col2 col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + + col1 + + cor0.col0 * - col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL - col0 * - col2 * col2 AS col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT 17 + col1 FROM tab1
----
27
30
43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7301
SELECT ( col1 ) * + CAST( NULL AS DECIMAL ) + + col0 * tab1.col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7301
SELECT ( col1 ) * + CAST ( NULL AS REAL ) + + col0 * tab1.col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * 87 - col2 AS col0 FROM tab0 AS cor0
----
2055
3044
7661

query I rowsort
SELECT - - col2 - col2 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + ( + col2 ) col2 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT + col0 * - col1 * + col0 FROM tab1 AS cor0
----
-234
-40960
-83200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7306
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) col1 FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7306
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL - - col0 + 35 FROM tab1 AS cor0
----
115
38
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * - cor0.col1 - - col1 col0 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-7309
SELECT col2 DIV cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-7309
SELECT col2 / cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
1
34
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7310
SELECT col2 * 29 DIV + col0 FROM tab0 AS cor0
----
0
26
39

skipif mysql # not compatible
query I rowsort label-7310
SELECT col2 * 29 / + col0 FROM tab0 AS cor0
----
0
26
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7311
SELECT ALL - CAST( NULL AS SIGNED ) + cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7311
SELECT ALL - CAST ( NULL AS INTEGER ) + cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - + col1 * - 69 AS col0 FROM tab1 AS cor0
----
1794
690
897

query I rowsort
SELECT col0 * + col0 * col0 FROM tab2
----
343
474552
493039

onlyif mysql # use DIV operator for integer division
query I rowsort label-7314
SELECT ALL + 58 * col2 DIV 65 AS col0 FROM tab1
----
48
50
85

skipif mysql # not compatible
query I rowsort label-7314
SELECT ALL + 58 * col2 / 65 AS col0 FROM tab1
----
48
50
85

query I rowsort
SELECT DISTINCT cor0.col1 * + 44 FROM tab2, tab2 AS cor0
----
1364
2596
748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7316
SELECT DISTINCT - col2 * CAST( 97 + - col2 AS SIGNED ) col2 FROM tab1
----
-2280
-2322
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7316
SELECT DISTINCT - col2 * CAST ( 97 + - col2 AS INTEGER ) col2 FROM tab1
----
-2280
-2322
-96

query I rowsort
SELECT + 73 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT + + col0 + - 34 * col0 AS col1 FROM tab0 AS cor0
----
-1155
-2937
-792

query I rowsort
SELECT + cor0.col2 * - cor0.col1 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 86c8e75d83d283b29460c020ab5988af

onlyif mysql # use DIV operator for integer division
query I rowsort label-7320
SELECT ALL 97 DIV 37 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7320
SELECT ALL 97 / 37 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT DISTINCT - 54 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
-54

onlyif mysql # use DIV operator for integer division
query I rowsort label-7322
SELECT ALL + + col0 DIV 5 - + col1 FROM tab1 AS cor0
----
-26
2
3

skipif mysql # not compatible
query I rowsort label-7322
SELECT ALL + + col0 / 5 - + col1 FROM tab1 AS cor0
----
-26
2
3

query I rowsort
SELECT - 20 * - col2 * col0 AS col0 FROM tab2
----
3780
40560
60040

onlyif mysql # use DIV operator for integer division
query I rowsort label-7324
SELECT CAST( - col2 AS SIGNED ) DIV col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-7324
SELECT CAST ( - col2 AS INTEGER ) / col1 FROM tab2
----
-2
0
0

query I rowsort
SELECT + 8 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT DISTINCT - ( - 10 * + col1 ) + 81 FROM tab0
----
1051
941
991

query I rowsort
SELECT DISTINCT + + tab1.col0 + - 32 FROM tab1, tab0, tab2 AS cor0
----
-29
32
48

query I rowsort
SELECT ALL 1 * col1 + col1 * - 26 AS col1 FROM tab1
----
-250
-325
-650

query I rowsort
SELECT + col0 * 78 AS col0 FROM tab1
----
234
4992
6240

query I rowsort
SELECT DISTINCT ( - col2 ) * + tab1.col2 + col1 * col2 AS col0 FROM tab1
----
-1512
-2679
-7968

query I rowsort
SELECT DISTINCT 25 * + col1 * - col2 + + col2 AS col0 FROM tab0
----
-186468
-2424
-70917

query I rowsort
SELECT DISTINCT - - ( cor0.col2 ) + col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7333
SELECT DISTINCT + 14 DIV + cor0.col0 + col1 * + col1 col0 FROM tab2 AS cor0
----
289
3481
963

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7333
SELECT DISTINCT + 14 / + cor0.col0 + col1 * + col1 col0 FROM tab2 AS cor0
----
289
3481
963

query I rowsort
SELECT col1 * cor0.col0 + col1 * + col2 AS col2 FROM tab2 cor0
----
1054
1989
6136

query I rowsort
SELECT DISTINCT - col1 * col0 + col2 * 44 AS col0 FROM tab0 AS cor0
----
-3351
-4491
-612

onlyif mysql # use DIV operator for integer division
query I rowsort label-7336
SELECT + ( col0 ) DIV - col2 + + col2 * col0 AS col1 FROM tab1
----
162
3647
7680

skipif mysql # not compatible
query I rowsort label-7336
SELECT + ( col0 ) / - col2 + + col2 * col0 AS col1 FROM tab1
----
162
3647
7680

query I rowsort
SELECT - - 62 * + col0 FROM tab2 AS cor0
----
434
4836
4898

onlyif mysql # use DIV operator for integer division
query I rowsort label-7338
SELECT - col2 * + 61 + cor0.col0 DIV 81 FROM tab2 AS cor0
----
-1586
-1647
-2318

skipif mysql # not compatible
query I rowsort label-7338
SELECT - col2 * + 61 + cor0.col0 / 81 FROM tab2 AS cor0
----
-1586
-1647
-2318

query I rowsort
SELECT ALL - - ( + col0 ) + 78 + + col1 FROM tab2 AS cor0
----
116
174
215

query I rowsort
SELECT + col2 + col0 * - 16 * col0 AS col2 FROM tab2 cor0
----
-757
-97318
-99818

onlyif mysql # use DIV operator for integer division
query I rowsort label-7341
SELECT - - col1 DIV + col0 + col2 DIV - col0 FROM tab0 AS cor0
----
1
2
2

skipif mysql # not compatible
query I rowsort label-7341
SELECT - - col1 / + col0 + col2 / - col0 FROM tab0 AS cor0
----
1
2
2

query I rowsort
SELECT ALL - tab2.col0 * 22 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to b3ab2acafc3b608f11d60d7dbf0748d1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7343
SELECT DISTINCT - col1 + col1 * CAST( NULL AS SIGNED ) + col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7343
SELECT DISTINCT - col1 + col1 * CAST ( NULL AS INTEGER ) + col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - ( col1 ) + col1 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT - - 30 + col2 FROM tab2 AS cor0
----
56
57
68

query I rowsort
SELECT - ( - col2 + col1 ) * col1 AS col0 FROM tab1
----
1079
470
728

query I rowsort
SELECT DISTINCT col1 * col0 * + col1 AS col2 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT + - 98 - col0 FROM tab0 AS cor0
----
-122
-133
-187

query I rowsort
SELECT - + col1 + - cor0.col2 + ( col2 ) FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - ( - 64 ) FROM tab1, tab2 AS cor0, tab1 AS cor1
----
64

query I rowsort
SELECT + + col0 + col0 + col1 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT cor0.col0 * + 49 FROM tab0 AS cor0
----
1176
1715
4361

query I rowsort
SELECT - col0 * + col0 + - col1 AS col1 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT - col1 + ( col0 ) AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col0 * + col2 + col1 AS col1 FROM tab0 cor0
----
-706
-7207
62

query I rowsort
SELECT - col2 * - col0 + - col0 AS col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT - ( - col2 ) * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - 67 * col1 * col1 + col0 + col1 FROM tab1 AS cor0
----
-11230
-45263
-6626

query I rowsort
SELECT col0 * 67 * cor0.col2 AS col2 FROM tab0 AS cor0
----
2345
488966
53064

query I rowsort
SELECT ALL - col1 * - cor0.col0 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - 12 - 7 FROM tab0 AS cor0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT - col0 * + col2 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 37 * + col2 * + col1 FROM tab2 AS cor0
----
23902
30969
56758

query I rowsort
SELECT ( ( - cor0.col2 ) ) + + col0 + col1 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT - col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + ( 35 ) FROM tab1, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT ( - 90 ) * col1 FROM tab2 AS cor0
----
-1530
-2790
-5310

query I rowsort
SELECT - 84 * 82 FROM tab1 cor0
----
-6888
-6888
-6888

query I rowsort
SELECT DISTINCT - col0 + - tab0.col2 AS col2 FROM tab0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 70 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

query I rowsort
SELECT ALL - col1 * + col2 + + col2 * col2 * col0 FROM tab2
----
113430
4266
51194

query I rowsort
SELECT + - col1 - + col1 * 72 FROM tab1 AS cor0
----
-1898
-730
-949

query I rowsort
SELECT DISTINCT + - 27 FROM tab0 AS cor0
----
-27

query I rowsort
SELECT ( + 13 ) FROM tab1
----
13
13
13

query I rowsort
SELECT + 63 * + 48 * + col2 + - col2 FROM tab0 AS cor0
----
247886
3023
99759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7377
SELECT CAST( + 50 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
50
50
50

skipif mysql # not compatible
query I rowsort label-7377
SELECT CAST ( + 50 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 91 * + col2 + col1 col2 FROM tab2 AS cor0
----
2425
2488
3475

query I rowsort
SELECT DISTINCT + col2 - + 31 FROM tab1
----
23
26
65

query I rowsort
SELECT - col0 + + 79 * col2 FROM tab2
----
1976
2126
2923

query I rowsort
SELECT ( 16 ) - - tab1.col0 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 1ffc8833304b6812bf475223957ec1a8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + 58 col0 FROM tab2
----
117
75
89

query I rowsort
SELECT col2 + - col1 + col1 AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT col0 + + ( 89 ) + + col1 AS col1 FROM tab0
----
199
221
269

query I rowsort
SELECT 54 AS col0 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor1.col0 + + 64 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
128
144
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7387
SELECT col1 + + col1 DIV - col0 FROM tab2
----
17
27
59

skipif mysql # not compatible
query I rowsort label-7387
SELECT col1 + + col1 / - col0 FROM tab2
----
17
27
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7388
SELECT + CAST( col2 AS SIGNED ) * + col1 + + col1 * + col0 FROM tab2 AS cor0
----
1054
1989
6136

skipif mysql # not compatible
query I rowsort label-7388
SELECT + CAST ( col2 AS INTEGER ) * + col1 + + col1 * + col0 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT 44 + - ( - col0 ) + 14 FROM tab1 AS cor0
----
122
138
61

query I rowsort
SELECT + + 82 * col1 + + cor0.col0 FROM tab0 cor0
----
7076
7551
7989

query I rowsort
SELECT DISTINCT + + ( - cor0.col1 ) * col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-7392
SELECT - col1 * + col1 DIV col1 + CAST( ( - col2 ) + - col1 * - col0 AS SIGNED ) FROM tab1 AS cor0
----
-2
573
931

skipif mysql # not compatible
query I rowsort label-7392
SELECT - col1 * + col1 / col1 + CAST ( ( - col2 ) + - col1 * - col0 AS INTEGER ) FROM tab1 AS cor0
----
-2
573
931

query I rowsort
SELECT ALL - 95 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-8170
-8645
-9215

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-7395
SELECT + + 50 DIV + 15 FROM tab0 AS cor0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-7395
SELECT + + 50 / + 15 FROM tab0 AS cor0
----
3
3
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7396
SELECT + 32 + - 67 DIV + col1 FROM tab0 AS cor0
----
32
32
32

skipif mysql # not compatible
query I rowsort label-7396
SELECT + 32 + - 67 / + col1 FROM tab0 AS cor0
----
32
32
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7397
SELECT CAST( NULL AS SIGNED ) + col1 * + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7397
SELECT CAST ( NULL AS INTEGER ) + col1 * + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * col2 * col1 + - ( ( col0 ) ) FROM tab1 AS cor0
----
119728
32426
75813

query I rowsort
SELECT + - ( cor0.col0 ) + - cor0.col0 * - ( ( - col2 ) ) FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT + + 42 + - 47 * + col1 * + ( - 21 ) AS col1 FROM tab2 AS cor0
----
16821
30639
58275

query I rowsort
SELECT tab0.col0 - + col0 * col2 * col0 FROM tab0
----
-1190
-18984
-649433

query I rowsort
SELECT + + 87 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

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

query I rowsort
SELECT - - ( - cor0.col1 ) FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7405
SELECT - col0 + - col0 DIV 19 FROM tab2 AS cor0
----
-7
-82
-83

skipif mysql # not compatible
query I rowsort label-7405
SELECT - col0 + - col0 / 19 FROM tab2 AS cor0
----
-7
-82
-83

query I rowsort
SELECT - - col0 - - ( + ( + cor0.col1 ) ) AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - col0 + 17 * cor0.col1 - - cor0.col2 AS col0 FROM tab2 AS cor0
----
248
547
951

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + 62 col2 FROM tab2 AS cor0
----
1054
1922
3658

query I rowsort
SELECT + + col2 * + col2 + 71 AS col1 FROM tab2 AS cor0
----
1515
747
800

query I rowsort
SELECT ALL + - col2 - - 13 * + 3 AS col1 FROM tab2 AS cor0
----
1
12
13

query I rowsort
SELECT ALL + col1 * 72 + + col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1513
3193
7729

query I rowsort
SELECT ALL - col0 + - 53 * - col2 AS col0 FROM tab1 AS cor0
----
2859
2957
5008

query I rowsort
SELECT + - col0 * + ( col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7414
SELECT ALL + + cor0.col0 DIV ( col2 ) FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7414
SELECT ALL + + cor0.col0 / ( col2 ) FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7415
SELECT ALL col1 DIV + col1 + - col0 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-7415
SELECT ALL col1 / + col1 + - col0 FROM tab2
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + 93 col1 FROM tab2 AS cor0
----
1581
2883
5487

query I rowsort
SELECT ALL col1 + col2 * - 26 FROM tab0 AS cor0
----
-2041
-772
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-7418
SELECT DISTINCT + col0 + - 45 DIV + ( + col2 ) FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7418
SELECT DISTINCT + col0 + - 45 / + ( + col2 ) FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7419
SELECT DISTINCT col2 DIV col2 + ( col1 ) DIV - 59 - - ( col1 ) AS col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-7419
SELECT DISTINCT col2 / col2 + ( col1 ) / - 59 - - ( col1 ) AS col1 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT DISTINCT col0 + 91 AS col2 FROM tab0 AS cor0
----
115
126
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 2 col0 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT ALL col2 + 51 * + col1 AS col0 FROM tab1 AS cor0
----
1380
567
759

query I rowsort
SELECT ALL - col0 - - col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + 83 + col0 FROM tab1 AS cor0
----
147
163
86

query I rowsort
SELECT - col1 * col0 - col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT - 78 * - cor0.col1 - col2 AS col2 FROM tab0 AS cor0
----
6675
7016
7565

query I rowsort
SELECT ALL + col0 + 75 AS col0 FROM tab2 AS cor0
----
153
154
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7428
SELECT DISTINCT CAST( + 28 AS SIGNED ) * - col0 FROM tab2 AS cor0
----
-196
-2184
-2212

skipif mysql # not compatible
query I rowsort label-7428
SELECT DISTINCT CAST ( + 28 AS INTEGER ) * - col0 FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT DISTINCT - 40 + col2 AS col1 FROM tab0 AS cor0
----
-39
-7
42

query I rowsort
SELECT ALL + - 21 * + col1 * + cor0.col0 FROM tab1 AS cor0
----
-13440
-1638
-21840

query I rowsort
SELECT - - ( + col2 ) * col1 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT tab2.col2 * + ( col1 ) AS col0 FROM tab2
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7433
SELECT - CAST( 78 AS SIGNED ) AS col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to c4f3c63f98c3c08f2848f46850a476d4

skipif mysql # not compatible
query I rowsort label-7433
SELECT - CAST ( 78 AS INTEGER ) AS col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to c4f3c63f98c3c08f2848f46850a476d4

query I rowsort
SELECT ALL tab1.col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-7435
SELECT ALL col1 * col0 DIV ( - ( col0 ) ) col0 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7435
SELECT ALL col1 * col0 / ( - ( col0 ) ) col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL 42 * - col0 FROM tab0
----
-1008
-1470
-3738

query I rowsort
SELECT + cor0.col1 + + 95 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c136ddc6b40629b5b662173d4b2a03f2

query I rowsort
SELECT 71 - col2 AS col2 FROM tab1
----
-25
14
17

query I rowsort
SELECT ALL + 96 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT DISTINCT 76 * cor0.col2 AS col2 FROM tab2 cor0
----
1976
2052
2888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 82 + 48 * col0 col1 FROM tab1 AS cor0
----
226
3154
3922

query I rowsort
SELECT DISTINCT + + 18 * + col1 FROM tab0 AS cor0
----
1548
1638
1746

query I rowsort
SELECT - col1 * 81 + + col2 FROM tab0 cor0
----
-6933
-7289
-7856

query I rowsort
SELECT + col2 * + ( col2 ) AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL tab1.col2 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ( + ( - col2 ) ) FROM tab2
----
-26
-27
-38

query I rowsort
SELECT col2 - 97 FROM tab1 AS cor0
----
-1
-40
-43

query I rowsort
SELECT - 70 + - col2 FROM tab1
----
-124
-127
-166

query I rowsort
SELECT tab1.col2 * - col2 * col0 + 46 + col2 AS col1 FROM tab1
----
-207833
-737138
-8648

query I rowsort
SELECT ALL col2 + + col2 * 78 AS col0 FROM tab2
----
2054
2133
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7451
SELECT - col2 + col0 DIV + col0 + + col1 FROM tab1
----
-27
-46
-82

skipif mysql # not compatible
query I rowsort label-7451
SELECT - col2 + col0 / + col0 + + col1 FROM tab1
----
-27
-46
-82

query I rowsort
SELECT ALL - 24 + col2 AS col1 FROM tab2
----
14
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7453
SELECT + col2 * col0 DIV col1 FROM tab2
----
176
34
6

skipif mysql # not compatible
query I rowsort label-7453
SELECT + col2 * col0 / col1 FROM tab2
----
176
34
6

query I rowsort
SELECT DISTINCT + col1 + + 62 AS col2 FROM tab0 cor0
----
148
153
159

query I rowsort
SELECT col2 + ( + col0 ) * col0 AS col1 FROM tab2 cor0
----
6110
6279
76

query I rowsort
SELECT ALL col0 * 38 + + col2 * col1 AS col1 FROM tab0 AS cor0
----
10844
1427
3750

query I rowsort
SELECT - col1 + 60 FROM tab2 AS cor0
----
1
29
43

query I rowsort
SELECT DISTINCT col1 + + col0 * - cor0.col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL - - col0 + 45 * - col2 FROM tab2 AS cor0
----
-1092
-1208
-1631

query I rowsort
SELECT + col1 + 33 FROM tab0 AS cor0
----
119
124
130

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7461
SELECT DISTINCT + - col0 / + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7461
SELECT DISTINCT + - col0 / + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - col1 * + 12 + cor0.col0 FROM tab0 AS cor0
----
-1003
-1008
-1129

query I rowsort
SELECT ALL col1 + ( + col2 ) FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7464
SELECT - + col2 * 32 + + 73 DIV col0 AS col1 FROM tab2 AS cor0
----
-1216
-832
-854

skipif mysql # not compatible
query I rowsort label-7464
SELECT - + col2 * 32 + + 73 / col0 AS col1 FROM tab2 AS cor0
----
-1216
-832
-854

query I rowsort
SELECT + tab1.col1 + + tab1.col2 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to c78408d90c4e135ef1bbc23c5252cd1d

query I rowsort
SELECT DISTINCT - tab0.col0 + 33 FROM tab0
----
-2
-56
9

query I rowsort
SELECT DISTINCT col1 + ( col2 * + col1 ) FROM tab1
----
1261
1430
580

query I rowsort
SELECT DISTINCT + col1 * + col1 + - col0 AS col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT - col0 * col2 + 55 * - col2 AS col0 FROM tab1 AS cor0
----
-12960
-3132
-6783

query I rowsort
SELECT + - col0 + + 29 FROM tab2 AS cor0
----
-49
-50
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-7471
SELECT ALL - cor0.col1 DIV col1 AS col0 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7471
SELECT ALL - cor0.col1 / col1 AS col0 FROM tab2 cor0
----
-1
-1
-1

query I rowsort
SELECT + - 61 * + col0 * cor0.col1 + - col1 AS col1 FROM tab2 cor0
----
-13268
-280781
-81940

query I rowsort
SELECT + - 32 AS col2 FROM tab1 AS cor0
----
-32
-32
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7474
SELECT - CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7474
SELECT - CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 98 + + ( col0 ) AS col1 FROM tab1 AS cor0
----
101
162
178

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7476
SELECT + CAST( col0 AS SIGNED ) * + col2 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-7476
SELECT + CAST ( col0 AS INTEGER ) * + col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 99 col0 FROM tab2 AS cor0
----
-1683
-3069
-5841

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 + col2 * + 77 col1 FROM tab0 cor0
----
106
2570
6343

query I rowsort
SELECT + col1 + col1 * col1 AS col0 FROM tab0 cor0
----
7482
8372
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7480
SELECT + ( cor0.col2 ) + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + + 65 + col2 * + cor0.col1 FROM tab2 AS cor0
----
1599
711
902

query I rowsort
SELECT + ( + col1 ) * 2 AS col2 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * ( 39 ) col1 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT - + cor0.col2 + - ( col1 ) * col1 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT + + 58 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT 27 + - col0 * - col2 AS col1 FROM tab1
----
189
3675
7707

query I rowsort
SELECT 1 * col2 + ( - 12 ) FROM tab0
----
-11
21
70

query I rowsort
SELECT ALL + - col2 * + col1 + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT col0 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - ( - col2 ) * cor0.col1 + + 72 * + col1 * - 21 AS col0 FROM tab2 AS cor0
----
-25058
-46035
-87674

query I rowsort
SELECT - cor0.col0 - col1 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-7493
SELECT DISTINCT + - 16 * col0 + - ( col2 ) DIV - col1 FROM tab0 AS cor0
----
-1424
-384
-560

skipif mysql # not compatible
query I rowsort label-7493
SELECT DISTINCT + - 16 * col0 + - ( col2 ) / - col1 FROM tab0 AS cor0
----
-1424
-384
-560

query I rowsort
SELECT - + ( + col2 ) + - col1 + + col2 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + 91 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT ALL 94 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

onlyif mysql # use DIV operator for integer division
query I rowsort label-7497
SELECT + col1 - col2 DIV cor0.col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7497
SELECT + col1 - col2 / cor0.col1 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 80 * + col2 col0 FROM tab0 AS cor0
----
-2640
-6560
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7499
SELECT - ( - col1 ) + + ( col0 ) DIV - col0 - + col0 * col0 FROM tab2 AS cor0
----
-19
-6026
-6225

skipif mysql # not compatible
query I rowsort label-7499
SELECT - ( - col1 ) + + ( col0 ) / - col0 - + col0 * col0 FROM tab2 AS cor0
----
-19
-6026
-6225

onlyif mysql # use DIV operator for integer division
query I rowsort label-7500
SELECT - ( col1 ) DIV - ( col0 ) + col1 * tab0.col1 + - col0 DIV tab0.col1 col0 FROM tab0
----
7399
8282
9411

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7500
SELECT - ( col1 ) / - ( col0 ) + col1 * tab0.col1 + - col0 / tab0.col1 col0 FROM tab0
----
7399
8282
9411

query I rowsort
SELECT cor0.col2 + - col0 AS col1 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-7502
SELECT + col2 + ( - 47 ) DIV col1 AS col0 FROM tab1 AS cor0
----
53
53
93

skipif mysql # not compatible
query I rowsort label-7502
SELECT + col2 + ( - 47 ) / col1 AS col0 FROM tab1 AS cor0
----
53
53
93

query I rowsort
SELECT - 83 FROM tab2, tab2 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 291feef3dca992d41fad4b2f7ab1ab9e

query I rowsort
SELECT col2 + 71 FROM tab0 AS cor0
----
104
153
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7505
SELECT + - CAST( cor0.col2 AS SIGNED ) * - col1 col0 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7505
SELECT + - CAST ( cor0.col2 AS INTEGER ) * - col1 col0 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL + 42 * - 0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL ( + cor0.col1 ) * - col2 + cor0.col2 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 29 col2 FROM tab1 AS cor0
----
-1856
-2320
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-7509
SELECT ALL - + col2 DIV 53 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7509
SELECT ALL - + col2 / 53 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 32 * col2 + col2 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-27
-570
702

query I rowsort
SELECT 80 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + 43 * - col0 col2 FROM tab2
----
-270
-3295
-3380

query I rowsort
SELECT 76 + - ( + tab0.col0 + col1 ) * 89 AS col1 FROM tab0
----
-11672
-15944
-9714

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT ALL + 63 * - 0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col2 + col0 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT DISTINCT - + 39 AS col2 FROM tab2 AS cor0
----
-39

query I rowsort
SELECT ALL ( - cor0.col2 ) * col0 + - col1 AS col0 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL + cor0.col0 + + 58 AS col1 FROM tab1 AS cor0
----
122
138
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7520
SELECT DISTINCT + CAST( + 91 AS SIGNED ) - - cor0.col1 col1 FROM tab1 AS cor0
----
101
104
117

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7520
SELECT DISTINCT + CAST ( + 91 AS INTEGER ) - - cor0.col1 col1 FROM tab1 AS cor0
----
101
104
117

query I rowsort
SELECT col1 * 24 AS col1 FROM tab1 AS cor0
----
240
312
624

query I rowsort
SELECT DISTINCT - - col0 * 43 FROM tab0 AS cor0
----
1032
1505
3827

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) + col0 * + col2 col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + col2 * + 30 AS col1 FROM tab2 cor0
----
1140
780
810

query I rowsort
SELECT DISTINCT 94 * col0 + col2 + 32 FROM tab1 AS cor0
----
368
6105
7648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 34 + - cor0.col2 col0 FROM tab2 AS cor0
----
-4
7
8

query I rowsort
SELECT ALL col2 + col2 + - 88 FROM tab2 AS cor0
----
-12
-34
-36

query I rowsort
SELECT ALL 2 + cor0.col0 FROM tab2 AS cor0
----
80
81
9

query I rowsort
SELECT ALL - 7 + + col2 FROM tab1 cor0
----
47
50
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7530
SELECT ALL CAST( - col2 AS SIGNED ) FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7530
SELECT ALL CAST ( - col2 AS INTEGER ) FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ALL + col2 * - col0 - + col1 FROM tab1 cor0
----
-188
-3658
-7693

query I rowsort
SELECT + 89 * + col2 FROM tab1 AS cor0
----
4806
5073
8544

query I rowsort
SELECT 11 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

onlyif mysql # use DIV operator for integer division
query I rowsort label-7534
SELECT col0 DIV - ( + col2 * col0 ) AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7534
SELECT col0 / - ( + col2 * col0 ) AS col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL + cor0.col2 * 13 AS col1 FROM tab2 AS cor0
----
338
351
494

query I rowsort
SELECT 98 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT + + col0 + + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col2 * col0 * + col1 col1 FROM tab1 AS cor0
----
36423
4158
99744

query I rowsort
SELECT DISTINCT - col2 + + col0 * - col2 FROM tab2 AS cor0
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-7540
SELECT DISTINCT cor0.col0 DIV 15 FROM tab0 AS cor0
----
1
2
5

skipif mysql # not compatible
query I rowsort label-7540
SELECT DISTINCT cor0.col0 / 15 FROM tab0 AS cor0
----
1
2
5

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 FROM tab0, tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7542
SELECT - + col2 DIV + ( - col1 * col1 ) AS col1 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7542
SELECT - + col2 / + ( - col1 * col1 ) AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT 70 * cor1.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 32a5976fc16eba6a3e2ecf21b53d4938

query I rowsort
SELECT ALL - + 10 * ( - col2 ) * 16 AS col1 FROM tab1 AS cor0
----
15360
8640
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-7545
SELECT DISTINCT - - col0 DIV + col2 AS col0 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-7545
SELECT DISTINCT - - col0 / + col2 AS col0 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT - + col1 * col2 * - col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL ( col0 ) + - col2 * - 12 AS col2 FROM tab1 AS cor0
----
1232
651
748

query I rowsort
SELECT ALL + 79 * cor0.col0 FROM tab0 AS cor0
----
1896
2765
7031

query I rowsort
SELECT + col1 - - 15 * + col2 AS col1 FROM tab1
----
1453
836
865

query I rowsort
SELECT DISTINCT col0 * + col2 + - col1 * + col2 AS col1 FROM tab2
----
-648
2356
494

query I rowsort
SELECT ALL 37 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7552
SELECT DISTINCT col0 + CAST( NULL AS SIGNED ) * col1 + tab1.col0 AS col2 FROM tab1
----
NULL

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7553
SELECT - col2 - CAST( NULL AS SIGNED ) * 84 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7553
SELECT - col2 - CAST ( NULL AS INTEGER ) * 84 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + tab2.col0 + col1 FROM tab2
----
11
111
58

query I rowsort
SELECT 13 * col2 AS col1 FROM tab2
----
338
351
494

query I rowsort
SELECT + col2 + - col2 * col0 AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-7557
SELECT - 75 * + col0 + col1 * col1 DIV col2 FROM tab0 AS cor0
----
-1576
-6575
6784

skipif mysql # not compatible
query I rowsort label-7557
SELECT - 75 * + col0 + col1 * col1 / col2 FROM tab0 AS cor0
----
-1576
-6575
6784

query I rowsort
SELECT + - ( cor0.col0 ) - ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + + col2 + + col1 * - col1 * - 29 AS col1 FROM tab1 cor0
----
19658
2957
4997

query I rowsort
SELECT ALL - 80 * + col0 FROM tab2 AS cor0
----
-560
-6240
-6320

query I rowsort
SELECT DISTINCT - 2 * col1 + col2 AS col1 FROM tab2 AS cor0
----
-35
-92
4

query I rowsort
SELECT DISTINCT + col0 - col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - 85 + col1 AS col0 FROM tab2 AS cor0
----
-26
-54
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7564
SELECT ALL + 19 * + col2 + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
520
572
801

skipif mysql # not compatible
query I rowsort label-7564
SELECT ALL + 19 * + col2 + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
520
572
801

query I rowsort
SELECT + - 32 FROM tab1, tab2 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT - col1 * + 48 + - col1 FROM tab2 AS cor0
----
-1519
-2891
-833

onlyif mysql # use DIV operator for integer division
query I rowsort label-7567
SELECT + col0 DIV col1 + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7567
SELECT + col0 / col1 + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + col2 * col1 + col2 * + col0 FROM tab0
----
132
14760
3630

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 4c87430a2010fee8daf6d04acf0ad703

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col0 ) * cor0.col0 col1 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) * + col1 col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + - ( + col1 ) * col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + - 12 FROM tab1 cor0
----
-12
-12
-12

query I rowsort
SELECT - col0 + cor0.col1 * col0 AS col2 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL + 70 * tab1.col0 FROM tab1
----
210
4480
5600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 50 col0 FROM tab1, tab0 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT ( + cor0.col2 ) + + ( + col0 + cor0.col1 ) * - col1 FROM tab2 AS cor0
----
-1151
-1594
-8057

query I rowsort
SELECT - col1 * - col0 + - col0 * ( 70 * - col0 ) AS col2 FROM tab2
----
3647
430482
438213

query I rowsort
SELECT ( 13 + col1 ) AS col2 FROM tab2
----
30
44
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7580
SELECT CAST( NULL AS SIGNED ) * 77 + col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7580
SELECT CAST ( NULL AS INTEGER ) * 77 + col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 97 * + tab0.col1 AS col2 FROM tab0
----
8342
8827
9409

query I rowsort
SELECT + cor0.col0 + tab0.col2 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to bd4afbebf32cf7139d4a26f0c77f8156

query I rowsort
SELECT + + 76 * col2 FROM tab1 AS cor0
----
4104
4332
7296

query I rowsort
SELECT DISTINCT cor1.col0 * - 66 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-462
-5148
-5214

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT cor0.col1 * cor0.col0 * 54 FROM tab0 AS cor0
----
111456
183330
437346

query I rowsort
SELECT ALL 60 * col0 FROM tab1
----
180
3840
4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col2 FROM tab0
----
86
86
86

query I rowsort
SELECT DISTINCT - tab1.col1 * + col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - 27 + - cor0.col2 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2a301dcdda03726a50ddd0057ba4a496

query I rowsort
SELECT DISTINCT 92 AS col2 FROM tab1, tab1 cor0, tab2 AS cor1
----
92

query I rowsort
SELECT DISTINCT 84 * col0 AS col1 FROM tab0
----
2016
2940
7476

query I rowsort
SELECT ALL 73 * + col0 FROM tab1
----
219
4672
5840

query I rowsort
SELECT + - tab1.col0 AS col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT + 6 + - col2 * - col2 * - col0 FROM tab2 cor0
----
-114070
-5097
-52722

query I rowsort
SELECT 42 + - cor0.col2 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
139
2880
7504

query I rowsort
SELECT DISTINCT 68 * cor0.col0 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
204
4352
5440

query I rowsort
SELECT - col2 * col0 + col2 + 51 FROM tab2 AS cor0
----
-111
-1951
-2913

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7599
SELECT + - CAST( NULL AS SIGNED ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7599
SELECT + - CAST ( NULL AS INTEGER ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7600
SELECT CAST( + 30 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
30
30
30

skipif mysql # not compatible
query I rowsort label-7600
SELECT CAST ( + 30 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
30
30
30

query I rowsort
SELECT + ( 32 ) AS col2 FROM tab1 AS cor0
----
32
32
32

query I rowsort
SELECT - + cor0.col0 * col2 + + col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7603
SELECT ALL col0 * CAST( NULL AS SIGNED ) * col0 + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7603
SELECT ALL col0 * CAST ( NULL AS INTEGER ) * col0 + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7604
SELECT DISTINCT - cor0.col1 * - CAST( col2 AS SIGNED ) + + col1 * 82 col1 FROM tab0 AS cor0
----
14924
8051
9890

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7604
SELECT DISTINCT - cor0.col1 * - CAST ( col2 AS INTEGER ) + + col1 * 82 col1 FROM tab0 AS cor0
----
14924
8051
9890

query I rowsort
SELECT col2 + - col2 * col1 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT col1 * 77 FROM tab0 cor0
----
6622
7007
7469

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7607
SELECT DISTINCT + ( + 57 ) * col1 + + CAST( + 63 AS SIGNED ) + col0 FROM tab0 AS cor0
----
4989
5339
5627

skipif mysql # not compatible
query I rowsort label-7607
SELECT DISTINCT + ( + 57 ) * col1 + + CAST ( + 63 AS INTEGER ) + col0 FROM tab0 AS cor0
----
4989
5339
5627

query I rowsort
SELECT DISTINCT - col0 - col1 * - col2 AS col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - + 21 + - col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
168
2007
2981

query I rowsort
SELECT ALL + ( - 66 ) AS col2 FROM tab2 AS cor0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT + col1 + - 88 FROM tab0 AS cor0
----
-2
3
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7612
SELECT ALL - ( col2 ) DIV col2 + 86 - 81 * - col0 col1 FROM tab0 AS cor0
----
2029
2920
7294

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7612
SELECT ALL - ( col2 ) / col2 + 86 - 81 * - col0 col1 FROM tab0 AS cor0
----
2029
2920
7294

query I rowsort
SELECT - col1 * 4 AS col0 FROM tab2 AS cor0
----
-124
-236
-68

query I rowsort
SELECT ALL - + ( 74 ) + + col0 FROM tab1 AS cor0
----
-10
-71
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-7615
SELECT DISTINCT - + ( + col0 ) + - col1 DIV - col0 + - col2 AS col2 FROM tab2 AS cor0
----
-104
-117
-30

skipif mysql # not compatible
query I rowsort label-7615
SELECT DISTINCT - + ( + col0 ) + - col1 / - col0 + - col2 AS col2 FROM tab2 AS cor0
----
-104
-117
-30

query I rowsort
SELECT ALL ( cor0.col1 ) * + col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - col0 * col1 + 86 * col0 AS col0 FROM tab2
----
2106
385
5451

query I rowsort
SELECT + 19 * 70 AS col0 FROM tab0 AS cor0
----
1330
1330
1330

query I rowsort
SELECT DISTINCT - 29 * col2 AS col0 FROM tab1 AS cor0
----
-1566
-1653
-2784

query I rowsort
SELECT + 64 + col0 AS col2 FROM tab2 AS cor0
----
142
143
71

query I rowsort
SELECT - - col0 * col1 + col2 AS col0 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT + 27 AS col2 FROM tab2 cor0
----
27

query I rowsort
SELECT + 83 * - col0 AS col0 FROM tab1 AS cor0
----
-249
-5312
-6640

query I rowsort
SELECT + - 77 + cor0.col1 FROM tab1 cor0
----
-51
-64
-67

query I rowsort
SELECT ALL col2 * - 5 AS col2 FROM tab1
----
-270
-285
-480

onlyif mysql # use DIV operator for integer division
query I rowsort label-7626
SELECT DISTINCT 10 DIV cor0.col0 FROM tab2 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-7626
SELECT DISTINCT 10 / cor0.col0 FROM tab2 cor0
----
0
1

query I rowsort
SELECT DISTINCT + - col0 * + col0 + 96 AS col2 FROM tab1 AS cor0
----
-4000
-6304
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - 94 ) col1 FROM tab0
----
-94

query I rowsort
SELECT ALL col1 + col2 + col2 FROM tab1
----
124
134
205

query I rowsort
SELECT - 83 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT + cor0.col2 + - col2 * col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT col2 * - col1 + tab2.col2 AS col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT + + col1 * col2 * col0 FROM tab1 cor0
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - ( + col0 ) col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col1 * - col2 + - col2 AS col0 FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT - 66 + col1 * col1 FROM tab2
----
223
3415
895

query I rowsort
SELECT ( col2 ) * + col1 * col0 + col2 AS col0 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT + 77 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT ALL + - col1 * 64 + + ( col0 ) * 0 FROM tab0 AS cor0
----
-5504
-5824
-6208

query I rowsort
SELECT ALL - - col1 + - col2 * col2 AS col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT - - col1 * 9 * - col0 + + col1 * + ( col2 + - col2 ) * + col2 FROM tab1 AS cor0
----
-5760
-702
-9360

query I rowsort
SELECT DISTINCT + col0 * + 72 FROM tab0 AS cor0
----
1728
2520
6408

query I rowsort
SELECT ALL - - col0 * col1 + - col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + col2 + + 77 * + 90 * + col1 AS col0 FROM tab0
----
596013
630712
672211

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7645
SELECT DISTINCT - col2 + CAST( + 12 AS SIGNED ) * cor0.col2 col1 FROM tab1 AS cor0
----
1056
594
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7645
SELECT DISTINCT - col2 + CAST ( + 12 AS INTEGER ) * cor0.col2 col1 FROM tab1 AS cor0
----
1056
594
627

query I rowsort
SELECT DISTINCT tab1.col2 - col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT - 20 + col2 FROM tab0
----
-19
13
62

query I rowsort
SELECT DISTINCT col1 - - col1 * col2 AS col1 FROM tab1
----
1261
1430
580

query I rowsort
SELECT DISTINCT + 87 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
87

query I rowsort
SELECT - - ( + 92 ) * col2 - col2 AS col1 FROM tab1 AS cor0
----
4914
5187
8736

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7651
SELECT DISTINCT CAST( col2 AS SIGNED ) * - col2 + - col2 * col2 - col0 * col0 FROM tab0 AS cor0
----
-1227
-21369
-2754

skipif mysql # not compatible
query I rowsort label-7651
SELECT DISTINCT CAST ( col2 AS INTEGER ) * - col2 + - col2 * col2 - col0 * col0 FROM tab0 AS cor0
----
-1227
-21369
-2754

query I rowsort
SELECT ALL + 52 + - col1 + + col1 * - 94 FROM tab0 cor0
----
-8118
-8593
-9163

query I rowsort
SELECT - col1 * - col2 + - col2 AS col1 FROM tab2 cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT + ( - 36 ) FROM tab0 AS cor0
----
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-7655
SELECT ALL - 74 + - 36 + + col1 DIV - 55 AS col0 FROM tab1 AS cor0
----
-110
-110
-110

skipif mysql # not compatible
query I rowsort label-7655
SELECT ALL - 74 + - 36 + + col1 / - 55 AS col0 FROM tab1 AS cor0
----
-110
-110
-110

query I rowsort
SELECT - col1 * col1 + - col0 AS col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7657
SELECT ALL + CAST( NULL AS DECIMAL ) + tab0.col1 * + col2 col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7657
SELECT ALL + CAST ( NULL AS REAL ) + tab0.col1 * + col2 col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + cor0.col2 + + 91 FROM tab0 AS cor0
----
1180
6815
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7659
SELECT + col2 DIV col1 + - col1 FROM tab1 cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-7659
SELECT + col2 / col1 + - col1 FROM tab1 cor0
----
-24
-5
-6

query I rowsort
SELECT + 59 * - col1 FROM tab1
----
-1534
-590
-767

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7661
SELECT - + col1 * col2 - CAST( + col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif mysql # not compatible
query I rowsort label-7661
SELECT - + col1 * col2 - CAST ( + col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL - 89 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c36e597b7bc5727536f5bb580e6cebbc

onlyif mysql # use DIV operator for integer division
query I rowsort label-7663
SELECT - - col1 DIV col0 AS col1 FROM tab1 cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7663
SELECT - - col1 / col0 AS col1 FROM tab1 cor0
----
0
0
8

query I rowsort
SELECT ALL col1 + col0 * col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-7665
SELECT ALL + col2 DIV col0 - - col2 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-7665
SELECT ALL + col2 / col0 - - col2 FROM tab0 AS cor0
----
1
34
82

query I rowsort
SELECT col2 AS col0 FROM tab0 WHERE NOT col1 <= ( + col1 * - col0 - - col2 )
----
1
33
82

query I rowsort
SELECT DISTINCT col0 * col0 + + col2 AS col1 FROM tab1
----
4153
63
6496

query I rowsort
SELECT ALL - col0 * col2 * col2 + col0 * col2 FROM tab0
----
-25344
-591138
0

query I rowsort
SELECT DISTINCT tab2.col2 + - col0 * - col2 * tab2.col2 FROM tab2
----
114114
5130
52754

query I rowsort
SELECT col0 * tab2.col2 FROM tab2 WHERE col2 IN ( col2 + + col1 )
----

query I rowsort
SELECT ALL - col2 * col1 * col1 + col0 * - col1 FROM tab1
----
-17264
-36582
-6340

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL BETWEEN NULL AND ( NULL )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT - col0 NOT IN ( + col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col1 col0 FROM tab1
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col1 FROM tab1 WHERE NULL <> col0
----

query I rowsort
SELECT ALL + col2 * + col0 / col0 + col0 FROM tab0 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT 95 * col2 FROM tab2 AS cor0
----
2470
2565
3610

query I rowsort
SELECT DISTINCT - 16 + + cor0.col1 FROM tab0 cor0
----
70
75
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7679
SELECT + 20 * col0 + ( + col2 ) DIV + col0 AS col1 FROM tab2 cor0
----
143
1560
1580

skipif mysql # not compatible
query I rowsort label-7679
SELECT + 20 * col0 + ( + col2 ) / + col0 AS col1 FROM tab2 cor0
----
143
1560
1580

onlyif mysql # use DIV operator for integer division
query I rowsort label-7680
SELECT ALL + 84 DIV col0 col2 FROM tab2
----
1
1
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7680
SELECT ALL + 84 / col0 col2 FROM tab2
----
1
1
12

query I rowsort
SELECT ALL - tab1.col1 - col0 AS col1 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT ALL - col2 + col2 AS col0 FROM tab1 WHERE - col2 >= NULL
----

query I rowsort
SELECT DISTINCT col0 * col1 * col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT col2 / col1 AS col0 FROM tab0 cor0 WHERE - col1 + col2 < ( NULL )
----

query III rowsort
SELECT * FROM tab2 WHERE - col1 NOT IN ( + col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL col1 - - cor0.col0 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + col0 * + col0 + + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT - cor0.col2 + + cor0.col2 * + col2 AS col0 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT col2 + + tab0.col2 * + tab0.col2 + col0 FROM tab0
----
1146
37
6895

query I rowsort
SELECT - col0 - col0 * + col2 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT - col2 * + col0 + + col1 FROM tab1
----
-136
-3638
-7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - - tab2.col0 col0 FROM tab2
----
104
117
34

query I rowsort
SELECT col0 AS col0 FROM tab2 WHERE NOT NULL NOT IN ( col1 )
----

query I rowsort
SELECT DISTINCT + col1 * col1 * col2 + col2 AS col1 FROM tab1
----
16320
36558
5757

query I rowsort
SELECT DISTINCT + col1 FROM tab1 WHERE NOT + col2 = ( col0 )
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - tab2.col1 col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT col2 * - col0 + col2 + - col2 AS col2 FROM tab1
----
-162
-3648
-7680

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL BETWEEN - col0 * + col1 + col0 AND NULL
----

query I rowsort
SELECT tab1.col1 * - col0 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - 90 + + cor0.col2 AS col2 FROM tab1, tab2, tab2 AS cor0
----
-52
-63
-64

query I rowsort
SELECT - ( col2 ) + - col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - - col1 * col0 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT col2 * + 1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - col2 * + 43 AS col0 FROM tab1 cor0
----
2322
2451
4128

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + col2 col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - - 70 * col0 FROM tab1 AS cor0
----
210
4480
5600

query I rowsort
SELECT ALL 10 * - col1 AS col1 FROM tab1 cor0
----
-100
-130
-260

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col2 FROM tab2, tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + - cor0.col1 + ( - col0 ) FROM tab1 AS cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + col1 + 14 col0 FROM tab0 AS cor0
----
16
76
76

query I rowsort
SELECT col2 + 90 * col0 FROM tab1 AS cor0
----
324
5817
7296

onlyif mysql # use DIV operator for integer division
query I rowsort label-7712
SELECT + - cor0.col1 DIV 81 AS col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7712
SELECT + - cor0.col1 / 81 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 + col1 + 35 * col2 FROM tab0 AS cor0
----
1208
131
2879

onlyif mysql # use DIV operator for integer division
query I rowsort label-7714
SELECT + col1 DIV + tab0.col1 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7714
SELECT + col1 / + tab0.col1 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort
SELECT 75 + col1 * + CAST ( + 41 AS REAL ) AS col2 FROM tab2
----
1346
2494
772

onlyif mysql # use DIV operator for integer division
query I rowsort label-7716
SELECT DISTINCT - 77 + col0 DIV - col1 AS col1 FROM tab2
----
-77
-78
-81

skipif mysql # not compatible
query I rowsort label-7716
SELECT DISTINCT - 77 + col0 / - col1 AS col1 FROM tab2
----
-77
-78
-81

query I rowsort
SELECT - 43 * col1 AS col0 FROM tab1
----
-1118
-430
-559

query I rowsort
SELECT DISTINCT col2 + col1 * tab1.col0 * + tab1.col0 FROM tab1
----
288
41017
83296

query I rowsort
SELECT + ( 41 ) FROM tab2, tab1 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT col1 * + 0 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7721
SELECT ALL - - col0 DIV col1 AS col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-7721
SELECT ALL - - col0 / col1 AS col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT - 34 - - ( col1 ) FROM tab0
----
52
57
63

query I rowsort
SELECT DISTINCT + col1 + 14 * - col2 * col0 AS col1 FROM tab1
----
-107507
-2242
-51062

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 * + 35 col0 FROM tab0
----
3010
3010
3010

query I rowsort
SELECT DISTINCT - col0 * col2 + col1 * col0 FROM tab0
----
1272
3360
801

query I rowsort
SELECT DISTINCT - 56 * col1 + - col1 * + col1 * + col0 - col2 AS col1 FROM tab2 AS cor0
----
-23821
-274848
-8490

query I rowsort
SELECT - 75 + - 83 * - col1 AS col0 FROM tab2
----
1336
2498
4822

onlyif mysql # use DIV operator for integer division
query I rowsort label-7728
SELECT ALL col2 + col0 DIV col2 FROM tab1
----
54
58
96

skipif mysql # not compatible
query I rowsort label-7728
SELECT ALL col2 + col0 / col2 FROM tab1
----
54
58
96

query I rowsort
SELECT ALL + + col2 * col1 + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT ( col2 ) + col1 * col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-7731
SELECT ALL + + col2 + + col0 DIV col1 AS col1 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7731
SELECT ALL + + col2 + + col0 / col1 AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT col2 * - cor0.col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 * + col1 col2 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT + ( - ( col2 ) ) AS col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ALL - - col2 + - col1 AS col2 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + - 5 * col0 - col2 AS col2 FROM tab0 AS cor0
----
-153
-176
-527

onlyif mysql # use DIV operator for integer division
query I rowsort label-7737
SELECT DISTINCT - col0 + - cor0.col2 DIV col0 FROM tab2 AS cor0
----
-10
-78
-79

skipif mysql # not compatible
query I rowsort label-7737
SELECT DISTINCT - col0 + - cor0.col2 / col0 FROM tab2 AS cor0
----
-10
-78
-79

query I rowsort
SELECT DISTINCT - 10 * col1 AS col0 FROM tab2 AS cor0
----
-170
-310
-590

query I rowsort
SELECT ALL 76 + cor0.col0 FROM tab0 cor0
----
100
111
165

query I rowsort
SELECT + col1 * + ( + ( - col1 ) ) + col0 * + col1 * col2 AS col0 FROM tab0 AS cor0
----
-6014
60716
655837

query I rowsort
SELECT + col1 - - 90 FROM tab2 AS cor0
----
107
121
149

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7742
SELECT DISTINCT tab0.col2 / - CAST( NULL AS SIGNED ) + col0 * col1 * col1 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7742
SELECT DISTINCT tab0.col2 / - CAST ( NULL AS INTEGER ) + col0 * col1 * col1 AS col2 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7743
SELECT DISTINCT + col0 * CAST( col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-7743
SELECT DISTINCT + col0 * CAST ( col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + - col0 * + ( - 59 ) - cor0.col0 FROM tab1 AS cor0
----
174
3712
4640

query I rowsort
SELECT DISTINCT - col1 + + col2 * + cor0.col2 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT col2 * 44 AS col2 FROM tab2 AS cor0
----
1144
1188
1672

query I rowsort
SELECT + col2 * - ( - 0 ) - - col0 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + col1 * - col0 + + col2 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT ( - col2 * col0 ) AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - + col0 - - col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col0 * ( - 37 ) + + col2 FROM tab1 AS cor0
----
-2311
-2864
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7752
SELECT col2 * - CAST( NULL AS SIGNED ) - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7752
SELECT col2 * - CAST ( NULL AS INTEGER ) - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * + 48 + col1 + - col0 AS col2 FROM tab1 AS cor0
----
2615
2682
4541

query I rowsort
SELECT + col2 - + 53 FROM tab1 cor0
----
1
4
43

query I rowsort
SELECT - ( + col2 ) * cor0.col1 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7756
SELECT DISTINCT CAST( cor0.col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7756
SELECT DISTINCT CAST ( cor0.col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - ( col0 ) * + col1 + col2 * col1 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT ( + col0 ) + + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL ( - col1 ) * col2 + cor0.col1 FROM tab2 AS cor0
----
-1475
-629
-806

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 cor1, tab1 cor2
----
972 values hashing to 9364ef7545b07c67767dceb70f02c643

onlyif mysql # use DIV operator for integer division
query I rowsort label-7761
SELECT ALL - col2 + + col0 DIV col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7761
SELECT ALL - col2 + + col0 / col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + col2 col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT ALL - - col2 * cor0.col1 + col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + col1 * - col0 + col2 * - col0 AS col0 FROM tab1 cor0
----
-240
-4288
-8720

query I rowsort
SELECT ALL + col0 * - col2 * col2 AS col2 FROM tab0 AS cor0
----
-26136
-35
-598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-7766
SELECT DISTINCT col1 DIV - col2 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-7766
SELECT DISTINCT col1 / - col2 FROM tab1 cor0
----
0

query I rowsort
SELECT + - col1 * - col1 * col2 + - col0 AS col1 FROM tab1 AS cor0
----
16144
36501
5636

query I rowsort
SELECT DISTINCT + col1 + col2 * col2 * + col2 AS col1 FROM tab1 AS cor0
----
157490
185203
884749

query I rowsort
SELECT ALL + col1 - col0 AS col1 FROM tab0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7770
SELECT ALL col1 * + col1 - + col2 DIV + tab0.col0 FROM tab0
----
7395
8281
9409

skipif mysql # not compatible
query I rowsort label-7770
SELECT ALL col1 * + col1 - + col2 / + tab0.col0 FROM tab0
----
7395
8281
9409

query I rowsort
SELECT DISTINCT + col0 * col2 * cor0.col1 + col1 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
36433
4184
99757

query I rowsort
SELECT - cor0.col1 * + col1 - col1 AS col0 FROM tab1 AS cor0
----
-110
-182
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col2 + + cor0.col1 col1 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT ALL + col2 + col2 * - col2 AS col2 FROM tab0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * tab1.col1 * + col1 + col1 col0 FROM tab1
----
-17550
-2184
-990

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

query I rowsort
SELECT - col1 + col0 + col1 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL col1 + tab2.col0 * tab2.col0 + col2 AS col2 FROM tab2
----
107
6169
6296

query I rowsort
SELECT + 3 AS col2 FROM tab0
----
3
3
3

query I rowsort
SELECT DISTINCT col0 + + col2 + col2 FROM tab2
----
130
155
61

query I rowsort
SELECT ALL + tab0.col1 + col0 AS col0 FROM tab0
----
110
132
180

query I rowsort
SELECT - col1 + col1 * + col0 + tab1.col2 AS col1 FROM tab1
----
106
1123
687

onlyif mysql # use DIV operator for integer division
query I rowsort label-7783
SELECT tab0.col1 DIV - col2 AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-7783
SELECT tab0.col1 / - col2 AS col0 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT col2 + + col2 * - col2 - + col0 FROM tab1
----
-2865
-3256
-9200

query I rowsort
SELECT col1 * col2 * - col0 FROM tab0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-7786
SELECT ALL - col0 DIV - col0 + - col0 * + tab1.col1 * col1 + + tab1.col0 FROM tab1
----
-13439
-2024
-6335

skipif mysql # not compatible
query I rowsort label-7786
SELECT ALL - col0 / - col0 + - col0 * + tab1.col1 * col1 + + tab1.col0 FROM tab1
----
-13439
-2024
-6335

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col0 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col2 + col1 + col0 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL + + col2 + + col2 * col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - col0 * + col1 * cor0.col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT - col2 * + col2 + + ( + col0 + col2 ) FROM tab2 AS cor0
----
-1327
-572
-695

query I rowsort
SELECT + cor0.col1 + 15 AS col0 FROM tab2 AS cor0
----
32
46
74

query I rowsort
SELECT - col0 + col2 * 78 FROM tab1 AS cor0
----
4209
4382
7408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7794
SELECT - ( + col2 ) DIV - col0 + + col0 AS col1 FROM tab2
----
10
78
79

skipif mysql # not compatible
query I rowsort label-7794
SELECT - ( + col2 ) / - col0 + + col0 AS col1 FROM tab2
----
10
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 69 ) col1 FROM tab1, tab2 AS cor0
----
69

query I rowsort
SELECT DISTINCT 75 AS col2 FROM tab2, tab0 AS cor0
----
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7797
SELECT DISTINCT - + col0 / CAST( NULL AS SIGNED ) + col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7797
SELECT DISTINCT - + col0 / CAST ( NULL AS INTEGER ) + col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT + 82 FROM tab1, tab2 cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT 19 FROM tab1, tab0 cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT ( 16 ) FROM tab1
----
16
16
16

query I rowsort
SELECT col0 + + col2 * + 77 * + 35 AS col0 FROM tab2 AS cor0
----
102489
70148
72772

query I rowsort
SELECT - col2 * + tab1.col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT + col0 * col2 * + col0 + - 86 * + col1 FROM tab0 AS cor0
----
-7117
11612
641696

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7804
SELECT ALL - CAST( NULL AS SIGNED ) * + col0 + - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7804
SELECT ALL - CAST ( NULL AS INTEGER ) * + col0 + - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT ALL 29 * col2 * + ( col2 ) + + col0 * CAST ( + col1 * col2 AS REAL ) FROM tab1 AS cor0
----
130701
367104
88776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col1 col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + + col2 * col1 + - 98 * + col0 AS col0 FROM tab1 AS cor0
----
-5702
-6592
1110

query I rowsort
SELECT + cor0.col1 * cor0.col0 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-7809
SELECT col1 DIV col1 + + col0 * col1 * + col0 AS col2 FROM tab2 AS cor0
----
106098
1520
358957

skipif mysql # not compatible
query I rowsort label-7809
SELECT col1 / col1 + + col0 * col1 * + col0 AS col2 FROM tab2 AS cor0
----
106098
1520
358957

query I rowsort
SELECT ALL + + col0 + cor0.col2 * - col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

onlyif mysql # use DIV operator for integer division
query I rowsort label-7811
SELECT ALL + col0 DIV + tab0.col0 + - col2 * col2 FROM tab0
----
-1088
-6723
0

skipif mysql # not compatible
query I rowsort label-7811
SELECT ALL + col0 / + tab0.col0 + - col2 * col2 FROM tab0
----
-1088
-6723
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * + col1 + + col2 col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL col2 + 29 FROM tab0
----
111
30
62

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1, tab1 cor2
----
3645 values hashing to 93e5b836e3f52f458344e73ebce589b5

query I rowsort
SELECT ( 0 ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7816
SELECT ALL - - col1 * - CAST( NULL AS DECIMAL ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7816
SELECT ALL - - col1 * - CAST ( NULL AS REAL ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 36 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

query I rowsort
SELECT ALL - 27 - tab2.col1 FROM tab2
----
-44
-58
-86

query I rowsort
SELECT - 98 + - col0 FROM tab2 AS cor0
----
-105
-176
-177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( 15 ) col1 FROM tab0 AS cor0
----
-15
-15
-15

query I rowsort
SELECT - col0 * col1 - - col2 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7822
SELECT - + col2 * - col1 + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7822
SELECT - + col2 * - col1 + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 66 * col0 AS col0 FROM tab1 AS cor0
----
198
4224
5280

query I rowsort
SELECT + - 16 - + cor0.col1 * - 17 FROM tab0 AS cor0
----
1446
1531
1633

query I rowsort
SELECT DISTINCT + 91 * + col2 + 65 * - col1 * + col2 FROM tab1 AS cor0
----
-31863
-72384
-86346

query I rowsort
SELECT - cor0.col0 * col1 + 27 AS col2 FROM tab1 cor0
----
-1013
-51
-613

query I rowsort
SELECT DISTINCT - 85 AS col1 FROM tab1, tab2 cor0
----
-85

query I rowsort
SELECT DISTINCT 90 * - col1 FROM tab0
----
-7740
-8190
-8730

query I rowsort
SELECT + ( ( + col1 ) ) FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT 8 * + 36 AS col2 FROM tab1
----
288

query I rowsort
SELECT ( col1 ) * - col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + 97 AS col2 FROM tab1
----
97
97
97

query I rowsort
SELECT - col2 * 16 AS col1 FROM tab0
----
-1312
-16
-528

query I rowsort
SELECT ALL + 5 * col2 AS col0 FROM tab2 AS cor0
----
130
135
190

query I rowsort
SELECT - col2 * col2 + col0 AS col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT DISTINCT + ( 63 ) AS col2 FROM tab0 AS cor0
----
63

query I rowsort
SELECT + 79 * 51 + - col2 FROM tab2 AS cor0
----
3991
4002
4003

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

query I rowsort
SELECT DISTINCT - ( - col0 ) * col0 + + col1 * + col2 FROM tab0
----
1322
15383
3414

query I rowsort
SELECT ALL 93 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT DISTINCT 50 + col2 FROM tab1
----
104
107
146

query I rowsort
SELECT DISTINCT ( col0 ) * col2 + col2 + - 11 FROM tab0
----
25
7369
814

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7843
SELECT + CAST( col2 AS SIGNED ) + + col0 AS col1 FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-7843
SELECT + CAST ( col2 AS INTEGER ) + + col0 AS col1 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7844
SELECT col2 * + col2 - + col1 DIV + col2 FROM tab1
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-7844
SELECT col2 * + col2 - + col1 / + col2 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7845
SELECT DISTINCT tab2.col0 DIV - 40 + + tab2.col1 * tab2.col0 FROM tab2
----
1342
217
4601

skipif mysql # not compatible
query I rowsort label-7845
SELECT DISTINCT tab2.col0 / - 40 + + tab2.col1 * tab2.col0 FROM tab2
----
1342
217
4601

query I rowsort
SELECT col0 * col2 + col0 * ( col0 ) * - tab1.col0 AS col2 FROM tab1
----
-258496
-504320
135

query I rowsort
SELECT DISTINCT - 33 * - col2 + - col0 AS col2 FROM tab0 AS cor0
----
-2
1065
2617

query I rowsort
SELECT DISTINCT ( + ( col0 ) ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL cor0.col0 * cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to f2938bee011b8d49dd931b1f9235e7f5

query I rowsort
SELECT ALL ( - cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + tab0.col1 * tab0.col0 + - 11 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 14b40b736a272549264df15f78533740

query I rowsort
SELECT 40 * + col0 * - col1 + - col1 AS col2 FROM tab1
----
-25610
-3146
-41613

query I rowsort
SELECT DISTINCT + 71 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
71

query I rowsort
SELECT - - col1 * - col1 * col2 + col1 + + cor0.col2 AS col1 FROM tab0 cor0
----
-243949
-678869
-9311

query I rowsort
SELECT - col2 * col0 * col1 + col1 AS col1 FROM tab0 AS cor0
----
-3298
-664027
-68026

query I rowsort
SELECT ALL + col2 + ( - cor0.col2 ) * col1 + - col0 FROM tab0 AS cor0
----
-131
-2829
-7469

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

query I rowsort
SELECT col0 * col2 + + col2 * + col0 FROM tab1 AS cor0
----
15360
324
7296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - 28 col2 FROM tab1 AS cor0
----
38
41
54

query I rowsort
SELECT DISTINCT + col0 * + cor0.col1 + cor0.col0 + + cor0.col2 FROM tab0 AS cor0
----
2121
3431
8270

query I rowsort
SELECT - + col2 - - ( - 39 ) * col0 FROM tab2 cor0
----
-300
-3068
-3119

query I rowsort
SELECT DISTINCT - col0 * + col1 * - ( - cor0.col0 ) + col0 AS col1 FROM tab1 AS cor0
----
-231
-40896
-83120

query I rowsort
SELECT DISTINCT cor0.col1 + ( col0 ) * + col2 + ( col0 ) FROM tab1 cor0
----
191
3722
7773

query I rowsort
SELECT - col0 - col0 * 10 FROM tab2 AS cor0
----
-77
-858
-869

query I rowsort
SELECT DISTINCT col2 + col0 + col1 FROM tab1
----
131
189
83

query I rowsort
SELECT ALL + col1 * - ( 60 ) + - cor0.col2 FROM tab1 AS cor0
----
-1614
-657
-876

onlyif mysql # use DIV operator for integer division
query I rowsort label-7867
SELECT DISTINCT - col2 DIV 55 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7867
SELECT DISTINCT - col2 / 55 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT + + col0 * cor0.col0 + + col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab2, tab0 cor0, tab0 cor1
----
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-7870
SELECT ALL col2 + cor0.col2 * - col1 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7870
SELECT ALL col2 + cor0.col2 * - col1 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + ( + 56 ) + - col2 AS col0 FROM tab1 cor0
----
-1
-40
2

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

query I rowsort
SELECT + - 26 - col2 * - col0 * 85 AS col1 FROM tab0 AS cor0
----
2949
620304
67294

query I rowsort
SELECT DISTINCT ( - 19 ) + + col2 * col2 * ( - col2 + - col1 ) AS col0 FROM tab1 AS cor0
----
-1004563
-217702
-233299

onlyif mysql # use DIV operator for integer division
query I rowsort label-7875
SELECT col0 + + 79 DIV + col2 FROM tab1 AS cor0
----
4
65
80

skipif mysql # not compatible
query I rowsort label-7875
SELECT col0 + + 79 / + col2 FROM tab1 AS cor0
----
4
65
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7876
SELECT 70 DIV - col1 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7876
SELECT 70 / - col1 FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT ALL - 58 * + col2 + - col2 AS col2 FROM tab0 AS cor0
----
-1947
-4838
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7878
SELECT DISTINCT + + ( - 9 ) DIV - cor0.col2 FROM tab0 cor0
----
0
9

skipif mysql # not compatible
query I rowsort label-7878
SELECT DISTINCT + + ( - 9 ) / - cor0.col2 FROM tab0 cor0
----
0
9

query I rowsort
SELECT - cor0.col1 * - col1 + col0 * - col1 - cor0.col0 * cor0.col2 FROM tab1 AS cor0
----
-4188
-8551
436

query I rowsort
SELECT DISTINCT + col1 + - cor0.col0 + - col1 * ( + col1 ) AS col1 FROM tab1 AS cor0
----
-154
-236
-653

query I rowsort
SELECT DISTINCT - + cor0.col1 * col1 + - col1 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ALL - col0 * 88 - - tab2.col0 FROM tab2
----
-609
-6786
-6873

query I rowsort
SELECT ALL col1 + - 69 * col2 AS col1 FROM tab1
----
-3700
-3923
-6611

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col1 FROM tab0 AS cor0
----
93
93
93

query I rowsort
SELECT DISTINCT + - col1 - cor0.col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT - - 82 * - col1 AS col0 FROM tab2 AS cor0
----
-1394
-2542
-4838

query I rowsort
SELECT DISTINCT - + 20 * col1 * 4 + col1 FROM tab1 AS cor0
----
-1027
-2054
-790

query I rowsort
SELECT - col1 * col1 * col2 AS col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7889
SELECT ALL - - 54 + col0 * - CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1171
-522
-7867

skipif mysql # not compatible
query I rowsort label-7889
SELECT ALL - - 54 + col0 * - CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1171
-522
-7867

query I rowsort
SELECT DISTINCT + - cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

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

query I rowsort
SELECT DISTINCT - - col2 + + col0 * + 15 AS col1 FROM tab1 AS cor0
----
1017
1296
99

query I rowsort
SELECT ALL - - col0 + col2 * - col2 + col2 AS col2 FROM tab2 cor0
----
-1327
-572
-695

onlyif mysql # use DIV operator for integer division
query I rowsort label-7894
SELECT ALL + col2 DIV col1 + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7894
SELECT ALL + col2 / col1 + col2 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7895
SELECT DISTINCT col0 DIV - col1 + col2 DIV + col0 AS col2 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-7895
SELECT DISTINCT col0 / - col1 + col2 / + col0 AS col2 FROM tab0
----
0
1

query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - + ( cor0.col2 ) * + 38 FROM tab2 AS cor0
----
-1026
-1444
-988

query I rowsort
SELECT DISTINCT + - 15 * + col1 FROM tab2 AS cor0
----
-255
-465
-885

query I rowsort
SELECT 45 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

onlyif mysql # use DIV operator for integer division
query I rowsort label-7900
SELECT DISTINCT + - ( - 60 ) DIV col0 + ( cor0.col0 ) AS col2 FROM tab2 cor0
----
15
78
79

skipif mysql # not compatible
query I rowsort label-7900
SELECT DISTINCT + - ( - 60 ) / col0 + ( cor0.col0 ) AS col2 FROM tab2 cor0
----
15
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 18 * cor0.col2 + - col0 col0 FROM tab2 AS cor0
----
-493
-546
-763

query I rowsort
SELECT DISTINCT - ( 73 ) FROM tab0 AS cor0
----
-73

query I rowsort
SELECT DISTINCT - 71 * - col0 + col0 AS col0 FROM tab0 AS cor0
----
1728
2520
6408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7904
SELECT DISTINCT - - ( col1 ) + + col1 DIV - 57 - col2 * col0 DIV - col1 FROM tab0 AS cor0
----
170
94
96

skipif mysql # not compatible
query I rowsort label-7904
SELECT DISTINCT - - ( col1 ) + + col1 / - 57 - col2 * col0 / - col1 FROM tab0 AS cor0
----
170
94
96

query I rowsort
SELECT ALL col0 + - 18 FROM tab1 AS cor0
----
-15
46
62

query I rowsort
SELECT + col1 * + col2 + + cor0.col2 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - 11 * 80 + + col0 * - ( col0 ) + col2 FROM tab2 AS cor0
----
-6938
-7083
-902

query I rowsort
SELECT + - col0 + col2 * col0 AS col0 FROM tab0 cor0
----
0
7209
768

query I rowsort
SELECT - col0 + - col1 * col1 + 27 * col2 AS col0 FROM tab2 AS cor0
----
-239
-2857
658

query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 FROM tab2
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7911
SELECT + CAST( NULL AS SIGNED ) * 30 * tab2.col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7911
SELECT + CAST ( NULL AS INTEGER ) * 30 * tab2.col0 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + - col0 + col2 - cor0.col1 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT - cor0.col1 + col1 * col0 * col1 + + col0 FROM tab1 AS cor0
----
13587
2005
6454

query I rowsort
SELECT ALL 12 * + tab0.col1 AS col0 FROM tab0
----
1032
1092
1164

query I rowsort
SELECT - 71 + col0 FROM tab1
----
-68
-7
9

query I rowsort
SELECT ALL + tab1.col1 * 84 AS col1 FROM tab1
----
1092
2184
840

query I rowsort
SELECT col2 * 1 AS col1 FROM tab1
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7918
SELECT DISTINCT col2 / + CAST( NULL AS SIGNED ) + + ( col1 * CAST( + col2 AS SIGNED ) ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7918
SELECT DISTINCT col2 / + CAST ( NULL AS INTEGER ) + + ( col1 * CAST ( + col2 AS INTEGER ) ) AS col1 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7919
SELECT - col0 DIV 84 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7919
SELECT - col0 / 84 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 * - col0 * - col1 + col1 AS col1 FROM tab0
----
118922
49622
720902

query I rowsort
SELECT - + col2 + 46 + col2 AS col1 FROM tab2 AS cor0
----
46
46
46

query I rowsort
SELECT col1 + + col2 + 14 AS col0 FROM tab2 AS cor0
----
69
72
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * tab1.col2 col0 FROM tab1
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - tab2.col2 col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT 38 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to a5677c50b23f70287df35c2388a1c9bf

query I rowsort
SELECT 11 * + col0 + + col2 - cor0.col0 FROM tab0 AS cor0
----
273
351
972

query I rowsort
SELECT DISTINCT cor0.col2 * 75 FROM tab1 AS cor0
----
4050
4275
7200

query I rowsort
SELECT - + col1 + - 68 * - col1 - cor0.col0 AS col2 FROM tab1 AS cor0
----
1739
606
791

query I rowsort
SELECT col1 * 78 - - col2 FROM tab2
----
1364
2445
4628

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 cor2, tab2 AS cor3
----
3645 values hashing to 17ceecc141378b185d60a17e53464c26

query I rowsort
SELECT - ( + tab0.col2 ) + col0 * + ( - 84 ) * col1 - - col2 * + 58 AS col1 FROM tab0
----
-171495
-285123
-675642

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7933
SELECT - CAST( NULL AS SIGNED ) * - col0 - + col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7933
SELECT - CAST ( NULL AS INTEGER ) * - col0 - + col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) + - col2 col1 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT ALL 22 AS col2 FROM tab0
----
22
22
22

query I rowsort
SELECT cor0.col0 + col1 * col2 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT cor0.col0 + ( col0 ) FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7938
SELECT - col0 DIV - ( col0 ) AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7938
SELECT - col0 / - ( col0 ) AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - - col2 * + 1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT cor0.col0 + - col2 * col2 AS col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT - 25 + col0 FROM tab0 AS cor0
----
-1
10
64

query I rowsort
SELECT - col1 + + col1 * + 39 AS col1 FROM tab2 AS cor0
----
1178
2242
646

query I rowsort
SELECT cor0.col1 + + col2 * col1 + - col0 AS col1 FROM tab1 cor0
----
1181
1427
516

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 * + col1 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL - 89 AS col0 FROM tab2 cor0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT 91 * col0 FROM tab1 AS cor0
----
273
5824
7280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col2 FROM tab0 cor0
----
2
2
2

query I rowsort
SELECT + col0 * + col1 + + col1 * col0 AS col1 FROM tab1
----
1280
156
2080

query I rowsort
SELECT DISTINCT + - col2 * + 24 + - 80 + col1 FROM tab0 AS cor0
----
-1957
-7
-786

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7950
SELECT - col1 + - CAST( NULL AS SIGNED ) * + col0 * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7950
SELECT - col1 + - CAST ( NULL AS INTEGER ) * + col0 * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * 61 * col2 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
-39327
-51050
-93496

query I rowsort
SELECT + col1 + ( - 44 ) * + col1 FROM tab0 AS cor0
----
-3698
-3913
-4171

query I rowsort
SELECT DISTINCT col0 + col2 + col2 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT DISTINCT col1 + ( 62 ) AS col2 FROM tab0 AS cor0
----
148
153
159

query I rowsort
SELECT - col1 * - 96 + - ( - col0 + col2 ) FROM tab2 AS cor0
----
1673
2956
5716

query I rowsort
SELECT + 36 + - col1 + - ( + col1 ) * col1 FROM tab0
----
-7446
-8336
-9470

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7957
SELECT ALL col0 + - col2 + + CAST( NULL AS SIGNED ) * 14 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7957
SELECT ALL col0 + - col2 + + CAST ( NULL AS INTEGER ) * 14 FROM tab2
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab2 cor0, tab1 cor1
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 88 + - col1 col2 FROM tab1
----
-101
-114
-98

query I rowsort
SELECT - 24 * - col2 + col0 * 6 AS col2 FROM tab2
----
1092
1386
690

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7961
SELECT col0 + + col0 * 52 * - tab1.col1 + col2 * - CAST( - col2 AS SIGNED ) * col2 FROM tab1
----
151977
153411
830736

skipif mysql # not compatible
query I rowsort label-7961
SELECT col0 + + col0 * 52 * - tab1.col1 + col2 * - CAST ( - col2 AS INTEGER ) * col2 FROM tab1
----
151977
153411
830736

query I rowsort
SELECT col0 + col1 + col0 AS col0 FROM tab1
----
138
173
32

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col2 AS REAL ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 * + ( col2 ) AS col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL + cor0.col2 * ( - col2 ) AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ( - col0 ) + - col1 AS col1 FROM tab1 cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7967
SELECT ALL - ( + 26 ) DIV + col1 FROM tab2 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7967
SELECT ALL - ( + 26 ) / + col1 FROM tab2 cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7968
SELECT + col0 DIV 66 AS col2 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7968
SELECT + col0 / 66 AS col2 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT - col1 - col0 * + ( - col2 ) AS col0 FROM tab0
----
-62
706
7207

query I rowsort
SELECT DISTINCT + tab1.col2 + + ( - 88 ) AS col2 FROM tab1
----
-31
-34
8

query I rowsort
SELECT DISTINCT + col1 + - 70 AS col2 FROM tab2
----
-11
-39
-53

query I rowsort
SELECT + col0 * + col0 * + ( - col2 ) FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT - col1 * col2 + 96 FROM tab2
----
-1438
-550
-741

query I rowsort
SELECT ( col2 * col2 ) FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT col2 + col2 * - col0 AS col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL + col1 * col0 * col0 + - ( col0 * col0 ) FROM tab2 AS cor0
----
1470
352872
99856

query I rowsort
SELECT ALL + - 16 AS col0 FROM tab2 AS cor0
----
-16
-16
-16

query I rowsort
SELECT DISTINCT + 87 AS col2 FROM tab2 AS cor0
----
87

query I rowsort
SELECT + + ( - 24 ) FROM tab2 AS cor0
----
-24
-24
-24

query I rowsort
SELECT col1 * col1 * 56 FROM tab0 AS cor0
----
414176
463736
526904

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2, tab1, tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 65 ) col0 FROM tab1
----
65
65
65

query I rowsort
SELECT col0 * - col1 - col0 FROM tab0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-7984
SELECT + col2 + - cor0.col1 DIV + 64 AS col0 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7984
SELECT + col2 + - cor0.col1 / + 64 AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + - col1 + col2 * ( col1 + col2 ) * col2 AS col0 FROM tab0 AS cor0
----
1
1163161
129505

query I rowsort
SELECT ALL col2 * - col2 + + ( - ( col2 ) ) AS col1 FROM tab2 AS cor0
----
-1482
-702
-756

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - cor0.col0 col2 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * + col1 + cor0.col2 col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ALL - col1 - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 * col2 col1 FROM tab1 cor0
----
2646
2793
4704

query I rowsort
SELECT ALL 28 + col0 * ( col1 + col1 ) * col2 FROM tab0 AS cor0
----
1328264
136252
6818

query I rowsort
SELECT DISTINCT - - 19 + col1 * ( col0 + col0 ) FROM tab1 AS cor0
----
1299
175
2099

query I rowsort
SELECT + ( + col0 ) + - col1 AS col0 FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 col1 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT - - col1 * cor0.col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - + 68 FROM tab0 AS cor0
----
-68
-68
-68

query I rowsort
SELECT - col1 * + 51 * + col1 FROM tab2
----
-14739
-177531
-49011

query I rowsort
SELECT ALL cor0.col1 + + ( + col0 ) * - col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - - cor0.col2 - + ( - 82 ) FROM tab2 cor0
----
108
109
120

query I rowsort
SELECT col2 * 2 * - col1 FROM tab0
----
-14924
-194
-5676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + + col0 * cor0.col2 col1 FROM tab2 cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT + col0 * + ( col2 ) * cor0.col2 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-8004
SELECT DISTINCT - - col1 * - col2 + + ( col2 ) DIV - col1 FROM tab2 AS cor0
----
-1534
-648
-837

skipif mysql # not compatible
query I rowsort label-8004
SELECT DISTINCT - - col1 * - col2 + + ( col2 ) / - col1 FROM tab2 AS cor0
----
-1534
-648
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-8005
SELECT cor0.col2 - ( col1 ) DIV - col1 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8005
SELECT cor0.col2 - ( col1 ) / - col1 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT ALL col0 * + 67 AS col2 FROM tab0 AS cor0
----
1608
2345
5963

onlyif mysql # use DIV operator for integer division
query I rowsort label-8007
SELECT ALL + + col0 DIV col2 + - 53 AS col1 FROM tab0 AS cor0
----
-18
-52
-53

skipif mysql # not compatible
query I rowsort label-8007
SELECT ALL + + col0 / col2 + - 53 AS col1 FROM tab0 AS cor0
----
-18
-52
-53

query I rowsort
SELECT DISTINCT col0 * + col1 - + cor0.col0 AS col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT + - col1 + - col0 AS col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + + col0 * - ( + col2 ) AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col2 * 62 AS col2 FROM tab0 AS cor0
----
2046
5084
62

query I rowsort
SELECT + col0 + + 41 + 33 * + col1 FROM tab2 AS cor0
----
1071
2066
681

query I rowsort
SELECT DISTINCT + - ( col0 ) * - col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - - ( + 14 ) FROM tab0 AS cor0
----
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8015
SELECT CAST( 90 AS SIGNED ) FROM tab2 AS cor0
----
90
90
90

skipif mysql # not compatible
query I rowsort label-8015
SELECT CAST ( 90 AS INTEGER ) FROM tab2 AS cor0
----
90
90
90

query I rowsort
SELECT ALL + + ( + 73 ) + + col2 AS col2 FROM tab0 AS cor0
----
106
155
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-8017
SELECT + + col1 DIV col1 + - col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-8017
SELECT + + col1 / col1 + - col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8018
SELECT ALL + CAST( col2 AS SIGNED ) + col1 * + 9 FROM tab2 AS cor0
----
191
306
557

skipif mysql # not compatible
query I rowsort label-8018
SELECT ALL + CAST ( col2 AS INTEGER ) + col1 * + 9 FROM tab2 AS cor0
----
191
306
557

query III rowsort
SELECT * FROM tab2 WHERE col0 >= col2
----
78
59
26
79
17
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab0 WHERE + col1 NOT BETWEEN - col2 AND col2 * - col0 * + col2
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 + col0 col2 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL + tab1.col1 * col0 - col1 FROM tab1
----
1027
52
630

query I rowsort
SELECT + col1 * + col2 AS col0 FROM tab2 WHERE NOT ( + col2 / col1 + col1 * col2 ) > NULL
----

query I rowsort
SELECT + tab0.col1 AS col0 FROM tab0 WHERE ( + col0 * - col0 ) < NULL
----

query I rowsort
SELECT ALL col0 + + cor0.col2 * col0 * col1 + col1 FROM tab1 cor0
----
36554
4241
99933

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col1 * - col0 col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT col2 + + col2 * - col1 AS col1 FROM tab1 WHERE NOT + col1 IN ( col0 + - col0 * + col1 )
----
-1152
-1350
-513

query I rowsort
SELECT tab0.col1 * col2 + tab0.col2 * - tab0.col0 * col1 AS col0 FROM tab0
----
-3298
-65274
-656656

query I rowsort
SELECT ALL col1 + + col1 * + col0 + tab0.col2 FROM tab0
----
2183
3493
8272

onlyif mysql # use DIV operator for integer division
query I rowsort label-8030
SELECT tab1.col0 DIV col2 + col0 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-8030
SELECT tab1.col0 / col2 + col0 FROM tab1
----
3
65
80

query I rowsort
SELECT ALL - tab0.col1 * col1 * col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT + col2 * + col2 * + col1 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT col0 AS col0 FROM tab2 WHERE - col0 + col2 = col2
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col2 * col1 + + col0 NOT IN ( - col2 )
----

query I rowsort
SELECT DISTINCT col2 + - col1 + - tab2.col0 FROM tab2
----
-11
-111
-58

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 WHERE NOT NULL BETWEEN ( + col1 + + col2 ) AND col0 * col1
----

query I rowsort
SELECT tab1.col2 + col0 + col0 FROM tab1
----
185
256
60

query I rowsort
SELECT DISTINCT - tab0.col1 * - col1 - - col2 FROM tab0
----
7429
8363
9410

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT BETWEEN ( NULL ) AND col2
----

query I rowsort
SELECT ALL - tab1.col0 * + col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col0 * - col1 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - col1 * - tab0.col0 + + tab0.col1 * - col1 FROM tab0
----
-182
-5332
-6014

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 WHERE NOT ( NULL ) >= ( + tab0.col1 )
----

query I rowsort
SELECT col0 * col0 * col2 AS col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT DISTINCT col2 * - col1 * col2 AS col2 FROM tab1
----
-119808
-32490
-75816

query III rowsort
SELECT * FROM tab1 WHERE - col1 * - col1 + - col0 * + col1 / + col0 = col2 + col0 * + col0
----

query I rowsort
SELECT - col1 * col1 * - col0 AS col0 FROM tab2
----
22831
271518
6727

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE col1 * col2 + + cor0.col0 >= NULL OR NOT ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col2 + + col0 + + col2 FROM tab1 AS cor0
----
111
178
272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col2 col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - + col1 - cor0.col2 * col2 * col1 AS col2 FROM tab2 AS cor0
----
-22630
-24565
-39943

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col1 ) NOT IN ( - col1 )
----

query I rowsort
SELECT - - col1 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL IN ( + col2 * col2 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL = col2 * + col2 + - col2
----

query I rowsort
SELECT - col2 * ( + col1 * - col2 ) FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT - cor0.col0 * - col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT col2 * + ( ( col2 ) + col1 ) AS col0 FROM tab1 AS cor0
----
10464
3819
4320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8059
SELECT DISTINCT + col1 * + CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-8059
SELECT DISTINCT + col1 * + CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL - col0 * - ( col0 ) * + col2 AS col0 FROM tab2 cor0
----
1323
158184
237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8061
SELECT ALL + col2 + + CAST( 64 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
102
90
91

skipif mysql # not compatible
query I rowsort label-8061
SELECT ALL + col2 + + CAST ( 64 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
102
90
91

query I rowsort
SELECT ALL + col1 + 8 FROM tab0 AS cor0
----
105
94
99

query I rowsort
SELECT - col1 - cor0.col2 AS col0 FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # use DIV operator for integer division
query III rowsort label-8064
SELECT * FROM tab1 WHERE NOT - col0 DIV - col2 NOT IN ( + col1 DIV col0 )
----
80
13
96

skipif mysql # not compatible
query III rowsort label-8064
SELECT * FROM tab1 WHERE NOT - col0 / - col2 NOT IN ( + col1 / col0 )
----
80
13
96

query I rowsort
SELECT DISTINCT col1 + - col1 AS col2 FROM tab0
----
0

query I rowsort
SELECT - col1 * - col1 - - tab0.col0 AS col2 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT col2 * col2 FROM tab1 WHERE NOT NULL <= col1 + + col0
----

query I rowsort
SELECT ALL + col2 * - col1 + - col0 * col0 FROM tab2
----
-6887
-7618
-886

query I rowsort
SELECT - col1 * col0 + + col2 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT DISTINCT + col0 - col2 AS col0 FROM tab2
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8071
SELECT - ( col2 * CAST( NULL AS SIGNED ) ) + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8071
SELECT - ( col2 * CAST ( NULL AS INTEGER ) ) + col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( col1 * tab2.col0 ) AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + + 75 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1800
2625
6675

onlyif mysql # use DIV operator for integer division
query I rowsort label-8074
SELECT col2 + - 16 * - col1 DIV - tab0.col1 AS col1 FROM tab0
----
-15
17
66

skipif mysql # not compatible
query I rowsort label-8074
SELECT col2 + - 16 * - col1 / - tab0.col1 AS col1 FROM tab0
----
-15
17
66

query I rowsort
SELECT col0 + 46 AS col1 FROM tab1
----
110
126
49

query I rowsort
SELECT + col2 + 66 FROM tab0 cor0
----
148
67
99

query I rowsort
SELECT DISTINCT + col0 * col2 + col0 * - col2 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL col1 * 7 AS col2 FROM tab1 AS cor0
----
182
70
91

query I rowsort
SELECT ALL - col2 - - 15 * col0 AS col0 FROM tab2 AS cor0
----
1144
1147
78

query I rowsort
SELECT DISTINCT + col1 * col2 + - 10 * col2 AS col2 FROM tab2 AS cor0
----
1274
266
567

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8081
SELECT DISTINCT + col2 + - CAST( col1 AS SIGNED ) FROM tab1 cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort label-8081
SELECT DISTINCT + col2 + - CAST ( col1 AS INTEGER ) FROM tab1 cor0
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8082
SELECT - cor0.col2 + CAST( NULL AS SIGNED ) * - col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8082
SELECT - cor0.col2 + CAST ( NULL AS INTEGER ) * - col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * col2 - ( col0 ) * col0 AS col1 FROM tab1 AS cor0
----
-3526
-5152
1395

query I rowsort
SELECT ALL + col2 * 60 AS col2 FROM tab1 AS cor0
----
3240
3420
5760

query I rowsort
SELECT ALL + + cor0.col2 + col0 * 36 FROM tab0 AS cor0
----
1261
3286
897

onlyif mysql # use DIV operator for integer division
query I rowsort label-8086
SELECT DISTINCT - cor0.col2 DIV col0 FROM tab2 cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-8086
SELECT DISTINCT - cor0.col2 / col0 FROM tab2 cor0
----
-3
0

query I rowsort
SELECT DISTINCT - 19 AS col2 FROM tab2, tab2 AS cor0
----
-19

query I rowsort
SELECT + - 54 + col1 AS col2 FROM tab2 AS cor0
----
-23
-37
5

query I rowsort
SELECT - 90 + 48 AS col0 FROM tab2
----
-42
-42
-42

query I rowsort
SELECT ALL + col2 * 56 AS col2 FROM tab1 AS cor0
----
3024
3192
5376

query I rowsort
SELECT DISTINCT ( ( - col0 ) ) + - col2 AS col2 FROM tab2 cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-8092
SELECT + - col0 * cor0.col1 DIV - col1 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8092
SELECT + - col0 * cor0.col1 / - col1 FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8093
SELECT ALL - + col1 DIV - 22 + col2 FROM tab2 AS cor0
----
28
28
38

skipif mysql # not compatible
query I rowsort label-8093
SELECT ALL - + col1 / - 22 + col2 FROM tab2 AS cor0
----
28
28
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8094
SELECT ALL + 75 DIV ( - col1 + col0 ) AS col2 FROM tab0 AS cor0
----
-1
-1
-37

skipif mysql # not compatible
query I rowsort label-8094
SELECT ALL + 75 / ( - col1 + col0 ) AS col2 FROM tab0 AS cor0
----
-1
-1
-37

query I rowsort
SELECT DISTINCT + + ( - col0 ) + - cor0.col2 * + col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT ALL + + 78 + col0 FROM tab2 AS cor0
----
156
157
85

query I rowsort
SELECT ALL - col1 - col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT - - ( cor0.col0 ) * col1 + 12 - - col2 AS col1 FROM tab0 AS cor0
----
2109
3408
8193

query I rowsort
SELECT ALL col1 - col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - + ( + col1 ) * 37 FROM tab2 AS cor0
----
-1147
-2183
-629

query I rowsort
SELECT ALL + - 19 + + cor0.col2 + + col2 * + col2 FROM tab0 AS cor0
----
-17
1103
6787

query I rowsort
SELECT ALL col1 * col0 + - 83 + - col2 AS col2 FROM tab2
----
107
1222
4493

query I rowsort
SELECT + tab2.col1 + 65 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 29598ea62ff6f542ca3dfa57eb0a9945

onlyif mysql # use DIV operator for integer division
query I rowsort label-8104
SELECT ALL - + col0 DIV - col2 AS col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-8104
SELECT ALL - + col0 / - col2 AS col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT DISTINCT col2 * col0 - col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-8106
SELECT + col0 DIV + col1 + - col2 + col1 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-8106
SELECT + col0 / + col1 + - col2 + col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL col1 + ( 37 ) FROM tab2 cor0
----
54
68
96

query I rowsort
SELECT ALL col1 + + ( col0 ) FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8109
SELECT - col0 * tab0.col2 DIV - 77 + col0 FROM tab0
----
183
34
35

skipif mysql # not compatible
query I rowsort label-8109
SELECT - col0 * tab0.col2 / - 77 + col0 FROM tab0
----
183
34
35

query I rowsort
SELECT - col1 * ( col1 ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - cor0.col2 * 51 FROM tab0 AS cor0
----
-1683
-4182
-51

query I rowsort
SELECT DISTINCT + + col2 * col2 + + col1 * + col0 FROM tab2 AS cor0
----
2787
5278
946

query I rowsort
SELECT ALL + col1 - + cor0.col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT col0 + - 72 * col2 AS col1 FROM tab2 AS cor0
----
-1794
-1937
-2657

onlyif mysql # use DIV operator for integer division
query I rowsort label-8115
SELECT ALL col1 DIV + 91 AS col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8115
SELECT ALL col1 / + 91 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + col1 + - tab1.col0 FROM tab1
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8117
SELECT - ( + tab2.col1 ) * col1 + + tab2.col1 DIV col1 FROM tab2
----
-288
-3480
-960

skipif mysql # not compatible
query I rowsort label-8117
SELECT - ( + tab2.col1 ) * col1 + + tab2.col1 / col1 FROM tab2
----
-288
-3480
-960

query I rowsort
SELECT - col2 + col1 * col2 FROM tab1
----
1152
1350
513

query I rowsort
SELECT DISTINCT 29 * col1 * ( ( + tab2.col1 ) ) + col0 * col1 AS col1 FROM tab2
----
105551
28086
9724

query I rowsort
SELECT + col2 * col0 * - col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT + ( - col0 ) * 88 - col0 * col1 FROM tab1
----
-342
-6272
-8080

query I rowsort
SELECT DISTINCT col2 * col2 * ( - col2 ) + - col0 AS col0 FROM tab1
----
-157467
-185257
-884816

onlyif mysql # use DIV operator for integer division
query I rowsort label-8123
SELECT ALL 59 DIV - tab1.col1 + + col2 FROM tab1
----
52
52
92

skipif mysql # not compatible
query I rowsort label-8123
SELECT ALL 59 / - tab1.col1 + + col2 FROM tab1
----
52
52
92

query I rowsort
SELECT ( - tab1.col1 ) * + col2 + - 20 FROM tab1
----
-1268
-1424
-590

query I rowsort
SELECT DISTINCT - col2 - + col2 AS col0 FROM tab2 AS cor0
----
-52
-54
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * - col0 - col1 col2 FROM tab0 AS cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col2 col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL col2 + col2 * col1 FROM tab0
----
2871
7544
98

query I rowsort
SELECT - col0 * + col1 + cor0.col1 * col2 * + col2 FROM tab2 AS cor0
----
22382
23205
35282

query I rowsort
SELECT + + col0 + + cor0.col0 * col2 * + col1 AS col0 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT col2 + col2 * col0 FROM tab0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col2 col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col1 - + col2 AS col0 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 + - col0 * tab1.col1 + col1 * + col2 col1 FROM tab1
----
-106
1290
172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT 97 + col1 * + col0 * - col0 FROM tab2 AS cor0
----
-106000
-1422
-358859

onlyif mysql # use DIV operator for integer division
query I rowsort label-8137
SELECT - col1 * + cor0.col2 + col1 + col2 DIV + col0 AS col0 FROM tab2 AS cor0
----
-1475
-629
-803

skipif mysql # not compatible
query I rowsort label-8137
SELECT - col1 * + cor0.col2 + col1 + col2 / + col0 AS col0 FROM tab2 AS cor0
----
-1475
-629
-803

query I rowsort
SELECT - 93 + + col1 FROM tab1
----
-67
-80
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8139
SELECT + 26 DIV - 22 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8139
SELECT + 26 / - 22 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT 46 * + tab2.col0 FROM tab2
----
322
3588
3634

query I rowsort
SELECT DISTINCT + 0 * col1 * col2 + - col0 * + tab2.col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT 42 + - col1 * + col0 AS col2 FROM tab0
----
-2022
-3353
-8057

query I rowsort
SELECT + col2 + ( col1 ) * col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT - ( + col1 ) * col0 AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT ( col0 ) * tab0.col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL + col0 + cor0.col0 AS col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT + 46 + + cor0.col0 + + col0 AS col0 FROM tab0 AS cor0
----
116
224
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col0 * col0 + cor0.col2 + + col0 col0 FROM tab2 AS cor0
----
-105980
-1485
-358852

query I rowsort
SELECT DISTINCT 52 AS col1 FROM tab0 cor0
----
52

query I rowsort
SELECT DISTINCT ( - col2 ) * - col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + + ( col1 ) + col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-8152
SELECT - col2 DIV - col0 col2 FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8152
SELECT - col2 / - col0 col2 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT - + 54 + + col0 AS col1 FROM tab0 AS cor0
----
-19
-30
35

query I rowsort
SELECT DISTINCT col2 + + col1 + col0 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT ALL - + col1 * - col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 * - col2 + + col0 - + cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + 59 * col0 FROM tab2
----
413
4602
4661

query I rowsort
SELECT - ( col0 * col0 + + col2 * col0 ) AS col1 FROM tab2
----
-238
-8112
-9243

query I rowsort
SELECT - 99 - + tab1.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 1f520960c5c4fdf735838f2eb271d984

onlyif mysql # use DIV operator for integer division
query I rowsort label-8160
SELECT 74 * col1 DIV - 70 FROM tab1 AS cor0
----
-10
-13
-27

skipif mysql # not compatible
query I rowsort label-8160
SELECT 74 * col1 / - 70 FROM tab1 AS cor0
----
-10
-13
-27

query I rowsort
SELECT col2 * col2 - col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT col0 + + col2 * 37 FROM tab1 AS cor0
----
2001
2173
3632

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-8164
SELECT - col0 DIV col1 + + col0 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-8164
SELECT - col0 / col1 + + col0 FROM tab1 AS cor0
----
3
58
74

query I rowsort
SELECT DISTINCT col2 + 19 AS col1 FROM tab0 AS cor0
----
101
20
52

query I rowsort
SELECT ALL - + col0 + col2 - col2 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8167
SELECT - ( cor0.col0 ) DIV + col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8167
SELECT - ( cor0.col0 ) / + col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + ( col2 ) * col0 * 61 AS col0 FROM tab0 cor0
----
2135
445178
48312

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-8170
SELECT 58 DIV - col1 AS col2 FROM tab1 AS cor0
----
-2
-4
-5

skipif mysql # not compatible
query I rowsort label-8170
SELECT 58 / - col1 AS col2 FROM tab1 AS cor0
----
-2
-4
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - cor0.col0 col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - ( col0 ) + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - + 15 + - col1 * + col0 FROM tab0 AS cor0
----
-2079
-3410
-8114

query I rowsort
SELECT - 60 + col2 AS col0 FROM tab1 AS cor0
----
-3
-6
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8175
SELECT ALL CAST( NULL AS SIGNED ) + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8175
SELECT ALL CAST ( NULL AS INTEGER ) + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * 98 AS col1 FROM tab1 AS cor0
----
-1274
-2548
-980

query I rowsort
SELECT + 79 * col1 AS col1 FROM tab0 AS cor0
----
6794
7189
7663

query I rowsort
SELECT - col1 + 85 AS col0 FROM tab1 AS cor0
----
59
72
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * 68 col2 FROM tab2, tab0 AS cor0
----
2244
5576
68

query I rowsort
SELECT DISTINCT + col2 + + col1 * - cor0.col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT ( + tab2.col2 ) * col2 AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL 65 + cor0.col2 * + col2 FROM tab0 cor0
----
1154
66
6789

query I rowsort
SELECT + col0 * 22 - + col2 AS col1 FROM tab2 AS cor0
----
127
1690
1700

query I rowsort
SELECT col1 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8185
SELECT - col0 + col1 DIV + col1 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-8185
SELECT - col0 + col1 / + col1 FROM tab2 AS cor0
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * 58 + cor0.col0 col0 FROM tab2 cor0
----
-399
-4446
-4503

query I rowsort
SELECT 95 * + 81 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to fef0f8134d0fc029b9741351f5bffdb4

query I rowsort
SELECT col2 * - cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + - cor0.col2 + + ( col2 ) AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * - ( - col0 ) + cor0.col0 + - 85 FROM tab2 AS cor0
----
-29
6077
6235

query I rowsort
SELECT ALL tab2.col1 * + 90 AS col2 FROM tab2
----
1530
2790
5310

onlyif mysql # use DIV operator for integer division
query I rowsort label-8192
SELECT DISTINCT 38 * - 0 + - col0 - - cor0.col0 DIV col0 AS col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-8192
SELECT DISTINCT 38 * - 0 + - col0 - - cor0.col0 / col0 AS col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT + ( + 87 ) + + col2 FROM tab0 cor0
----
120
169
88

query I rowsort
SELECT DISTINCT col0 * col1 + + col2 AS col2 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT + ( + 43 ) * col1 + 77 FROM tab2 AS cor0
----
1410
2614
808

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8196
SELECT - col0 + + CAST( - col2 * col0 AS SIGNED ) + col1 * col1 FROM tab0
----
6580
894
9339

skipif mysql # not compatible
query I rowsort label-8196
SELECT - col0 + + CAST ( - col2 * col0 AS INTEGER ) + col1 * col1 FROM tab0
----
6580
894
9339

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8197
SELECT DISTINCT col2 * col1 * - CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-8197
SELECT DISTINCT col2 * col1 * - CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT col2 * col1 * 6 + - 47 AS col0 FROM tab2
----
3829
4975
9157

query I rowsort
SELECT - - col1 * - col1 * - 16 FROM tab1 cor0
----
10816
1600
2704

query I rowsort
SELECT - + col0 * + 83 AS col0 FROM tab1 cor0
----
-249
-5312
-6640

query I rowsort
SELECT - + col2 + ( + 87 ) * + col0 FROM tab2 AS cor0
----
582
6760
6835

query I rowsort
SELECT 50 * col1 + - 55 AS col2 FROM tab1 AS cor0
----
1245
445
595

onlyif mysql # use DIV operator for integer division
query I rowsort label-8203
SELECT col1 DIV + CAST( 15 AS SIGNED ) AS col0 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8203
SELECT col1 / + CAST ( 15 AS INTEGER ) AS col0 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT ALL col0 * 65 AS col2 FROM tab2
----
455
5070
5135

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 83 + 2 * + cor0.col0 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 453dabdd61559ce6e4ea46d715f05fa6

query I rowsort
SELECT 53 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT DISTINCT - - cor0.col2 + col1 * + col0 FROM tab2 AS cor0
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col1 + 60 + - col2 AS col1 FROM tab0
----
113
156
69

query I rowsort
SELECT DISTINCT - 45 * col0 + - col2 * - col2 FROM tab1
----
2781
369
5616

query I rowsort
SELECT ALL + 12 * - 93 - - col0 * + col1 FROM tab1
----
-1038
-476
-76

query I rowsort
SELECT ALL ( 93 ) - col0 FROM tab1
----
13
29
90

query I rowsort
SELECT ALL col2 - + col0 * - col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL + - ( + col2 ) + - col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL col0 * + 58 - col0 * + 60 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT - col1 * cor0.col0 - col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-8217
SELECT + col0 DIV - 32 + col1 AS col1 FROM tab1 AS cor0
----
11
26
8

skipif mysql # not compatible
query I rowsort label-8217
SELECT + col0 / - 32 + col1 AS col1 FROM tab1 AS cor0
----
11
26
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + 97 col2 FROM tab2 cor0
----
38
66
80

query I rowsort
SELECT ( - col1 ) * col0 + - col2 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT + col0 * - col0 * - col1 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT + + cor0.col2 * col1 + 90 AS col1 FROM tab1 AS cor0
----
1338
1494
660

onlyif mysql # use DIV operator for integer division
query I rowsort label-8222
SELECT - col0 + - col0 DIV col1 FROM tab1 AS cor0
----
-3
-70
-86

skipif mysql # not compatible
query I rowsort label-8222
SELECT - col0 + - col0 / col1 FROM tab1 AS cor0
----
-3
-70
-86

query I rowsort
SELECT DISTINCT + col0 * - col1 + + ( col1 ) FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + col2 * - col2 * - col2 FROM tab1 cor0
----
157302
181545
877056

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

query I rowsort
SELECT - + col0 * - col2 + - col2 * 69 AS col1 FROM tab0 AS cor0
----
-1485
-34
1640

query I rowsort
SELECT + col0 + - col1 * 41 FROM tab1 AS cor0
----
-1063
-346
-453

query I rowsort
SELECT col1 * - col0 + 23 AS col2 FROM tab2 cor0
----
-1320
-194
-4579

onlyif mysql # use DIV operator for integer division
query I rowsort label-8229
SELECT + col1 + - col0 DIV + col0 AS col2 FROM tab1 cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-8229
SELECT + col1 + - col0 / + col0 AS col2 FROM tab1 cor0
----
12
25
9

query I rowsort
SELECT ALL 52 - tab1.col0 AS col2 FROM tab1
----
-12
-28
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8231
SELECT ALL + CAST( col0 AS SIGNED ) - + col0 * - 24 AS col1 FROM tab1
----
1600
2000
75

skipif mysql # not compatible
query I rowsort label-8231
SELECT ALL + CAST ( col0 AS INTEGER ) - + col0 * - 24 AS col1 FROM tab1
----
1600
2000
75

query I rowsort
SELECT ALL - 71 + col2 * - 30 * col0 FROM tab2 AS cor0
----
-5741
-60911
-90131

query I rowsort
SELECT DISTINCT - cor0.col0 + + col2 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + + 24 * cor0.col2 FROM tab1 AS cor0
----
1296
1368
2304

onlyif mysql # use DIV operator for integer division
query I rowsort label-8235
SELECT DISTINCT 85 * col0 DIV - col0 AS col1 FROM tab1 cor0
----
-85

skipif mysql # not compatible
query I rowsort label-8235
SELECT DISTINCT 85 * col0 / - col0 AS col1 FROM tab1 cor0
----
-85

query I rowsort
SELECT + cor0.col0 * + cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 815fccd4c3d372b28d3f3fb103025775

query I rowsort
SELECT - col1 + - col0 * - col0 * col1 FROM tab0 cor0
----
118728
49450
720720

query I rowsort
SELECT DISTINCT col0 - + col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT tab0.col1 * + col1 + + col0 + col1 FROM tab0
----
7506
8461
9541

query I rowsort
SELECT + col2 * col0 * col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT col2 * - col1 + + 4 FROM tab0 AS cor0
----
-2834
-7458
-93

query I rowsort
SELECT 86 - col2 FROM tab0 AS cor0
----
4
53
85

query I rowsort
SELECT DISTINCT + + col1 + col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + 24 * col1 + 69 * + col0 AS col1 FROM tab0 cor0
----
3720
4743
8325

query I rowsort
SELECT - + cor0.col1 * - cor0.col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT tab0.col2 + col1 * col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT col2 + col0 * + col2 * col1 FROM tab0
----
3396
664200
68145

query I rowsort
SELECT DISTINCT 60 * col0 AS col0 FROM tab2
----
420
4680
4740

onlyif mysql # use DIV operator for integer division
query I rowsort label-8249
SELECT col1 DIV - col2 + col1 AS col0 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-8249
SELECT col1 / - col2 + col1 AS col0 FROM tab0
----
0
84
90

query I rowsort
SELECT DISTINCT - col1 * col0 + + col2 AS col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT 19 + - col1 FROM tab0
----
-67
-72
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8252
SELECT col2 DIV - col1 + - ( col0 * - col2 ) col1 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8252
SELECT col2 / - col1 + - ( col0 * - col2 ) col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT cor0.col1 + col0 * col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT - col1 + + 85 * + cor0.col1 FROM tab1 AS cor0
----
1092
2184
840

query I rowsort
SELECT ALL + - col1 + col2 * + col2 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT ALL - + col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ( + col0 ) * + col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + + cor0.col1 + cor0.col1 - - cor0.col0 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT ALL - - ( col0 ) - col1 * - 23 AS col0 FROM tab2 AS cor0
----
1435
470
720

query I rowsort
SELECT + 84 * col2 * - cor0.col2 FROM tab1 AS cor0
----
-244944
-272916
-774144

query I rowsort
SELECT + - 51 * + cor0.col2 + + col2 FROM tab0 AS cor0
----
-1650
-4100
-50

query I rowsort
SELECT DISTINCT - col1 * + col1 + - col1 * + ( + col2 ) FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT DISTINCT + + col0 * 59 FROM tab0 AS cor0
----
1416
2065
5251

query I rowsort
SELECT - - 62 * col2 AS col0 FROM tab1 AS cor0
----
3348
3534
5952

query I rowsort
SELECT col2 * ( col0 ) - - col0 AS col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT col0 * - col0 + col1 * + col0 AS col2 FROM tab0
----
1488
178
2170

query I rowsort
SELECT DISTINCT - 75 - - col1 * col0 FROM tab2
----
1268
142
4527

query I rowsort
SELECT DISTINCT col2 * col1 + + col1 AS col0 FROM tab1
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-8269
SELECT - col1 DIV - ( col1 ) AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8269
SELECT - col1 / - ( col1 ) AS col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 + 44 * col0 col1 FROM tab2 AS cor0
----
281
3406
3438

query I rowsort
SELECT DISTINCT + 40 * col2 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT DISTINCT + col0 + + 66 AS col0 FROM tab0 cor0
----
101
155
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8273
SELECT + CAST( NULL AS SIGNED ) + - tab0.col2 * + col1 col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8273
SELECT + CAST ( NULL AS INTEGER ) + - tab0.col2 * + col1 col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 - 47 * 34 AS col1 FROM tab1
----
-1518
-1534
-1595

query I rowsort
SELECT - col0 * - 71 AS col2 FROM tab1 AS cor0
----
213
4544
5680

query I rowsort
SELECT DISTINCT + 26 * cor0.col0 + - col0 * col1 FROM tab0 AS cor0
----
-1440
-2485
-5785

query I rowsort
SELECT DISTINCT col2 * - cor0.col0 + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - 63 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-441
-4914
-4977

query I rowsort
SELECT ( 49 ) AS col2 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT ALL 14 * 79 FROM tab1 AS cor0
----
1106
1106
1106

query I rowsort
SELECT - cor0.col0 * + 77 AS col2 FROM tab2 AS cor0
----
-539
-6006
-6083

onlyif mysql # use DIV operator for integer division
query I rowsort label-8282
SELECT DISTINCT + - cor0.col0 + 36 DIV + col1 col0 FROM tab2 AS cor0
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8282
SELECT DISTINCT + - cor0.col0 + 36 / + col1 col0 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT DISTINCT - tab2.col0 * 98 FROM tab2
----
-686
-7644
-7742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 95 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT + cor0.col1 + cor0.col1 * 26 FROM tab2 AS cor0
----
1593
459
837

query I rowsort
SELECT - + col2 * - col1 + 58 AS col1 FROM tab2 AS cor0
----
1592
704
895

query I rowsort
SELECT ALL 56 * - 98 FROM tab2
----
-5488
-5488
-5488

onlyif mysql # use DIV operator for integer division
query I rowsort label-8288
SELECT - ( + tab0.col0 ) DIV tab0.col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-8288
SELECT - ( + tab0.col0 ) / tab0.col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT - ( + col2 * col1 ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + 33 * + 26 AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c8756e82ee338cf96d585d1d59d6d954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col1 col2 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT tab1.col1 + tab1.col2 + col1 * tab1.col1 AS col0 FROM tab1
----
167
278
756

query I rowsort
SELECT col0 * ( + col0 ) * - col0 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT DISTINCT 63 * + col2 FROM tab2
----
1638
1701
2394

query I rowsort
SELECT - - 64 * col0 + - col0 FROM tab2 AS cor0
----
441
4914
4977

query I rowsort
SELECT - col0 * col2 * - 71 FROM tab0
----
2485
518158
56232

query I rowsort
SELECT tab0.col2 - - 64 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 9eead868a8ce3e9ae24bbd63da905974

onlyif mysql # use DIV operator for integer division
query I rowsort label-8298
SELECT ALL - col2 DIV cor0.col0 col2 FROM tab0 cor0
----
-1
0
0

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

query I rowsort
SELECT ALL + col1 * col0 + - col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + + col2 * 7 FROM tab1 cor0
----
378
399
672

query I rowsort
SELECT col1 + - col0 * - col0 AS col0 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-8302
SELECT - col0 DIV + col1 + 84 + + col1 FROM tab0
----
170
175
181

skipif mysql # not compatible
query I rowsort label-8302
SELECT - col0 / + col1 + 84 + + col1 FROM tab0
----
170
175
181

onlyif mysql # use DIV operator for integer division
query I rowsort label-8303
SELECT + 71 * col0 DIV 17 FROM tab1
----
12
267
334

skipif mysql # not compatible
query I rowsort label-8303
SELECT + 71 * col0 / 17 FROM tab1
----
12
267
334

query I rowsort
SELECT - col0 * - col0 + + cor0.col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL + + col0 * + ( + col1 ) AS col2 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-8306
SELECT DISTINCT col1 + + ( + cor0.col1 ) * col0 DIV + col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-8306
SELECT DISTINCT col1 + + ( + cor0.col1 ) * col0 / + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - + col0 * - 50 + - col0 AS col1 FROM tab0 AS cor0
----
1176
1715
4361

query I rowsort
SELECT - col2 * col0 * + col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT + cor0.col2 * ( col0 ) FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8310
SELECT ALL col0 + CAST( NULL AS SIGNED ) * - col0 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8310
SELECT ALL col0 + CAST ( NULL AS INTEGER ) * - col0 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + cor0.col2 col2 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * + 38 col2 FROM tab2 AS cor0
----
-1026
-1444
-988

query I rowsort
SELECT + + cor0.col0 * + col1 + col2 AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - 36 * col0 + 51 * - 7 + + col0 * col0 FROM tab2 AS cor0
----
-560
2919
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8315
SELECT col0 * col1 + + CAST( 27 AS SIGNED ) * col1 * + col2 FROM tab1 AS cor0
----
16030
34736
37986

skipif mysql # not compatible
query I rowsort label-8315
SELECT col0 * col1 + + CAST ( 27 AS INTEGER ) * col1 * + col2 FROM tab1 AS cor0
----
16030
34736
37986

query I rowsort
SELECT - - col1 * - col2 + + 39 FROM tab0 cor0
----
-2799
-58
-7423

query I rowsort
SELECT + ( + col1 ) + + ( col1 * + col2 ) - + col0 FROM tab2 AS cor0
----
1515
584
861

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 - cor0.col1 col2 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL - col0 * + col2 + 28 + - col1 * + col2 FROM tab0 AS cor0
----
-104
-14732
-3602

query I rowsort
SELECT - col1 * + col2 + - 21 FROM tab1 AS cor0
----
-1269
-1425
-591

onlyif mysql # use DIV operator for integer division
query I rowsort label-8321
SELECT DISTINCT - 57 DIV col0 + col2 DIV ( col0 ) FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8321
SELECT DISTINCT - 57 / col0 + col2 / ( col0 ) FROM tab0 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - + col1 * col1 col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT - + 16 * + 21 + - col1 FROM tab0 AS cor0
----
-422
-427
-433

query I rowsort
SELECT DISTINCT + col0 - col2 * cor0.col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL - + ( col0 ) * - col2 + + col0 * + 17 AS col0 FROM tab0 AS cor0
----
1200
630
8811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8326
SELECT ALL CAST( NULL AS SIGNED ) + + 5 * - col1 * - 94 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8326
SELECT ALL CAST ( NULL AS INTEGER ) + + 5 * - col1 * - 94 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 * 75 * col1 + + 80 + - cor0.col1 AS col1 FROM tab1 cor0
----
-105246
-42680
-93533

query I rowsort
SELECT DISTINCT - col0 + 38 FROM tab2 AS cor0
----
-40
-41
31

query I rowsort
SELECT ALL - col0 * + 81 AS col0 FROM tab1 AS cor0
----
-243
-5184
-6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( + cor0.col1 ) col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT 6 * col1 AS col0 FROM tab0 cor0
----
516
546
582

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 90 + col2 + col2 FROM tab0 AS cor0
----
156
254
92

query I rowsort
SELECT ALL - ( cor0.col1 ) * + col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT + + 48 + - col2 * col1 + - 62 FROM tab1 AS cor0
----
-1262
-1418
-584

query I rowsort
SELECT - + col2 + col0 * + col1 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL + col1 + - col1 + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8338
SELECT DISTINCT CAST( NULL AS SIGNED ) - cor0.col0 * - col0 * - cor0.col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8338
SELECT DISTINCT CAST ( NULL AS INTEGER ) - cor0.col0 * - col0 * - cor0.col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - + 29 * + 93 - col1 AS col1 FROM tab0 AS cor0
----
-2783
-2788
-2794

query I rowsort
SELECT - col2 + 34 FROM tab1 AS cor0
----
-20
-23
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col0 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL 65 FROM tab0, tab0 cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT ALL 96 * col2 AS col0 FROM tab1 AS cor0
----
5184
5472
9216

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

query I rowsort
SELECT + 0 * 47 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL - + col0 - ( + col2 ) AS col2 FROM tab1 cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8347
SELECT + col0 * col0 DIV - 76 + - tab2.col1 FROM tab2
----
-139
-31
-99

skipif mysql # not compatible
query I rowsort label-8347
SELECT + col0 * col0 / - 76 + - tab2.col1 FROM tab2
----
-139
-31
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8348
SELECT DISTINCT tab0.col1 * CAST( NULL AS SIGNED ) FROM tab0, tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8348
SELECT DISTINCT tab0.col1 * CAST ( NULL AS INTEGER ) FROM tab0, tab1 cor0
----
NULL

query I rowsort
SELECT DISTINCT + ( - 42 ) + - cor1.col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
-124
-43
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + 66 + - col1 col2 FROM tab1
----
1690
650
845

query I rowsort
SELECT DISTINCT - col1 + col2 * - col1 FROM tab1
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT col1 + + 30 AS col0 FROM tab1
----
40
43
56

query I rowsort
SELECT tab0.col1 + 21 + col2 AS col2 FROM tab0
----
119
140
194

query I rowsort
SELECT DISTINCT - col0 + - tab2.col1 * col1 FROM tab2
----
-3559
-368
-968

onlyif mysql # use DIV operator for integer division
query I rowsort label-8355
SELECT col0 DIV - 68 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8355
SELECT col0 / - 68 FROM tab1
----
-1
0
0

query I rowsort
SELECT tab0.col0 * - 2 + 27 + - col0 AS col2 FROM tab0
----
-240
-45
-78

query I rowsort
SELECT ALL col0 * col1 + + col0 * - col2 AS col1 FROM tab0
----
1272
3360
801

query I rowsort
SELECT - col2 + ( col1 + col1 ) * 31 FROM tab1 AS cor0
----
1558
563
710

query I rowsort
SELECT + - col1 * - col0 + - col1 + cor0.col2 FROM tab2 AS cor0
----
1364
213
4569

query I rowsort
SELECT col1 + - col0 + - col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + cor0.col2 * ( col2 ) AS col1 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + + col0 + cor0.col1 * - ( - col2 ) FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8363
SELECT + col2 + + CAST( tab2.col0 AS SIGNED ) FROM tab2
----
104
117
34

skipif mysql # not compatible
query I rowsort label-8363
SELECT + col2 + + CAST ( tab2.col0 AS INTEGER ) FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT - col0 * 22 AS col2 FROM tab1
----
-1408
-1760
-66

query I rowsort
SELECT ALL + col0 + ( col1 ) AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - + col1 + 89 FROM tab2 AS cor0
----
30
58
72

query I rowsort
SELECT DISTINCT cor0.col0 + ( + 41 ) * + col1 FROM tab0 AS cor0
----
3550
3820
4012

onlyif mysql # use DIV operator for integer division
query I rowsort label-8368
SELECT DISTINCT + - col1 DIV ( 91 ) FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8368
SELECT DISTINCT + - col1 / ( 91 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT ( - col0 ) * col0 * + ( - col1 * - col2 ) AS col2 FROM tab0 AS cor0
----
-118825
-1634688
-59106502

onlyif mysql # use DIV operator for integer division
query I rowsort label-8370
SELECT ( 92 ) + col2 DIV + 44 AS col0 FROM tab0 AS cor0
----
92
92
93

skipif mysql # not compatible
query I rowsort label-8370
SELECT ( 92 ) + col2 / + 44 AS col0 FROM tab0 AS cor0
----
92
92
93

query I rowsort
SELECT ALL - 59 * 68 * + col0 AS col0 FROM tab2
----
-28084
-312936
-316948

onlyif mysql # use DIV operator for integer division
query I rowsort label-8372
SELECT 26 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8372
SELECT 26 / col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + - 94 * col1 - col2 FROM tab2 AS cor0
----
-1636
-2941
-5572

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab1 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 32e6d0f63bf719b0a999c75379e75eca

query I rowsort
SELECT - col1 * col1 - col1 FROM tab2 cor0
----
-306
-3540
-992

onlyif mysql # use DIV operator for integer division
query I rowsort label-8376
SELECT - col2 DIV col1 + - col1 + - CAST( 46 * - col0 AS SIGNED ) FROM tab0 AS cor0
----
1018
1513
4003

skipif mysql # not compatible
query I rowsort label-8376
SELECT - col2 / col1 + - col1 + - CAST ( 46 * - col0 AS INTEGER ) FROM tab0 AS cor0
----
1018
1513
4003

query I rowsort
SELECT ALL + - col2 * col0 + - col0 FROM tab0 AS cor0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-8378
SELECT ALL + - cor0.col2 DIV col2 + + 29 AS col0 FROM tab0 AS cor0
----
28
28
28

skipif mysql # not compatible
query I rowsort label-8378
SELECT ALL + - cor0.col2 / col2 + + 29 AS col0 FROM tab0 AS cor0
----
28
28
28

query I rowsort
SELECT DISTINCT + col2 * - col0 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - 28 * col0 AS col2 FROM tab0
----
-2492
-672
-980

query I rowsort
SELECT - ( - col1 ) * - col1 + - col2 AS col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT + + cor0.col0 + - col1 * 86 AS col1 FROM tab2 AS cor0
----
-1383
-2659
-4996

query I rowsort
SELECT - 0 + - col1 AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT 28 + col0 * cor0.col0 FROM tab1 AS cor0
----
37
4124
6428

query I rowsort
SELECT DISTINCT - - cor0.col0 + - col0 + col2 AS col0 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8386
SELECT col2 DIV 20 FROM tab0 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-8386
SELECT col2 / 20 FROM tab0 AS cor0
----
0
1
4

query I rowsort
SELECT - col0 + - 62 FROM tab2 AS cor0
----
-140
-141
-69

onlyif mysql # use DIV operator for integer division
query I rowsort label-8388
SELECT - - col1 DIV - 79 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8388
SELECT - - col1 / - 79 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + cor0.col0 col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col2 + + col1 * + cor0.col1 FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-8391
SELECT ALL - col0 DIV + col1 - - 83 AS col0 FROM tab1 cor0
----
77
77
83

skipif mysql # not compatible
query I rowsort label-8391
SELECT ALL - col0 / + col1 - - 83 AS col0 FROM tab1 cor0
----
77
77
83

query I rowsort
SELECT 98 + + col1 * - 19 AS col0 FROM tab2
----
-1023
-225
-491

query I rowsort
SELECT col0 * col2 + - tab0.col0 FROM tab0
----
0
7209
768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

onlyif mysql # use DIV operator for integer division
query I rowsort label-8395
SELECT CAST( - col0 AS SIGNED ) * col1 DIV + col1 + col1 * - col1 FROM tab1 AS cor0
----
-164
-249
-679

skipif mysql # not compatible
query I rowsort label-8395
SELECT CAST ( - col0 AS INTEGER ) * col1 / + col1 + col1 * - col1 FROM tab1 AS cor0
----
-164
-249
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8396
SELECT ALL CAST( col2 AS SIGNED ) AS col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8396
SELECT ALL CAST ( col2 AS INTEGER ) AS col1 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL + 28 AS col0 FROM tab0
----
28
28
28

query I rowsort
SELECT 74 AS col0 FROM tab2 AS cor0
----
74
74
74

query I rowsort
SELECT + - ( - col0 ) + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - - col2 * - col1 + ( col0 ) * col2 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT + + col1 * col2 + - col1 AS col0 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT + col0 + col1 * ( ( - col1 ) ) * - col0 AS col1 FROM tab2 AS cor0
----
22910
271596
6734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col2 + - col2 + - col2 * + col0 * - col2 col1 FROM tab1 AS cor0
----
11610
211128
746400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col0 * 52 col0 FROM tab2 AS cor0
----
371
4134
4187

onlyif mysql # use DIV operator for integer division
query I rowsort label-8405
SELECT DISTINCT - + col1 DIV col1 + col0 AS col1 FROM tab1 cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-8405
SELECT DISTINCT - + col1 / col1 + col0 AS col1 FROM tab1 cor0
----
2
63
79

query I rowsort
SELECT + cor0.col0 - cor0.col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT col1 - - col1 * + 57 FROM tab0 AS cor0
----
4988
5278
5626

query I rowsort
SELECT ALL - - cor0.col2 * col0 + ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-8409
SELECT col1 + ( col2 ) DIV col0 FROM tab0 cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-8409
SELECT col1 + ( col2 ) / col0 FROM tab0 cor0
----
87
91
97

query I rowsort
SELECT col2 * ( + 76 ) + - col0 FROM tab1 AS cor0
----
4101
4268
7216

query I rowsort
SELECT DISTINCT + tab2.col0 AS col1 FROM tab2, tab1 AS cor0
----
7
78
79

query I rowsort
SELECT - col2 * - col1 - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT + col1 * + ( 69 + col2 ) AS col1 FROM tab0
----
13741
6790
8772

query I rowsort
SELECT tab0.col2 * - ( col0 ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - ( col2 ) + cor0.col1 AS col2 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT ALL + + col1 + - 52 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-1630
-4173
45

query I rowsort
SELECT DISTINCT + 4 AS col1 FROM tab2 cor0
----
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8418
SELECT + col1 DIV - ( col1 ) - + col0 col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8418
SELECT + col1 / - ( col1 ) - + col0 col0 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT ALL + 17 * col1 * col0 - ( - cor0.col0 ) FROM tab2 AS cor0
----
22910
3696
78312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8420
SELECT ALL + + CAST( NULL AS SIGNED ) * - 42 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8420
SELECT ALL + + CAST ( NULL AS INTEGER ) * - 42 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 + + col0 AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - 61 * - col2 + col2 FROM tab1 AS cor0
----
3348
3534
5952

query I rowsort
SELECT DISTINCT + 89 + col1 * - col0 AS col0 FROM tab0 AS cor0
----
-1975
-3306
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8424
SELECT + CAST( - 57 AS SIGNED ) FROM tab2 AS cor0
----
-57
-57
-57

skipif mysql # not compatible
query I rowsort label-8424
SELECT + CAST ( - 57 AS INTEGER ) FROM tab2 AS cor0
----
-57
-57
-57

query I rowsort
SELECT + ( 58 ) FROM tab2, tab2 cor0
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

onlyif mysql # use DIV operator for integer division
query I rowsort label-8426
SELECT + col0 DIV 76 AS col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8426
SELECT + col0 / 76 AS col0 FROM tab0
----
0
0
1

query I rowsort
SELECT DISTINCT + col2 + ( col0 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8428
SELECT col0 DIV - 80 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8428
SELECT col0 / - 80 AS col2 FROM tab0
----
-1
0
0

query I rowsort
SELECT col1 * ( + col1 ) AS col2 FROM tab2
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8430
SELECT + CAST( NULL AS SIGNED ) FROM tab1, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8430
SELECT + CAST ( NULL AS INTEGER ) FROM tab1, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8431
SELECT DISTINCT - CAST( + col2 AS SIGNED ) AS col1 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8431
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - + cor0.col0 * - col2 + - col1 + ( col1 ) FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 90 * + col2 + col2 col1 FROM tab1
----
4914
5187
8736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 27 + - col1 * col0 * ( 40 ) col2 FROM tab1 AS cor0
----
-2418
-25330
-41249

query I rowsort
SELECT - - cor0.col2 * 81 * - col0 AS col0 FROM tab0 cor0
----
-2835
-591138
-64152

query I rowsort
SELECT ALL - 99 * 48 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to d5134ee21ec5ee25612e3041332a6fcd

query I rowsort
SELECT - tab1.col0 - - col2 * + tab1.col0 AS col0 FROM tab1
----
159
3584
7600

query I rowsort
SELECT DISTINCT col1 + 69 AS col2 FROM tab2 AS cor0
----
100
128
86

query I rowsort
SELECT ALL - col2 + ( + 42 ) FROM tab2 AS cor0
----
15
16
4

query I rowsort
SELECT DISTINCT 8 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
8

query I rowsort
SELECT - cor0.col2 - + col2 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT col2 * col0 + + col0 + + ( + col1 ) * - col0 AS col2 FROM tab1 AS cor0
----
3072
6720
87

query I rowsort
SELECT DISTINCT - cor0.col0 + - cor0.col1 + cor0.col1 * - col2 FROM tab2 AS cor0
----
-1671
-742
-875

query I rowsort
SELECT + - cor0.col2 * - col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col2 * col2 + + 98 * col1 FROM tab1 cor0
----
10490
4229
5464

query I rowsort
SELECT ALL - col1 * - col2 - + col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - col2 + col0 * cor0.col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT 78 + col2 * + col2 AS col2 FROM tab1 cor0
----
2994
3327
9294

query I rowsort
SELECT ALL + col0 + + col2 * - col0 - col2 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
-485
1
321

query I rowsort
SELECT DISTINCT col2 * + col1 + - col0 * + 33 AS col1 FROM tab2 AS cor0
----
-1040
-1961
606

query I rowsort
SELECT ALL col2 * + col0 + + col1 + col1 AS col2 FROM tab1 AS cor0
----
214
3668
7706

query I rowsort
SELECT DISTINCT - col2 + - 17 AS col0 FROM tab2 AS cor0
----
-43
-44
-55

query I rowsort
SELECT DISTINCT - col2 * + 98 FROM tab0 AS cor0
----
-3234
-8036
-98

query I rowsort
SELECT cor0.col1 - col2 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT col1 * col1 - 32 AS col1 FROM tab1
----
137
644
68

query I rowsort
SELECT DISTINCT col2 * 13 - + cor0.col1 FROM tab0 AS cor0
----
-84
343
975

query I rowsort
SELECT + cor0.col2 + + col1 - + col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + ( - col1 ) + col1 col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT 41 + col0 AS col2 FROM tab1
----
105
121
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8460
SELECT ALL CAST( NULL AS SIGNED ) + col1 * + col0 FROM tab1 cor0
----
NULL
NULL
NULL

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8461
SELECT ALL + CAST( - 43 AS SIGNED ) + col1 + col1 AS col2 FROM tab2 AS cor0
----
-9
19
75

skipif mysql # not compatible
query I rowsort label-8461
SELECT ALL + CAST ( - 43 AS INTEGER ) + col1 + col1 AS col2 FROM tab2 AS cor0
----
-9
19
75

query I rowsort
SELECT ALL - ( + 54 ) AS col0 FROM tab0 AS cor0
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) + 38 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 5111694fae19213d38c768d8b6f956d9

query I rowsort
SELECT + 16 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 9ffb4aaf972de606a4957894645b6216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 54 col0 FROM tab1, tab1 AS cor0
----
-54

query I rowsort
SELECT ALL col1 * - col2 + + col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ( - cor0.col2 ) * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + + ( cor0.col1 ) + - col0 * + ( col2 * cor0.col0 ) FROM tab0 AS cor0
----
-1128
-18922
-649431

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8469
SELECT DISTINCT CAST( 16 AS SIGNED ) * + col2 AS col0 FROM tab2 AS cor0
----
416
432
608

skipif mysql # not compatible
query I rowsort label-8469
SELECT DISTINCT CAST ( 16 AS INTEGER ) * + col2 AS col0 FROM tab2 AS cor0
----
416
432
608

query I rowsort
SELECT DISTINCT cor1.col0 + 42 FROM tab0, tab0 cor0, tab0 AS cor1
----
131
66
77

query I rowsort
SELECT - 73 - - 57 AS col0 FROM tab1
----
-16
-16
-16

onlyif mysql # use DIV operator for integer division
query I rowsort label-8472
SELECT + 50 DIV col0 + tab0.col2 col1 FROM tab0
----
2
35
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8472
SELECT + 50 / col0 + tab0.col2 col1 FROM tab0
----
2
35
82

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8474
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + 75 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8474
SELECT DISTINCT - CAST ( NULL AS REAL ) + 75 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + 62 * - col1 + - col0 FROM tab1
----
-1615
-684
-886

onlyif mysql # use DIV operator for integer division
query I rowsort label-8476
SELECT DISTINCT - + cor1.col2 DIV + 14 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-1
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8476
SELECT DISTINCT - + cor1.col2 / + 14 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-1
-2

query I rowsort
SELECT cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT 95 + tab0.col1 * + tab0.col2 FROM tab0
----
192
2933
7557

onlyif mysql # use DIV operator for integer division
query I rowsort label-8479
SELECT ALL + col2 DIV tab1.col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8479
SELECT ALL + col2 / tab1.col2 FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT + - col2 + col1 * 73 AS col0 FROM tab2 AS cor0
----
1203
2236
4281

query I rowsort
SELECT - - cor0.col1 + + col0 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - 69 AS col2 FROM tab1
----
-69
-69
-69

query I rowsort
SELECT + 29 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT + col0 * 33 AS col2 FROM tab2
----
231
2574
2607

onlyif mysql # use DIV operator for integer division
query I rowsort label-8485
SELECT DISTINCT col1 + + cor0.col0 DIV cor0.col1 FROM tab1 cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-8485
SELECT DISTINCT col1 + + cor0.col0 / cor0.col1 FROM tab1 cor0
----
16
19
26

query I rowsort
SELECT ALL - + col2 * col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + - col2 + - ( + col2 ) FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL + - col1 + cor0.col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + col2 * - col2 - - col1 * - col1 AS col1 FROM tab0 AS cor0
----
-15005
-8485
-9410

query I rowsort
SELECT - col0 + 62 * - 15 * - col1 FROM tab0
----
79956
84541
90175

query I rowsort
SELECT col0 * col0 + col0 * col1 FROM tab2 AS cor0
----
10686
266
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-8492
SELECT DISTINCT - cor0.col0 DIV col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-8492
SELECT DISTINCT - cor0.col0 / col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL - col0 * ( col2 ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + - ( + col1 ) * + col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col0 * + col2 + + col2 * + 10 AS col0 FROM tab0 AS cor0
----
-25
-462
-6478

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8496
SELECT ALL + - CAST( - col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8496
SELECT ALL + - CAST ( - col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8497
SELECT + col2 + col0 * col0 DIV - ( col1 + col1 ) AS col1 FROM tab2 AS cor0
----
-145
-25
27

skipif mysql # not compatible
query I rowsort label-8497
SELECT + col2 + col0 * col0 / - ( col1 + col1 ) AS col1 FROM tab2 AS cor0
----
-145
-25
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8498
SELECT DISTINCT - CAST( - 24 AS SIGNED ) * cor0.col1 AS col1 FROM tab1 AS cor0
----
240
312
624

skipif mysql # not compatible
query I rowsort label-8498
SELECT DISTINCT - CAST ( - 24 AS INTEGER ) * cor0.col1 AS col1 FROM tab1 AS cor0
----
240
312
624

query I rowsort
SELECT DISTINCT + 38 * - ( col1 ) AS col0 FROM tab0
----
-3268
-3458
-3686

query I rowsort
SELECT ALL + - ( + col0 ) * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 70 * col2 FROM tab1 AS cor0
----
3780
3990
6720

query I rowsort
SELECT + col0 * col1 * col0 AS col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT + + col0 + ( + cor0.col2 ) * cor0.col0 + + 74 AS col2 FROM tab0 AS cor0
----
144
7461
890

onlyif mysql # use DIV operator for integer division
query I rowsort label-8504
SELECT - col2 + + col2 DIV + col0 FROM tab2 AS cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-8504
SELECT - col2 + + col2 / + col0 FROM tab2 AS cor0
----
-24
-26
-38

query I rowsort
SELECT - cor1.col0 + cor0.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 960c4e26bb2904811f97a3ce3a894790

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8506
SELECT ALL CAST( NULL AS SIGNED ) * - 11 + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8506
SELECT ALL CAST ( NULL AS INTEGER ) * - 11 + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 23 - + col1 AS col0 FROM tab2 AS cor0
----
-36
-8
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8508
SELECT - col2 * - CAST( - 53 + col2 AS SIGNED ) FROM tab2
----
-570
-702
-702

skipif mysql # not compatible
query I rowsort label-8508
SELECT - col2 * - CAST ( - 53 + col2 AS INTEGER ) FROM tab2
----
-570
-702
-702

query I rowsort
SELECT DISTINCT - col1 * + col2 - ( col1 ) FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT ALL ( - 41 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT + col2 * col2 + + col2 - 88 AS col2 FROM tab1
----
2882
3218
9224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 * + col2 + col0 * - col1 col2 FROM tab0
----
0
656019
66048

query I rowsort
SELECT - col2 * - 76 + col0 - col1 FROM tab1 AS cor0
----
4081
4386
7363

query I rowsort
SELECT + col0 * + col0 + col2 + - col0 * 8 FROM tab0 AS cor0
----
417
7291
946

query I rowsort
SELECT - col1 * - col1 + + col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - ( 90 ) + - col2 FROM tab0 AS cor0
----
-123
-172
-91

query I rowsort
SELECT ALL col2 * + tab0.col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT + 40 AS col2 FROM tab0
----
40
40
40

query I rowsort
SELECT 18 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
243 values hashing to 162ac04886543cfd80f55de959076e4e

query I rowsort
SELECT - - col0 + col1 * col2 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + + col2 * col1 * + 7 FROM tab0 AS cor0
----
19866
52234
679

query I rowsort
SELECT - col2 * - col0 * 72 FROM tab0 AS cor0
----
2520
525456
57024

query I rowsort
SELECT + col1 + cor0.col2 * - col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT - col1 + - col1 * col2 AS col0 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT + col0 + + 65 * + col0 AS col1 FROM tab0 AS cor0
----
1584
2310
5874

onlyif mysql # use DIV operator for integer division
query I rowsort label-8526
SELECT DISTINCT + - col0 DIV - 46 AS col0 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8526
SELECT DISTINCT + - col0 / - 46 AS col0 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT - - col2 + - cor0.col0 * col2 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-8528
SELECT + tab0.col2 + cor0.col0 DIV 75 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 802500fe105d4b262fbd34570cb66599

skipif mysql # not compatible
query I rowsort label-8528
SELECT + tab0.col2 + cor0.col0 / 75 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 802500fe105d4b262fbd34570cb66599

query I rowsort
SELECT + col2 * - col0 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col1 + + col1 * + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT col2 * + ( - col0 ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + - col2 + - 82 + 66 * col2 AS col1 FROM tab2 AS cor0
----
1608
1673
2388

query I rowsort
SELECT DISTINCT + col1 + - 87 FROM tab1 AS cor0
----
-61
-74
-77

query I rowsort
SELECT DISTINCT - col2 * + 48 * + col0 AS col1 FROM tab2 AS cor0
----
-144096
-9072
-97344

query I rowsort
SELECT DISTINCT + col1 * 66 AS col1 FROM tab0 cor0
----
5676
6006
6402

query I rowsort
SELECT - col1 * 74 FROM tab2 AS cor0
----
-1258
-2294
-4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-8537
SELECT - col2 + + col1 DIV + col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-8537
SELECT - col2 + + col1 / + col1 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT - col0 + col1 * - col2 FROM tab0 cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL 1 + - 52 + col0 FROM tab2 AS cor0
----
-44
27
28

query I rowsort
SELECT - + 80 * col1 FROM tab1 AS cor0
----
-1040
-2080
-800

query I rowsort
SELECT DISTINCT col1 * 57 FROM tab2 AS cor0
----
1767
3363
969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 + col0 col1 FROM tab0 cor0
----
122
57
68

query I rowsort
SELECT + col0 + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-8544
SELECT - col2 * - ( cor0.col1 ) + - CAST( col1 + - col1 AS SIGNED ) * ( + col1 + col1 ) DIV + 39 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-8544
SELECT - col2 * - ( cor0.col1 ) + - CAST ( col1 + - col1 AS INTEGER ) * ( + col1 + col1 ) / + 39 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + ( - col0 ) * col1 + 31 FROM tab1 AS cor0
----
-1009
-47
-609

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8546
SELECT ALL + + CAST( - 40 AS SIGNED ) + + col0 AS col1 FROM tab1 AS cor0
----
-37
24
40

skipif mysql # not compatible
query I rowsort label-8546
SELECT ALL + + CAST ( - 40 AS INTEGER ) + + col0 AS col1 FROM tab1 AS cor0
----
-37
24
40

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col2 + cor0.col1 * - 92 col1 FROM tab1 AS cor0
----
-1020
-2335
-799

onlyif mysql # use DIV operator for integer division
query I rowsort label-8549
SELECT ALL + + ( - 10 ) - + col0 DIV 78 FROM tab0 AS cor0
----
-10
-10
-11

skipif mysql # not compatible
query I rowsort label-8549
SELECT ALL + + ( - 10 ) - + col0 / 78 FROM tab0 AS cor0
----
-10
-10
-11

query I rowsort
SELECT 50 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT col1 * + ( col0 ) - - col2 * col0 FROM tab2
----
406
4345
6630

query I rowsort
SELECT ALL - 33 + - col0 * col0 AS col1 FROM tab1 AS cor0
----
-4129
-42
-6433

query I rowsort
SELECT col2 * - col0 + col2 AS col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT + col2 + + ( + col1 ) * col1 AS col0 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT ALL + ( col1 ) + + col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8556
SELECT DISTINCT - col0 DIV col1 + + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8556
SELECT DISTINCT - col0 / col1 + + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + + 74 * - col2 + 55 * - 62 * col0 AS col1 FROM tab2 AS cor0
----
-25868
-267904
-272202

query I rowsort
SELECT DISTINCT - ( - col2 ) * ( col2 ) + + col2 * cor0.col1 AS col2 FROM tab0 AS cor0
----
14186
3927
98

query I rowsort
SELECT ALL + cor0.col2 - col1 FROM tab1 cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 89 + + col2 col1 FROM tab2 AS cor0
----
115
116
127

query I rowsort
SELECT - 84 + + col1 * - 14 FROM tab2 AS cor0
----
-322
-518
-910

query I rowsort
SELECT DISTINCT - ( 19 ) AS col0 FROM tab0
----
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8563
SELECT DISTINCT CAST( NULL AS SIGNED ) * - col1 * col1 FROM tab0
----
NULL

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

query I rowsort
SELECT - + tab1.col1 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT 42 + + col1 * - col0 FROM tab2 AS cor0
----
-1301
-175
-4560

query I rowsort
SELECT ALL + + col2 * col1 - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) * - cor0.col1 + - col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT col2 - col0 AS col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL tab1.col0 AS col1 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL + col1 * - col2 + + col2 * - ( col2 ) FROM tab0
----
-14186
-3927
-98

query I rowsort
SELECT ALL col2 - - ( col1 ) * cor0.col1 AS col2 FROM tab2 cor0
----
327
3507
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * + 64 col0 FROM tab1 cor0
----
1664
640
832

query I rowsort
SELECT 62 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 + - col2 * col1 col2 FROM tab0
----
-2752
-7371
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8575
SELECT + CAST( 70 * col0 AS SIGNED ) + CAST( NULL AS DECIMAL ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8575
SELECT + CAST ( 70 * col0 AS INTEGER ) + CAST ( NULL AS REAL ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 10 FROM tab0, tab1 cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

onlyif mysql # use DIV operator for integer division
query I rowsort label-8577
SELECT 34 * col2 DIV - 93 FROM tab1 cor0
----
-19
-20
-35

skipif mysql # not compatible
query I rowsort label-8577
SELECT 34 * col2 / - 93 FROM tab1 cor0
----
-19
-20
-35

query I rowsort
SELECT 93 + + col1 FROM tab0
----
179
184
190

query I rowsort
SELECT ALL + 64 * tab1.col0 AS col0 FROM tab1
----
192
4096
5120

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab2, tab1 cor1
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

query I rowsort
SELECT ALL - + 60 + + col1 FROM tab2 AS cor0
----
-1
-29
-43

query I rowsort
SELECT col2 + col2 * 41 FROM tab1 AS cor0
----
2268
2394
4032

query I rowsort
SELECT DISTINCT - + ( col0 ) + - ( + 59 ) * cor0.col0 AS col0 FROM tab1 AS cor0
----
-180
-3840
-4800

query I rowsort
SELECT - cor0.col2 + - col0 * - 6 AS col0 FROM tab2 AS cor0
----
15
436
442

query I rowsort
SELECT ALL - 96 * col0 * + col1 FROM tab0
----
-198144
-325920
-777504

query I rowsort
SELECT ALL - + 19 * + col0 AS col2 FROM tab1 AS cor0
----
-1216
-1520
-57

query I rowsort
SELECT 29 AS col0 FROM tab1 cor0
----
29
29
29

query I rowsort
SELECT ALL - col2 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + - col1 + 3 FROM tab0 AS cor0
----
-83
-88
-94

query I rowsort
SELECT col1 * - cor0.col2 * - col0 FROM tab2 cor0
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + - col0 * - col2 col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT col1 * ( 58 * col1 ) AS col0 FROM tab0 AS cor0
----
428968
480298
545722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8594
SELECT DISTINCT + col0 + CAST( NULL AS DECIMAL ) * 90 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8594
SELECT DISTINCT + col0 + CAST ( NULL AS REAL ) * 90 AS col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + 42 col0 FROM tab2 AS cor0
----
-17
11
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - 54 + cor0.col0 col0 FROM tab2 AS cor0
----
1465
1482
2131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8597
SELECT ALL col2 + CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL - + col0 + 29 AS col0 FROM tab0 cor0
----
-6
-60
5

query I rowsort
SELECT + - col2 * + col0 * - col2 + col1 FROM tab2 AS cor0
----
114093
5134
52787

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8601
SELECT - col1 DIV + col0 + - 42 FROM tab0 AS cor0
----
-43
-44
-45

skipif mysql # not compatible
query I rowsort label-8601
SELECT - col1 / + col0 + - 42 FROM tab0 AS cor0
----
-43
-44
-45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8602
SELECT CAST( NULL AS SIGNED ) + 46 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8602
SELECT CAST ( NULL AS INTEGER ) + 46 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( col2 ) * + col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + col0 * + 31 + cor0.col0 AS col2 FROM tab0 cor0
----
1120
2848
768

query I rowsort
SELECT + 96 + ( - col2 ) FROM tab1 AS cor0
----
0
39
42

query I rowsort
SELECT DISTINCT + ( ( + col0 ) ) * - col0 + - col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab0, tab2 AS cor0, tab2 cor1
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - cor0.col0 + + col2 AS col1 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT ( 42 ) * col2 FROM tab1 AS cor0
----
2268
2394
4032

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) + + col0 * col1 * + col1 col2 FROM tab0 AS cor0
----
177480
329280
736920

query I rowsort
SELECT DISTINCT col1 + - col0 * col0 - col0 * 74 * - col1 FROM tab2 cor0
----
16040
334523
93158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col0 ) * col0 col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-8613
SELECT col2 + col2 DIV col2 AS col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-8613
SELECT col2 + col2 / col2 AS col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT - ( 84 ) FROM tab1 AS cor0
----
-84
-84
-84

query I rowsort
SELECT 88 + cor0.col2 FROM tab2 AS cor0
----
114
115
126

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8616
SELECT - CAST( + col2 AS SIGNED ) + - col0 col1 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8616
SELECT - CAST ( + col2 AS INTEGER ) + - col0 col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT - 62 * tab0.col1 AS col1 FROM tab0
----
-5332
-5642
-6014

onlyif mysql # use DIV operator for integer division
query I rowsort label-8618
SELECT - tab0.col0 + 47 DIV col0 AS col1 FROM tab0
----
-23
-34
-89

skipif mysql # not compatible
query I rowsort label-8618
SELECT - tab0.col0 + 47 / col0 AS col1 FROM tab0
----
-23
-34
-89

query I rowsort
SELECT - col1 - - col1 * cor0.col1 FROM tab2 cor0
----
272
3422
930

query I rowsort
SELECT col2 * ( + 89 ) - - col1 AS col2 FROM tab1 AS cor0
----
4832
5083
8557

query I rowsort
SELECT + cor0.col0 - col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8622
SELECT + col2 + + col0 * tab1.col2 DIV col1 + col2 DIV col0 FROM tab1
----
421
687
78

skipif mysql # not compatible
query I rowsort label-8622
SELECT + col2 + + col0 * tab1.col2 / col1 + col2 / col0 FROM tab1
----
421
687
78

query I rowsort
SELECT DISTINCT - col1 + ( + 59 ) FROM tab1
----
33
46
49

query I rowsort
SELECT - col0 + 94 AS col0 FROM tab0 AS cor0
----
5
59
70

query I rowsort
SELECT DISTINCT + - col2 * + 77 AS col0 FROM tab2 AS cor0
----
-2002
-2079
-2926

query I rowsort
SELECT col0 + col0 + col0 FROM tab0 AS cor0
----
105
267
72

query I rowsort
SELECT ALL + col1 + col2 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT col1 * + cor0.col0 + + 41 AS col1 FROM tab0 AS cor0
----
2105
3436
8140

query I rowsort
SELECT - 12 * + col2 + 0 AS col0 FROM tab0 AS cor0
----
-12
-396
-984

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
17
31
59

query I rowsort
SELECT ALL 55 + - 88 + + tab2.col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 9cec2dc30d765601e6600e979875a3ca

onlyif mysql # use DIV operator for integer division
query I rowsort label-8632
SELECT 92 DIV + tab1.col0 FROM tab1
----
1
1
30

skipif mysql # not compatible
query I rowsort label-8632
SELECT 92 / + tab1.col0 FROM tab1
----
1
1
30

query I rowsort
SELECT + col2 * - col1 - col0 AS col2 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT 64 * + col0 FROM tab2
----
448
4992
5056

query I rowsort
SELECT + - 66 * col0 AS col0 FROM tab1 AS cor0
----
-198
-4224
-5280

query I rowsort
SELECT ALL + ( col2 ) - - 67 FROM tab0
----
100
149
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-8637
SELECT - ( 10 ) DIV - col2 col0 FROM tab0 AS cor0
----
0
0
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8637
SELECT - ( 10 ) / - col2 col0 FROM tab0 AS cor0
----
0
0
10

query I rowsort
SELECT DISTINCT - 25 * 47 FROM tab2, tab2 AS cor0
----
-1175

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8639
SELECT - tab1.col1 * - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8639
SELECT - tab1.col1 * - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - 62 * - cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to d8c0f02de1722cd24bfd0311399d94be

query I rowsort
SELECT - ( col2 ) * + col0 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8642
SELECT - 66 DIV - col2 + col2 * + ( - col2 + col0 ) AS col2 FROM tab0 AS cor0
----
-295
100
574

skipif mysql # not compatible
query I rowsort label-8642
SELECT - 66 / - col2 + col2 * + ( - col2 + col0 ) AS col2 FROM tab0 AS cor0
----
-295
100
574

query I rowsort
SELECT - - col1 * cor0.col0 * - col2 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT 32 * - col1 AS col1 FROM tab2 AS cor0
----
-1888
-544
-992

query I rowsort
SELECT - 96 * col2 FROM tab0 AS cor0
----
-3168
-7872
-96

query I rowsort
SELECT - + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + + col1 + col2 * - cor0.col2 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT + 6 * col1 - + col1 AS col0 FROM tab0
----
430
455
485

query I rowsort
SELECT - 41 * - 66 * tab2.col1 + col1 AS col0 FROM tab2
----
159713
46019
83917

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8650
SELECT CAST( col2 AS SIGNED ) + col1 AS col0 FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-8650
SELECT CAST ( col2 AS INTEGER ) + col1 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL col0 * + col1 + col1 * col1 AS col0 FROM tab0
----
12804
16380
9460

query I rowsort
SELECT ALL 75 + - tab2.col0 AS col0 FROM tab2
----
-3
-4
68

query I rowsort
SELECT ( + 85 ) + col0 AS col1 FROM tab0 AS cor0
----
109
120
174

query I rowsort
SELECT ( - 82 ) AS col0 FROM tab1
----
-82
-82
-82

query I rowsort
SELECT - cor0.col0 + + col1 * col1 AS col2 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT ALL - + col2 * cor0.col2 * cor0.col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT col1 * + col1 + ( - col2 ) FROM tab0 cor0
----
7363
8199
9408

query I rowsort
SELECT ALL + - 48 AS col0 FROM tab0 AS cor0
----
-48
-48
-48

query I rowsort
SELECT DISTINCT + + col2 * + cor0.col0 + - 56 AS col1 FROM tab0 AS cor0
----
-21
7242
736

query I rowsort
SELECT + col0 * col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT + 51 * + col2 FROM tab0 AS cor0
----
1683
4182
51

query I rowsort
SELECT ALL 87 * + col1 + + col1 * + col1 FROM tab0 cor0
----
14878
16198
17848

query I rowsort
SELECT 36 * col2 AS col1 FROM tab2 AS cor0
----
1368
936
972

query I rowsort
SELECT DISTINCT + - 0 AS col2 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8665
SELECT ALL + cor0.col0 * col2 + + cor0.col0 DIV - col1 + - col0 AS col0 FROM tab2 AS cor0
----
182
1949
2919

skipif mysql # not compatible
query I rowsort label-8665
SELECT ALL + cor0.col0 * col2 + + cor0.col0 / - col1 + - col0 AS col0 FROM tab2 AS cor0
----
182
1949
2919

query I rowsort
SELECT ALL - cor0.col1 + col2 * + ( - 67 ) FROM tab2 AS cor0
----
-1801
-1840
-2563

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8667
SELECT - ( col0 ) * CAST( + 27 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-2403
-648
-945

skipif mysql # not compatible
query I rowsort label-8667
SELECT - ( col0 ) * CAST ( + 27 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2403
-648
-945

onlyif mysql # use DIV operator for integer division
query I rowsort label-8668
SELECT ALL col0 DIV + col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8668
SELECT ALL col0 / + col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8669
SELECT ALL tab1.col0 DIV col1 + col2 FROM tab1
----
102
54
63

skipif mysql # not compatible
query I rowsort label-8669
SELECT ALL tab1.col0 / col1 + col2 FROM tab1
----
102
54
63

query I rowsort
SELECT DISTINCT - col2 * - col0 + + col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + + col2 + + cor0.col2 FROM tab0 AS cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - col1 * CAST ( + col2 AS REAL ) AS col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + cor0.col2 * ( - 72 ) AS col1 FROM tab2 AS cor0
----
-1872
-1944
-2736

query I rowsort
SELECT - col0 + + 65 AS col0 FROM tab2 AS cor0
----
-13
-14
58

query I rowsort
SELECT DISTINCT + 29 * + col0 AS col2 FROM tab2 AS cor0
----
203
2262
2291

query I rowsort
SELECT ALL - 29 * col1 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT DISTINCT - 6 AS col2 FROM tab1 AS cor0
----
-6

query I rowsort
SELECT ALL + - 21 + col1 * col0 FROM tab2 cor0
----
1322
196
4581

query I rowsort
SELECT ALL + 99 + + col2 FROM tab1
----
153
156
195

onlyif mysql # use DIV operator for integer division
query I rowsort label-8680
SELECT - - col0 DIV 85 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8680
SELECT - - col0 / 85 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * - 63 AS col2 FROM tab0 AS cor0
----
-2079
-5166
-63

query I rowsort
SELECT 13 - tab1.col0 FROM tab1
----
-51
-67
10

query I rowsort
SELECT ALL - tab2.col0 * col0 + 33 * col2 AS col1 FROM tab2
----
-4987
-5226
842

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8684
SELECT DISTINCT col1 + + col2 * CAST( + col0 AS SIGNED ) + col2 AS col0 FROM tab1
----
242
3715
7789

skipif mysql # not compatible
query I rowsort label-8684
SELECT DISTINCT col1 + + col2 * CAST ( + col0 AS INTEGER ) + col2 AS col0 FROM tab1
----
242
3715
7789

query I rowsort
SELECT - 85 + - col2 AS col1 FROM tab0
----
-118
-167
-86

query I rowsort
SELECT col1 + 97 FROM tab0
----
183
188
194

query I rowsort
SELECT ALL + - 39 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 97 AS REAL ) FROM tab0, tab1 cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

onlyif mysql # use DIV operator for integer division
query I rowsort label-8689
SELECT ALL col1 DIV - tab1.col1 AS col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8689
SELECT ALL col1 / - tab1.col1 AS col2 FROM tab1
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8690
SELECT - col2 + - CAST( cor0.col1 + col1 AS SIGNED ) FROM tab0 AS cor0
----
-195
-205
-264

skipif mysql # not compatible
query I rowsort label-8690
SELECT - col2 + - CAST ( cor0.col1 + col1 AS INTEGER ) FROM tab0 AS cor0
----
-195
-205
-264

onlyif mysql # use DIV operator for integer division
query I rowsort label-8691
SELECT ALL - cor0.col0 DIV 13 AS col1 FROM tab0 AS cor0
----
-1
-2
-6

skipif mysql # not compatible
query I rowsort label-8691
SELECT ALL - cor0.col0 / 13 AS col1 FROM tab0 AS cor0
----
-1
-2
-6

query I rowsort
SELECT DISTINCT + + col2 * 65 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
3484
3695
6227

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8693
SELECT col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8693
SELECT col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 83 AS REAL ) - - col1 * 78 * - col0 FROM tab0
----
-160909
-264727
-631639

query I rowsort
SELECT 8 * + col1 - col2 AS col1 FROM tab0 AS cor0
----
646
655
775

query I rowsort
SELECT ALL + ( col2 ) * col0 + 61 FROM tab2 AS cor0
----
2089
250
3063

query I rowsort
SELECT - col2 * col0 - col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 2 + ( + col2 ) * - ( - cor0.col1 * cor0.col1 ) col2 FROM tab1 AS cor0
----
16226
36506
5702

query I rowsort
SELECT - - 4 + col1 FROM tab0 AS cor0
----
101
90
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * col1 col0 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8701
SELECT ALL - 6 * + col0 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8701
SELECT ALL - 6 * + col0 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 79 * col1 * - ( col1 ) col0 FROM tab1 cor0
----
13351
53404
7900

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) + + 78 AS col2 FROM tab0 AS cor0
----
-11
43
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-8704
SELECT 51 DIV col0 AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-8704
SELECT 51 / col0 AS col1 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT - col1 * col1 * col0 AS col2 FROM tab2 cor0
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-8706
SELECT - col2 * col0 DIV col0 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8706
SELECT - col2 * col0 / col0 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT col1 + col0 * ( + ( col0 ) ) AS col0 FROM tab0 cor0
----
1322
662
8012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col2 * - 99 col2 FROM tab1 AS cor0
----
-16038
-361152
-760320

query I rowsort
SELECT ALL col0 * col0 + col0 FROM tab0 cor0
----
1260
600
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8710
SELECT + col0 * + col1 + CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
1381
244
4628

skipif mysql # not compatible
query I rowsort label-8710
SELECT + col0 * + col1 + CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT col2 * + col1 + cor0.col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + col1 + + ( - col0 ) * col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + col2 + + col0 * col1 FROM tab1 AS cor0
----
1136
132
697

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2, tab1 cor2
----
3645 values hashing to a8d2ba8b8eb568b0a9a1771ccb0a8f23

query I rowsort
SELECT - cor0.col2 * - col0 + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - col2 * - col0 + - 68 * col1 AS col1 FROM tab2 AS cor0
----
-1919
-1984
1846

query I rowsort
SELECT - col1 + col0 * 61 AS col1 FROM tab0 AS cor0
----
1378
2038
5338

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8718
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-8718
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8719
SELECT + + col2 + ( col1 ) DIV col0 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-8719
SELECT + + col2 + ( col1 ) / col0 FROM tab0 AS cor0
----
3
36
83

query I rowsort
SELECT - - col1 * + 89 FROM tab2 AS cor0
----
1513
2759
5251

onlyif mysql # use DIV operator for integer division
query I rowsort label-8721
SELECT ALL - col2 DIV col1 + + col2 FROM tab1 AS cor0
----
52
52
89

skipif mysql # not compatible
query I rowsort label-8721
SELECT ALL - col2 / col1 + + col2 FROM tab1 AS cor0
----
52
52
89

query I rowsort
SELECT ALL + 98 * 26 AS col2 FROM tab2 AS cor0
----
2548
2548
2548

query I rowsort
SELECT DISTINCT + 34 * 15 FROM tab0
----
510

query I rowsort
SELECT ALL ( 47 ) FROM tab2 cor0
----
47
47
47

query I rowsort
SELECT 57 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT - ( 46 ) + - cor0.col0 FROM tab2 AS cor0
----
-124
-125
-53

query I rowsort
SELECT + ( col1 ) + + tab2.col0 + 19 * - 94 FROM tab2
----
-1649
-1690
-1748

query I rowsort
SELECT ALL ( + 67 ) + + tab0.col0 FROM tab0
----
102
156
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-8729
SELECT + 19 DIV - col0 AS col1 FROM tab1 AS cor0
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-8729
SELECT + 19 / - col0 AS col1 FROM tab1 AS cor0
----
-6
0
0

query I rowsort
SELECT DISTINCT ( + 2 ) AS col2 FROM tab1
----
2

query I rowsort
SELECT DISTINCT + 71 AS col0 FROM tab2, tab1 AS cor0
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8732
SELECT ALL CAST( col0 + + col1 AS SIGNED ) FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-8732
SELECT ALL CAST ( col0 + + col1 AS INTEGER ) FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT + ( - ( + tab0.col0 ) ) AS col0 FROM tab0, tab2 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + - cor0.col2 * - col2 + - col1 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT ALL + col0 * 40 + + col1 * - col0 * 95 FROM tab0 AS cor0
----
-195120
-321125
-765845

query I rowsort
SELECT col0 * - 63 + col0 AS col2 FROM tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT DISTINCT - col0 * ( col0 ) + + ( col2 ) AS col2 FROM tab2 cor0
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT + cor0.col0 + - 86 AS col2 FROM tab2 AS cor0
----
-7
-79
-8

query I rowsort
SELECT ALL 53 FROM tab0 cor0
----
53
53
53

query I rowsort
SELECT - + 73 + col0 AS col1 FROM tab0 cor0
----
-38
-49
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8741
SELECT + col1 * col1 + + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8741
SELECT + col1 * col1 + + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 64 + col2 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-2852
-3185
-9152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + cor0.col1 + + col2 col1 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-8744
SELECT DISTINCT - + col2 DIV + col0 - + col1 AS col0 FROM tab0 AS cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-8744
SELECT DISTINCT - + col2 / + col0 - + col1 AS col0 FROM tab0 AS cor0
----
-87
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL col2 + col2 * - col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT col0 + - 20 * 19 - col2 FROM tab2 AS cor0
----
-328
-339
-400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8748
SELECT ALL - col1 * - CAST( NULL AS SIGNED ) * - col0 + + col1 + 70 * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8748
SELECT ALL - col1 * - CAST ( NULL AS INTEGER ) * - col0 + + col1 + 70 * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - 43 + + 22 AS col0 FROM tab0 AS cor0
----
-3676
-3891
-4149

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 50 col0 FROM tab2, tab2 AS cor0, tab2 cor1
----
50

query I rowsort
SELECT - col2 * - ( 22 ) FROM tab1 cor0
----
1188
1254
2112

query I rowsort
SELECT ALL - col2 - 8 AS col1 FROM tab2 AS cor0
----
-34
-35
-46

query I rowsort
SELECT cor0.col1 + + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT 1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL col2 * - 69 FROM tab1 AS cor0
----
-3726
-3933
-6624

query I rowsort
SELECT DISTINCT col1 * - cor0.col0 + - 17 FROM tab1 AS cor0
----
-1057
-657
-95

query I rowsort
SELECT col0 + col1 * 40 * col1 AS col2 FROM tab2
----
11639
139318
38447

query I rowsort
SELECT cor1.col2 * + 70 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 76230c61c7902fa5a05895113d4f1885

query I rowsort
SELECT ALL - 65 - col0 FROM tab2
----
-143
-144
-72

query I rowsort
SELECT DISTINCT + col2 + 0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8761
SELECT col2 DIV - 76 + ( - col2 ) col1 FROM tab2
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8761
SELECT col2 / - 76 + ( - col2 ) col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT - col0 + col1 * col0 AS col1 FROM tab1
----
576
75
960

query I rowsort
SELECT col1 + - col0 * + ( + col2 ) + col0 AS col2 FROM tab0
----
-682
-7118
97

query I rowsort
SELECT + col2 + 29 FROM tab2
----
55
56
67

query I rowsort
SELECT ( cor1.col1 ) * cor1.col2 FROM tab1, tab2, tab0 AS cor0, tab1 AS cor1
----
81 values hashing to 940f1e7270a057eb303b3443f91e7ee3

query I rowsort
SELECT col2 - - ( col0 ) FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + col2 - - col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT + + col0 * + col0 + cor0.col1 AS col2 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT + - col2 + - col1 FROM tab1 cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8770
SELECT ALL - col0 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8770
SELECT ALL - col0 / col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - + col2 * - ( + col1 ) + cor0.col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL + + col0 + 37 FROM tab2 cor0
----
115
116
44

query I rowsort
SELECT ALL cor0.col2 + + 50 FROM tab2 AS cor0
----
76
77
88

query I rowsort
SELECT + tab2.col0 * - 82 FROM tab2
----
-574
-6396
-6478

query I rowsort
SELECT DISTINCT - cor0.col0 + 87 FROM tab2 AS cor0
----
8
80
9

query I rowsort
SELECT ( + col0 ) + - col1 AS col2 FROM tab2
----
-24
19
62

query I rowsort
SELECT + col1 - - col2 * - tab1.col0 AS col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT - ( - col2 + tab0.col0 ) * + col1 AS col2 FROM tab0
----
-3298
-637
774

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8779
SELECT ( col2 ) * 97 / - 5 + col1 + + CAST( NULL AS SIGNED ) * + col2 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8779
SELECT ( col2 ) * 97 / - 5 + col1 + + CAST ( NULL AS INTEGER ) * + col2 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8780
SELECT DISTINCT CAST( + col2 AS SIGNED ) * col1 AS col0 FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-8780
SELECT DISTINCT CAST ( + col2 AS INTEGER ) * col1 AS col0 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 19 ) col1 FROM tab0
----
19
19
19

query I rowsort
SELECT DISTINCT - tab2.col0 * - ( col0 ) FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - tab1.col2 col0 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - cor0.col0 ) col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + 81 * cor0.col1 + - col2 + col0 FROM tab2 AS cor0
----
1418
2491
4831

query I rowsort
SELECT ALL - 61 * col1 AS col2 FROM tab1 AS cor0
----
-1586
-610
-793

query I rowsort
SELECT - - col1 * - col0 - col1 * + col0 FROM tab0 AS cor0
----
-16198
-4128
-6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 43 * + col1 col2 FROM tab1 AS cor0
----
1118
430
559

onlyif mysql # use DIV operator for integer division
query I rowsort label-8789
SELECT - col0 - + col0 DIV + col0 AS col2 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-8789
SELECT - col0 - + col0 / + col0 AS col2 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT DISTINCT + ( + col0 ) * - 20 FROM tab1 AS cor0
----
-1280
-1600
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8791
SELECT DISTINCT CAST( NULL AS SIGNED ) + 81 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8791
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 81 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col0 * col1 + + cor0.col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - 41 * + 5 + col0 FROM tab1 AS cor0
----
-125
-141
-202

onlyif mysql # use DIV operator for integer division
query I rowsort label-8794
SELECT cor0.col0 + 75 DIV col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8794
SELECT cor0.col0 + 75 / col1 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col1 * col1 + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL - 54 AS col0 FROM tab0
----
-54
-54
-54

onlyif mysql # use DIV operator for integer division
query I rowsort label-8797
SELECT - + 58 - + col2 DIV cor0.col0 FROM tab2 AS cor0
----
-58
-58
-61

skipif mysql # not compatible
query I rowsort label-8797
SELECT - + 58 - + col2 / cor0.col0 FROM tab2 AS cor0
----
-58
-58
-61

query I rowsort
SELECT ALL - - ( + col0 ) + + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + - 16 + col1 AS col0 FROM tab0 AS cor0
----
70
75
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-8800
SELECT - + col1 + col0 DIV - col2 FROM tab0 AS cor0
----
-132
-86
-92

skipif mysql # not compatible
query I rowsort label-8800
SELECT - + col1 + col0 / - col2 FROM tab0 AS cor0
----
-132
-86
-92

query I rowsort
SELECT ALL + - col0 * col1 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8802
SELECT - - 38 * - col2 + + CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8802
SELECT - - 38 * - col2 + + CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col0 * - col0 + 48 FROM tab0 cor0
----
-1177
-528
-7873

query I rowsort
SELECT ALL + 74 AS col0 FROM tab0
----
74
74
74

query I rowsort
SELECT ( + ( + col1 ) ) * 26 FROM tab0
----
2236
2366
2522

query I rowsort
SELECT col0 + - col0 * + tab1.col1 FROM tab1
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8807
SELECT DISTINCT - tab1.col2 DIV 58 + col2 * 99 FROM tab1
----
5346
5643
9503

skipif mysql # not compatible
query I rowsort label-8807
SELECT DISTINCT - tab1.col2 / 58 + col2 * 99 FROM tab1
----
5346
5643
9503

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8808
SELECT DISTINCT CAST( NULL AS SIGNED ) + + col1 + col1 * 55 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8808
SELECT DISTINCT CAST ( NULL AS INTEGER ) + + col1 + col1 * 55 AS col1 FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8809
SELECT ALL + + col1 DIV col0 col0 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8809
SELECT ALL + + col1 / col0 col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT + col1 * + 15 FROM tab2 AS cor0
----
255
465
885

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8811
SELECT DISTINCT col2 + col0 * col1 - + col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8811
SELECT DISTINCT col2 + col0 * col1 - + col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8812
SELECT ALL - col0 DIV - 55 + col1 FROM tab0 AS cor0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-8812
SELECT ALL - col0 / - 55 + col1 FROM tab0 AS cor0
----
86
92
97

query I rowsort
SELECT DISTINCT + col2 * + 30 * 98 FROM tab2 AS cor0
----
111720
76440
79380

query I rowsort
SELECT 54 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT col2 - - col1 * - col0 AS col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT + col1 * tab2.col1 + + col2 AS col1 FROM tab2
----
327
3507
988

query I rowsort
SELECT ( 78 ) FROM tab0, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT ALL + col0 + col2 * - 21 + - col0 FROM tab0 AS cor0
----
-1722
-21
-693

query I rowsort
SELECT DISTINCT + col2 * - 4 + + 28 AS col1 FROM tab0 AS cor0
----
-104
-300
24

query I rowsort
SELECT DISTINCT - - col0 + 67 AS col1 FROM tab1 AS cor0
----
131
147
70

query I rowsort
SELECT - col0 * - cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col1 * - cor0.col2 AS col0 FROM tab2 cor0
----
-1593
-663
-868

query I rowsort
SELECT + col1 * - cor0.col2 + + col1 * - 79 FROM tab2 AS cor0
----
-1989
-3286
-6195

query I rowsort
SELECT + + col0 * - col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - - ( - 31 ) * col1 FROM tab2 AS cor0
----
-1829
-527
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 24 col1 FROM tab0 AS cor0
----
2064
2184
2328

query I rowsort
SELECT DISTINCT - col1 * + col0 * col0 AS col2 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT - 36 * + 57 AS col0 FROM tab1
----
-2052
-2052
-2052

query I rowsort
SELECT DISTINCT col2 * 53 FROM tab0
----
1749
4346
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-8830
SELECT DISTINCT - 25 DIV ( + col2 ) - ( ( - col2 ) ) FROM tab0
----
-24
33
82

skipif mysql # not compatible
query I rowsort label-8830
SELECT DISTINCT - 25 / ( + col2 ) - ( ( - col2 ) ) FROM tab0
----
-24
33
82

query I rowsort
SELECT ALL + ( + col2 ) AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT - + 27 + - col2 AS col1 FROM tab2 AS cor0
----
-53
-54
-65

query I rowsort
SELECT - 80 * 71 AS col2 FROM tab2 AS cor0
----
-5680
-5680
-5680

query I rowsort
SELECT - - ( cor0.col1 ) - - col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + + col1 + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT col0 + + 28 FROM tab1 AS cor0
----
108
31
92

query I rowsort
SELECT - 74 * - col0 AS col1 FROM tab1
----
222
4736
5920

query I rowsort
SELECT + - ( 94 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

query I rowsort
SELECT + 11 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT ALL col0 * col1 + ( - col1 * - col0 ) AS col2 FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT 40 * + col2 AS col1 FROM tab1 AS cor0
----
2160
2280
3840

query I rowsort
SELECT DISTINCT 60 * col1 FROM tab0 cor0
----
5160
5460
5820

query I rowsort
SELECT + 60 * col0 * - 44 AS col0 FROM tab2 AS cor0
----
-18480
-205920
-208560

query I rowsort
SELECT DISTINCT - col2 + + col1 * - 97 AS col0 FROM tab1 AS cor0
----
-1027
-1357
-2576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8845
SELECT ALL col2 + col0 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8845
SELECT ALL col2 + col0 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8847
SELECT DISTINCT + col2 * 63 DIV col1 FROM tab0
----
0
24
56

skipif mysql # not compatible
query I rowsort label-8847
SELECT DISTINCT + col2 * 63 / col1 FROM tab0
----
0
24
56

query I rowsort
SELECT DISTINCT + col0 * + col0 + 12 + - col1 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
-57
3468
5372

query I rowsort
SELECT DISTINCT + col0 * - 22 AS col1 FROM tab2
----
-154
-1716
-1738

query I rowsort
SELECT ALL cor0.col2 + 0 * + col1 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - col2 col2 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT cor0.col0 + ( 64 ) * - col1 AS col2 FROM tab2 AS cor0
----
-1009
-1977
-3698

query I rowsort
SELECT DISTINCT - col0 * tab2.col1 AS col0 FROM tab2
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 * col0 col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT + + col0 + cor0.col1 * cor0.col2 * col2 FROM tab1 AS cor0
----
119888
32554
75819

onlyif mysql # use DIV operator for integer division
query I rowsort label-8856
SELECT - + col0 * - col2 DIV cor0.col2 + + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-8856
SELECT - + col0 * - col2 / cor0.col2 + + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + col0 - + col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT col1 + + col1 + - col2 AS col0 FROM tab2
----
-4
35
92

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE + col2 * col1 + + col1 BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT - col2 + + col2 * col0 AS col0 FROM tab2 AS cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-8861
SELECT - col1 DIV col1 + + col1 AS col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-8861
SELECT - col1 / col1 + + col1 AS col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT ALL + col1 - + tab1.col0 AS col1 FROM tab1
----
-54
-67
23

query IIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND cor0.col0
----

query I rowsort
SELECT - col2 * cor0.col0 * cor0.col0 + col0 FROM tab0 cor0
----
-1190
-18984
-649433

query I rowsort
SELECT DISTINCT - + cor0.col0 + - col2 AS col0 FROM tab0 cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8866
SELECT + col0 * - col2 DIV + col2 + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8866
SELECT + col0 * - col2 / + col2 + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 + - col2 * + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL + cor0.col2 + col1 * ( cor0.col1 ) FROM tab0 AS cor0
----
7429
8363
9410

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-8870
SELECT DISTINCT + ( col0 ) DIV 43 + + col0 FROM tab2 AS cor0
----
7
79
80

skipif mysql # not compatible
query I rowsort label-8870
SELECT DISTINCT + ( col0 ) / 43 + + col0 FROM tab2 AS cor0
----
7
79
80

query I rowsort
SELECT + col2 + - col1 * 96 FROM tab2 AS cor0
----
-1594
-2949
-5638

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8872
SELECT - - col0 * col2 - CAST( NULL AS DECIMAL ) * col0 * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8872
SELECT - - col0 * col2 - CAST ( NULL AS REAL ) * col0 * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 AS col2 FROM tab1 WHERE + col0 = - col2 + + col0 * col2
----

query I rowsort
SELECT DISTINCT + 97 + col1 AS col0 FROM tab2 cor0
----
114
128
156

query I rowsort
SELECT ALL + col1 * col1 + + col1 - + col2 AS col0 FROM tab0 AS cor0
----
7449
8290
9505

query I rowsort
SELECT DISTINCT + col2 * + tab1.col1 - - 43 AS col1 FROM tab1
----
1291
1447
613

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 - col2 * - ( col1 * col0 + col0 ) col0 FROM tab0
----
3431
678140
69993

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8878
SELECT + col2 * - CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT - col1 * cor0.col0 + col1 * - col1 FROM tab2 AS cor0
----
-1178
-1632
-8083

query I rowsort
SELECT DISTINCT col1 + + ( - col2 ) * col2 AS col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL + - col2 + col1 + - col2 * + col2 FROM tab2 cor0
----
-1465
-643
-725

query I rowsort
SELECT + col1 * 58 + 30 FROM tab2 AS cor0
----
1016
1828
3452

onlyif mysql # use DIV operator for integer division
query I rowsort label-8883
SELECT DISTINCT - col2 DIV col0 + 65 col2 FROM tab2 AS cor0
----
62
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8883
SELECT DISTINCT - col2 / col0 + 65 col2 FROM tab2 AS cor0
----
62
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 col1 FROM tab1
----
5
5
5

query I rowsort
SELECT ALL 46 + + col1 AS col1 FROM tab0
----
132
137
143

query I rowsort
SELECT - cor0.col1 - 33 FROM tab0, tab1 AS cor0
----
9 values hashing to 41d736a7f96d62218d23dd5dacc16807

query I rowsort
SELECT tab0.col1 + 88 FROM tab0, tab1 AS cor0
----
9 values hashing to 92f87f957233febfe86bc179f47367c2

query I rowsort
SELECT - 79 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c9cc9510604e093bd158ca33928acaed

onlyif mysql # use DIV operator for integer division
query I rowsort label-8889
SELECT ALL tab0.col1 DIV + col2 + + 93 FROM tab0
----
190
94
95

skipif mysql # not compatible
query I rowsort label-8889
SELECT ALL tab0.col1 / + col2 + + 93 FROM tab0
----
190
94
95

query I rowsort
SELECT DISTINCT + 82 + - col2 FROM tab1
----
-14
25
28

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL > col1
----

query I rowsort
SELECT - col1 AS col2 FROM tab0 WHERE NOT - col0 * + col2 <= - col1 * + col1
----
-86
-91
-97

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col2 BETWEEN NULL AND - col0
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL - col0 - + col0 * col0 AS col0 FROM tab0
----
-1260
-600
-8010

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( + col1 + col0 ) NOT IN ( - col2 * - tab2.col1 / - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - col2 col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT col2 AS col1 FROM tab0 WHERE NULL = - col0 * - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8898
SELECT + col2 DIV - tab1.col0 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8898
SELECT + col2 / - tab1.col0 FROM tab1
----
-1
-18
0

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

query I rowsort
SELECT tab2.col0 FROM tab2 WHERE NOT ( col2 ) IN ( col1 )
----
7
78
79

query I rowsort
SELECT col0 - col1 * col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - col0 FROM tab1 WHERE NOT NULL NOT BETWEEN - col2 - - col2 AND - col1
----

query I rowsort
SELECT ALL - col0 * - col1 + - col2 AS col1 FROM tab1
----
24
583
944

query I rowsort
SELECT + col1 + col1 * - col0 AS col2 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT - col2 + col0 + col2 AS col1 FROM tab0 WHERE ( NULL ) IN ( col2 )
----

query I rowsort
SELECT - col0 + col2 + + col2 FROM tab0
----
-33
42
75

query I rowsort
SELECT DISTINCT col2 FROM tab0 WHERE NOT col0 IN ( col1 * col1 )
----
1
33
82

query I rowsort
SELECT DISTINCT + tab0.col1 - - col0 AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT + tab1.col1 * col0 + tab1.col0 AS col1 FROM tab1
----
1120
704
81

query I rowsort
SELECT ALL + col1 * col0 + col2 AS col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT ALL 23 * col0 + ( 58 ) FROM tab0
----
2105
610
863

query I rowsort
SELECT ALL - col1 * + col2 * col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT col1 * cor0.col1 * + col2 + col0 AS col2 FROM tab1 AS cor0
----
16304
36507
5764

query I rowsort
SELECT DISTINCT + - 68 + + col2 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-103
-7366
-860

query I rowsort
SELECT + ( col2 ) * 67 AS col0 FROM tab1 AS cor0
----
3618
3819
6432

query I rowsort
SELECT - + col0 * + 5 + + col2 FROM tab0 AS cor0
----
-174
-363
-87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8917
SELECT cor0.col0 * + CAST( NULL AS SIGNED ) + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL - col2 + - 29 FROM tab0 AS cor0
----
-111
-30
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8919
SELECT + col1 + CAST( - 82 * col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-543
-6337
-6461

skipif mysql # not compatible
query I rowsort label-8919
SELECT + col1 + CAST ( - 82 * col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-543
-6337
-6461

query I rowsort
SELECT ALL col0 * col2 * col0 FROM tab1 cor0
----
233472
486
614400

query I rowsort
SELECT ALL + + col1 * + ( col2 ) + col1 * col2 AS col2 FROM tab0 AS cor0
----
14924
194
5676

onlyif mysql # use DIV operator for integer division
query I rowsort label-8922
SELECT DISTINCT - cor0.col2 DIV 47 AS col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8922
SELECT DISTINCT - cor0.col2 / 47 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col1 * 98 AS col1 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT ALL + tab2.col2 + - col2 * ( col0 ) FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT ALL - col2 * + col2 + + 44 FROM tab1
----
-2872
-3205
-9172

query I rowsort
SELECT + - col1 + - col2 - - col0 AS col1 FROM tab1 cor0
----
-29
-3
-77

query I rowsort
SELECT + + col1 - + col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + - col1 * col1 - col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT - cor0.col0 * - cor0.col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - 35 + col2 * cor0.col2 * - col1 FROM tab0 AS cor0
----
-132
-611919
-93689

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8931
SELECT + CAST( NULL AS DECIMAL ) * 15 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8931
SELECT + CAST ( NULL AS REAL ) * 15 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 + cor0.col0 * col0 FROM tab0 AS cor0
----
1224
543
7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-8933
SELECT DISTINCT + CAST( col0 AS SIGNED ) DIV col0 AS col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-8933
SELECT DISTINCT + CAST ( col0 AS INTEGER ) / col0 AS col0 FROM tab0 AS cor0
----
1

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

query I rowsort
SELECT ALL + - 96 * col1 - col0 * ( cor0.col0 ) AS col1 FROM tab2 cor0
----
-11748
-3025
-7873

query I rowsort
SELECT ALL - 3 + + col0 AS col1 FROM tab1 AS cor0
----
0
61
77

query I rowsort
SELECT + col2 + - ( + col0 ) AS col0 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT ALL - ( + 14 ) + cor0.col0 * col2 FROM tab0 AS cor0
----
21
7284
778

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8939
SELECT ALL - CAST( NULL AS SIGNED ) * col2 + cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-8940
SELECT ALL - cor0.col0 DIV 54 AS col2 FROM tab2 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-8940
SELECT ALL - cor0.col0 / 54 AS col2 FROM tab2 cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT + + col2 + 52 AS col2 FROM tab0 AS cor0
----
134
53
85

query I rowsort
SELECT 79 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT cor0.col1 + col0 * CAST ( + col1 AS REAL ) + col0 AS col2 FROM tab1 cor0
----
107
1133
714

query I rowsort
SELECT - 35 + col1 * ( col2 ) FROM tab0 AS cor0
----
2803
62
7427

query I rowsort
SELECT DISTINCT + 7 AS col2 FROM tab1
----
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8946
SELECT CAST( + tab0.col1 AS SIGNED ) col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8946
SELECT CAST ( + tab0.col1 AS INTEGER ) col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

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

query I rowsort
SELECT ALL + col1 * + 38 AS col2 FROM tab1
----
380
494
988

query I rowsort
SELECT tab2.col0 * 41 + col0 FROM tab2
----
294
3276
3318

query I rowsort
SELECT ALL col2 * - col0 * - col0 FROM tab1
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-8951
SELECT DISTINCT col0 - + col1 DIV cor0.col2 FROM tab0 AS cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-8951
SELECT DISTINCT col0 - + col1 / cor0.col2 FROM tab0 AS cor0
----
-62
22
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col2 + ( - 14 ) * col2 FROM tab1
----
-1440
-810
-855

query I rowsort
SELECT ALL - col1 * - ( - tab1.col0 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - col0 * - 62 AS col0 FROM tab0
----
1488
2170
5518

query I rowsort
SELECT ALL col1 * - 47 FROM tab2
----
-1457
-2773
-799

query I rowsort
SELECT + - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT ALL + 71 * tab1.col0 FROM tab1
----
213
4544
5680

query I rowsort
SELECT ALL + 65 * + 89 - + col2 * col0 FROM tab1 AS cor0
----
-1895
2137
5623

query I rowsort
SELECT ALL + 73 * col2 FROM tab2
----
1898
1971
2774

query I rowsort
SELECT DISTINCT - 60 AS col0 FROM tab0
----
-60

query I rowsort
SELECT 39 * cor0.col2 FROM tab0 AS cor0
----
1287
3198
39

query I rowsort
SELECT + 98 + + col1 FROM tab1 cor0
----
108
111
124

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8964
SELECT - CAST( NULL AS SIGNED ) * 36 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8964
SELECT - CAST ( NULL AS INTEGER ) * 36 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 23 * col2 AS col0 FROM tab1 AS cor0
----
1242
1311
2208

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8966
SELECT DISTINCT + + CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8966
SELECT DISTINCT + + CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL 68 * - col2 FROM tab0 AS cor0
----
-2244
-5576
-68

query I rowsort
SELECT DISTINCT - 1 + + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT + ( ( + cor0.col0 ) ) * 6 FROM tab0 AS cor0
----
144
210
534

query I rowsort
SELECT + 69 + + col0 AS col1 FROM tab0 cor0
----
104
158
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8971
SELECT ALL + ( cor0.col0 ) DIV + col2 + 6 + - col0 AS col1 FROM tab1 AS cor0
----
-57
-74
3

skipif mysql # not compatible
query I rowsort label-8971
SELECT ALL + ( cor0.col0 ) / + col2 + 6 + - col0 AS col1 FROM tab1 AS cor0
----
-57
-74
3

query I rowsort
SELECT DISTINCT - 11 * - 77 - - col1 FROM tab2 AS cor0
----
864
878
906

query I rowsort
SELECT + 13 - + col0 FROM tab1 AS cor0
----
-51
-67
10

query I rowsort
SELECT + col0 * ( + cor0.col1 ) - col2 FROM tab0 AS cor0
----
2031
3394
8017

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( col1 AS REAL ) + col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8976
SELECT DISTINCT + + col2 - - ( col1 ) DIV cor0.col1 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8976
SELECT DISTINCT + + col2 - - ( col1 ) / cor0.col1 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT + 3 * - col1 + - col1 AS col0 FROM tab0 AS cor0
----
-344
-364
-388

query I rowsort
SELECT + col0 * col1 + 61 - col2 FROM tab2
----
1366
251
4637

query I rowsort
SELECT DISTINCT 64 + - cor0.col0 FROM tab2 cor0
----
-14
-15
57

query I rowsort
SELECT tab0.col2 * - 14 AS col0 FROM tab0
----
-1148
-14
-462

query I rowsort
SELECT + col0 * - 0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( cor1.col2 ) + + 0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-26
-27
-38

query I rowsort
SELECT col2 * - col1 + col2 * col2 FROM tab2
----
-108
-858
798

query I rowsort
SELECT DISTINCT + 31 + - ( - col2 ) AS col2 FROM tab2
----
57
58
69

query I rowsort
SELECT - 81 + + 67 AS col0 FROM tab2 AS cor0
----
-14
-14
-14

query I rowsort
SELECT - - 32 + - 33 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT ( + 3 ) + col0 * ( - 57 ) + + col0 * + 98 AS col1 FROM tab0
----
1438
3652
987

onlyif mysql # use DIV operator for integer division
query I rowsort label-8988
SELECT ALL 74 * col0 DIV - col0 AS col0 FROM tab1
----
-74
-74
-74

skipif mysql # not compatible
query I rowsort label-8988
SELECT ALL 74 * col0 / - col0 AS col0 FROM tab1
----
-74
-74
-74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8989
SELECT + col1 * CAST( + col2 + + col2 AS SIGNED ) * + 11 AS col0 FROM tab2 cor0
----
14212
18414
33748

skipif mysql # not compatible
query I rowsort label-8989
SELECT + col1 * CAST ( + col2 + + col2 AS INTEGER ) * + 11 AS col0 FROM tab2 cor0
----
14212
18414
33748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8990
SELECT ALL + col2 + CAST( NULL AS SIGNED ) * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8990
SELECT ALL + col2 + CAST ( NULL AS INTEGER ) * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8991
SELECT + ( + col0 ) + col0 DIV - 81 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8991
SELECT + ( + col0 ) + col0 / - 81 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + 93 * col2 AS col1 FROM tab2
----
2418
2511
3534

onlyif mysql # use DIV operator for integer division
query I rowsort label-8993
SELECT DISTINCT + tab2.col2 DIV + col1 FROM tab2
----
0
2

skipif mysql # not compatible
query I rowsort label-8993
SELECT DISTINCT + tab2.col2 / + col1 FROM tab2
----
0
2

query I rowsort
SELECT + col1 - 26 FROM tab2
----
-9
33
5

query I rowsort
SELECT + 77 + 10 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT ALL - + col1 * + 79 FROM tab1 AS cor0
----
-1027
-2054
-790

query I rowsort
SELECT ALL + + col2 + - 48 * - col1 * col2 FROM tab2 AS cor0
----
31046
40203
73658

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 cor2
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT - cor0.col0 + col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
36
673
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9000
SELECT col2 DIV - 5 AS col2 FROM tab2 cor0
----
-5
-5
-7

skipif mysql # not compatible
query I rowsort label-9000
SELECT col2 / - 5 AS col2 FROM tab2 cor0
----
-5
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9001
SELECT ALL + cor0.col1 DIV - 59 + - col1 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-9001
SELECT ALL + cor0.col1 / - 59 + - col1 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9002
SELECT - tab1.col2 * CAST( col2 AS SIGNED ) + col2 FROM tab1
----
-2862
-3192
-9120

skipif mysql # not compatible
query I rowsort label-9002
SELECT - tab1.col2 * CAST ( col2 AS INTEGER ) + col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT cor0.col1 + + cor0.col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT col2 * ( + col1 ) + - cor0.col0 AS col1 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-9005
SELECT ALL - col1 * + ( - ( col1 ) ) DIV col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-9005
SELECT ALL - col1 * + ( - ( col1 ) ) / col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT 65 + + col0 FROM tab1 AS cor0
----
129
145
68

query I rowsort
SELECT DISTINCT col0 + ( + col1 ) FROM tab2
----
137
38
96

query I rowsort
SELECT ALL + + col1 * 10 FROM tab1 cor0
----
100
130
260

query I rowsort
SELECT - col1 * 32 FROM tab2 AS cor0
----
-1888
-544
-992

query I rowsort
SELECT + ( - ( col1 ) ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + 66 + col0 AS col2 FROM tab1 cor0
----
130
146
69

query I rowsort
SELECT ALL + col0 * 77 AS col1 FROM tab2
----
539
6006
6083

query I rowsort
SELECT ALL - - 31 FROM tab2 AS cor0
----
31
31
31

query I rowsort
SELECT DISTINCT col0 + + 87 * col1 FROM tab1 AS cor0
----
1211
2265
934

query I rowsort
SELECT - + 14 * col1 + - col2 FROM tab0 AS cor0
----
-1237
-1356
-1359

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 76 col0 FROM tab0, tab1 cor0
----
-76

query I rowsort
SELECT DISTINCT + + col1 - col0 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ( col2 ) + + col0 * + col1 AS col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT col0 + - col1 + 83 * + col1 FROM tab1 AS cor0
----
1146
2135
884

query I rowsort
SELECT ALL + + 37 * + col0 + ( - col0 ) AS col2 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT + col0 + - col1 * - 22 FROM tab1 AS cor0
----
284
366
575

onlyif mysql # use DIV operator for integer division
query I rowsort label-9022
SELECT DISTINCT + col2 DIV - ( + col1 * cor0.col0 ) + ( col2 ) * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-9022
SELECT DISTINCT + col2 / - ( + col1 * cor0.col0 ) + ( col2 ) * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - col2 * + 48 + - 54 FROM tab2 AS cor0
----
-1302
-1350
-1878

onlyif mysql # use DIV operator for integer division
query I rowsort label-9024
SELECT DISTINCT col0 * col0 DIV ( col2 ) FROM tab1 cor0
----
0
66
71

skipif mysql # not compatible
query I rowsort label-9024
SELECT DISTINCT col0 * col0 / ( col2 ) FROM tab1 cor0
----
0
66
71

query I rowsort
SELECT + col2 * col1 + col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL - - col1 * ( + col0 ) + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + - col2 * - cor0.col0 + cor0.col0 * col2 FROM tab1 AS cor0
----
15360
324
7296

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9028
SELECT DISTINCT col0 * CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-9028
SELECT DISTINCT col0 * CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 7 + - col0 col2 FROM tab2
----
-14
-85
-86

query I rowsort
SELECT col0 * col2 + - col2 FROM tab1
----
108
3591
7584

query I rowsort
SELECT - 21 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

query I rowsort
SELECT + 50 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT - + 4 + + cor0.col1 FROM tab2 AS cor0
----
13
27
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 69 col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to ca5f4bc365dc2c6b14187d6ffc83a01d

query I rowsort
SELECT + tab1.col2 * ( + col0 ) FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9036
SELECT DISTINCT + col2 * 28 + + col1 + - col0 DIV col0 col2 FROM tab0
----
1009
124
2386

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9036
SELECT DISTINCT + col2 * 28 + + col1 + - col0 / col0 col2 FROM tab0
----
1009
124
2386

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9037
SELECT DISTINCT - col1 + CAST( + ( col2 ) AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-9037
SELECT DISTINCT - col1 + CAST ( + ( col2 ) AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + - col0 * - 92 + - 0 AS col1 FROM tab2 cor0
----
644
7176
7268

query I rowsort
SELECT col2 + + 67 - 96 AS col1 FROM tab1 AS cor0
----
25
28
67

query I rowsort
SELECT DISTINCT - + col2 * - col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT cor0.col2 + + col1 * + 32 AS col0 FROM tab1 AS cor0
----
377
512
886

onlyif mysql # use DIV operator for integer division
query I rowsort label-9042
SELECT ALL - col1 DIV + 74 AS col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9042
SELECT ALL - col1 / + 74 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 29 * + 52 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-39208
-40716
-57304

onlyif mysql # use DIV operator for integer division
query I rowsort label-9044
SELECT - + 21 DIV - col1 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9044
SELECT - + 21 / - col1 FROM tab1 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT + 71 * 19 FROM tab2 AS cor0
----
1349

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 * col0 col1 FROM tab2 AS cor0
----
224
2496
2528

query I rowsort
SELECT DISTINCT cor0.col0 + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL + - ( col1 ) + col2 * - col1 FROM tab0 cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL - - ( - col1 ) * - col1 * col2 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT ALL - col0 + 92 FROM tab0 AS cor0
----
3
57
68

query I rowsort
SELECT + 1 * col2 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - 88 + + col0 AS col0 FROM tab1 AS cor0
----
-24
-8
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9053
SELECT DISTINCT 58 DIV - col0 + col0 + + col1 AS col2 FROM tab0 AS cor0
----
108
131
180

skipif mysql # not compatible
query I rowsort label-9053
SELECT DISTINCT 58 / - col0 + col0 + + col1 AS col2 FROM tab0 AS cor0
----
108
131
180

query I rowsort
SELECT - 20 * - col2 * + col2 FROM tab2 AS cor0
----
13520
14580
28880

query I rowsort
SELECT - 28 * + col1 FROM tab0 cor0
----
-2408
-2548
-2716

query I rowsort
SELECT ( tab0.col2 ) + - col0 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT col0 + - col2 * col2 + + ( tab1.col1 ) AS col0 FROM tab1
----
-2887
-3175
-9123

query I rowsort
SELECT - + 64 + col0 AS col1 FROM tab2 AS cor0
----
-57
14
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9059
SELECT + CAST( NULL AS SIGNED ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9059
SELECT + CAST ( NULL AS INTEGER ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 28 * + col2 + col2 AS col0 FROM tab2 AS cor0
----
1102
754
783

onlyif mysql # use DIV operator for integer division
query I rowsort label-9061
SELECT - 68 + + col0 * 83 DIV cor0.col2 FROM tab1 AS cor0
----
-64
1
25

skipif mysql # not compatible
query I rowsort label-9061
SELECT - 68 + + col0 * 83 / cor0.col2 FROM tab1 AS cor0
----
-64
1
25

query I rowsort
SELECT + 90 * + col2 + - col2 AS col1 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT + col1 + col1 * + col2 FROM tab2 cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-9064
SELECT + + ( col1 ) DIV - col1 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9064
SELECT + + ( col1 ) / - col1 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - cor0.col0 + - col1 * 16 AS col1 FROM tab1 cor0
----
-224
-288
-419

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 * + ( cor0.col1 ) AS col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT col2 * + col2 * + col2 AS col0 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT cor0.col0 * + ( 67 * col1 ) FROM tab0 AS cor0
----
138288
227465
542633

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9069
SELECT - + col1 * CAST( NULL AS DECIMAL ) - col2 * - col2 col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9069
SELECT - + col1 * CAST ( NULL AS REAL ) - col2 * - col2 col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + + 22 col2 FROM tab2 cor0
----
-37
-9
5

query I rowsort
SELECT - col1 + - col1 * - 17 FROM tab1 AS cor0
----
160
208
416

query I rowsort
SELECT + - col0 + + ( col0 ) * col0 AS col1 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT col2 + ( - col1 + 57 * + 97 ) FROM tab1 AS cor0
----
5557
5576
5612

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab1 AS cor0, tab1 cor1
----
3
64
80

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

query I rowsort
SELECT ALL + col1 + cor0.col0 * - col0 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT ALL ( - col1 ) * 77 + - col2 AS col0 FROM tab0 AS cor0
----
-6655
-7089
-7470

query I rowsort
SELECT + + 5 AS col2 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT ALL - cor0.col1 + + col0 * col2 AS col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - + col0 + + cor0.col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT ( col0 ) * - col0 AS col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - + col1 + col2 + + col0 AS col2 FROM tab0 AS cor0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9083
SELECT DISTINCT + 17 DIV col2 - ( 62 * + col1 + col0 * + ( col0 ) ) FROM tab1 AS cor0
----
-1621
-4716
-7206

skipif mysql # not compatible
query I rowsort label-9083
SELECT DISTINCT + 17 / col2 - ( 62 * + col1 + col0 * + ( col0 ) ) FROM tab1 AS cor0
----
-1621
-4716
-7206

query I rowsort
SELECT ALL col2 + + cor0.col0 - col1 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT DISTINCT - + 90 * + 25 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-2250

query I rowsort
SELECT - col2 + - 82 * col2 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT DISTINCT + col1 + col1 + col1 * col2 AS col2 FROM tab0 AS cor0
----
291
3010
7644

query I rowsort
SELECT ALL + col2 + - 89 AS col1 FROM tab1 cor0
----
-32
-35
7

query I rowsort
SELECT DISTINCT - col1 * - col0 AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT 2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT - ( col2 ) * + col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col2 + + col2 * col2 FROM tab0 AS cor0
----
0
1056
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT + col1 * + col1 * col2 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT 74 * - tab1.col1 AS col2 FROM tab1
----
-1924
-740
-962

query I rowsort
SELECT - ( + col1 ) + - tab2.col0 AS col0 FROM tab2
----
-137
-38
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9097
SELECT CAST( - col2 + - col1 * - col1 AS SIGNED ) AS col0 FROM tab2
----
251
3455
934

skipif mysql # not compatible
query I rowsort label-9097
SELECT CAST ( - col2 + - col1 * - col1 AS INTEGER ) AS col0 FROM tab2
----
251
3455
934

query I rowsort
SELECT ALL + ( + col2 + + col0 * - col2 ) FROM tab2
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 64 + - 93 col2 FROM tab0 AS cor0
----
-29
-29
-29

query I rowsort
SELECT ALL - 60 FROM tab1, tab2 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT DISTINCT + cor1.col2 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT - + col1 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + col0 * col2 * - ( col0 ) AS col1 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT ALL + col0 + - col1 * - col2 * - 51 + col0 AS col0 FROM tab0
----
-144690
-380384
-4877

query I rowsort
SELECT DISTINCT + col1 - col2 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - tab1.col1 FROM tab1, tab2 cor0, tab1 cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT ALL col2 * + cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL 4 + col0 * + col1 AS col0 FROM tab1 cor0
----
1044
644
82

query I rowsort
SELECT ALL ( + col2 ) * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - - col2 + - col0 * ( col0 ) FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT 19 FROM tab2 cor0
----
19

query I rowsort
SELECT DISTINCT col1 * + tab1.col2 + + col0 * col0 FROM tab1
----
1413
4666
7648

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9113
SELECT + col2 + + col2 + - 11 * col2 / + CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9113
SELECT + col2 + + col2 + - 11 * col2 / + CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9114
SELECT col2 + 88 DIV col2 + tab0.col1 * col1 FROM tab0
----
7431
8364
9498

skipif mysql # not compatible
query I rowsort label-9114
SELECT col2 + 88 / col2 + tab0.col1 * col1 FROM tab0
----
7431
8364
9498

onlyif mysql # use DIV operator for integer division
query I rowsort label-9115
SELECT DISTINCT - col1 DIV + col2 + 99 * col1 + col2 * ( + col0 ) FROM tab1 AS cor0
----
2736
4638
8967

skipif mysql # not compatible
query I rowsort label-9115
SELECT DISTINCT - col1 / + col2 + 99 * col1 + col2 * ( + col0 ) FROM tab1 AS cor0
----
2736
4638
8967

query I rowsort
SELECT col2 - + ( + 39 ) AS col1 FROM tab0 AS cor0
----
-38
-6
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-9117
SELECT - + col0 DIV - cor0.col0 - 9 FROM tab1 AS cor0
----
-8
-8
-8

skipif mysql # not compatible
query I rowsort label-9117
SELECT - + col0 / - cor0.col0 - 9 FROM tab1 AS cor0
----
-8
-8
-8

query I rowsort
SELECT DISTINCT - - col0 * - col1 + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + 83 * col1 col2 FROM tab1 AS cor0
----
1175
2212
887

query I rowsort
SELECT DISTINCT cor0.col2 - cor0.col0 FROM tab0, tab1 cor0
----
-7
16
51

query I rowsort
SELECT ALL + col0 + + 11 + 69 AS col0 FROM tab1 AS cor0
----
144
160
83

query I rowsort
SELECT 35 - 30 FROM tab2, tab0 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT ALL + + 97 + - 71 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-116
-4447
-5583

query I rowsort
SELECT DISTINCT col1 * 35 FROM tab0 AS cor0
----
3010
3185
3395

onlyif mysql # use DIV operator for integer division
query I rowsort label-9125
SELECT ALL + + col1 DIV + col1 + cor0.col2 * - 95 * - col1 AS col0 FROM tab2 AS cor0
----
145731
61371
79516

skipif mysql # not compatible
query I rowsort label-9125
SELECT ALL + + col1 / + col1 + cor0.col2 * - 95 * - col1 AS col0 FROM tab2 AS cor0
----
145731
61371
79516

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor0.col2 ) col0 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9127
SELECT + - CAST( + cor0.col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-9127
SELECT + - CAST ( + cor0.col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + ( + col2 ) * col0 * + col2 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT + 49 * - col2 * col1 + col1 FROM tab1 AS cor0
----
-27920
-61139
-68770

query I rowsort
SELECT DISTINCT + ( col2 ) * - cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9131
SELECT 9 DIV col0 FROM tab2 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9131
SELECT 9 / col0 FROM tab2 cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9132
SELECT ALL - cor0.col1 + - col2 * col2 * CAST( 17 AS SIGNED ) col2 FROM tab1 AS cor0
----
-156685
-49598
-55243

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9132
SELECT ALL - cor0.col1 + - col2 * col2 * CAST ( 17 AS INTEGER ) col2 FROM tab1 AS cor0
----
-156685
-49598
-55243

query I rowsort
SELECT ALL - + col0 * + col0 + - col1 AS col0 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT ALL - ( - cor0.col2 ) * col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + 64 * - col0 AS col1 FROM tab1 AS cor0
----
-192
-4096
-5120

query I rowsort
SELECT ALL tab0.col1 + + 22 - - col2 AS col2 FROM tab0
----
120
141
195

query I rowsort
SELECT DISTINCT tab0.col1 * - 72 - - col2 * + col2 AS col1 FROM tab0
----
-5103
-6983
172

query I rowsort
SELECT ALL + col1 - + ( col0 ) * col0 AS col2 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT + - col0 * - col2 * + col0 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL + col2 * 68 AS col2 FROM tab2 AS cor0
----
1768
1836
2584

onlyif mysql # use DIV operator for integer division
query I rowsort label-9141
SELECT DISTINCT col2 DIV + 25 AS col1 FROM tab0 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-9141
SELECT DISTINCT col2 / + 25 AS col1 FROM tab0 AS cor0
----
0
1
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-9142
SELECT - ( - col0 ) + + col1 DIV - 44 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9142
SELECT - ( - col0 ) + + col1 / - 44 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9143
SELECT ALL - CAST( NULL AS SIGNED ) + + cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT + col1 + + col0 * col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-9145
SELECT ALL col0 * col0 DIV col1 - col1 AS col2 FROM tab0 AS cor0
----
-4
-80
-85

skipif mysql # not compatible
query I rowsort label-9145
SELECT ALL col0 * col0 / col1 - col1 AS col2 FROM tab0 AS cor0
----
-4
-80
-85

query I rowsort
SELECT DISTINCT col1 * col1 * + col1 AS col2 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT + + col2 * - col1 * col1 + col2 FROM tab2 AS cor0
----
-10944
-25920
-90480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9148
SELECT CAST( NULL AS SIGNED ) + 92 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9148
SELECT CAST ( NULL AS INTEGER ) + 92 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - 31 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

onlyif mysql # use DIV operator for integer division
query I rowsort label-9150
SELECT ALL tab1.col1 DIV + 93 + col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9150
SELECT ALL tab1.col1 / + 93 + col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL col0 * 88 + col1 AS col2 FROM tab0
----
2198
3177
7923

query I rowsort
SELECT col0 + col2 * col0 AS col1 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT + - col0 * col0 - - col2 * 74 AS col0 FROM tab1 AS cor0
----
122
3987
704

query I rowsort
SELECT col0 * - 10 AS col0 FROM tab1
----
-30
-640
-800

query I rowsort
SELECT ( - col1 ) * col1 AS col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - ( 82 ) AS col2 FROM tab1
----
-82
-82
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 12 col2 FROM tab0
----
12
12
12

query I rowsort
SELECT - + col0 * - col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + 97 * col2 * tab2.col0 FROM tab2
----
18333
196716
291194

query I rowsort
SELECT DISTINCT - col1 * + col2 + - col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT - + 26 * col0 AS col0 FROM tab2 AS cor0
----
-182
-2028
-2054

query I rowsort
SELECT DISTINCT + - col0 * col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + cor0.col1 * + cor0.col0 + ( 78 * col2 ) FROM tab0 cor0
----
14495
3473
4638

query I rowsort
SELECT 58 + cor0.col0 FROM tab2 AS cor0
----
136
137
65

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 * - col2 * - col2 FROM tab1 AS cor0
----
119904
32547
75870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col2 - - col1 col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + - 89 + cor0.col0 FROM tab0 AS cor0
----
-54
-65
0

query I rowsort
SELECT + 99 + + col1 FROM tab0 AS cor0
----
185
190
196

query I rowsort
SELECT ALL + + col2 + col1 + + col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT DISTINCT - ( col1 ) - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - 24 * + tab1.col1 AS col0 FROM tab1
----
-240
-312
-624

onlyif mysql # use DIV operator for integer division
query I rowsort label-9172
SELECT DISTINCT - 88 DIV tab0.col0 AS col0 FROM tab0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-9172
SELECT DISTINCT - 88 / tab0.col0 AS col0 FROM tab0
----
-2
-3
0

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + col1 * + cor0.col1 + + 18 + + 76 AS col1 FROM tab1 AS cor0
----
194
263
770

onlyif mysql # use DIV operator for integer division
query I rowsort label-9175
SELECT - col0 DIV 95 + ( + col2 ) * + CAST( col1 AS SIGNED ) + col2 * ( + col2 ) FROM tab2 cor0
----
1566
2090
2210

skipif mysql # not compatible
query I rowsort label-9175
SELECT - col0 / 95 + ( + col2 ) * + CAST ( col1 AS INTEGER ) + col2 * ( + col2 ) FROM tab2 cor0
----
1566
2090
2210

onlyif mysql # use DIV operator for integer division
query I rowsort label-9176
SELECT - col0 + col1 DIV col0 FROM tab1 AS cor0
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-9176
SELECT - col0 + col1 / col0 FROM tab1 AS cor0
----
-64
-80
5

query I rowsort
SELECT + col2 * ( col2 ) AS col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT col2 * col1 + - tab0.col0 * col1 + col0 AS col0 FROM tab0
----
-3263
-548
798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9179
SELECT - + col0 * - CAST( NULL AS DECIMAL ) + + col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9179
SELECT - + col0 * - CAST ( NULL AS REAL ) + + col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9180
SELECT col2 DIV - 47 + col1 col1 FROM tab0 AS cor0
----
86
90
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9180
SELECT col2 / - 47 + col1 col1 FROM tab0 AS cor0
----
86
90
97

query I rowsort
SELECT DISTINCT + col0 + ( col0 ) * col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT cor0.col2 * ( + col1 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9183
SELECT + col0 DIV - CAST( col0 AS SIGNED ) + + col2 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-9183
SELECT + col0 / - CAST ( col0 AS INTEGER ) + + col2 AS col1 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT - 82 AS col1 FROM tab0 cor0
----
-82
-82
-82

query I rowsort
SELECT - + col1 * 58 AS col0 FROM tab1 AS cor0
----
-1508
-580
-754

query I rowsort
SELECT + + 59 * - 48 * - col0 AS col0 FROM tab1 AS cor0
----
181248
226560
8496

onlyif mysql # use DIV operator for integer division
query I rowsort label-9187
SELECT - + col0 DIV - col0 - + cor0.col1 * + col1 AS col0 FROM tab2 AS cor0
----
-288
-3480
-960

skipif mysql # not compatible
query I rowsort label-9187
SELECT - + col0 / - col0 - + cor0.col1 * + col1 AS col0 FROM tab2 AS cor0
----
-288
-3480
-960

query I rowsort
SELECT + col0 * col1 + - 19 + - 24 * col0 FROM tab0 AS cor0
----
1469
2536
5944

onlyif mysql # use DIV operator for integer division
query I rowsort label-9189
SELECT col0 - + col2 DIV + col1 FROM tab2
----
7
77
78

skipif mysql # not compatible
query I rowsort label-9189
SELECT col0 - + col2 / + col1 FROM tab2
----
7
77
78

query I rowsort
SELECT - tab2.col1 * col0 + - col2 FROM tab2
----
-1381
-244
-4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col2 * - col2 col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + cor0.col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL cor0.col2 + - col1 * + col2 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 + col0 * + col0 col2 FROM tab0 AS cor0
----
1224
543
7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-9195
SELECT col0 + tab0.col2 DIV tab0.col2 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9195
SELECT col0 + tab0.col2 / tab0.col2 FROM tab0
----
25
36
90

query I rowsort
SELECT + + col0 + + col2 * col1 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-9197
SELECT ALL - col0 * - col1 - col0 * + col0 DIV - col0 FROM tab2 AS cor0
----
1422
224
4680

skipif mysql # not compatible
query I rowsort label-9197
SELECT ALL - col0 * - col1 - col0 * + col0 / - col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + cor0.col2 + + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 - + cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
-216
1190
623

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-9201
SELECT - col1 + col2 DIV + col2 col2 FROM tab1 AS cor0
----
-12
-25
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9201
SELECT - col1 + col2 / + col2 col2 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT ALL + tab2.col0 + + tab2.col0 FROM tab2
----
14
156
158

query I rowsort
SELECT + 18 * col0 FROM tab2
----
126
1404
1422

query I rowsort
SELECT 31 + + col0 - + col1 * cor0.col1 FROM tab0 AS cor0
----
-7341
-8161
-9343

onlyif mysql # use DIV operator for integer division
query I rowsort label-9205
SELECT DISTINCT + 85 DIV + col1 FROM tab1 AS cor0
----
3
6
8

skipif mysql # not compatible
query I rowsort label-9205
SELECT DISTINCT + 85 / + col1 FROM tab1 AS cor0
----
3
6
8

query I rowsort
SELECT ALL 2 FROM tab0 cor0
----
2
2
2

query I rowsort
SELECT DISTINCT - 5 * + cor0.col2 + + col1 FROM tab2 AS cor0
----
-104
-173
-71

query I rowsort
SELECT + - col0 + col1 AS col2 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL + 79 + + col1 AS col2 FROM tab1 cor0
----
105
89
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * col2 col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * - col2 col1 FROM tab0 cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9212
SELECT DISTINCT 84 DIV col1 + col0 DIV col1 AS col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-9212
SELECT DISTINCT 84 / col1 + col0 / col1 AS col1 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9213
SELECT col2 DIV + tab0.col2 + + col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9213
SELECT col2 / + tab0.col2 + + col0 FROM tab0
----
25
36
90

query I rowsort
SELECT ALL col1 FROM tab1 WHERE NULL = NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT + col0 IN ( col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL + col1 * col0 * + col0 - + col2 AS col1 FROM tab1
----
180
40903
83104

onlyif mysql # use DIV operator for integer division
query I rowsort label-9217
SELECT DISTINCT - col1 * tab1.col0 + + tab1.col2 DIV col2 FROM tab1
----
-1039
-639
-77

skipif mysql # not compatible
query I rowsort label-9217
SELECT DISTINCT - col1 * tab1.col0 + + tab1.col2 / col2 FROM tab1
----
-1039
-639
-77

query I rowsort
SELECT ALL col2 * + col1 AS col2 FROM tab0 WHERE NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9219
SELECT ALL + col2 DIV - col0 AS col2 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9219
SELECT ALL + col2 / - col0 AS col2 FROM tab2
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 + - col0 col1 FROM tab2
----
182
1950
2923

query I rowsort
SELECT + col1 * tab1.col0 + col1 - + col2 * col2 FROM tab1 WHERE + col2 NOT BETWEEN + col2 * col0 AND ( NULL )
----
-2599
-2812
-8163

onlyif mysql # use DIV operator for integer division
query I rowsort label-9222
SELECT - col2 DIV - col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-9222
SELECT - col2 / - col1 AS col2 FROM tab1
----
2
5
7

query I rowsort
SELECT DISTINCT - tab1.col1 FROM tab1 WHERE NOT col2 IN ( col1 )
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9224
SELECT - col0 * + col0 DIV tab1.col0 AS col2 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-9224
SELECT - col0 * + col0 / tab1.col0 AS col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT + col1 * - col1 + + col1 * + col1 * + col1 + - col2 FROM tab2
----
201872
28803
4586

query I rowsort
SELECT - col2 * col2 + + col0 + + col2 * tab2.col2 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL col0 * + col1 AS col2 FROM tab1 WHERE NOT NULL NOT IN ( - col0 )
----

query I rowsort
SELECT DISTINCT tab2.col2 + col1 * tab2.col2 AS col0 FROM tab2
----
1560
684
864

query I rowsort
SELECT DISTINCT - col0 * col2 + + col1 AS col1 FROM tab1
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-9230
SELECT ALL - col0 DIV + col2 + tab0.col0 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-9230
SELECT ALL - col0 / + col2 + tab0.col0 FROM tab0
----
0
24
88

query I rowsort
SELECT DISTINCT + col2 * - col0 + + tab2.col2 FROM tab2
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 col2 FROM tab2 cor0
----
-60
-60
-60

query I rowsort
SELECT - col1 * col2 + col2 - tab0.col2 * + col1 FROM tab0
----
-14842
-193
-5643

query I rowsort
SELECT tab0.col1 * col1 * col2 - + col1 AS col1 FROM tab0
----
243982
678951
9312

query I rowsort
SELECT DISTINCT - col1 * col0 * - col0 FROM tab0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 / col1 col0 FROM tab1 WHERE NULL IN ( col1 )
----

query I rowsort
SELECT ALL + col0 * - col1 - - col1 FROM tab2 WHERE NULL = NULL
----

query I rowsort
SELECT DISTINCT col1 + + col1 * col2 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT col2 * tab0.col0 * + col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT + col0 * + col2 + - col1 * tab2.col2 * - col1 FROM tab2
----
13984
26136
92534

query I rowsort
SELECT - col0 * col2 + + col1 * + col2 FROM tab2
----
-2356
-494
648

onlyif mysql # use DIV operator for integer division
query I rowsort label-9242
SELECT - col1 DIV - col1 - col0 col2 FROM tab2
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9242
SELECT - col1 / - col1 - col0 col2 FROM tab2
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col1 col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - col0 * col2 - + col2 AS col1 FROM tab0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 * col2 col0 FROM tab2
----
-1534
-646
-837

query III rowsort
SELECT * FROM tab0 WHERE NOT col0 * col2 + col0 IN ( + col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL col1 * - col1 * col1 AS col1 FROM tab2
----
-205379
-29791
-4913

onlyif mysql # use DIV operator for integer division
query I rowsort label-9248
SELECT ALL tab2.col1 + - col2 - + col1 DIV + col0 AS col2 FROM tab2
----
-21
0
33

skipif mysql # not compatible
query I rowsort label-9248
SELECT ALL tab2.col1 + - col2 - + col1 / + col0 AS col2 FROM tab2
----
-21
0
33

query I rowsort
SELECT ALL col1 * + col1 + - col0 AS col0 FROM tab2 AS cor0
----
210
3403
954

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

query I rowsort
SELECT col2 * - col0 - + col2 * col0 AS col1 FROM tab0 AS cor0
----
-14596
-1584
-70

query I rowsort
SELECT + col0 * col1 * col2 AS col1 FROM tab0
----
3395
664118
68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - cor0.col1 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 9be0dab92dd50faf37ee99ac8db7c57d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 - + col0 col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT ALL + col0 FROM tab2 AS cor0 WHERE NOT ( NULL ) IN ( col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT NULL <> + col2
----

query I rowsort
SELECT - ( - col1 ) * - col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + - col2 + 61 - + cor0.col1 FROM tab0 AS cor0
----
-112
-37
-58

query I rowsort
SELECT - 13 + col0 + - col2 * 6 * col1 FROM tab2 AS cor0
----
-3810
-5028
-9139

onlyif mysql # use DIV operator for integer division
query I rowsort label-9260
SELECT - + 97 DIV + ( col1 ) + col2 - - ( - col1 + cor0.col0 ) FROM tab0 AS cor0
----
-30
-62
79

skipif mysql # not compatible
query I rowsort label-9260
SELECT - + 97 / + ( col1 ) + col2 - - ( - col1 + cor0.col0 ) FROM tab0 AS cor0
----
-30
-62
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * + 57 + + col1 col1 FROM tab2 AS cor0
----
1541
1570
2183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 + col0 col1 FROM tab0 cor0
----
-35
-46
19

query I rowsort
SELECT ALL + - col1 + 69 FROM tab2 AS cor0
----
10
38
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - cor0.col1 * + col2 col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT 42 * cor0.col0 * col1 FROM tab0 AS cor0
----
142590
340158
86688

query I rowsort
SELECT + col2 + col1 * col2 * + col1 FROM tab1 AS cor0
----
16320
36558
5757

query I rowsort
SELECT DISTINCT 81 * - col1 AS col2 FROM tab2 AS cor0
----
-1377
-2511
-4779

query I rowsort
SELECT + 66 + + col0 FROM tab2 cor0
----
144
145
73

query I rowsort
SELECT - 70 * - col1 * 52 AS col1 FROM tab1 AS cor0
----
36400
47320
94640

query I rowsort
SELECT + cor0.col1 * col2 AS col1 FROM tab1 cor0
----
1248
1404
570

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 489b7b2b5c4980d50e86e51be30361c3

query I rowsort
SELECT ALL ( 6 ) FROM tab2
----
6
6
6

query I rowsort
SELECT + - 57 * col2 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
-38532
-41553
-82308

query I rowsort
SELECT - 87 + col1 * col0 AS col1 FROM tab0 AS cor0
----
1977
3308
8012

query I rowsort
SELECT - 77 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT ALL + cor0.col2 + - 75 * - col2 + - col2 AS col0 FROM tab1 AS cor0
----
4050
4275
7200

query I rowsort
SELECT cor0.col0 * - cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT col0 * 91 FROM tab2 cor0
----
637
7098
7189

query I rowsort
SELECT ALL 2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT - - col2 + + ( + 38 ) * col0 FROM tab2 AS cor0
----
293
2990
3040

query I rowsort
SELECT ALL col1 + 67 FROM tab1
----
77
80
93

query I rowsort
SELECT ALL col1 * 67 + + tab1.col0 AS col2 FROM tab1
----
1745
734
951

query I rowsort
SELECT - + ( cor0.col0 ) * col1 + - ( - col2 ) * + col1 FROM tab2 AS cor0
----
-3068
-697
620

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9284
SELECT - + 37 + - ( col1 ) + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
-37
-37
-37

skipif mysql # not compatible
query I rowsort label-9284
SELECT - + 37 + - ( col1 ) + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
-37
-37
-37

query I rowsort
SELECT ALL - col1 * col1 + 56 + col1 FROM tab2
----
-216
-3366
-874

query I rowsort
SELECT ALL 67 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT ALL + 3 * cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 643559ac626975360fee96de89aa95ee

query I rowsort
SELECT DISTINCT - + 72 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
-72

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9290
SELECT ALL + + CAST( + col2 AS SIGNED ) * + cor0.col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-9290
SELECT ALL + + CAST ( + col2 AS INTEGER ) * + cor0.col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9291
SELECT ( - col2 ) DIV - col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-9291
SELECT ( - col2 ) / - col1 AS col2 FROM tab1
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9292
SELECT + CAST( NULL AS SIGNED ) * + col2 col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9292
SELECT + CAST ( NULL AS INTEGER ) * + col2 col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col0 AS REAL ) AS col0 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9294
SELECT + 89 DIV - 23 FROM tab1
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-9294
SELECT + 89 / - 23 FROM tab1
----
-3
-3
-3

query I rowsort
SELECT ( + col0 ) * - col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT 96 * - col2 FROM tab1
----
-5184
-5472
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9297
SELECT CAST( ( + col2 ) AS SIGNED ) AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-9297
SELECT CAST ( ( + col2 ) AS INTEGER ) AS col0 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-9298
SELECT 57 DIV + 3 FROM tab1
----
19
19
19

skipif mysql # not compatible
query I rowsort label-9298
SELECT 57 / + 3 FROM tab1
----
19
19
19

query I rowsort
SELECT - ( + ( col1 ) ) * - tab1.col1 AS col2 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-9300
SELECT ALL - col0 DIV col0 - col1 DIV col2 AS col1 FROM tab0
----
-2
-3
-98

skipif mysql # not compatible
query I rowsort label-9300
SELECT ALL - col0 / col0 - col1 / col2 AS col1 FROM tab0
----
-2
-3
-98

query I rowsort
SELECT ALL + col1 * col0 - col2 AS col1 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT - 6 + col0 * - col1 AS col0 FROM tab0
----
-2070
-3401
-8105

query I rowsort
SELECT - + col2 * - cor0.col1 * - col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT 36 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 4d1892e880125dc90345721151acb22c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9305
SELECT - ( + col2 ) + + CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT 84 FROM tab2, tab0, tab2 AS cor0
----
84

query I rowsort
SELECT DISTINCT + 10 AS col1 FROM tab2
----
10

query I rowsort
SELECT - - col2 * - col2 + col2 * col1 FROM tab0 AS cor0
----
1749
738
96

query I rowsort
SELECT + col0 + 67 * ( col2 ) FROM tab0 AS cor0
----
102
2235
5583

query I rowsort
SELECT + col1 * ( col2 ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col1 * + 60 * col0 FROM tab2 AS cor0
----
-13020
-276120
-80580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 14 * col1 + + col2 * + col2 col2 FROM tab2 cor0
----
-17358
-2309
-63752

query I rowsort
SELECT DISTINCT col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - 89 FROM tab1, tab2, tab1 AS cor0
----
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9315
SELECT ALL col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9315
SELECT ALL col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + - ( col0 ) FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL col2 * 88 FROM tab0
----
2904
7216
88

query I rowsort
SELECT ALL - + col2 * cor0.col2 + + col0 AS col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT + + col1 - + ( + 85 ) * col2 * 35 FROM tab2 AS cor0
----
-113033
-77291
-80294

query I rowsort
SELECT + col0 + + ( + col0 ) AS col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL - + cor0.col1 + col0 * col1 AS col0 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL - col1 * - col1 * + col2 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-9323
SELECT - col1 * col2 + - col1 DIV + cor0.col0 AS col0 FROM tab2 cor0
----
-1534
-646
-841

skipif mysql # not compatible
query I rowsort label-9323
SELECT - col1 * col2 + - col1 / + cor0.col0 AS col0 FROM tab2 cor0
----
-1534
-646
-841

query I rowsort
SELECT DISTINCT + 74 FROM tab0, tab0 cor0
----
74

query I rowsort
SELECT ALL col1 - 90 AS col1 FROM tab1
----
-64
-77
-80

query I rowsort
SELECT + + ( - col1 ) * - col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + + col2 * 89 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT - col1 * + col2 + - col2 AS col2 FROM tab0 AS cor0
----
-2871
-7544
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9329
SELECT + col1 + col0 * CAST( - 64 AS SIGNED ) - - col2 AS col0 FROM tab0 AS cor0
----
-1417
-2142
-5523

skipif mysql # not compatible
query I rowsort label-9329
SELECT + col1 + col0 * CAST ( - 64 AS INTEGER ) - - col2 AS col0 FROM tab0 AS cor0
----
-1417
-2142
-5523

query I rowsort
SELECT DISTINCT + + 50 * col1 AS col2 FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT + col1 + - col1 - cor0.col2 * - 34 AS col0 FROM tab0 AS cor0
----
1122
2788
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-9332
SELECT 21 + + col2 DIV + col1 FROM tab2 AS cor0
----
21
21
23

skipif mysql # not compatible
query I rowsort label-9332
SELECT 21 + + col2 / + col1 FROM tab2 AS cor0
----
21
21
23

query I rowsort
SELECT - 50 + - col2 * + col1 * - 18 FROM tab0 AS cor0
----
134266
1696
51034

query I rowsort
SELECT + 3 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT tab1.col1 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-9336
SELECT ALL + col2 + + cor0.col2 DIV col0 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-9336
SELECT ALL + col2 + + cor0.col2 / col0 FROM tab2 AS cor0
----
26
30
38

query I rowsort
SELECT 65 * - col0 - - col2 AS col0 FROM tab1 AS cor0
----
-141
-4103
-5104

query I rowsort
SELECT DISTINCT col1 + - col2 * - col1 AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + + col2 * cor0.col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - 53 + + col2 - + col1 FROM tab1 AS cor0
----
-25
-6
30

query I rowsort
SELECT ALL + col2 * + col1 + + col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - 74 AS col0 FROM tab0 AS cor0
----
-74
-74
-74

query I rowsort
SELECT DISTINCT col0 + col2 * + 60 + col2 FROM tab1 AS cor0
----
3297
3541
5936

query I rowsort
SELECT DISTINCT + ( col1 ) + - 57 AS col1 FROM tab1
----
-31
-44
-47

query I rowsort
SELECT DISTINCT + 49 + - col2 + col1 FROM tab0 AS cor0
----
102
145
58

query I rowsort
SELECT DISTINCT - ( + col0 ) * col1 + - col2 AS col2 FROM tab1 AS cor0
----
-1136
-132
-697

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

query I rowsort
SELECT - col1 * col1 + col1 AS col0 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT ALL - col2 * col2 + ( col1 ) + - cor0.col2 * - col2 AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT - 61 * col0 * ( - 86 ) AS col2 FROM tab1 AS cor0
----
15738
335744
419680

query I rowsort
SELECT + 53 - - cor0.col1 AS col0 FROM tab1 AS cor0
----
63
66
79

query I rowsort
SELECT ALL + + ( col0 ) + + 0 * + col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - + 39 AS col0 FROM tab1 AS cor0
----
-39

query I rowsort
SELECT col2 - ( col2 * - col1 ) FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT 18 AS col2 FROM tab2, tab0 AS cor0
----
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9356
SELECT ALL + col2 * + CAST( col0 * col1 AS SIGNED ) + CAST( col1 * col2 AS SIGNED ) FROM tab1 AS cor0
----
101088
37050
5616

skipif mysql # not compatible
query I rowsort label-9356
SELECT ALL + col2 * + CAST ( col0 * col1 AS INTEGER ) + CAST ( col1 * col2 AS INTEGER ) FROM tab1 AS cor0
----
101088
37050
5616

query I rowsort
SELECT 73 + 35 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6d22d46245dff8bdc639b4b61304fdd9

query I rowsort
SELECT ALL + 7 + 61 + col0 FROM tab0 cor0
----
103
157
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9359
SELECT ALL - CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-9359
SELECT ALL - CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - + 89 * col0 + - col2 FROM tab1 AS cor0
----
-321
-5753
-7216

query I rowsort
SELECT ( - ( + col0 ) ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9362
SELECT ALL - tab2.col1 + + 3 DIV - col0 AS col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-9362
SELECT ALL - tab2.col1 + + 3 / - col0 AS col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT + 31 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT DISTINCT - 86 AS col0 FROM tab0
----
-86

query I rowsort
SELECT - 37 + 29 AS col0 FROM tab0
----
-8
-8
-8

query I rowsort
SELECT + tab1.col2 * - tab1.col2 + col1 AS col0 FROM tab1
----
-2890
-3239
-9203

query I rowsort
SELECT + 39 + - col2 FROM tab1
----
-15
-18
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9368
SELECT - 55 + + col1 DIV col1 AS col0 FROM tab1
----
-54
-54
-54

skipif mysql # not compatible
query I rowsort label-9368
SELECT - 55 + + col1 / col1 AS col0 FROM tab1
----
-54
-54
-54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9369
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9369
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col2 * tab2.col0 * col1 + col2 AS col1 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT - 44 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT + col0 * ( col2 * cor0.col2 ) AS col1 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT - cor0.col1 * + 81 FROM tab2 AS cor0
----
-1377
-2511
-4779

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9374
SELECT - - cor0.col0 * CAST( 5 AS SIGNED ) AS col2 FROM tab2 cor0
----
35
390
395

skipif mysql # not compatible
query I rowsort label-9374
SELECT - - cor0.col0 * CAST ( 5 AS INTEGER ) AS col2 FROM tab2 cor0
----
35
390
395

query I rowsort
SELECT DISTINCT + + col2 * 27 AS col2 FROM tab0 AS cor0
----
2214
27
891

query I rowsort
SELECT + - 97 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to e4a6bd848a69226cbb7ad3d154be321b

query I rowsort
SELECT ALL + 52 FROM tab2, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9378
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 1 / col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9378
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 1 / col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT 24 + 64 * - col0 + 68 FROM tab1 cor0
----
-100
-4004
-5028

query I rowsort
SELECT DISTINCT col1 * 5 AS col2 FROM tab1
----
130
50
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9381
SELECT - CAST( NULL AS SIGNED ) * cor0.col0 - - col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 54 + col2 col2 FROM tab1 AS cor0
----
108
111
150

query I rowsort
SELECT ALL - ( - 97 ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

onlyif mysql # use DIV operator for integer division
query I rowsort label-9384
SELECT DISTINCT + + 52 DIV - col1 FROM tab1 AS cor0
----
-2
-4
-5

skipif mysql # not compatible
query I rowsort label-9384
SELECT DISTINCT + + 52 / - col1 FROM tab1 AS cor0
----
-2
-4
-5

query I rowsort
SELECT ALL + + 69 AS col1 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT - - col1 + col0 + + cor0.col0 FROM tab2 cor0
----
175
215
45

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

query I rowsort
SELECT + 24 + + col2 AS col1 FROM tab0
----
106
25
57

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + - cor0.col0 * 64 FROM tab2 cor0
----
-448
-4992
-5056

query I rowsort
SELECT + col1 * col2 * col0 + + 55 FROM tab2
----
119707
51089
5914

query I rowsort
SELECT ALL 15 FROM tab0, tab2 cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT col2 * col0 - col0 FROM tab1
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-9394
SELECT - + col2 + - ( cor0.col0 ) DIV - col0 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-9394
SELECT - + col2 + - ( cor0.col0 ) / - col0 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT + - col2 * - ( col1 ) + + col1 * 11 FROM tab1 AS cor0
----
1391
1690
680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9396
SELECT ALL + col0 + + col1 DIV col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9396
SELECT ALL + col0 + + col1 / col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col0 + - 86 FROM tab1 cor0
----
-150
-166
-89

query I rowsort
SELECT ALL - 21 + col2 FROM tab1 cor0
----
33
36
75

query I rowsort
SELECT ALL - - col0 * + ( + col0 ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-9400
SELECT ALL - 89 DIV col1 + - col1 FROM tab2 AS cor0
----
-22
-33
-60

skipif mysql # not compatible
query I rowsort label-9400
SELECT ALL - 89 / col1 + - col1 FROM tab2 AS cor0
----
-22
-33
-60

query I rowsort
SELECT col1 * col1 + - 49 AS col1 FROM tab1 AS cor0
----
120
51
627

query I rowsort
SELECT 17 * col0 * + col2 FROM tab0
----
124066
13464
595

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 69 + + ( tab2.col1 ) col1 FROM tab2, tab1, tab2 AS cor0
----
-10
-38
-52

query I rowsort
SELECT - ( col0 ) * col0 + - ( 97 ) AS col2 FROM tab0
----
-1322
-673
-8018

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9405
SELECT + col2 + - col1 * - CAST( - cor0.col0 AS SIGNED ) FROM tab1 AS cor0
----
-24
-583
-944

skipif mysql # not compatible
query I rowsort label-9405
SELECT + col2 + - col1 * - CAST ( - cor0.col0 AS INTEGER ) FROM tab1 AS cor0
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 90 + 4 col1 FROM tab0 AS cor0
----
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 91 + + 66 * col2 col2 FROM tab1 AS cor0
----
3473
3671
6245

query I rowsort
SELECT ALL ( col0 ) + - col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + ( ( col0 ) ) + CAST ( col1 AS REAL ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col2 + + 16 FROM tab0 AS cor0
----
17
49
98

query I rowsort
SELECT ALL col0 + col2 * + col0 + col1 AS col2 FROM tab2 AS cor0
----
2165
227
3098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( ( - cor0.col1 ) ) * - col0 + col2 * col1 col2 FROM tab1 cor0
----
1210
1482
2288

query I rowsort
SELECT DISTINCT + + 39 * - col1 FROM tab0 AS cor0
----
-3354
-3549
-3783

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 cor1, tab0 AS cor2, tab2 AS cor3
----
3645 values hashing to 9a8c5b685ae97f053cdce34c34044cb4

query I rowsort
SELECT DISTINCT + 84 FROM tab2, tab2 AS cor0
----
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 46 + 97 + col0 col0 FROM tab1 AS cor0
----
146
207
223

query I rowsort
SELECT - 8 - 40 FROM tab2 AS cor0
----
-48
-48
-48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9418
SELECT DISTINCT + CAST( NULL AS DECIMAL ) - col1 AS col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9418
SELECT DISTINCT + CAST ( NULL AS REAL ) - col1 AS col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL + 52 * col0 + + col1 AS col2 FROM tab2 AS cor0
----
395
4115
4125

query I rowsort
SELECT - 27 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-1728
-2160
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9421
SELECT ALL ( + col1 ) * + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9421
SELECT ALL ( + col1 ) * + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col0 * cor0.col1 + - ( + col1 + col1 ) FROM tab2 AS cor0
----
-1377
-279
-4720

query I rowsort
SELECT + col0 * col2 + + col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + - 23 AS col2 FROM tab0 cor0
----
-23

query I rowsort
SELECT DISTINCT - 15 + + col2 FROM tab2
----
11
12
23

query I rowsort
SELECT DISTINCT + col2 * - 87 AS col0 FROM tab1 AS cor0
----
-4698
-4959
-8352

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9427
SELECT ALL - + col0 + CAST( NULL AS SIGNED ) + - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9427
SELECT ALL - + col0 + CAST ( NULL AS INTEGER ) + - col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 - 6 * - col0 FROM tab2 cor0
----
35
390
395

query I rowsort
SELECT DISTINCT + + cor0.col2 + ( + col2 ) * col2 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-9430
SELECT DISTINCT + col1 + + cor0.col2 DIV + col0 + + col1 FROM tab1 AS cor0
----
20
27
70

skipif mysql # not compatible
query I rowsort label-9430
SELECT DISTINCT + col1 + + cor0.col2 / + col0 + + col1 FROM tab1 AS cor0
----
20
27
70

query I rowsort
SELECT ALL col0 - + ( + col0 + col0 ) * - 38 AS col1 FROM tab1 AS cor0
----
231
4928
6160

query I rowsort
SELECT DISTINCT col1 + - cor0.col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-706
-7207
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9433
SELECT ALL col0 - CAST( + col2 AS SIGNED ) * col1 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

skipif mysql # not compatible
query I rowsort label-9433
SELECT ALL col0 - CAST ( + col2 AS INTEGER ) * col1 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT + col1 - + col1 * col1 AS col2 FROM tab0
----
-7310
-8190
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 56 col2 FROM tab1
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 95 col0 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT - 95 FROM tab2, tab2 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT DISTINCT - col2 * - col0 + col1 * col2 AS col0 FROM tab2 AS cor0
----
1026
3562
3648

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9439
SELECT ALL col1 * col2 + - cor0.col2 * col1 + - CAST( col2 * - col1 AS SIGNED ) FROM tab0 cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-9439
SELECT ALL col1 * col2 + - cor0.col2 * col1 + - CAST ( col2 * - col1 AS INTEGER ) FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9440
SELECT DISTINCT cor0.col0 DIV + col1 + - col0 FROM tab1 AS cor0
----
-3
-58
-74

skipif mysql # not compatible
query I rowsort label-9440
SELECT DISTINCT cor0.col0 / + col1 + - col0 FROM tab1 AS cor0
----
-3
-58
-74

query I rowsort
SELECT DISTINCT + - col2 * + cor0.col1 + + 89 AS col2 FROM tab1 AS cor0
----
-1159
-1315
-481

query I rowsort
SELECT DISTINCT - - col1 + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - col1 + 2 FROM tab1 AS cor0
----
-11
-24
-8

query I rowsort
SELECT col0 + + ( + col2 ) * - col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT + col1 * 5 + col1 FROM tab0
----
516
546
582

query I rowsort
SELECT ALL + cor0.col2 * - 28 FROM tab1 AS cor0
----
-1512
-1596
-2688

query I rowsort
SELECT ALL 39 + - col0 FROM tab1 AS cor0
----
-25
-41
36

query I rowsort
SELECT - col1 * - 69 AS col2 FROM tab1 cor0
----
1794
690
897

query I rowsort
SELECT ALL - ( col2 ) + - col0 * 55 AS col2 FROM tab0 AS cor0
----
-1353
-1926
-4977

onlyif mysql # use DIV operator for integer division
query I rowsort label-9450
SELECT DISTINCT - col2 DIV + cor0.col1 AS col1 FROM tab2 cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-9450
SELECT DISTINCT - col2 / + cor0.col1 AS col1 FROM tab2 cor0
----
-2
0

query I rowsort
SELECT ALL - + 8 - - 78 AS col2 FROM tab1 AS cor0
----
70
70
70

query I rowsort
SELECT DISTINCT - + col2 * - col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9453
SELECT ALL - ( col0 ) + col2 DIV 26 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-9453
SELECT ALL - ( col0 ) + col2 / 26 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT + col0 * col2 + cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
2704
4446
918

query I rowsort
SELECT + 7 * col2 * + col2 AS col2 FROM tab2 cor0
----
10108
4732
5103

query I rowsort
SELECT DISTINCT + 90 * col0 AS col1 FROM tab2 AS cor0
----
630
7020
7110

query I rowsort
SELECT ALL - + 9 + - col0 * col1 FROM tab2 AS cor0
----
-1352
-226
-4611

query I rowsort
SELECT ALL - col0 + col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT DISTINCT col2 + col2 * - 64 FROM tab0 AS cor0
----
-2079
-5166
-63

query I rowsort
SELECT - - col2 + col2 * ( + 91 ) AS col0 FROM tab2 AS cor0
----
2392
2484
3496

query I rowsort
SELECT + col2 + + col2 * 68 AS col1 FROM tab2 cor0
----
1794
1863
2622

query I rowsort
SELECT DISTINCT 27 + - col0 * col2 AS col1 FROM tab0 cor0
----
-7271
-765
-8

query I rowsort
SELECT ALL - col2 * col1 + col0 * col1 FROM tab0 AS cor0
----
-774
3298
637

query I rowsort
SELECT + col1 * ( 93 ) * + col0 FROM tab2 AS cor0
----
124899
20181
427986

query I rowsort
SELECT DISTINCT + + col1 * + 25 AS col2 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT - col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - + col1 * + ( 29 ) AS col2 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT ALL col0 * - 73 AS col0 FROM tab1 AS cor0
----
-219
-4672
-5840

query I rowsort
SELECT + 75 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT 25 * + col1 AS col1 FROM tab0
----
2150
2275
2425

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
7
78
79

query I rowsort
SELECT ( + col1 ) * + col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-9473
SELECT 69 + tab2.col2 DIV col1 col0 FROM tab2
----
69
69
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9473
SELECT 69 + tab2.col2 / col1 col0 FROM tab2
----
69
69
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9474
SELECT DISTINCT - col1 DIV col0 AS col0 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-9474
SELECT DISTINCT - col1 / col0 AS col0 FROM tab2 AS cor0
----
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9475
SELECT ALL + cor0.col1 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-9476
SELECT cor0.col0 DIV ( + 16 * + cor0.col0 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9476
SELECT cor0.col0 / ( + 16 * + cor0.col0 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + 17 AS col2 FROM tab2 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT col0 + - col1 * - col2 * - col1 AS col0 FROM tab0
----
-244044
-678953
-9374

query I rowsort
SELECT tab1.col2 * - col1 * col0 AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + 10 * + col0 AS col0 FROM tab2
----
70
780
790

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9481
SELECT CAST( NULL AS DECIMAL ) * col0 + - col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9481
SELECT CAST ( NULL AS REAL ) * col0 + - col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + 52 FROM tab0 AS cor0
----
141
76
87

query I rowsort
SELECT - 96 * 61 FROM tab1
----
-5856
-5856
-5856

query I rowsort
SELECT + - 50 * col2 FROM tab0 AS cor0
----
-1650
-4100
-50

query I rowsort
SELECT 92 AS col1 FROM tab0, tab1 cor0 CROSS JOIN tab2
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT DISTINCT col0 + + col1 + col0 * - 66 * - 66 FROM tab1
----
13097
278858
348573

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col2 ) + + 69 * - col2 col0 FROM tab1 AS cor0
----
-3672
-3876
-6528

query I rowsort
SELECT 27 + col1 FROM tab1 AS cor0
----
37
40
53

query I rowsort
SELECT DISTINCT - ( - col0 ) * col2 AS col2 FROM tab2
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9490
SELECT - cor0.col2 + CAST( NULL AS DECIMAL ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-9490
SELECT - cor0.col2 + CAST ( NULL AS REAL ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col0 col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT col0 * + 37 AS col1 FROM tab0
----
1295
3293
888

query I rowsort
SELECT ALL - col0 * - 45 AS col2 FROM tab2
----
315
3510
3555

onlyif mysql # use DIV operator for integer division
query I rowsort label-9494
SELECT + tab0.col2 * col2 DIV col2 col0 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9494
SELECT + tab0.col2 * col2 / col2 col0 FROM tab0
----
1
33
82

query I rowsort
SELECT + 14 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

onlyif mysql # use DIV operator for integer division
query I rowsort label-9496
SELECT - - col0 DIV col0 col1 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9496
SELECT - - col0 / col0 col1 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9497
SELECT - col1 DIV - 33 AS col2 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9497
SELECT - col1 / - 33 AS col2 FROM tab2 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9498
SELECT + + col0 / - CAST( NULL AS SIGNED ) + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9498
SELECT + + col0 / - CAST ( NULL AS INTEGER ) + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - ( - ( col2 ) ) AS col1 FROM tab0 cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9500
SELECT - + CAST( NULL AS DECIMAL ) + col2 / cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9500
SELECT - + CAST ( NULL AS REAL ) + col2 / cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 * + 71 FROM tab0 cor0
----
6106
6461
6887

query I rowsort
SELECT cor0.col2 + + col1 + cor0.col0 FROM tab0 cor0
----
133
143
262

query I rowsort
SELECT + col1 * + col1 + col0 AS col0 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT cor0.col2 + cor0.col2 * + col2 FROM tab1 AS cor0
----
2970
3306
9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9505
SELECT DISTINCT - col1 * + CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9505
SELECT DISTINCT - col1 * + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL

query I rowsort
SELECT - 34 FROM tab2, tab1 cor0
----
9 values hashing to 40442a74794ded4c78101eefe525a5bb

query I rowsort
SELECT DISTINCT 81 * cor0.col0 + - col0 FROM tab2 cor0
----
560
6240
6320

query I rowsort
SELECT - col0 * 53 FROM tab2
----
-371
-4134
-4187

onlyif mysql # use DIV operator for integer division
query I rowsort label-9509
SELECT 30 DIV + col1 + - ( tab2.col1 * col2 ) FROM tab2
----
-1534
-645
-837

skipif mysql # not compatible
query I rowsort label-9509
SELECT 30 / + col1 + - ( tab2.col1 * col2 ) FROM tab2
----
-1534
-645
-837

query I rowsort
SELECT + 65 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT DISTINCT - + 61 AS col2 FROM tab1 AS cor0
----
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-9512
SELECT + - col1 DIV cor0.col0 col1 FROM tab1 AS cor0
----
-8
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9512
SELECT + - col1 / cor0.col0 col1 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT ALL + - col1 * + col2 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - col2 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + - col0 * - 27 * cor0.col0 AS col0 FROM tab0 AS cor0
----
15552
213867
33075

query I rowsort
SELECT - cor0.col2 - + col1 * + ( col2 * - col0 ) FROM tab0 AS cor0
----
3394
664036
68079

query I rowsort
SELECT ALL - col1 + 58 * - col1 FROM tab2 AS cor0
----
-1003
-1829
-3481

query I rowsort
SELECT - + col0 - col0 * col0 AS col0 FROM tab2 AS cor0
----
-56
-6162
-6320

query I rowsort
SELECT DISTINCT col1 + - 20 FROM tab0 cor0
----
66
71
77

query I rowsort
SELECT + col1 + col0 + col2 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT + - col2 * + 51 + + col0 AS col2 FROM tab0 AS cor0
----
-16
-1659
-4093

query I rowsort
SELECT col2 * - col2 + col2 + col2 AS col0 FROM tab2 cor0
----
-1368
-624
-675

query I rowsort
SELECT ALL + col1 + + col1 * - cor0.col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT + - col2 * - 14 - col2 * col1 AS col2 FROM tab0 AS cor0
----
-2376
-6314
-83

query I rowsort
SELECT DISTINCT - 41 FROM tab0
----
-41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9526
SELECT ALL + - col1 + + CAST( - 34 AS SIGNED ) AS col0 FROM tab2 cor0
----
-51
-65
-93

skipif mysql # not compatible
query I rowsort label-9526
SELECT ALL + - col1 + + CAST ( - 34 AS INTEGER ) AS col0 FROM tab2 cor0
----
-51
-65
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9527
SELECT DISTINCT + + col2 + + CAST( NULL AS SIGNED ) * - cor0.col2 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9527
SELECT DISTINCT + + col2 + + CAST ( NULL AS INTEGER ) * - cor0.col2 AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9528
SELECT DISTINCT - - col0 + CAST( ( col1 ) AS SIGNED ) FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-9528
SELECT DISTINCT - - col0 + CAST ( ( col1 ) AS INTEGER ) FROM tab2 AS cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col0 FROM tab0, tab1, tab0 AS cor0, tab2
----
81 values hashing to 786a240f80bef6f9c6a190e92cd4f9e8

query I rowsort
SELECT ALL cor0.col1 + 16 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 28994c0e551fa62a4af9c88b1832ca3f

query I rowsort
SELECT ALL col0 + cor0.col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + 73 AS col1 FROM tab1 AS cor0
----
73
73
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9533
SELECT DISTINCT - CAST( + col0 AS SIGNED ) + - col0 + + 49 col2 FROM tab0 AS cor0
----
-129
-21
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9533
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) + - col0 + + 49 col2 FROM tab0 AS cor0
----
-129
-21
1

query I rowsort
SELECT DISTINCT + + col2 * - cor0.col2 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT - + col2 * 73 FROM tab1 cor0
----
-3942
-4161
-7008

query I rowsort
SELECT DISTINCT 61 + + col2 * col1 FROM tab0 AS cor0
----
158
2899
7523

query I rowsort
SELECT + ( - 76 ) FROM tab1 AS cor0
----
-76
-76
-76

query I rowsort
SELECT - - ( + col1 ) * col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9539
SELECT CAST( - col1 AS SIGNED ) + col0 FROM tab1 cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-9539
SELECT CAST ( - col1 AS INTEGER ) + col0 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - ( tab0.col0 ) AS col0 FROM tab0, tab2 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - 8 + 46 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT ALL ( - col0 ) + - col1 - col2 FROM tab1 AS cor0
----
-131
-189
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9543
SELECT ALL + - CAST( col0 AS SIGNED ) DIV col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9543
SELECT ALL + - CAST ( col0 AS INTEGER ) / col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT 12 + col2 * col1 FROM tab1 AS cor0
----
1260
1416
582

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col1 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 43 + - col2 AS col2 FROM tab1 AS cor0
----
-11
-14
-53

query I rowsort
SELECT DISTINCT col1 + + col0 + cor0.col1 * 46 AS col1 FROM tab0 AS cor0
----
4066
4366
4594

query I rowsort
SELECT - - ( col0 ) + + cor0.col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL - ( + col0 ) * + 39 + 68 AS col2 FROM tab1 AS cor0
----
-2428
-3052
-49

onlyif mysql # use DIV operator for integer division
query I rowsort label-9550
SELECT DISTINCT ( col0 ) + + 37 DIV + col0 col0 FROM tab1 AS cor0
----
15
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9550
SELECT DISTINCT ( col0 ) + + 37 / + col0 col0 FROM tab1 AS cor0
----
15
64
80

query I rowsort
SELECT - + col0 * col0 + + cor0.col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT - 64 * col1 AS col1 FROM tab1 AS cor0
----
-1664
-640
-832

query I rowsort
SELECT DISTINCT - col2 * cor0.col2 + - cor0.col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT ( col2 ) * + col0 AS col2 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9555
SELECT DISTINCT + + col1 DIV col0 + - ( + col0 ) FROM tab1 AS cor0
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-9555
SELECT DISTINCT + + col1 / col0 + - ( + col0 ) FROM tab1 AS cor0
----
-64
-80
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9556
SELECT ALL 18 + - col1 DIV - col2 AS col0 FROM tab1 AS cor0
----
18
18
18

skipif mysql # not compatible
query I rowsort label-9556
SELECT ALL 18 + - col1 / - col2 AS col0 FROM tab1 AS cor0
----
18
18
18

query I rowsort
SELECT - col1 + - col1 * + 5 AS col0 FROM tab1 cor0
----
-156
-60
-78

query I rowsort
SELECT + 82 * tab2.col0 AS col2 FROM tab2
----
574
6396
6478

query I rowsort
SELECT + col2 * + 79 * + col0 AS col0 FROM tab1
----
12798
288192
606720

query I rowsort
SELECT - ( + col0 ) * col2 + + ( + col2 ) AS col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT - 47 * col0 FROM tab0
----
-1128
-1645
-4183

query I rowsort
SELECT DISTINCT + 86 + + col2 * - col2 FROM tab1
----
-2830
-3163
-9130

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9563
SELECT + ( + tab0.col1 * - col1 ) + + CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9563
SELECT + ( + tab0.col1 * - col1 ) + + CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 70 + - tab1.col1 FROM tab1
----
-80
-83
-96

query I rowsort
SELECT ALL + 11 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT DISTINCT - 55 * + col2 FROM tab1 AS cor0
----
-2970
-3135
-5280

onlyif mysql # use DIV operator for integer division
query I rowsort label-9567
SELECT ALL + + col1 + cor0.col0 DIV ( + cor0.col2 ) AS col0 FROM tab1 cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-9567
SELECT ALL + + col1 + cor0.col0 / ( + cor0.col2 ) AS col0 FROM tab1 cor0
----
11
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) + cor0.col2 col0 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9569
SELECT DISTINCT + cor0.col0 + col2 * col0 DIV - 44 FROM tab1 AS cor0
----
-18
-94
0

skipif mysql # not compatible
query I rowsort label-9569
SELECT DISTINCT + cor0.col0 + col2 * col0 / - 44 FROM tab1 AS cor0
----
-18
-94
0

query I rowsort
SELECT DISTINCT + 86 * col2 + - 97 AS col1 FROM tab2 AS cor0
----
2139
2225
3171

query I rowsort
SELECT DISTINCT + col0 * - col2 * ( + col1 ) + col1 FROM tab1 AS cor0
----
-36470
-4186
-99827

query I rowsort
SELECT ALL - col1 - col0 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT - + 52 AS col2 FROM tab0 AS cor0
----
-52
-52
-52

query I rowsort
SELECT ALL col0 * col2 + ( + 57 ) FROM tab2 AS cor0
----
2085
246
3059

query I rowsort
SELECT DISTINCT - + col1 * - col2 + - 84 * - col1 FROM tab0 AS cor0
----
10062
15106
8245

query I rowsort
SELECT - col2 + col0 * + col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT col1 * + col1 - - col0 AS col1 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT + col1 + - 39 FROM tab0 AS cor0
----
47
52
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-9579
SELECT DISTINCT + col1 DIV - 87 AS col0 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-9579
SELECT DISTINCT + col1 / - 87 AS col0 FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT col2 + tab2.col2 * + 55 * col2 FROM tab2
----
37206
40122
79458

query I rowsort
SELECT + col1 + - 85 AS col1 FROM tab1
----
-59
-72
-75

query I rowsort
SELECT ALL - col0 + + col1 * + col2 AS col2 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT - col2 * cor0.col0 + + col1 * - ( col1 ) * col0 + + col2 FROM tab0 AS cor0
----
-178263
-329349
-744225

query I rowsort
SELECT - 0 + + tab2.col2 * 50 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 44bc5334d6e7adab2bd9631469888c1e

query I rowsort
SELECT 75 * 23 AS col2 FROM tab0
----
1725
1725
1725

query I rowsort
SELECT - col0 * + tab0.col2 + + col2 * col0 * - tab0.col1 + col1 FROM tab0
----
-3333
-671325
-68818

query I rowsort
SELECT DISTINCT - col2 - cor0.col0 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9588
SELECT cor1.col0 DIV - 19 AS col2 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to eb586f073a764ef4cb21e01170ac909c

skipif mysql # not compatible
query I rowsort label-9588
SELECT cor1.col0 / - 19 AS col2 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to eb586f073a764ef4cb21e01170ac909c

query I rowsort
SELECT DISTINCT - + 86 * col1 * col0 AS col2 FROM tab0 AS cor0
----
-177504
-291970
-696514

onlyif mysql # use DIV operator for integer division
query I rowsort label-9590
SELECT - col0 + + col0 DIV col0 AS col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-9590
SELECT - col0 + + col0 / col0 AS col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT DISTINCT col2 + + cor0.col0 - + col0 AS col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9592
SELECT ALL + + CAST( 21 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
21
21
21

skipif mysql # not compatible
query I rowsort label-9592
SELECT ALL + + CAST ( 21 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
21
21
21

query I rowsort
SELECT + cor0.col2 * col1 + - col2 AS col0 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT col1 * + 55 AS col2 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT - cor0.col0 + - ( + 84 ) AS col0 FROM tab1 AS cor0
----
-148
-164
-87

query I rowsort
SELECT col1 * + 46 * tab1.col0 FROM tab1
----
29440
3588
47840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + cor0.col1 col0 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9598
SELECT - col0 + - col0 DIV + 71 + + col1 AS col2 FROM tab2 cor0
----
-20
-63
24

skipif mysql # not compatible
query I rowsort label-9598
SELECT - col0 + - col0 / + 71 + + col1 AS col2 FROM tab2 cor0
----
-20
-63
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9599
SELECT + col2 * - CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-9599
SELECT + col2 * - CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + col1 * + ( - ( + col0 ) ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 43 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT + 15 + + col0 FROM tab2 AS cor0
----
22
93
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 43 * 64 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ae7a1370a8eeb2cb6144313344dcc171

query I rowsort
SELECT - col2 - + col1 * + cor0.col1 * + 73 FROM tab1 cor0
----
-12433
-49402
-7357

onlyif mysql # use DIV operator for integer division
query I rowsort label-9605
SELECT DISTINCT - ( - col0 ) + + col2 DIV 54 AS col2 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-9605
SELECT DISTINCT - ( - col0 ) + + col2 / 54 AS col2 FROM tab2
----
7
78
79

query I rowsort
SELECT - tab1.col0 * + col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT col0 * - col0 * + tab1.col1 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT tab0.col0 + tab0.col0 AS col1 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL + + 6 + col0 FROM tab1 AS cor0
----
70
86
9

query I rowsort
SELECT ALL - 59 * col2 AS col1 FROM tab2 AS cor0
----
-1534
-1593
-2242

onlyif mysql # use DIV operator for integer division
query I rowsort label-9611
SELECT + - col1 * col0 + 14 * col1 DIV col2 FROM tab0 AS cor0
----
-2028
-2037
-8084

skipif mysql # not compatible
query I rowsort label-9611
SELECT + - col1 * col0 + 14 * col1 / col2 FROM tab0 AS cor0
----
-2028
-2037
-8084

query I rowsort
SELECT DISTINCT + + 55 + - col2 FROM tab0 AS cor0
----
-27
22
54

query I rowsort
SELECT ALL - + ( col1 ) * cor0.col1 + col0 * cor0.col0 FROM tab0 AS cor0
----
-360
-6820
-8184

query I rowsort
SELECT - + col1 * col0 - + col0 * + col2 FROM tab2 AS cor0
----
-406
-4345
-6630

query I rowsort
SELECT ALL ( col1 ) + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ( + col0 + ( + col2 ) ) AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT 31 FROM tab2, tab2 cor0, tab1 AS cor1
----
31

query I rowsort
SELECT ALL - - cor0.col0 * + 44 - + col1 FROM tab0 AS cor0
----
1443
3825
970

query I rowsort
SELECT DISTINCT - col1 - col1 * 12 FROM tab1 AS cor0
----
-130
-169
-338

query I rowsort
SELECT + - col0 * + 98 - - col0 AS col0 FROM tab1 AS cor0
----
-291
-6208
-7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-9621
SELECT DISTINCT col0 DIV + col1 - + tab1.col1 AS col0 FROM tab1
----
-26
-4
-7

skipif mysql # not compatible
query I rowsort label-9621
SELECT DISTINCT col0 / + col1 - + tab1.col1 AS col0 FROM tab1
----
-26
-4
-7

query I rowsort
SELECT - ( + col1 + col2 ) * - tab0.col2 AS col2 FROM tab0
----
14186
3927
98

query I rowsort
SELECT 89 AS col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 * col1 col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT DISTINCT col0 + ( 54 ) FROM tab2
----
132
133
61

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab0 cor1, tab2, tab2 cor2
----
3645 values hashing to c9ee6ec1bc8c6eb5f95042f98a50bd57

query I rowsort
SELECT - + col1 + - 97 FROM tab1 AS cor0
----
-107
-110
-123

query I rowsort
SELECT - ( - tab2.col2 * + col0 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT ( 74 ) * col0 FROM tab0 AS cor0
----
1776
2590
6586

query I rowsort
SELECT DISTINCT 89 * col0 FROM tab0
----
2136
3115
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 61 ) col2 FROM tab1
----
-61

query I rowsort
SELECT cor0.col0 - col1 * - cor0.col1 FROM tab1 cor0
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-9633
SELECT + cor0.col0 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9633
SELECT + cor0.col0 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - - col2 + + col2 * col2 AS col1 FROM tab1 cor0
----
2970
3306
9312

query I rowsort
SELECT - + 90 * - col0 - col1 * - col0 AS col0 FROM tab0 AS cor0
----
16109
4224
6545

query I rowsort
SELECT DISTINCT col1 * + col2 + + 38 FROM tab0 AS cor0
----
135
2876
7500

query I rowsort
SELECT ALL col0 * + 79 AS col1 FROM tab0
----
1896
2765
7031

onlyif mysql # use DIV operator for integer division
query I rowsort label-9638
SELECT ALL col1 + - col1 DIV + cor0.col0 + + 62 DIV + col0 FROM tab2 AS cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-9638
SELECT ALL col1 + - col1 / + cor0.col0 + + 62 / + col0 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT DISTINCT - col2 * col0 - - ( - col2 ) AS col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT DISTINCT col0 + - 27 FROM tab0
----
-3
62
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * + col0 col0 FROM tab2 cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-9642
SELECT - col2 + - ( + col0 + cor0.col2 ) DIV col1 FROM tab0 AS cor0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-9642
SELECT - col2 + - ( + col0 + cor0.col2 ) / col1 FROM tab0 AS cor0
----
-1
-33
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * cor0.col2 col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + cor0.col0 * 29 FROM tab2, tab0 AS cor0
----
9 values hashing to 54bc59094b2661807c1d12f560e4953b

query I rowsort
SELECT DISTINCT - ( - 15 ) FROM tab1, tab0 AS cor0
----
15

query I rowsort
SELECT ALL cor0.col0 * 97 FROM tab2, tab0 AS cor0
----
9 values hashing to e30a30007d8f2794e2c4dddc0f207e12

query I rowsort
SELECT DISTINCT + col1 * col2 + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL col1 * - col2 + - 23 * 35 AS col0 FROM tab1 AS cor0
----
-1375
-2053
-2209

query I rowsort
SELECT DISTINCT - + col0 + - col2 * 85 FROM tab2 AS cor0
----
-2288
-2302
-3309

query I rowsort
SELECT - col1 + col1 + + tab0.col0 * tab0.col1 * - col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT - col1 * + col0 + col0 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT 7 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

onlyif mysql # use DIV operator for integer division
query I rowsort label-9653
SELECT - col1 DIV + col1 + col1 - + col2 FROM tab0 AS cor0
----
52
8
95

skipif mysql # not compatible
query I rowsort label-9653
SELECT - col1 / + col1 + col1 - + col2 FROM tab0 AS cor0
----
52
8
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9654
SELECT - col2 + + CAST( col0 AS SIGNED ) AS col0 FROM tab1 cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-9654
SELECT - col2 + + CAST ( col0 AS INTEGER ) AS col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT 21 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9656
SELECT ALL + + col1 * 77 DIV col0 AS col0 FROM tab0 AS cor0
----
213
275
78

skipif mysql # not compatible
query I rowsort label-9656
SELECT ALL + + col1 * 77 / col0 AS col0 FROM tab0 AS cor0
----
213
275
78

query I rowsort
SELECT ALL col1 + + 97 + col2 * + col1 FROM tab1
----
1358
1527
677

query I rowsort
SELECT + col2 + - col1 * + col0 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-9659
SELECT ( 89 ) * col0 + col1 DIV col2 FROM tab1 AS cor0
----
267
5696
7120

skipif mysql # not compatible
query I rowsort label-9659
SELECT ( 89 ) * col0 + col1 / col2 FROM tab1 AS cor0
----
267
5696
7120

query I rowsort
SELECT ALL - + 18 FROM tab2 AS cor0
----
-18
-18
-18

query I rowsort
SELECT - - ( - 16 ) * col0 FROM tab1 AS cor0
----
-1024
-1280
-48

query I rowsort
SELECT - - 73 * + col2 + col1 AS col0 FROM tab2 AS cor0
----
1957
2002
2791

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + 36 col2 FROM tab1 cor0
----
46
49
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - cor0.col0 ) + col0 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 75 * 14 AS col2 FROM tab1 AS cor0
----
1050
1050
1050

query I rowsort
SELECT ALL + col2 * + 35 AS col0 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT + + 61 + + 15 * col1 FROM tab1 AS cor0
----
211
256
451

query I rowsort
SELECT DISTINCT - col0 * - col2 + col0 * - col1 * - col2 FROM tab2 AS cor0
----
121680
54036
6048

query I rowsort
SELECT - - cor0.col2 * + col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL 96 AS col2 FROM tab0 AS cor0
----
96
96
96

query I rowsort
SELECT DISTINCT col1 * col1 * col2 + + col0 * col0 FROM tab2
----
17223
25996
96590

query I rowsort
SELECT ALL col0 + + ( - ( col1 ) ) FROM tab1
----
-23
54
67

query I rowsort
SELECT - cor0.col2 + 0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - + 84 + - 17 * col0 AS col0 FROM tab2 AS cor0
----
-1410
-1427
-203

query I rowsort
SELECT - - col1 * - cor0.col0 + - col2 * ( + 85 ) AS col2 FROM tab1 AS cor0
----
-4668
-5485
-9200

query I rowsort
SELECT ALL - - ( + 16 ) FROM tab0 AS cor0
----
16
16
16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * - cor0.col2 + col0 col0 FROM tab1 cor0
----
-2913
-3185
-9136

query I rowsort
SELECT - col2 * col0 * col0 + + col2 - cor0.col2 * + col1 AS col0 FROM tab0 AS cor0
----
-1321
-21813
-656902

onlyif mysql # use DIV operator for integer division
query I rowsort label-9679
SELECT 51 DIV col1 - - col2 * ( cor0.col2 ) FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-9679
SELECT 51 / col1 - - col2 * ( cor0.col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - + col1 + - 92 FROM tab2 AS cor0
----
-109
-123
-151

query I rowsort
SELECT - col2 + + 34 * col2 AS col2 FROM tab0 AS cor0
----
1089
2706
33

query I rowsort
SELECT + col2 * col1 * - col1 AS col0 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT col0 * cor0.col0 * - 53 + 10 * + col1 AS col1 FROM tab1 AS cor0
----
-216988
-217
-339070

query I rowsort
SELECT - + col1 + - col2 * + col0 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT - 20 * - col1 AS col2 FROM tab1 AS cor0
----
200
260
520

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab1, tab2, tab2 AS cor0, tab0 cor1
----
-86
-91
-97

query I rowsort
SELECT ALL + col1 + + ( - col2 ) + 11 * col1 AS col0 FROM tab2
----
166
345
682

query I rowsort
SELECT ALL - col1 * + col1 * col2 + col0 AS col0 FROM tab0
----
-244044
-678953
-9374

query I rowsort
SELECT DISTINCT - + cor0.col1 AS col1 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9690
SELECT DISTINCT - cor0.col0 + + col2 DIV 50 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-9690
SELECT DISTINCT - cor0.col0 + + col2 / 50 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT ALL + cor0.col0 * + col0 + - col1 FROM tab2 AS cor0
----
18
6025
6224

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9692
SELECT ALL + cor0.col1 + + CAST( NULL AS SIGNED ) * ( + col1 ) + - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9692
SELECT ALL + cor0.col1 + + CAST ( NULL AS INTEGER ) * ( + col1 ) + - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9693
SELECT - col2 DIV + col1 + + col1 * col1 - 57 FROM tab0 AS cor0
----
7339
8224
9352

skipif mysql # not compatible
query I rowsort label-9693
SELECT - col2 / + col1 + + col1 * col1 - 57 FROM tab0 AS cor0
----
7339
8224
9352

query I rowsort
SELECT DISTINCT col1 + - col2 * col2 AS col1 FROM tab1
----
-2890
-3239
-9203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9695
SELECT col0 + + CAST( col0 AS SIGNED ) * col2 - + col1 * col2 AS col1 FROM tab2 cor0
----
-641
2435
572

skipif mysql # not compatible
query I rowsort label-9695
SELECT col0 + + CAST ( col0 AS INTEGER ) * col2 - + col1 * col2 AS col1 FROM tab2 cor0
----
-641
2435
572

query I rowsort
SELECT DISTINCT + cor0.col1 * + 45 + - ( - col2 ) * - 22 + + col2 * - col0 FROM tab1 AS cor0
----
-180
-4452
-9207

onlyif mysql # use DIV operator for integer division
query I rowsort label-9697
SELECT - col1 DIV - 82 + + col2 DIV col0 + - col2 col1 FROM tab0 AS cor0
----
-31
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9697
SELECT - col1 / - 82 + + col2 / col0 + - col2 col1 FROM tab0 AS cor0
----
-31
-81
0

query I rowsort
SELECT col2 * 52 AS col0 FROM tab2
----
1352
1404
1976

query I rowsort
SELECT col1 * tab1.col0 * + 88 AS col1 FROM tab1
----
56320
6864
91520

query I rowsort
SELECT + col0 * col1 * - col1 AS col2 FROM tab2
----
-22831
-271518
-6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 col1 FROM tab1 cor0
----
60
60
60

query I rowsort
SELECT + cor0.col1 + - 34 FROM tab1 AS cor0
----
-21
-24
-8

query I rowsort
SELECT + col1 + 81 * - cor0.col1 * col1 AS col0 FROM tab2 AS cor0
----
-23392
-281902
-77810

query I rowsort
SELECT + col2 * - col0 + - 64 AS col1 FROM tab0 AS cor0
----
-7362
-856
-99

query I rowsort
SELECT col0 * 53 FROM tab0 AS cor0
----
1272
1855
4717

query I rowsort
SELECT ALL - - cor0.col2 + 32 - 27 * + cor0.col0 * 91 AS col0 FROM tab0 AS cor0
----
-218559
-58903
-85962

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 + - CAST ( + cor0.col0 AS REAL ) + cor0.col0 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col2 + ( + col0 ) * col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT - col2 * ( + col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col0 + ( col2 * + col2 ) FROM tab2 AS cor0
----
1365
598
722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + 23 col0 FROM tab1 AS cor0
----
119
77
80

query I rowsort
SELECT - + col2 * - 64 FROM tab2 AS cor0
----
1664
1728
2432

query I rowsort
SELECT DISTINCT + col0 + + col1 * - col1 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT col1 + + col2 * + col0 AS col2 FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT tab2.col0 - - col2 AS col0 FROM tab2
----
104
117
34

query III rowsort
SELECT ALL * FROM tab2 WHERE - col2 IN ( col1 * - tab2.col2 * - col1 - col0 * - col2 )
----

query I rowsort
SELECT ALL + col0 + tab1.col0 AS col2 FROM tab1
----
128
160
6

query III rowsort
SELECT * FROM tab1 WHERE NOT - col0 * + col2 NOT IN ( col0 )
----

query I rowsort
SELECT ALL + col1 - tab0.col2 * + col0 * + col1 AS col1 FROM tab0
----
-3298
-664027
-68026

onlyif mysql # use DIV operator for integer division
query I rowsort label-9720
SELECT + col2 DIV - col0 col2 FROM tab2
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9720
SELECT + col2 / - col0 col2 FROM tab2
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + tab0.col0 * + col1 + - col2 col2 FROM tab0
----
2117
3491
8108

query I rowsort
SELECT - col0 * - col0 + - col2 + - col0 * + tab2.col0 AS col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL - col2 + + col2 * + col2 * tab2.col1 FROM tab2
----
22572
24510
39858

query I rowsort
SELECT col0 * - tab0.col0 * - tab0.col0 FROM tab0
----
13824
42875
704969

query I rowsort
SELECT - 8 * cor0.col1 FROM tab2 AS cor0
----
-136
-248
-472

query I rowsort
SELECT - col1 * col0 * ( - col2 + col2 ) AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 79 * col1 AS col1 FROM tab1 AS cor0
----
-1027
-2054
-790

onlyif mysql # use DIV operator for integer division
query I rowsort label-9728
SELECT DISTINCT 15 + col1 + - ( col1 ) DIV + cor0.col2 FROM tab0 AS cor0
----
105
15
99

skipif mysql # not compatible
query I rowsort label-9728
SELECT DISTINCT 15 + col1 + - ( col1 ) / + cor0.col2 FROM tab0 AS cor0
----
105
15
99

query I rowsort
SELECT DISTINCT col2 * col1 * ( + col2 ) AS col0 FROM tab1
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-9730
SELECT + ( col2 ) DIV + 35 AS col2 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9730
SELECT + ( col2 ) / + 35 AS col2 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT - col1 + col0 * 94 FROM tab0 cor0
----
2170
3193
8275

onlyif mysql # use DIV operator for integer division
query I rowsort label-9732
SELECT - ( col1 ) + - col0 DIV 32 AS col2 FROM tab1 AS cor0
----
-12
-15
-26

skipif mysql # not compatible
query I rowsort label-9732
SELECT - ( col1 ) + - col0 / 32 AS col2 FROM tab1 AS cor0
----
-12
-15
-26

query I rowsort
SELECT DISTINCT + ( col1 ) * col0 + - 44 FROM tab2 cor0
----
1299
173
4558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 54 + + col1 col2 FROM tab2 AS cor0
----
113
71
85

query I rowsort
SELECT ALL + + ( col0 ) * - col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9736
SELECT DISTINCT 75 + col0 DIV col0 AS col0 FROM tab0 AS cor0
----
76

skipif mysql # not compatible
query I rowsort label-9736
SELECT DISTINCT 75 + col0 / col0 AS col0 FROM tab0 AS cor0
----
76

query I rowsort
SELECT ALL - col2 * + col1 * col2 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL cor0.col1 - cor0.col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + 93 + + col2 FROM tab1 AS cor0
----
147
150
189

query I rowsort
SELECT 3 * cor0.col1 AS col2 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT - col2 * - 48 AS col2 FROM tab1 AS cor0
----
2592
2736
4608

query I rowsort
SELECT ALL + + col0 * 28 AS col1 FROM tab0 AS cor0
----
2492
672
980

onlyif mysql # use DIV operator for integer division
query I rowsort label-9743
SELECT ALL + 95 - - col0 DIV 24 col1 FROM tab0
----
96
96
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9743
SELECT ALL + 95 - - col0 / 24 col1 FROM tab0
----
96
96
98

query I rowsort
SELECT ALL - 19 * 15 + - col1 FROM tab2 cor0
----
-302
-316
-344

query I rowsort
SELECT ALL + 66 * cor0.col0 + - col1 FROM tab1 AS cor0
----
172
4214
5267

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9747
SELECT - CAST( + col1 AS SIGNED ) * - col1 + col0 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

skipif mysql # not compatible
query I rowsort label-9747
SELECT - CAST ( + col1 AS INTEGER ) * - col1 + col0 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( + 73 ) col0 FROM tab1
----
3942
4161
7008

onlyif mysql # use DIV operator for integer division
query I rowsort label-9749
SELECT col1 + - col0 DIV col0 AS col0 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-9749
SELECT col1 + - col0 / col0 AS col0 FROM tab2
----
16
30
58

query I rowsort
SELECT ALL 51 * - ( + col2 ) AS col1 FROM tab1
----
-2754
-2907
-4896

query I rowsort
SELECT DISTINCT - 22 FROM tab2, tab0 cor0, tab2 AS cor1, tab2 AS cor2
----
-22

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab0
----
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9753
SELECT ( - col0 ) / - col1 + - CAST( NULL AS DECIMAL ) * - col2 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9753
SELECT ( - col0 ) / - col1 + - CAST ( NULL AS REAL ) * - col2 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + 14 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * + cor0.col1 + col0 * col2 col2 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT - col0 + + col1 AS col1 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT ALL - cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9758
SELECT ALL CAST( NULL AS SIGNED ) + cor0.col1 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-9758
SELECT ALL CAST ( NULL AS INTEGER ) + cor0.col1 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col0 + ( - col1 ) FROM tab2
----
-137
-38
-96

query I rowsort
SELECT tab2.col2 * col2 + col1 * col1 * + tab2.col0 AS col0 FROM tab2
----
24275
272194
7456

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + 11 col1 FROM tab2 AS cor0
----
187
341
649

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col0 col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - col2 * - ( - col1 ) + col2 * 3 AS col2 FROM tab1 AS cor0
----
1536
1566
741

onlyif mysql # use DIV operator for integer division
query I rowsort label-9764
SELECT + 40 DIV - tab2.col1 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to ccd77e2770d5a834e59c1674defa88fa

skipif mysql # not compatible
query I rowsort label-9764
SELECT + 40 / - tab2.col1 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to ccd77e2770d5a834e59c1674defa88fa

query I rowsort
SELECT DISTINCT + col2 * - col2 + 2 + cor0.col1 * - ( + cor0.col0 ) * col0 AS col1 FROM tab0 AS cor0
----
-118824
-50623
-727533

query I rowsort
SELECT 7 + col2 FROM tab0
----
40
8
89

query I rowsort
SELECT + 54 * - col0 AS col1 FROM tab0
----
-1296
-1890
-4806

query I rowsort
SELECT col1 * tab2.col2 + + col0 AS col2 FROM tab2
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) * col2 * + cor0.col1 + col1 * + 42 col1 FROM tab2 cor0
----
122130
51748
7161

query I rowsort
SELECT + + 57 * col0 AS col2 FROM tab2 AS cor0
----
399
4446
4503

query I rowsort
SELECT - ( tab0.col1 * + tab0.col1 ) FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT 42 + col1 * tab2.col1 FROM tab2
----
1003
331
3523

onlyif mysql # use DIV operator for integer division
query I rowsort label-9773
SELECT + + col2 + col1 DIV col1 AS col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-9773
SELECT + + col2 + col1 / col1 AS col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT col0 * cor0.col2 + cor0.col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT - cor0.col0 + cor0.col1 * - col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT - col1 * col2 + + col1 + + ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
-1139
-1324
-503

query I rowsort
SELECT 25 * - tab2.col1 * ( + tab2.col1 ) FROM tab2
----
-24025
-7225
-87025

query I rowsort
SELECT ALL - col0 * col1 - 7 AS col1 FROM tab1 AS cor0
----
-1047
-647
-85

query I rowsort
SELECT DISTINCT - col1 + - cor0.col2 * + col0 AS col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT + col0 + col0 + - col0 * + 13 AS col1 FROM tab0 AS cor0
----
-264
-385
-979

query I rowsort
SELECT ALL col0 + - col2 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - col2 * cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-157464
-185193
-884736

query I rowsort
SELECT - 35 * col1 FROM tab2 AS cor0
----
-1085
-2065
-595

query I rowsort
SELECT + col2 + col0 * + tab2.col2 + tab2.col1 FROM tab2
----
2113
247
3057

query I rowsort
SELECT ALL + 1 * col0 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT ( - tab2.col2 ) AS col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL col2 * + col2 + 58 AS col1 FROM tab0
----
1147
59
6782

query I rowsort
SELECT col1 + col1 * 69 * col0 FROM tab0 AS cor0
----
142502
234352
558922

query I rowsort
SELECT + + 89 * - col2 * col2 AS col2 FROM tab1 AS cor0
----
-259524
-289161
-820224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + cor0.col0 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + - 83 * + col1 + col2 FROM tab0 cor0
----
-7105
-7471
-8050

query I rowsort
SELECT col2 + col1 * col1 + col0 AS col0 FROM tab1 cor0
----
221
345
733

query I rowsort
SELECT col1 + 89 * + ( col1 ) + cor0.col0 AS col0 FROM tab1 AS cor0
----
1250
2343
964

query I rowsort
SELECT DISTINCT - col1 + 20 FROM tab0 AS cor0
----
-66
-71
-77

query I rowsort
SELECT ALL - col2 + - col0 * 28 AS col0 FROM tab2 cor0
----
-2210
-223
-2250

query I rowsort
SELECT ALL + col2 * col2 + + ( + 23 ) AS col2 FROM tab0
----
1112
24
6747

onlyif mysql # use DIV operator for integer division
query I rowsort label-9797
SELECT + - col1 * 84 * - col1 + + col0 DIV col1 AS col2 FROM tab0 AS cor0
----
621264
695604
790356

skipif mysql # not compatible
query I rowsort label-9797
SELECT + - col1 * 84 * - col1 + + col0 / col1 AS col2 FROM tab0 AS cor0
----
621264
695604
790356

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 10 + - col1 col1 FROM tab1
----
-16
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9799
SELECT - 13 DIV + col0 FROM tab1
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-9799
SELECT - 13 / + col0 FROM tab1
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9800
SELECT ALL - ( col1 ) + + col1 DIV col2 col2 FROM tab0
----
-84
-90
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9800
SELECT ALL - ( col1 ) + + col1 / col2 col2 FROM tab0
----
-84
-90
0

query I rowsort
SELECT - + col2 * + 37 * cor0.col2 + + col2 + col1 FROM tab0 cor0
----
-248615
-40174
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-9802
SELECT + col1 DIV 59 + col1 * + cor0.col1 FROM tab0 AS cor0
----
7397
8282
9410

skipif mysql # not compatible
query I rowsort label-9802
SELECT + col1 / 59 + col1 * + cor0.col1 FROM tab0 AS cor0
----
7397
8282
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col1 + col1 + col0 col1 FROM tab1 AS cor0
----
-1155
-1375
-496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - - col1 * - col2 col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT - 56 * - col1 * col1 + 61 FROM tab0 AS cor0
----
414237
463797
526965

query I rowsort
SELECT ALL - + 64 AS col0 FROM tab2 AS cor0
----
-64
-64
-64

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

query I rowsort
SELECT 17 + - col0 FROM tab0 AS cor0
----
-18
-7
-72

query I rowsort
SELECT ALL - ( 32 ) + col0 AS col2 FROM tab0 AS cor0
----
-8
3
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9810
SELECT + + col0 DIV 7 AS col2 FROM tab2 AS cor0
----
1
11
11

skipif mysql # not compatible
query I rowsort label-9810
SELECT + + col0 / 7 AS col2 FROM tab2 AS cor0
----
1
11
11

query I rowsort
SELECT DISTINCT 3 * + col0 AS col1 FROM tab1 AS cor0
----
192
240
9

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( col0 AS REAL ) * + col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT ( + col1 ) + + col0 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + 21 col2 FROM tab1 cor0
----
-43
-59
18

query I rowsort
SELECT ALL 44 * 26 AS col0 FROM tab0 AS cor0
----
1144
1144
1144

query I rowsort
SELECT DISTINCT + + col0 * - col0 + - col1 * ( ( - col2 ) ) AS col2 FROM tab0 cor0
----
-1128
-459
2262

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 5 + col0 col2 FROM tab1 AS cor0
----
69
8
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9818
SELECT ALL - CAST( tab0.col0 AS SIGNED ) AS col1 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9818
SELECT ALL - CAST ( tab0.col0 AS INTEGER ) AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT 83 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 5ced3720d5aeff0dd77d5059a38001b6

query I rowsort
SELECT ALL + + col1 * col0 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + tab0.col2 * - tab0.col0 AS col1 FROM tab0, tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT 50 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9823
SELECT DISTINCT + CAST( NULL AS SIGNED ) + 85 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9823
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + 85 FROM tab2 cor0
----
NULL

query I rowsort
SELECT col2 - - 50 * + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-2423
-304174
-312012

query I rowsort
SELECT - cor0.col2 - 68 * col2 AS col2 FROM tab0 AS cor0
----
-2277
-5658
-69

query I rowsort
SELECT ALL tab2.col0 + - cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 26e0a13f06b06526abc7ba6b9ede0485

query I rowsort
SELECT DISTINCT 62 - cor0.col0 FROM tab0, tab0 AS cor0
----
-27
27
38

query I rowsort
SELECT ( tab1.col1 ) AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + tab0.col1 - tab0.col2 FROM tab0
----
53
9
96

query I rowsort
SELECT + + 86 - - col0 AS col0 FROM tab0 AS cor0
----
110
121
175

query I rowsort
SELECT - col0 + col2 * + col2 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT DISTINCT 14 * - col2 * 31 AS col1 FROM tab2
----
-11284
-11718
-16492

query I rowsort
SELECT ALL + + col1 * - col1 + - ( col0 + + col2 ) * + ( col2 ) AS col1 FROM tab2 cor0
----
-1879
-4735
-6185

query I rowsort
SELECT ALL - - 30 + - col1 AS col0 FROM tab1 AS cor0
----
17
20
4

query I rowsort
SELECT - ( + col0 ) + - col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9836
SELECT DISTINCT + ( col2 ) - - col0 DIV 24 FROM tab0 AS cor0
----
2
34
85

skipif mysql # not compatible
query I rowsort label-9836
SELECT DISTINCT + ( col2 ) - - col0 / 24 FROM tab0 AS cor0
----
2
34
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col2 * col2 col0 FROM tab1 AS cor0
----
-2919
-3313
-9296

query I rowsort
SELECT ALL + col2 * col1 + cor0.col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL + - cor1.col0 * + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b460624d1c2c1007450ea637cc667d6b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9840
SELECT cor0.col1 * CAST( NULL AS SIGNED ) * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9840
SELECT cor0.col1 * CAST ( NULL AS INTEGER ) * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * - ( col2 ) AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + col0 * col1 * - col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - + col2 * col0 + - 26 FROM tab2 AS cor0
----
-2054
-215
-3028

query I rowsort
SELECT ALL - cor0.col1 * col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9845
SELECT + col2 + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9845
SELECT + col2 + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 + cor0.col2 * col0 AS col2 FROM tab0 cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 3 + + col2 * cor0.col1 col1 FROM tab0 AS cor0
----
-8
2766
7195

query I rowsort
SELECT DISTINCT - ( + col2 ) * + col1 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT + - 17 * - col1 + col0 * + 87 FROM tab0 AS cor0
----
3550
4694
9290

query I rowsort
SELECT DISTINCT cor1.col1 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT ALL - ( + 23 ) FROM tab1 AS cor0
----
-23
-23
-23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9852
SELECT ALL - CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT - cor0.col0 + - 53 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
-131
-132
-60

query I rowsort
SELECT + col1 * + col2 + + ( 21 ) FROM tab2 AS cor0
----
1555
667
858

query I rowsort
SELECT - col1 * + col2 AS col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - - col1 * + cor0.col0 + col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-9857
SELECT col1 DIV - col1 + - col1 FROM tab2 AS cor0
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-9857
SELECT col1 / - col1 + - col1 FROM tab2 AS cor0
----
-18
-32
-60

query I rowsort
SELECT - col1 * + col2 + + col2 FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT - + cor0.col0 * - col1 + + col2 FROM tab1 AS cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 89 * - col0 col2 FROM tab0 AS cor0
----
-2136
-3115
-7921

query I rowsort
SELECT + + 72 + col2 * col1 FROM tab2 AS cor0
----
1606
718
909

query I rowsort
SELECT ALL + 34 * + col1 + - cor0.col0 FROM tab1 AS cor0
----
276
362
881

query I rowsort
SELECT DISTINCT - col0 * col2 - cor0.col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + 6 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

query I rowsort
SELECT 13 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT ALL + cor0.col0 * + 63 FROM tab2 AS cor0
----
441
4914
4977

query I rowsort
SELECT - col0 + - col2 + + col1 AS col0 FROM tab2 AS cor0
----
-100
-3
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * tab0.col2 + 44 col2 FROM tab0
----
-7254
-748
9

query I rowsort
SELECT ALL ( col0 * - col2 ) + tab1.col2 + - col0 FROM tab1
----
-111
-3655
-7664

query I rowsort
SELECT DISTINCT + + 90 FROM tab1, tab0, tab1 AS cor0
----
90

query I rowsort
SELECT - ( 23 ) FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

query I rowsort
SELECT ALL - - ( - 15 ) * col0 FROM tab1 AS cor0
----
-1200
-45
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-9873
SELECT - col2 * col2 + cor0.col1 DIV col0 - + cor0.col2 FROM tab1 AS cor0
----
-2962
-3306
-9312

skipif mysql # not compatible
query I rowsort label-9873
SELECT - col2 * col2 + cor0.col1 / col0 - + cor0.col2 FROM tab1 AS cor0
----
-2962
-3306
-9312

query I rowsort
SELECT DISTINCT col1 + + tab0.col2 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - 98 + col2 * - col0 FROM tab2 AS cor0
----
-2126
-287
-3100

query I rowsort
SELECT - 68 * 68 FROM tab2 AS cor0
----
-4624
-4624
-4624

query I rowsort
SELECT ALL 33 + - col1 * - col1 FROM tab1 AS cor0
----
133
202
709

query I rowsort
SELECT - col2 + cor0.col1 * col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - 55 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
1430
550
715

query I rowsort
SELECT DISTINCT ( 19 ) + + col2 * col1 FROM tab1 cor0
----
1267
1423
589

query I rowsort
SELECT DISTINCT + + col2 * col0 + - col1 AS col0 FROM tab1 AS cor0
----
136
3638
7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9882
SELECT ALL + CAST( NULL AS SIGNED ) * + col2 + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9882
SELECT ALL + CAST ( NULL AS INTEGER ) * + col2 + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + cor0.col2 + col0 AS col1 FROM tab1 AS cor0
----
111
178
272

onlyif mysql # use DIV operator for integer division
query I rowsort label-9884
SELECT ALL 87 + - col2 DIV col0 FROM tab1 AS cor0
----
69
86
87

skipif mysql # not compatible
query I rowsort label-9884
SELECT ALL 87 + - col2 / col0 FROM tab1 AS cor0
----
69
86
87

query I rowsort
SELECT ( - 55 ) * col0 + - cor0.col2 FROM tab0 AS cor0
----
-1353
-1926
-4977

query I rowsort
SELECT col1 + - col0 - cor0.col2 AS col1 FROM tab0 AS cor0
----
-80
29
61

query I rowsort
SELECT ALL + ( + col1 ) * 94 - + col1 FROM tab1 AS cor0
----
1209
2418
930

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

query I rowsort
SELECT - 99 * 74 AS col0 FROM tab1
----
-7326
-7326
-7326

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col1 * + col2 + + col2 AS col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT + col0 * ( + ( - col1 ) ) AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9893
SELECT ALL - col0 DIV 18 FROM tab0 AS cor0
----
-1
-1
-4

skipif mysql # not compatible
query I rowsort label-9893
SELECT ALL - col0 / 18 FROM tab0 AS cor0
----
-1
-1
-4

query I rowsort
SELECT DISTINCT col1 + 42 * col1 AS col2 FROM tab0 AS cor0
----
3698
3913
4171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - ( - col0 + - col1 ) * - 27 col0 FROM tab0
----
-3003
-3565
-4942

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9896
SELECT - col0 + CAST( + col0 AS SIGNED ) AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9896
SELECT - col0 + CAST ( + col0 AS INTEGER ) AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - 14 AS col2 FROM tab2, tab2 AS cor0
----
-14

query I rowsort
SELECT col1 + + 26 FROM tab1
----
36
39
52

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + ( - col0 ) + col2 + CAST ( col1 AS REAL ) FROM tab2
----
-24
51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9900
SELECT + 25 DIV + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9900
SELECT + 25 / + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + ( + 77 ) AS col2 FROM tab2 AS cor0
----
77
77
77

query I rowsort
SELECT 28 + + col0 FROM tab2
----
106
107
35

query I rowsort
SELECT 17 * + col1 FROM tab2
----
1003
289
527

query I rowsort
SELECT ALL 15 * col2 FROM tab2
----
390
405
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col1 col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9906
SELECT DISTINCT - col0 DIV col1 + + col0 - - 33 DIV - col2 AS col1 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-9906
SELECT DISTINCT - col0 / col1 + + col0 - - 33 / - col2 AS col1 FROM tab1 AS cor0
----
3
58
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9907
SELECT + + col1 * + cor0.col2 + - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9907
SELECT + + col1 * + cor0.col2 + - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - col2 + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + + 33 + col2 AS col0 FROM tab1 AS cor0
----
129
87
90

query I rowsort
SELECT - 64 * + col2 AS col1 FROM tab1
----
-3456
-3648
-6144

query I rowsort
SELECT ALL - + col2 - 19 FROM tab0 AS cor0
----
-101
-20
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * - col0 + cor0.col1 + + col0 col1 FROM tab0 AS cor0
----
-682
-7118
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9913
SELECT - cor0.col1 + - CAST( col0 + col2 AS SIGNED ) * + cor0.col0 FROM tab0 AS cor0
----
-1357
-1454
-15310

skipif mysql # not compatible
query I rowsort label-9913
SELECT - cor0.col1 + - CAST ( col0 + col2 AS INTEGER ) * + cor0.col0 FROM tab0 AS cor0
----
-1357
-1454
-15310

query I rowsort
SELECT ALL col0 + 22 FROM tab2 AS cor0
----
100
101
29

query I rowsort
SELECT DISTINCT + - col0 * 95 - + col2 AS col1 FROM tab2 AS cor0
----
-692
-7436
-7543

query I rowsort
SELECT ALL + + col2 * + ( + 78 ) AS col1 FROM tab0 AS cor0
----
2574
6396
78

query I rowsort
SELECT DISTINCT - cor0.col1 * ( - col2 ) + - cor0.col1 AS col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL - col1 + 96 FROM tab2 AS cor0
----
37
65
79

query I rowsort
SELECT DISTINCT col0 * + ( col1 * + col1 ) FROM tab2 AS cor0
----
22831
271518
6727

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9920
SELECT - cor0.col2 + CAST( NULL AS SIGNED ) * col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9920
SELECT - cor0.col2 + CAST ( NULL AS INTEGER ) * col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 90 + col1 FROM tab2 AS cor0
----
107
121
149

query I rowsort
SELECT ALL + col0 + - col1 * + cor0.col1 FROM tab1 cor0
----
-36
-673
-89

query I rowsort
SELECT col2 * - col0 + + 55 AS col0 FROM tab0 AS cor0
----
-7243
-737
20

query I rowsort
SELECT ALL + - cor0.col0 * ( + cor0.col1 ) FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col1 * - col1 * - col0 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - col1 * - 87 + + 41 AS col0 FROM tab1 AS cor0
----
1172
2303
911

query I rowsort
SELECT - + tab0.col2 + - 14 AS col0 FROM tab2, tab1, tab0 AS cor0, tab0
----
81 values hashing to 138310d0580ed429a5438b717519b2b1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9928
SELECT col1 + + CAST( + ( col0 ) AS SIGNED ) * + col0 FROM tab1 AS cor0
----
35
4106
6413

skipif mysql # not compatible
query I rowsort label-9928
SELECT col1 + + CAST ( + ( col0 ) AS INTEGER ) * + col0 FROM tab1 AS cor0
----
35
4106
6413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9929
SELECT DISTINCT + col0 + CAST( col0 AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

skipif mysql # not compatible
query I rowsort label-9929
SELECT DISTINCT + col0 + CAST ( col0 AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - col1 + col2 * col1 AS col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL - cor0.col1 + - 38 * + 93 AS col2 FROM tab2 AS cor0
----
-3551
-3565
-3593

query I rowsort
SELECT DISTINCT 57 * col2 FROM tab2
----
1482
1539
2166

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab0, tab2, tab2 AS cor0
----
10

query I rowsort
SELECT DISTINCT - 23 + cor0.col0 AS col0 FROM tab0, tab2, tab0 AS cor0
----
1
12
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-9935
SELECT ALL col1 * + col2 DIV + col2 col2 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9935
SELECT ALL col1 * + col2 / + col2 col2 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9936
SELECT ALL - tab2.col2 DIV - col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9936
SELECT ALL - tab2.col2 / - col1 FROM tab2
----
0
0
2

query I rowsort
SELECT ALL - col1 * 21 - col1 AS col1 FROM tab0 AS cor0
----
-1892
-2002
-2134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( cor0.col2 ) + + col1 * col0 * col2 col1 FROM tab1 AS cor0
----
36537
4266
99936

query I rowsort
SELECT + col0 + + 95 FROM tab2 AS cor0
----
102
173
174

onlyif mysql # use DIV operator for integer division
query I rowsort label-9940
SELECT - + ( ( cor0.col1 ) ) + + col1 DIV col2 FROM tab0 AS cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-9940
SELECT - + ( ( cor0.col1 ) ) + + col1 / col2 FROM tab0 AS cor0
----
-84
-90
0

query I rowsort
SELECT col1 * 38 AS col1 FROM tab1
----
380
494
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 * - col1 * col2 col0 FROM tab0 cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - col0 * - 97 FROM tab0
----
2328
3395
8633

onlyif mysql # use DIV operator for integer division
query I rowsort label-9944
SELECT DISTINCT 38 * col0 DIV - col0 AS col0 FROM tab2
----
-38

skipif mysql # not compatible
query I rowsort label-9944
SELECT DISTINCT 38 * col0 / - col0 AS col0 FROM tab2
----
-38

query I rowsort
SELECT col0 + - ( - col1 ) * + ( - col1 ) AS col2 FROM tab0 AS cor0
----
-7372
-8192
-9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9946
SELECT + CAST( NULL AS SIGNED ) + - 44 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9946
SELECT + CAST ( NULL AS INTEGER ) + - 44 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 46 * - cor0.col1 FROM tab1 AS cor0
----
1196
460
598

query I rowsort
SELECT ALL + col2 + + col1 * ( - col2 ) FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT 59 + col1 AS col1 FROM tab1 cor0
----
69
72
85

query I rowsort
SELECT DISTINCT + + 40 FROM tab0 AS cor0
----
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-9951
SELECT ALL - col1 + + col2 DIV + col1 FROM tab2 cor0
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-9951
SELECT ALL - col1 + + col2 / + col1 FROM tab2 cor0
----
-15
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9952
SELECT ALL + col1 * col2 DIV col0 + + 9 * - col2 AS col1 FROM tab2
----
-124
-215
-334

skipif mysql # not compatible
query I rowsort label-9952
SELECT ALL + col1 * col2 / col0 + + 9 * - col2 AS col1 FROM tab2
----
-124
-215
-334

query I rowsort
SELECT ALL + 56 + - cor0.col1 FROM tab2 AS cor0
----
-3
25
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + - col2 * + 96 col1 FROM tab2 AS cor0
----
-2437
-2561
-3631

query I rowsort
SELECT ALL + col0 * - col0 + col0 AS col2 FROM tab0 cor0
----
-1190
-552
-7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 58 * - col0 col1 FROM tab0 AS cor0
----
-1392
-2030
-5162

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + cor0.col2 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + 82 * + col1 + ( + 5 ) * col2 FROM tab0 cor0
----
-6887
-7052
-7949

query I rowsort
SELECT ALL - + col1 - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT - col0 * col2 + + tab1.col0 AS col0 FROM tab1
----
-159
-3584
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-9962
SELECT DISTINCT + col2 DIV tab2.col0 - 38 FROM tab2
----
-35
-38

skipif mysql # not compatible
query I rowsort label-9962
SELECT DISTINCT + col2 / tab2.col0 - 38 FROM tab2
----
-35
-38

query I rowsort
SELECT + col0 * ( - col2 + + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-1280
-153
448

query I rowsort
SELECT + col1 * ( 86 ) FROM tab1 AS cor0
----
1118
2236
860

onlyif mysql # use DIV operator for integer division
query I rowsort label-9965
SELECT col1 DIV ( col1 ) FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9965
SELECT col1 / ( col1 ) FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT col1 + - 62 * + col0 AS col0 FROM tab0 AS cor0
----
-1402
-2073
-5427

query I rowsort
SELECT DISTINCT 24 * col2 + col1 - + ( - ( - col0 ) ) FROM tab2 AS cor0
----
605
672
850

query I rowsort
SELECT + ( + col1 ) * - cor0.col1 + 48 * - 61 FROM tab2 AS cor0
----
-3217
-3889
-6409

query I rowsort
SELECT cor1.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + + 58 - 29 FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT - - ( col2 ) * col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab0 AS cor0, tab0 cor1
----
1
33
82

query I rowsort
SELECT ALL - col2 * col0 + + col2 AS col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT 8 * col2 + col2 FROM tab1
----
486
513
864

query I rowsort
SELECT ALL + 26 * - col1 FROM tab1 AS cor0
----
-260
-338
-676

query I rowsort
SELECT + 54 * - cor0.col0 FROM tab0 AS cor0
----
-1296
-1890
-4806

onlyif mysql # use DIV operator for integer division
query I rowsort label-9977
SELECT ALL - col0 * col1 * cor0.col1 + + col0 DIV col1 AS col1 FROM tab1 AS cor0
----
-13514
-2028
-6394

skipif mysql # not compatible
query I rowsort label-9977
SELECT ALL - col0 * col1 * cor0.col1 + + col0 / col1 AS col1 FROM tab1 AS cor0
----
-13514
-2028
-6394

query I rowsort
SELECT ALL - ( + col1 ) + col0 * + col1 - + col2 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-110
-3018
-6653

query I rowsort
SELECT DISTINCT + col0 + col2 * col1 * col1 AS col1 FROM tab2 AS cor0
----
11061
25954
90584

query I rowsort
SELECT + + col2 - + col1 * + col1 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT - col2 - col0 * - col0 AS col1 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT + col2 * + col0 + + col0 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT ALL 31 * + col0 FROM tab1
----
1984
2480
93

query I rowsort
SELECT + ( + col2 ) * col2 * col1 + col2 FROM tab1 AS cor0
----
119904
32547
75870

query I rowsort
SELECT col2 + 64 AS col2 FROM tab1
----
118
121
160

query I rowsort
SELECT + tab0.col1 AS col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL 7 * - cor0.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to a3bebbadd8bd4475be0b876b798c4db6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9988
SELECT + CAST( NULL AS SIGNED ) * + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9988
SELECT + CAST ( NULL AS INTEGER ) * + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 53 * - col1 + + cor0.col0 FROM tab2 AS cor0
----
1650
3205
980

query I rowsort
SELECT - + 25 * + 69 + col2 * col1 AS col0 FROM tab1 AS cor0
----
-1155
-321
-477

query I rowsort
SELECT DISTINCT + + 63 * - 32 + + col2 AS col2 FROM tab1 AS cor0
----
-1920
-1959
-1962

query I rowsort
SELECT - col1 + + col0 * + col1 * - col1 AS col2 FROM tab1 AS cor0
----
-13533
-2054
-6410

query I rowsort
SELECT - ( + col1 ) + + cor0.col2 * - col0 * col0 FROM tab2 AS cor0
----
-1354
-158243
-237175

query I rowsort
SELECT ALL + ( - col1 ) * col0 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - 5 + + col2 * + col1 FROM tab0 AS cor0
----
2833
7457
92

query I rowsort
SELECT DISTINCT + 92 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1196
2392
920

query I rowsort
SELECT ALL - 23 * - col1 AS col0 FROM tab1
----
230
299
598

onlyif mysql # use DIV operator for integer division
query I rowsort label-9998
SELECT cor0.col1 * col1 DIV col0 AS col1 FROM tab1 AS cor0
----
1
2
225

skipif mysql # not compatible
query I rowsort label-9998
SELECT cor0.col1 * col1 / col0 AS col1 FROM tab1 AS cor0
----
1
2
225

query I rowsort
SELECT DISTINCT + col2 + - col0 + - col2 * - col2 * - col1 FROM tab1
----
-119792
-32497
-75765

